index.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * Multisite administration panel.
  4. *
  5. * @package WordPress
  6. * @subpackage Multisite
  7. * @since 3.0.0
  8. */
  9. /** Load WordPress Administration Bootstrap */
  10. require_once( dirname( __FILE__ ) . '/admin.php' );
  11. /** Load WordPress dashboard API */
  12. require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
  13. if ( ! current_user_can( 'manage_network' ) )
  14. wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
  15. $title = __( 'Dashboard' );
  16. $parent_file = 'index.php';
  17. $overview = '<p>' . __( 'Welcome to your Network Admin. This area of the Administration Screens is used for managing all aspects of your Multisite Network.' ) . '</p>';
  18. $overview .= '<p>' . __( 'From here you can:' ) . '</p>';
  19. $overview .= '<ul><li>' . __( 'Add and manage sites or users' ) . '</li>';
  20. $overview .= '<li>' . __( 'Install and activate themes or plugins' ) . '</li>';
  21. $overview .= '<li>' . __( 'Update your network' ) . '</li>';
  22. $overview .= '<li>' . __( 'Modify global network settings' ) . '</li></ul>';
  23. get_current_screen()->add_help_tab( array(
  24. 'id' => 'overview',
  25. 'title' => __( 'Overview' ),
  26. 'content' => $overview
  27. ) );
  28. $quick_tasks = '<p>' . __( 'The Right Now widget on this screen provides current user and site counts on your network.' ) . '</p>';
  29. $quick_tasks .= '<ul><li>' . __( 'To add a new user, <strong>click Create a New User</strong>.' ) . '</li>';
  30. $quick_tasks .= '<li>' . __( 'To add a new site, <strong>click Create a New Site</strong>.' ) . '</li></ul>';
  31. $quick_tasks .= '<p>' . __( 'To search for a user or site, use the search boxes.' ) . '</p>';
  32. $quick_tasks .= '<ul><li>' . __( 'To search for a user, <strong>enter an email address or username</strong>. Use a wildcard to search for a partial username, such as user&#42;.' ) . '</li>';
  33. $quick_tasks .= '<li>' . __( 'To search for a site, <strong>enter the path or domain</strong>.' ) . '</li></ul>';
  34. get_current_screen()->add_help_tab( array(
  35. 'id' => 'quick-tasks',
  36. 'title' => __( 'Quick Tasks' ),
  37. 'content' => $quick_tasks
  38. ) );
  39. get_current_screen()->set_help_sidebar(
  40. '<p><strong>' . __('For more information:') . '</strong></p>' .
  41. '<p>' . __('<a href="https://codex.wordpress.org/Network_Admin">Documentation on the Network Admin</a>') . '</p>' .
  42. '<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
  43. );
  44. wp_dashboard_setup();
  45. wp_enqueue_script( 'dashboard' );
  46. wp_enqueue_script( 'plugin-install' );
  47. add_thickbox();
  48. require_once( ABSPATH . 'wp-admin/admin-header.php' );
  49. ?>
  50. <div class="wrap">
  51. <h1><?php echo esc_html( $title ); ?></h1>
  52. <div id="dashboard-widgets-wrap">
  53. <?php wp_dashboard(); ?>
  54. <div class="clear"></div>
  55. </div><!-- dashboard-widgets-wrap -->
  56. </div><!-- wrap -->
  57. <?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>