index.php 2.8 KB

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