wp/wp-admin/network/index.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
equal deleted inserted replaced
6:490d5cc509ed 7:cf61fcea0001
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
    11 require_once( dirname( __FILE__ ) . '/admin.php' );
    12 
    12 
    13 /** Load WordPress dashboard API */
    13 /** Load WordPress dashboard API */
    14 require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
    14 require_once( ABSPATH . 'wp-admin/includes/dashboard.php' );
    15 
    15 
    16 if ( !is_multisite() )
       
    17 	wp_die( __( 'Multisite support is not enabled.' ) );
       
    18 
       
    19 if ( ! current_user_can( 'manage_network' ) )
    16 if ( ! current_user_can( 'manage_network' ) )
    20 	wp_die( __( 'You do not have permission to access this page.' ), 403 );
    17 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    21 
    18 
    22 $title = __( 'Dashboard' );
    19 $title = __( 'Dashboard' );
    23 $parent_file = 'index.php';
    20 $parent_file = 'index.php';
    24 
    21 
    25 $overview = '<p>' . __( 'Welcome to your Network Admin. This area of the Administration Screens is used for managing all aspects of your Multisite Network.' ) . '</p>';
    22 $overview = '<p>' . __( 'Welcome to your Network Admin. This area of the Administration Screens is used for managing all aspects of your Multisite Network.' ) . '</p>';
    48 	'content' => $quick_tasks
    45 	'content' => $quick_tasks
    49 ) );
    46 ) );
    50 
    47 
    51 get_current_screen()->set_help_sidebar(
    48 get_current_screen()->set_help_sidebar(
    52 	'<p><strong>' . __('For more information:') . '</strong></p>' .
    49 	'<p><strong>' . __('For more information:') . '</strong></p>' .
    53 	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin" target="_blank">Documentation on the Network Admin</a>') . '</p>' .
    50 	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin">Documentation on the Network Admin</a>') . '</p>' .
    54 	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/" target="_blank">Support Forums</a>') . '</p>'
    51 	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
    55 );
    52 );
    56 
    53 
    57 wp_dashboard_setup();
    54 wp_dashboard_setup();
    58 
    55 
    59 wp_enqueue_script( 'dashboard' );
    56 wp_enqueue_script( 'dashboard' );
    63 require_once( ABSPATH . 'wp-admin/admin-header.php' );
    60 require_once( ABSPATH . 'wp-admin/admin-header.php' );
    64 
    61 
    65 ?>
    62 ?>
    66 
    63 
    67 <div class="wrap">
    64 <div class="wrap">
    68 <h2><?php echo esc_html( $title ); ?></h2>
    65 <h1><?php echo esc_html( $title ); ?></h1>
    69 
    66 
    70 <div id="dashboard-widgets-wrap">
    67 <div id="dashboard-widgets-wrap">
    71 
    68 
    72 <?php wp_dashboard(); ?>
    69 <?php wp_dashboard(); ?>
    73 
    70 
    74 <div class="clear"></div>
    71 <div class="clear"></div>
    75 </div><!-- dashboard-widgets-wrap -->
    72 </div><!-- dashboard-widgets-wrap -->
    76 
    73 
    77 </div><!-- wrap -->
    74 </div><!-- wrap -->
    78 
    75 
    79 <?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
    76 <?php
       
    77 wp_print_community_events_templates();
       
    78 include( ABSPATH . 'wp-admin/admin-footer.php' );