Make WordPress Core


Ignore:
Timestamp:
10/21/2010 10:06:17 AM (16 years ago)
Author:
nacin
Message:

Dashboard widgets in the network admin. props PeteMall. see #15163.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r15849 r15878  
    5959
    6060        // WP Plugins Widget
    61         if ( is_blog_admin() && current_user_can( 'install_plugins' ) )
     61        if ( ( is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) ) )
    6262                wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' );
    6363
     
    101101
    102102        // Hook to register new widgets
    103         do_action( 'wp_dashboard_setup' );
    104 
    105103        // Filter widget order
    106         $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() );
     104        if ( is_network_admin() ) {
     105                do_action( 'wp_network_dashboard_setup' );
     106                $dashboard_widgets = apply_filters( 'wp_network_dashboard_widgets', array() );
     107        } else {
     108                do_action( 'wp_dashboard_setup' );
     109                $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() );
     110        }
    107111
    108112        foreach ( $dashboard_widgets as $widget_id ) {
Note: See TracChangeset for help on using the changeset viewer.