Changeset 15878
- Timestamp:
- 10/21/2010 10:06:17 AM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r15849 r15878 59 59 60 60 // 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' ) ) ) 62 62 wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' ); 63 63 … … 101 101 102 102 // Hook to register new widgets 103 do_action( 'wp_dashboard_setup' );104 105 103 // 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 } 107 111 108 112 foreach ( $dashboard_widgets as $widget_id ) { -
trunk/wp-admin/network/index.php
r15481 r15878 8 8 */ 9 9 10 /** Load WordPress Bootstrap */ 10 11 require_once( './admin.php' ); 12 13 /** Load WordPress dashboard API */ 14 require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); 11 15 12 16 if ( !is_multisite() ) … … 16 20 wp_die( __( 'You do not have permission to access this page.' ) ); 17 21 18 $title = __( 'Network Admin' );22 $title = __( 'Network Dashboard' ); 19 23 $parent_file = 'index.php'; 20 24 … … 29 33 ); 30 34 35 wp_dashboard_setup(); 36 37 wp_enqueue_script( 'dashboard' ); 38 wp_admin_css( 'dashboard' ); 39 add_thickbox(); 40 41 add_screen_option('layout_columns', array('max' => 4, 'default' => 2) ); 42 31 43 require_once( '../admin-header.php' ); 32 44 33 $c_users = get_user_count();34 $c_blogs = get_blog_count();35 36 $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );37 $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) );38 39 $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );40 45 ?> 41 46 42 47 <div class="wrap"> 43 44 48 <?php screen_icon(); ?> 49 <h2><?php echo esc_html( $title ); ?></h2> 45 50 46 <ul class="subsubsub"> 47 <li><a href="sites.php#form-add-site"><?php _e( 'Create a New Site' ); ?></a> |</li> 48 <li><a href="users.php#form-add-user"><?php _e( 'Create a New User' ); ?></a></li> 49 </ul> 50 <br class="clear" /> 51 <div id="dashboard-widgets-wrap"> 51 52 52 <p class="youhave"><?php echo $sentence; ?></p> 53 <?php do_action( 'wpmuadminresult', '' ); ?> 53 <?php wp_dashboard(); ?> 54 54 55 <form name="searchform" action="users.php" method="get"> 56 <p> 57 <input type="hidden" name="action" value="users" /> 58 <input type="text" name="s" value="" size="17" /> 59 <input class="button" type="submit" name="submit" value="<?php esc_attr_e( 'Search Users' ); ?>" /> 60 </p> 61 </form> 55 <div class="clear"></div> 56 </div><!-- dashboard-widgets-wrap --> 62 57 63 <form name="searchform" action="sites.php" method="get"> 64 <p> 65 <input type="hidden" name="action" value="blogs" /> 66 <input type="hidden" name="searchaction" value="name" /> 67 <input type="text" name="s" value="" size="17" /> 68 <input class="button" type="submit" name="blog_name" value="<?php esc_attr_e( 'Search Sites' ); ?>" /> 69 </p> 70 </form> 71 72 <?php do_action( 'mu_rightnow_end' ); ?> 73 <?php do_action( 'mu_activity_box_end' ); ?> 74 </div> 58 </div><!-- wrap --> 75 59 76 60 <?php include( '../admin-footer.php' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.