Changeset 21199
- Timestamp:
- 06/30/2012 12:54:05 PM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
-
menu.php (modified) (1 diff)
-
update-core.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu.php
r21198 r21199 35 35 36 36 if ( ! is_multisite() ) { 37 $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), 'update_core', 'update-core.php'); 37 if ( current_user_can( 'update_core' ) ) 38 $cap = 'update_core'; 39 elseif ( current_user_can( 'update_plugins' ) ) 40 $cap = 'update_plugins'; 41 else 42 $cap = 'update_themes'; 43 $submenu[ 'index.php' ][10] = array( sprintf( __('Updates %s'), "<span class='update-plugins count-{$update_data['counts']['total']}' title='{$update_data['title']}'><span class='update-count'>" . number_format_i18n($update_data['counts']['total']) . "</span></span>" ), $cap, 'update-core.php'); 44 unset( $cap ); 38 45 } 39 46 -
trunk/wp-admin/update-core.php
r20894 r21199 19 19 } 20 20 21 if ( ! current_user_can( 'update_core' ) )21 if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) ) 22 22 wp_die( __( 'You do not have sufficient permissions to update this site.' ) ); 23 23 … … 135 135 136 136 $updates = get_core_updates(); 137 ?> 138 <div class="wrap"> 139 <?php screen_icon('tools'); ?> 140 <h2><?php _e('WordPress Updates'); ?></h2> 141 <?php 137 142 138 if ( $upgrade_error ) { 143 139 echo '<div class="error"><p>'; … … 184 180 } 185 181 dismissed_updates(); 186 187 if ( current_user_can( 'update_plugins' ) )188 list_plugin_updates();189 if ( current_user_can( 'update_themes' ) )190 list_theme_updates();191 do_action('core_upgrade_preamble');192 echo '</div>';193 182 } 194 183 … … 455 444 wp_version_check(); 456 445 require_once(ABSPATH . 'wp-admin/admin-header.php'); 457 core_upgrade_preamble(); 446 ?> 447 <div class="wrap"> 448 <?php screen_icon('tools'); ?> 449 <h2><?php _e('WordPress Updates'); ?></h2> 450 <?php 451 if ( current_user_can( 'update_core' ) ) 452 core_upgrade_preamble(); 453 if ( current_user_can( 'update_plugins' ) ) 454 list_plugin_updates(); 455 if ( current_user_can( 'update_themes' ) ) 456 list_theme_updates(); 457 do_action('core_upgrade_preamble'); 458 echo '</div>'; 458 459 include(ABSPATH . 'wp-admin/admin-footer.php'); 459 460 460 461 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { 462 463 if ( ! current_user_can( 'update_core' ) ) 464 wp_die( __( 'You do not have sufficient permissions to update this site.' ) ); 465 461 466 check_admin_referer('upgrade-core'); 462 467
Note: See TracChangeset
for help on using the changeset viewer.