diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 5a5d2fb15..ceffea88c 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -58,7 +58,7 @@ function wp_dashboard_setup() { } // WP Plugins Widget - if ( is_blog_admin() && current_user_can( 'install_plugins' ) ) + if ( ( is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) ) ) wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' ); // QuickPress Widget @@ -100,10 +100,14 @@ function wp_dashboard_setup() { wp_add_dashboard_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_secondary', 'wp_dashboard_secondary_control' ); // Hook to register new widgets - do_action( 'wp_dashboard_setup' ); - // Filter widget order - $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); + if ( is_network_admin() ) { + do_action( 'wp_network_dashboard_setup' ); + $dashboard_widgets = apply_filters( 'wp_network_dashboard_widgets', array() ); + } else { + do_action( 'wp_dashboard_setup' ); + $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); + } foreach ( $dashboard_widgets as $widget_id ) { $name = empty( $wp_registered_widgets[$widget_id]['all_link'] ) ? $wp_registered_widgets[$widget_id]['name'] : $wp_registered_widgets[$widget_id]['name'] . " " . __('View all') . ''; diff --git a/wp-admin/network/index-extra.php b/wp-admin/network/index-extra.php new file mode 100644 index 000000000..d778541bc --- /dev/null +++ b/wp-admin/network/index-extra.php @@ -0,0 +1,5 @@ +' . __('Support Forums') . '

' ); +wp_dashboard_setup(); + +wp_enqueue_script( 'dashboard' ); +wp_admin_css( 'dashboard' ); +add_thickbox(); + +add_screen_option('layout_columns', array('max' => 4, 'default' => 2) ); + require_once( '../admin-header.php' ); -$c_users = get_user_count(); -$c_blogs = get_blog_count(); - -$user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); -$blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) ); - -$sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); ?>
- -

+ +

- -
+
-

- + -
-

- - - -

-
+
+
-
-

- - - - -

-
- - - -
+