| 1 |
<?php |
| 2 |
/** |
| 3 |
* WPSEO plugin file. |
| 4 |
* |
| 5 |
* @package WPSEO\Admin\Views |
| 6 |
* |
| 7 |
* @uses Yoast_Form $yform Form object. |
| 8 |
*/ |
| 9 |
|
| 10 |
if ( ! defined( 'WPSEO_VERSION' ) ) { |
| 11 |
header( 'Status: 403 Forbidden' ); |
| 12 |
header( 'HTTP/1.1 403 Forbidden' ); |
| 13 |
exit(); |
| 14 |
} |
| 15 |
|
| 16 |
echo '<p>' . esc_html__( 'Using this form you can reset a site to the default SEO settings.', 'wordpress-seo' ) . '</p>'; |
| 17 |
|
| 18 |
if ( get_blog_count() <= 100 ) { |
| 19 |
$network_admin = new Yoast_Network_Admin(); |
| 20 |
|
| 21 |
$yform->select( |
| 22 |
'site_id', |
| 23 |
__( 'Site ID', 'wordpress-seo' ), |
| 24 |
$network_admin->get_site_choices( false, true ), |
| 25 |
); |
| 26 |
} |
| 27 |
else { |
| 28 |
$yform->textinput( 'site_id', __( 'Site ID', 'wordpress-seo' ) ); |
| 29 |
} |
| 30 |
|
| 31 |
wp_nonce_field( 'wpseo-network-restore', 'restore_site_nonce', false ); |
| 32 |
echo '<button type="submit" name="action" value="' . esc_attr( Yoast_Network_Admin::RESTORE_SITE_ACTION ) . '" class="button button-primary">' . esc_html__( 'Restore site to defaults', 'wordpress-seo' ) . '</button>'; |
| 33 |
|