Ticket #15163: 15163.diff
| File 15163.diff, 6.3 KB (added by , 16 years ago) |
|---|
-
wp-admin/includes/dashboard.php
58 58 } 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 64 64 // QuickPress Widget … … 100 100 wp_add_dashboard_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_secondary', 'wp_dashboard_secondary_control' ); 101 101 102 102 // Hook to register new widgets 103 do_action( 'wp_dashboard_setup' ); 103 if ( is_network_admin() ) 104 do_action( 'wp_network_dashboard_setup' ); 105 else 106 do_action( 'wp_dashboard_setup' ); 104 107 105 108 // Filter widget order 106 109 $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); 110 $dashboard_widgets = apply_filters( 'wp_network_dashboard_widgets', $dashboard_widgets ); 107 111 108 112 foreach ( $dashboard_widgets as $widget_id ) { 109 113 $name = empty( $wp_registered_widgets[$widget_id]['all_link'] ) ? $wp_registered_widgets[$widget_id]['name'] : $wp_registered_widgets[$widget_id]['name'] . " <a href='{$wp_registered_widgets[$widget_id]['all_link']}' class='edit-box open-box'>" . __('View all') . '</a>'; -
wp-admin/js/common.dev.js
205 205 206 206 $('#screen-options-wrap').slideToggle('fast', function(){ 207 207 if ( $(this).hasClass('screen-options-open') ) { 208 $('#show-settings-link').css({'backgroundImage':'url(" images/screen-options-right.gif?ver=20100531")'});208 $('#show-settings-link').css({'backgroundImage':'url("/wp-admin/images/screen-options-right.gif?ver=20100531")'}); 209 209 $('#contextual-help-link-wrap').css('visibility', ''); 210 210 $(this).removeClass('screen-options-open'); 211 211 } else { 212 $('#show-settings-link').css({'backgroundImage':'url(" images/screen-options-right-up.gif?ver=20100531")'});212 $('#show-settings-link').css({'backgroundImage':'url("/wp-admin/images/screen-options-right-up.gif?ver=20100531")'}); 213 213 $(this).addClass('screen-options-open'); 214 214 } 215 215 }); … … 223 223 224 224 $('#contextual-help-wrap').slideToggle('fast', function() { 225 225 if ( $(this).hasClass('contextual-help-open') ) { 226 $('#contextual-help-link').css({'backgroundImage':'url(" images/screen-options-right.gif?ver=20100531")'});226 $('#contextual-help-link').css({'backgroundImage':'url("/wp-admin/images/screen-options-right.gif?ver=20100531")'}); 227 227 $('#screen-options-link-wrap').css('visibility', ''); 228 228 $(this).removeClass('contextual-help-open'); 229 229 } else { 230 $('#contextual-help-link').css({'backgroundImage':'url(" images/screen-options-right-up.gif?ver=20100531")'});230 $('#contextual-help-link').css({'backgroundImage':'url("/wp-admin/images/screen-options-right-up.gif?ver=20100531")'}); 231 231 $(this).addClass('contextual-help-open'); 232 232 } 233 233 }); -
wp-admin/network/index.php
7 7 * @since 3.0.0 8 8 */ 9 9 10 /** Load WordPress Bootstrap */ 10 11 require_once( './admin.php' ); 11 12 13 /** Load WordPress dashboard API */ 14 require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); 15 12 16 if ( !is_multisite() ) 13 17 wp_die( __( 'Multisite support is not enabled.' ) ); 14 18 15 19 if ( ! current_user_can( 'manage_network' ) ) 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 21 25 add_contextual_help($current_screen, … … 28 32 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 29 33 ); 30 34 31 require_once( '../admin-header.php');35 wp_dashboard_setup(); 32 36 33 $c_users = get_user_count(); 34 $c_blogs = get_blog_count(); 37 wp_enqueue_script( 'dashboard' ); 38 wp_admin_css( 'dashboard' ); 39 add_thickbox(); 35 40 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 ) ); 41 add_screen_option('layout_columns', array('max' => 4, 'default' => 2) ); 38 42 39 $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); 43 require_once( '../admin-header.php' ); 44 40 45 ?> 41 46 42 47 <div class="wrap"> 43 <?php screen_icon(); ?>44 <h2><?php echo esc_html( $title ); ?></h2>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> 58 </div><!-- wrap --> 71 59 72 <?php do_action( 'mu_rightnow_end' ); ?>73 <?php do_action( 'mu_activity_box_end' ); ?>74 </div>75 76 60 <?php include( '../admin-footer.php' ); ?> -
wp-admin/network/index-extra.php
1 <?php 2 3 require_once( './admin.php' ); 4 5 require( '../index-extra.php' );