wp/wp-admin/network/index.php
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
equal deleted inserted replaced
8:c7c34916027a 9:177826044cd9
    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 ( ! current_user_can( 'manage_network' ) )
    16 if ( ! current_user_can( 'manage_network' ) ) {
    17 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
    17 	wp_die( __( 'Sorry, you are not allowed to access this page.' ), 403 );
       
    18 }
    18 
    19 
    19 $title = __( 'Dashboard' );
    20 $title       = __( 'Dashboard' );
    20 $parent_file = 'index.php';
    21 $parent_file = 'index.php';
    21 
    22 
    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>';
    23 $overview  = '<p>' . __( 'Welcome to your Network Admin. This area of the Administration Screens is used for managing all aspects of your Multisite Network.' ) . '</p>';
    23 $overview .= '<p>' . __( 'From here you can:' ) . '</p>';
    24 $overview .= '<p>' . __( 'From here you can:' ) . '</p>';
    24 $overview .= '<ul><li>' . __( 'Add and manage sites or users' ) . '</li>';
    25 $overview .= '<ul><li>' . __( 'Add and manage sites or users' ) . '</li>';
    25 $overview .= '<li>' . __( 'Install and activate themes or plugins' ) . '</li>';
    26 $overview .= '<li>' . __( 'Install and activate themes or plugins' ) . '</li>';
    26 $overview .= '<li>' . __( 'Update your network' ) . '</li>';
    27 $overview .= '<li>' . __( 'Update your network' ) . '</li>';
    27 $overview .= '<li>' . __( 'Modify global network settings' ) . '</li></ul>';
    28 $overview .= '<li>' . __( 'Modify global network settings' ) . '</li></ul>';
    28 
    29 
    29 get_current_screen()->add_help_tab( array(
    30 get_current_screen()->add_help_tab(
    30 	'id'      => 'overview',
    31 	array(
    31 	'title'   => __( 'Overview' ),
    32 		'id'      => 'overview',
    32 	'content' => $overview
    33 		'title'   => __( 'Overview' ),
    33 ) );
    34 		'content' => $overview,
       
    35 	)
       
    36 );
    34 
    37 
    35 $quick_tasks = '<p>' . __( 'The Right Now widget on this screen provides current user and site counts on your network.' ) . '</p>';
    38 $quick_tasks  = '<p>' . __( 'The Right Now widget on this screen provides current user and site counts on your network.' ) . '</p>';
    36 $quick_tasks .= '<ul><li>' . __( 'To add a new user, <strong>click Create a New User</strong>.' ) . '</li>';
    39 $quick_tasks .= '<ul><li>' . __( 'To add a new user, <strong>click Create a New User</strong>.' ) . '</li>';
    37 $quick_tasks .= '<li>' . __( 'To add a new site, <strong>click Create a New Site</strong>.' ) . '</li></ul>';
    40 $quick_tasks .= '<li>' . __( 'To add a new site, <strong>click Create a New Site</strong>.' ) . '</li></ul>';
    38 $quick_tasks .= '<p>' . __( 'To search for a user or site, use the search boxes.' ) . '</p>';
    41 $quick_tasks .= '<p>' . __( 'To search for a user or site, use the search boxes.' ) . '</p>';
    39 $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>';
    42 $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>';
    40 $quick_tasks .= '<li>' . __( 'To search for a site, <strong>enter the path or domain</strong>.' ) . '</li></ul>';
    43 $quick_tasks .= '<li>' . __( 'To search for a site, <strong>enter the path or domain</strong>.' ) . '</li></ul>';
    41 
    44 
    42 get_current_screen()->add_help_tab( array(
    45 get_current_screen()->add_help_tab(
    43 	'id'      => 'quick-tasks',
    46 	array(
    44 	'title'   => __( 'Quick Tasks' ),
    47 		'id'      => 'quick-tasks',
    45 	'content' => $quick_tasks
    48 		'title'   => __( 'Quick Tasks' ),
    46 ) );
    49 		'content' => $quick_tasks,
       
    50 	)
       
    51 );
    47 
    52 
    48 get_current_screen()->set_help_sidebar(
    53 get_current_screen()->set_help_sidebar(
    49 	'<p><strong>' . __('For more information:') . '</strong></p>' .
    54 	'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
    50 	'<p>' . __('<a href="https://codex.wordpress.org/Network_Admin">Documentation on the Network Admin</a>') . '</p>' .
    55 	'<p>' . __( '<a href="https://codex.wordpress.org/Network_Admin">Documentation on the Network Admin</a>' ) . '</p>' .
    51 	'<p>' . __('<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>') . '</p>'
    56 	'<p>' . __( '<a href="https://wordpress.org/support/forum/multisite/">Support Forums</a>' ) . '</p>'
    52 );
    57 );
    53 
    58 
    54 wp_dashboard_setup();
    59 wp_dashboard_setup();
    55 
    60 
    56 wp_enqueue_script( 'dashboard' );
    61 wp_enqueue_script( 'dashboard' );