Changeset 12753 for trunk/wp-admin/includes/update.php
- Timestamp:
- 01/18/2010 10:21:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update.php
r12752 r12753 83 83 84 84 function core_update_footer( $msg = '' ) { 85 if ( is_multisite() && ! is_super_admin() )86 return false; 87 88 if ( !current_user_can(' manage_options') )85 if ( is_multisite() && !current_user_can('update_core') ) 86 return false; 87 88 if ( !current_user_can('update_core') ) 89 89 return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); 90 90 … … 105 105 106 106 case 'upgrade' : 107 if ( current_user_can('manage_options') ) { 108 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', 'update-core.php', $cur->current); 109 break; 110 } 107 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', 'update-core.php', $cur->current); 108 break; 111 109 112 110 case 'latest' : … … 119 117 120 118 function update_nag() { 121 if ( is_multisite() && ! is_super_admin() )119 if ( is_multisite() && !current_user_can('update_core') ) 122 120 return false; 123 121 … … 132 130 return false; 133 131 134 if ( current_user_can(' manage_options') )132 if ( current_user_can('update_core') ) 135 133 $msg = sprintf( __('WordPress %1$s is available! <a href="%2$s">Please update now</a>.'), $cur->current, 'update-core.php' ); 136 134 else … … 143 141 // Called directly from dashboard 144 142 function update_right_now_message() { 145 if ( is_multisite() && ! is_super_admin() )143 if ( is_multisite() && !current_user_can('update_core') ) 146 144 return false; 147 145 … … 149 147 150 148 $msg = sprintf( __('You are using <span class="b">WordPress %s</span>.'), $GLOBALS['wp_version'] ); 151 if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can(' manage_options') )149 if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) 152 150 $msg .= " <a href='update-core.php' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 153 151 … … 170 168 171 169 function wp_plugin_update_rows() { 170 if ( !current_user_can('update_plugins' ) ) 171 return; 172 172 173 $plugins = get_site_transient( 'update_plugins' ); 173 174 if ( isset($plugins->response) && is_array($plugins->response) ) { … … 206 207 207 208 function wp_update_plugin($plugin, $feedback = '') { 208 if ( is_multisite() && !is_super_admin() )209 return false;210 211 212 209 if ( !empty($feedback) ) 213 210 add_filter('update_feedback', $feedback); … … 235 232 236 233 function wp_update_theme($theme, $feedback = '') { 237 238 234 if ( !empty($feedback) ) 239 235 add_filter('update_feedback', $feedback); … … 246 242 247 243 function wp_update_core($current, $feedback = '') { 248 249 244 if ( !empty($feedback) ) 250 245 add_filter('update_feedback', $feedback); … … 261 256 return false; 262 257 263 if ( current_user_can(' manage_options') )258 if ( current_user_can('update_core') ) 264 259 $msg = sprintf( __('An automated WordPress update has failed to complete - <a href="%s">please attempt the update again now</a>.'), 'update-core.php' ); 265 260 else
Note: See TracChangeset
for help on using the changeset viewer.