/wp-content/plugins/wordpress-seo/admin/pages/dashboard.php

https://bitbucket.org/carloskikea/helpet · PHP · 67 lines · 50 code · 12 blank · 5 comment · 5 complexity · c8ec23a024726dae0fe25770c76b6df5 MD5 · raw file

  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\Admin
  6. */
  7. if ( ! defined( 'WPSEO_VERSION' ) ) {
  8. header( 'Status: 403 Forbidden' );
  9. header( 'HTTP/1.1 403 Forbidden' );
  10. exit();
  11. }
  12. if ( filter_input( INPUT_GET, 'intro' ) ) {
  13. update_user_meta( get_current_user_id(), 'wpseo_seen_about_version', WPSEO_VERSION );
  14. require WPSEO_PATH . 'admin/views/about.php';
  15. return;
  16. }
  17. if ( isset( $_GET['allow_tracking'] ) && check_admin_referer( 'wpseo_activate_tracking', 'nonce' ) ) {
  18. WPSEO_Options::set( 'yoast_tracking', ( $_GET['allow_tracking'] === 'yes' ) );
  19. if ( isset( $_SERVER['HTTP_REFERER'] ) ) {
  20. wp_safe_redirect( $_SERVER['HTTP_REFERER'], 307 );
  21. exit;
  22. }
  23. }
  24. $yform = Yoast_Form::get_instance();
  25. $yform->admin_header( true, 'wpseo' );
  26. do_action( 'wpseo_all_admin_notices' );
  27. $tabs = new WPSEO_Option_Tabs( 'dashboard' );
  28. $tabs->add_tab(
  29. new WPSEO_Option_Tab(
  30. 'dashboard',
  31. __( 'Dashboard', 'wordpress-seo' ),
  32. array(
  33. 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-notification-center' ),
  34. 'save_button' => false,
  35. )
  36. )
  37. );
  38. $tabs->add_tab(
  39. new WPSEO_Option_Tab(
  40. 'features',
  41. __( 'Features', 'wordpress-seo' ),
  42. array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-features' ) )
  43. )
  44. );
  45. $tabs->add_tab(
  46. new WPSEO_Option_Tab(
  47. 'webmaster-tools',
  48. __( 'Webmaster Tools', 'wordpress-seo' ),
  49. array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-general-search-console' ) )
  50. )
  51. );
  52. do_action( 'wpseo_settings_tabs_dashboard', $tabs );
  53. $tabs->display( $yform );
  54. do_action( 'wpseo_dashboard' );
  55. $yform->admin_footer();