| 1 |
<?php |
| 2 |
/** |
| 3 |
* WPSEO plugin file. |
| 4 |
* |
| 5 |
* @package WPSEO\Admin\Views |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'WPSEO_VERSION' ) ) { |
| 9 |
header( 'Status: 403 Forbidden' ); |
| 10 |
header( 'HTTP/1.1 403 Forbidden' ); |
| 11 |
exit(); |
| 12 |
} |
| 13 |
|
| 14 |
if ( ! defined( 'WPSEO_NAMESPACES' ) || ! WPSEO_NAMESPACES ) { |
| 15 |
esc_html_e( 'Import of settings is only supported on servers that run PHP 5.3 or higher.', 'wordpress-seo' ); |
| 16 |
return; |
| 17 |
} |
| 18 |
?> |
| 19 |
<p id="settings-import-desc"> |
| 20 |
<?php |
| 21 |
printf( |
| 22 |
/* translators: 1: expands to Yoast SEO, 2: expands to Import settings. */ |
| 23 |
esc_html__( 'Import settings from another %1$s installation by pasting them here and clicking "%2$s".', 'wordpress-seo' ), |
| 24 |
'Yoast SEO', |
| 25 |
esc_html__( 'Import settings', 'wordpress-seo' ), |
| 26 |
); |
| 27 |
?> |
| 28 |
</p> |
| 29 |
|
| 30 |
<form |
| 31 |
action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#wpseo-import' ) ); ?>" |
| 32 |
method="post" |
| 33 |
accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>"> |
| 34 |
<?php wp_nonce_field( WPSEO_Import_Settings::NONCE_ACTION ); ?> |
| 35 |
<label class="yoast-inline-label" for="settings-import"> |
| 36 |
<?php |
| 37 |
printf( |
| 38 |
/* translators: %s expands to Yoast SEO */ |
| 39 |
esc_html__( '%s settings to import:', 'wordpress-seo' ), |
| 40 |
'Yoast SEO', |
| 41 |
); |
| 42 |
?> |
| 43 |
</label><br /> |
| 44 |
<textarea id="settings-import" rows="10" cols="140" name="settings_import" aria-describedby="settings-import-desc"></textarea><br/> |
| 45 |
<input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Import settings', 'wordpress-seo' ); ?>"/> |
| 46 |
</form> |
| 47 |
|