index.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 __DIR__ . '/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. }
  16. // Used in the HTML title tag.
  17. $title = __( 'Dashboard' );
  18. $parent_file = 'index.php';
  19. $overview = '<p>' . __( 'Welcome to your Network Admin. This area of the Administration Screens is used for managing all aspects of your Multisite Network.' ) . '</p>';
  20. $overview .= '<p>' . __( 'From here you can:' ) . '</p>';
  21. $overview .= '<ul><li>' . __( 'Add and manage sites or users' ) . '</li>';
  22. $overview .= '<li>' . __( 'Install and activate themes or plugins' ) . '</li>';
  23. $overview .= '<li>' . __( 'Update your network' ) . '</li>';
  24. $overview .= '<li>' . __( 'Modify global network settings' ) . '</li></ul>';
  25. get_current_screen()->add_help_tab(
  26. array(
  27. 'id' => 'overview',
  28. 'title' => __( 'Overview' ),
  29. 'content' => $overview,
  30. )
  31. );
  32. $quick_tasks = '<p>' . __( 'The Right Now widget on this screen provides current user and site counts on your network.' ) . '</p>';
  33. $quick_tasks .= '<ul><li>' . __( 'To add a new user, <strong>click Create a New User</strong>.' ) . '</li>';
  34. $quick_tasks .= '<li>' . __( 'To add a new site, <strong>click Create a New Site</strong>.' ) . '</li></ul>';
  35. $quick_tasks .= '<p>' . __( 'To search for a user or site, use the search boxes.' ) . '</p>';
  36. $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>';
  37. $quick_tasks .= '<li>' . __( 'To search for a site, <strong>enter the path or domain</strong>.' ) . '</li></ul>';
  38. get_current_screen()->add_help_tab(
  39. array(
  40. 'id' => 'quick-tasks',
  41. 'title' => __( 'Quick Tasks' ),
  42. 'content' => $quick_tasks,
  43. )
  44. );
  45. get_current_screen()->set_help_sidebar(
  46. '<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
  47. '<p>' . __( '<a href="https://wordpress.org/support/article/network-admin/">Documentation on the Network Admin</a>' ) . '</p>' .
  48. '<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
  49. );
  50. wp_dashboard_setup();
  51. wp_enqueue_script( 'dashboard' );
  52. wp_enqueue_script( 'plugin-install' );
  53. add_thickbox();
  54. require_once ABSPATH . 'wp-admin/admin-header.php';
  55. ?>
  56. <div class="wrap">
  57. <h1><?php echo esc_html( $title ); ?></h1>
  58. <div id="dashboard-widgets-wrap">
  59. <?php wp_dashboard(); ?>
  60. <div class="clear"></div>
  61. </div><!-- dashboard-widgets-wrap -->
  62. </div><!-- wrap -->
  63. <?php
  64. wp_print_community_events_templates();
  65. require_once ABSPATH . 'wp-admin/admin-footer.php';