| 1 |
<?php |
| 2 |
/** |
| 3 |
* WPSEO plugin file. |
| 4 |
* |
| 5 |
* @package WPSEO\Admin |
| 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 ( isset( $_GET['allow_tracking'] ) && check_admin_referer( 'wpseo_activate_tracking', 'nonce' ) ) { |
| 15 |
WPSEO_Options::set( 'yoast_tracking', ( $_GET['allow_tracking'] === 'yes' ) ); |
| 16 |
|
| 17 |
if ( isset( $_SERVER['HTTP_REFERER'] ) ) { |
| 18 |
wp_safe_redirect( wp_unslash( $_SERVER['HTTP_REFERER'] ), 307 ); |
| 19 |
exit; |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
$yform = Yoast_Form::get_instance(); |
| 24 |
$yform->admin_header( true, 'wpseo' ); |
| 25 |
|
| 26 |
do_action( 'wpseo_all_admin_notices' ); |
| 27 |
|
| 28 |
$dashboard_tabs = new WPSEO_Option_Tabs( 'dashboard' ); |
| 29 |
$dashboard_tabs->add_tab( |
| 30 |
new WPSEO_Option_Tab( |
| 31 |
'dashboard', |
| 32 |
__( 'Dashboard', 'wordpress-seo' ), |
| 33 |
[ |
| 34 |
'save_button' => false, |
| 35 |
] |
| 36 |
) |
| 37 |
); |
| 38 |
$dashboard_tabs->add_tab( |
| 39 |
new WPSEO_Option_Tab( |
| 40 |
'features', |
| 41 |
__( 'Features', 'wordpress-seo' ) |
| 42 |
) |
| 43 |
); |
| 44 |
$dashboard_tabs->add_tab( |
| 45 |
new WPSEO_Option_Tab( |
| 46 |
'integrations', |
| 47 |
__( 'Integrations', 'wordpress-seo' ) |
| 48 |
) |
| 49 |
); |
| 50 |
$dashboard_tabs->add_tab( |
| 51 |
new WPSEO_Option_Tab( |
| 52 |
'webmaster-tools', |
| 53 |
__( 'Webmaster Tools', 'wordpress-seo' ) |
| 54 |
) |
| 55 |
); |
| 56 |
|
| 57 |
do_action( 'wpseo_settings_tabs_dashboard', $dashboard_tabs ); |
| 58 |
|
| 59 |
$dashboard_tabs->display( $yform ); |
| 60 |
|
| 61 |
do_action( 'wpseo_dashboard' ); |
| 62 |
|
| 63 |
$yform->admin_footer(); |
| 64 |
|