HEX
Server: LiteSpeed
System: Linux cde4.duelhost.dk 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: dmhkjfau (1027)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/dmhkjfau/public_html/wp-content/plugins/wp-seopress/inc/admin/migrate/MigrationTools.php
<?php
/**
 * Migration Tools
 *
 * @package Migrate
 */

defined( 'ABSPATH' ) || exit( 'Please don&rsquo;t call the plugin directly. Thanks :)' );

/**
 * Migration tool
 *
 * @param string $plugin Plugin name.
 * @param array $details Plugin details.
 * @param bool $checked Checked.
 */
function seopress_migration_tool( $plugin, $details, $checked ) {
	$seo_title = 'SEOPress';
	if ( method_exists( seopress_get_service( 'ToggleOption' ), 'getToggleWhiteLabel' ) && '1' === seopress_get_service( 'ToggleOption' )->getToggleWhiteLabel() ) {
		$seo_title = function_exists( 'seopress_pro_get_service' ) && method_exists( seopress_pro_get_service( 'OptionPro' ), 'getWhiteLabelListTitle' ) && seopress_pro_get_service( 'OptionPro' )->getWhiteLabelListTitle() ? seopress_pro_get_service( 'OptionPro' )->getWhiteLabelListTitle() : 'SEOPress';
	}

	$html = '<div id="' . $plugin . '-migration-tool" class="postbox section-tool ' . ( $checked ? 'active' : '' ) . '" tabindex="-1">
        <div class="inside">
                <h3>' . /* translators: %s SEO plugin name */ sprintf( __( 'Import posts and terms (if available) metadata from %s', 'wp-seopress' ), $details['name'] ) . '</h3>

                <p>' . esc_html__( 'By clicking Migrate, we\'ll import:', 'wp-seopress' ) . '</p>

                <ul>';
	if ( 'yoast' === $plugin || 'rk' === $plugin || 'aio' === $plugin || 'surerank' === $plugin ) {
		$html .= '<li>' . esc_html__( 'Global settings', 'wp-seopress' ) . '</li>';
	}
				$html .= '<li>' . esc_html__( 'Title tags', 'wp-seopress' ) . '</li>
                <li>' . esc_html__( 'Meta description', 'wp-seopress' ) . '</li>
                <li>' . esc_html__( 'Facebook Open Graph tags (title, description and image thumbnail)', 'wp-seopress' ) . '</li>';
	if ( 'premium-seo-pack' !== $plugin ) {
		$html .= '<li>' . esc_html__( 'X tags (title, description and image thumbnail)', 'wp-seopress' ) . '</li>';
	}
	if ( 'wp-meta-seo' !== $plugin && 'seo-ultimate' !== $plugin ) {
		$html .= '<li>' . esc_html__( 'Meta Robots (noindex, nofollow...)', 'wp-seopress' ) . '</li>';
	}
	if ( 'wp-meta-seo' !== $plugin && 'seo-ultimate' !== $plugin && 'slim-seo' !== $plugin ) {
		$html .= '<li>' . esc_html__( 'Canonical URL', 'wp-seopress' ) . '</li>';
	}
	if ( 'wp-meta-seo' !== $plugin && 'seo-ultimate' !== $plugin && 'squirrly' !== $plugin && 'slim-seo' !== $plugin ) {
		$html .= '<li>' . esc_html__( 'Focus / target keywords', 'wp-seopress' ) . '</li>';
	}
	if ( 'wp-meta-seo' !== $plugin && 'premium-seo-pack' !== $plugin && 'seo-ultimate' !== $plugin && 'squirrly' !== $plugin && 'aio' !== $plugin && 'slim-seo' !== $plugin ) {
		$html .= '<li>' . esc_html__( 'Primary category', 'wp-seopress' ) . '</li>';
	}
	if ( 'smart-crawl' === $plugin || 'rk' === $plugin || 'seo-framework' === $plugin || 'aio' === $plugin ) {
		$html .= '<li>' . esc_html__( 'Redirect URL', 'wp-seopress' ) . '</li>';
	}
	if ( 'yoast' === $plugin ) {
		$html .= '<li>' . esc_html__( 'Breadcrumb Title', 'wp-seopress' ) . '</li>';
	}
				$html .= '</ul>

                <div class="seopress-notice is-warning">
                    <p>
                        ' . /* translators: %1$s defaut: SEOPress, %2$s competitor SEO plugin name */ sprintf( wp_kses_post( __( '<strong>WARNING:</strong> Migration will delete / update all <strong>%1$s posts and terms metadata</strong>, plus <strong>global settings</strong> (if applicable). Some dynamic variables will not be interpreted. We do <strong>NOT delete any %2$s data</strong>.', 'wp-seopress' ) ), $seo_title, $details['name'] ) . '
                    </p>
                </div>

                <button id="seopress-' . $plugin . '-migrate" type="button" class="btn btnSecondary">
                    ' . esc_html__( 'Migrate now', 'wp-seopress' ) . '
                </button>

                <span class="spinner" aria-hidden="true"></span>

                <div class="log" aria-live="polite"></div>
            </div>
        </div>';

	return $html;
}