aioseop_welcome

The WordPress Core aioseop welcome class.

Defined (1)

The class is defined in the following location(s).

/admin/display/welcome.php  
  1. class aioseop_welcome { 
  2. function __construct() { 
  3.  
  4. if ( AIOSEOPPRO ) { 
  5. return; 
  6.  
  7. add_action( 'admin_menu', array( $this, 'add_menus' ) ); 
  8. add_action( 'admin_head', array( $this, 'remove_pages' ) ); 
  9. add_action( 'admin_enqueue_scripts', array( $this, 'welcome_screen_assets' ) ); 
  10.  
  11.  
  12. function welcome_screen_assets( $hook ) { 
  13.  
  14. if ( 'dashboard_page_aioseop-about' == $hook ) { 
  15.  
  16. wp_enqueue_style( 'aioseop_welcome_css', AIOSEOP_PLUGIN_URL . '/css/welcome.css' ); 
  17. wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . '/js/welcome.js', array( 'jquery' ), AIOSEOP_VERSION, true ); 
  18.  
  19. function remove_pages() { 
  20. remove_submenu_page( 'index.php', 'aioseop-about' ); 
  21. remove_submenu_page( 'index.php', 'aioseop-credits' ); 
  22.  
  23. function add_menus() { 
  24. add_dashboard_page( 
  25. __( 'Welcome to All in One SEO Pack', 'all-in-one-seo-pack' ),  
  26. __( 'Welcome to All in One SEO Pack', 'all-in-one-seo-pack' ),  
  27. 'manage_options',  
  28. 'aioseop-about',  
  29. array( $this, 'about_screen' ) 
  30. ); 
  31.  
  32.  
  33. function init() { 
  34.  
  35. if ( AIOSEOPPRO ) { 
  36. return; 
  37.  
  38. if ( ! is_admin() ) { 
  39. return; 
  40.  
  41. if ( ! current_user_can( 'manage_options' ) ) { 
  42. return; 
  43.  
  44. wp_safe_redirect( add_query_arg( array( 'page' => 'aioseop-about' ), admin_url( 'index.php' ) ) ); 
  45. exit; 
  46.  
  47. function about_screen() { 
  48.  
  49. $version = AIOSEOP_VERSION; 
  50.  
  51. ?> 
  52.  
  53. <div class="wrap about-wrap"> 
  54. <h1><?php printf( esc_html__( 'Welcome to All in One SEO Pack %s', 'all-in-one-seo-pack' ), $version ); ?></h1> 
  55. <div 
  56. class="about-text"><?php printf( esc_html__( 'All in One SEO Pack %s contains new features, bug fixes, increased security, and tons of under the hood performance improvements.', 'all-in-one-seo-pack' ), $version ); ?></div> 
  57.  
  58. <h2 class="nav-tab-wrapper"> 
  59. <a class="nav-tab nav-tab-active" id="aioseop-about" 
  60. href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-about' ), 'index.php' ) ) ); ?>"> 
  61. <?php esc_html_e( 'What’s New', 'all-in-one-seo-pack' ); ?> 
  62. </a> 
  63. <a class="nav-tab" id="aioseop-credits" 
  64. href="<?php echo esc_url( admin_url( add_query_arg( array( 'page' => 'aioseop-credits' ), 'index.php' ) ) ); ?>"> 
  65. <?php esc_html_e( 'Credits', 'all-in-one-seo-pack' ); ?> 
  66. </a> 
  67. </h2> 
  68.  
  69.  
  70. <div id='sections'> 
  71. <section><?php include_once( AIOSEOP_PLUGIN_DIR . 'admin/display/welcome-content.php' ); ?></section> 
  72. <section><?php include_once( AIOSEOP_PLUGIN_DIR . 'admin/display/credits-content.php' ); ?></section> 
  73. </div> 
  74.  
  75. </div> 
  76.  
  77.  
  78. <?php 
  79.  
  80.