Ticket #25219: 25219.3.diff
File 25219.3.diff, 22.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/theme.php
111 111 function theme_update_available( $theme ) { 112 112 static $themes_update; 113 113 114 if ( ! current_user_can('update_themes' ) )114 if ( ! current_user_can( 'view_theme_updates' ) ) 115 115 return; 116 116 117 117 if ( !isset($themes_update) ) -
src/wp-admin/includes/update.php
158 158 } 159 159 160 160 function core_update_footer( $msg = '' ) { 161 if ( ! current_user_can('update_core') )161 if ( ! current_user_can( 'view_core_updates' ) ) 162 162 return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) ); 163 163 164 164 $cur = get_preferred_from_update_core(); … … 180 180 break; 181 181 182 182 case 'upgrade' : 183 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', network_admin_url( 'update-core.php' ), $cur->current); 183 if ( current_user_can( 'update_core' ) ) { 184 return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', network_admin_url( 'update-core.php' ), $cur->current); 185 } else { 186 return sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please update now.'), $cur->current ); 187 } 184 188 break; 185 189 186 190 case 'latest' : … … 207 211 208 212 if ( current_user_can('update_core') ) { 209 213 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! <a href="%2$s">Please update now</a>.'), $cur->current, network_admin_url( 'update-core.php' ) ); 214 } elseif ( current_user_can( 'view_core_updates' ) ) { 215 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please update now.'), $cur->current ); 210 216 } else { 211 217 $msg = sprintf( __('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please notify the site administrator.'), $cur->current ); 212 218 } … … 219 225 function update_right_now_message() { 220 226 $msg = sprintf( __( 'You are using <span class="b">WordPress %s</span>.' ), get_bloginfo( 'version', 'display' ) ); 221 227 222 if ( current_user_can( 'update_core') ) {228 if ( current_user_can( 'view_core_updates' ) ) { 223 229 $cur = get_preferred_from_update_core(); 224 230 225 if ( isset( $cur->response ) && $cur->response == 'upgrade' ) 226 $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 231 if ( isset( $cur->response ) && $cur->response == 'upgrade' ) { 232 if ( current_user_can( 'update_core' ) ) { 233 $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __( 'Update to %s' ), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 234 } else { 235 $msg .= ' ' . sprintf( __( '<a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> is available! Please update now.' ), $cur->current ); 236 } 237 } 227 238 } 228 239 229 240 echo "<span id='wp-version-message'>$msg</span>"; … … 244 255 } 245 256 246 257 function wp_plugin_update_rows() { 247 if ( ! current_user_can('update_plugins' ) )258 if ( ! current_user_can( 'view_plugin_updates' ) ) 248 259 return; 249 260 250 261 $plugins = get_site_transient( 'update_plugins' ); -
src/wp-admin/menu.php
34 34 $update_data = wp_get_update_data(); 35 35 36 36 if ( ! is_multisite() ) { 37 if ( current_user_can( ' update_core' ) )38 $cap = ' update_core';39 elseif ( current_user_can( ' update_plugins' ) )40 $cap = ' update_plugins';37 if ( current_user_can( 'view_core_updates' ) ) 38 $cap = 'view_core_updates'; 39 elseif ( current_user_can( 'view_plugin_updates' ) ) 40 $cap = 'view_plugin_updates'; 41 41 else 42 $cap = ' update_themes';42 $cap = 'view_theme_updates'; 43 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 44 unset( $cap ); 45 45 } … … 155 155 } 156 156 157 157 $count = ''; 158 if ( ! is_multisite() && current_user_can( ' update_plugins' ) ) {158 if ( ! is_multisite() && current_user_can( 'view_plugin_updates' ) ) { 159 159 if ( ! isset( $update_data ) ) 160 160 $update_data = wp_get_update_data(); 161 161 $count = "<span class='update-plugins count-{$update_data['counts']['plugins']}'><span class='plugin-count'>" . number_format_i18n($update_data['counts']['plugins']) . "</span></span>"; … … 167 167 168 168 if ( ! is_multisite() ) { 169 169 /* translators: add new plugin */ 170 $submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), ' install_plugins', 'plugin-install.php' );170 $submenu['plugins.php'][10] = array( _x('Add New', 'plugin'), 'view_plugin_updates', 'plugin-install.php' ); 171 171 $submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' ); 172 172 } 173 173 -
src/wp-admin/plugin-install.php
14 14 */ 15 15 require_once( dirname( __FILE__ ) . '/admin.php' ); 16 16 17 if ( ! current_user_can( 'install_plugins') )18 wp_die( __('You do not have sufficient permissions to install plugins on this site.'));17 if ( ! current_user_can( 'view_plugin_updates' ) ) 18 wp_die( __( 'You do not have sufficient permissions to view plugin updates for this site.' ) ); 19 19 20 20 if ( is_multisite() && ! is_network_admin() ) { 21 21 wp_redirect( network_admin_url( 'plugin-install.php' ) ); -
src/wp-admin/update-core.php
18 18 exit(); 19 19 } 20 20 21 if ( ! current_user_can( ' update_core' ) && ! current_user_can( 'update_themes' ) && ! current_user_can( 'update_plugins' ) )22 wp_die( __( 'You do not have sufficient permissions to updatethis site.' ) );21 if ( ! current_user_can( 'view_core_updates' ) && ! current_user_can( 'view_theme_updates' ) && ! current_user_can( 'view_plugin_updates' ) ) 22 wp_die( __( 'You do not have sufficient permissions to view updates for this site.' ) ); 23 23 24 24 function list_core_update( $update ) { 25 25 global $wp_local_package, $wpdb, $wp_version; … … 62 62 $message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires PHP version %2$s or higher. You are running version %3$s.'), $update->current, $update->php_version, $php_version ); 63 63 elseif ( !$mysql_compat ) 64 64 $message = sprintf( __('You cannot update because <a href="http://codex.wordpress.org/Version_%1$s">WordPress %1$s</a> requires MySQL version %2$s or higher. You are running version %3$s.'), $update->current, $update->mysql_version, $mysql_version ); 65 else 66 $message = sprintf(__('You can update to <a href="http://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string); 65 else { 66 if ( current_user_can( 'update_core' ) ) { 67 $message = sprintf(__('You can update to <a href="http://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> automatically or download the package and install it manually:'), $update->current, $version_string); 68 } else { 69 $message = sprintf(__('<a href="http://codex.wordpress.org/Version_%1$s">WordPress %2$s</a> is available. Please download the package and install it manually.'), $update->current, $version_string); 70 } 71 } 67 72 if ( !$mysql_compat || !$php_compat ) 68 73 $show_buttons = false; 69 74 } … … 79 84 echo '<input name="version" value="'. esc_attr($update->current) .'" type="hidden"/>'; 80 85 echo '<input name="locale" value="'. esc_attr($update->locale) .'" type="hidden"/>'; 81 86 if ( $show_buttons ) { 82 if ( $first_pass ) { 83 submit_button( $submit, $current ? 'button' : 'primary regular', 'upgrade', false ); 84 $first_pass = false; 85 } else { 86 submit_button( $submit, 'button', 'upgrade', false ); 87 if ( current_user_can( 'update_core' ) ) { 88 if ( $first_pass ) { 89 submit_button( $submit, $current ? 'button' : 'primary regular', 'upgrade', false ); 90 $first_pass = false; 91 } else { 92 submit_button( $submit, 'button', 'upgrade', false ); 93 } 94 echo ' '; 87 95 } 88 echo ' <a href="' . esc_url( $update->download ) . '" class="button">' . $download . '</a> ';96 echo '<a href="' . esc_url( $update->download ) . '" class="button">' . $download . '</a> '; 89 97 } 90 98 if ( 'en_US' != $update->locale ) 91 99 if ( !isset( $update->dismissed ) || !$update->dismissed ) … … 186 194 } 187 195 echo '</ul>'; 188 196 // Don't show the maintenance mode notice when we are only showing a single re-install option. 189 if ( $updates && ( count( $updates ) > 1 || $updates[0]->response != 'latest' ) ) {197 if ( $updates && ( count( $updates ) > 1 || $updates[0]->response != 'latest' ) && current_user_can( 'update_core' ) ) { 190 198 echo '<p>' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, your site will return to normal.' ) . '</p>'; 191 199 } elseif ( ! $updates ) { 192 200 list( $normalized_version ) = explode( '-', $wp_version ); … … 216 224 $core_update_version = $core_updates[0]->current; 217 225 ?> 218 226 <h3><?php _e( 'Plugins' ); ?></h3> 219 <p><?php _e( 'The following plugins have new versions available. Check the ones you want to update and then click “Update Plugins”.' ); ?></p> 220 <form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-plugins" class="upgrade"> 221 <?php wp_nonce_field('upgrade-core'); ?> 222 <p><input id="upgrade-plugins" class="button" type="submit" value="<?php esc_attr_e('Update Plugins'); ?>" name="upgrade" /></p> 227 <p> 228 <?php _e( 'The following plugins have new versions available.' ); ?> 229 <?php if ( current_user_can( 'update_plugins' ) ) : ?> 230 <?php _e( 'Check the ones you want to update and then click “Update Plugins”.' ); ?> 231 <?php endif; ?> 232 </p> 233 234 <?php if ( current_user_can( 'update_plugins' ) ) : ?> 235 <form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-plugins" class="upgrade"> 236 <?php wp_nonce_field('upgrade-core'); ?> 237 <p><input id="upgrade-plugins" class="button" type="submit" value="<?php esc_attr_e('Update Plugins'); ?>" name="upgrade" /></p> 238 <?php endif; ?> 239 223 240 <table class="widefat" cellspacing="0" id="update-plugins-table"> 224 <thead> 225 <tr> 226 <th scope="col" class="manage-column check-column"><input type="checkbox" id="plugins-select-all" /></th> 227 <th scope="col" class="manage-column"><label for="plugins-select-all"><?php _e('Select All'); ?></label></th> 228 </tr> 229 </thead> 241 <?php if ( current_user_can( 'update_plugins' ) ) : ?> 242 <thead> 243 <tr> 244 <th scope="col" class="manage-column check-column"><input type="checkbox" id="plugins-select-all" /></th> 245 <th scope="col" class="manage-column"><label for="plugins-select-all"><?php _e('Select All'); ?></label></th> 246 </tr> 247 </thead> 230 248 231 <tfoot> 232 <tr> 233 <th scope="col" class="manage-column check-column"><input type="checkbox" id="plugins-select-all-2" /></th> 234 <th scope="col" class="manage-column"><label for="plugins-select-all-2"><?php _e('Select All'); ?></label></th> 235 </tr> 236 </tfoot> 249 <tfoot> 250 <tr> 251 <th scope="col" class="manage-column check-column"><input type="checkbox" id="plugins-select-all-2" /></th> 252 <th scope="col" class="manage-column"><label for="plugins-select-all-2"><?php _e('Select All'); ?></label></th> 253 </tr> 254 </tfoot> 255 <?php endif; ?> 256 237 257 <tbody class="plugins"> 238 258 <?php 239 259 foreach ( (array) $plugins as $plugin_file => $plugin_data) { … … 267 287 $details_text = sprintf(__('View version %1$s details'), $plugin_data->update->new_version); 268 288 $details = sprintf('<a href="%1$s" class="thickbox" title="%2$s">%3$s</a>.', esc_url($details_url), esc_attr($plugin_data->Name), $details_text); 269 289 270 echo " 271 <tr class='active'> 272 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($plugin_file) . "' /></th> 273 <td><p><strong>{$plugin_data->Name}</strong><br />" . sprintf(__('You have version %1$s installed. Update to %2$s.'), $plugin_data->Version, $plugin_data->update->new_version) . ' ' . $details . $compat . $upgrade_notice . "</p></td> 274 </tr>"; 290 ?> 291 <tr class='active'> 292 <?php if ( current_user_can( 'update_plugins' ) ) : ?> 293 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='<?php echo esc_attr( $plugin_file ); ?>' /></th> 294 <?php endif; ?> 295 <td> 296 <p> 297 <strong><?php echo esc_html( $plugin_data->Name ); ?></strong><br /> 298 <?php echo sprintf( __( 'You have version %s installed.' ), $plugin_data->Version ); ?> 299 <?php if ( current_user_can( 'update_plugins' ) ) : ?> 300 <?php echo sprintf( __( 'Update to %s.' ), $plugin_data->update->new_version ); ?> 301 <?php else : ?> 302 <?php echo sprintf( __( '%s is available.' ), $plugin_data->update->new_version ); ?> 303 <?php endif; ?> 304 <?php echo $details .' '. $compat .' '. $upgrade_notice; ?> 305 </p> 306 </td> 307 </tr> 308 <?php 275 309 } 276 310 ?> 277 311 </tbody> 278 312 </table> 279 <p><input id="upgrade-plugins-2" class="button" type="submit" value="<?php esc_attr_e('Update Plugins'); ?>" name="upgrade" /></p> 280 </form> 313 314 <?php if ( current_user_can( 'update_plugins' ) ) : ?> 315 <p><input id="upgrade-plugins-2" class="button" type="submit" value="<?php esc_attr_e('Update Plugins'); ?>" name="upgrade" /></p> 316 </form> 317 <?php endif; ?> 281 318 <?php 282 319 } 283 320 … … 293 330 294 331 ?> 295 332 <h3><?php _e( 'Themes' ); ?></h3> 296 <p><?php _e( 'The following themes have new versions available. Check the ones you want to update and then click “Update Themes”.' ); ?></p> 333 <p> 334 <?php _e( 'The following themes have new versions available.' ); ?> 335 <?php if ( current_user_can( 'update_themes' ) ) : ?> 336 <?php _e( 'Check the ones you want to update and then click “Update Themes”.' ); ?> 337 <?php endif; ?> 338 </p> 297 339 <p><?php printf( __( '<strong>Please Note:</strong> Any customizations you have made to theme files will be lost. Please consider using <a href="%s">child themes</a> for modifications.' ), __( 'http://codex.wordpress.org/Child_Themes' ) ); ?></p> 298 <form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade"> 299 <?php wp_nonce_field('upgrade-core'); ?> 300 <p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p> 340 341 <?php if ( current_user_can( 'update_themes' ) ) : ?> 342 <form method="post" action="<?php echo esc_url( $form_action ); ?>" name="upgrade-themes" class="upgrade"> 343 <?php wp_nonce_field('upgrade-core'); ?> 344 <p><input id="upgrade-themes" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p> 345 <?php endif; ?> 346 301 347 <table class="widefat" cellspacing="0" id="update-themes-table"> 302 <thead> 303 <tr> 304 <th scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all" /></th> 305 <th scope="col" class="manage-column"><label for="themes-select-all"><?php _e('Select All'); ?></label></th> 306 </tr> 307 </thead> 348 <?php if ( current_user_can( 'update_themes' ) ) : ?> 349 <thead> 350 <tr> 351 <th scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all" /></th> 352 <th scope="col" class="manage-column"><label for="themes-select-all"><?php _e('Select All'); ?></label></th> 353 </tr> 354 </thead> 355 356 <tfoot> 357 <tr> 358 <th scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all-2" /></th> 359 <th scope="col" class="manage-column"><label for="themes-select-all-2"><?php _e('Select All'); ?></label></th> 360 </tr> 361 </tfoot> 362 <?php endif; ?> 308 363 309 <tfoot>310 <tr>311 <th scope="col" class="manage-column check-column"><input type="checkbox" id="themes-select-all-2" /></th>312 <th scope="col" class="manage-column"><label for="themes-select-all-2"><?php _e('Select All'); ?></label></th>313 </tr>314 </tfoot>315 364 <tbody class="plugins"> 316 365 <?php 317 366 foreach ( $themes as $stylesheet => $theme ) { 318 echo " 319 <tr class='active'> 320 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr( $stylesheet ) . "' /></th> 321 <td class='plugin-title'><img src='" . esc_url( $theme->get_screenshot() ) . "' width='85' height='64' style='float:left; padding: 0 5px 5px' /><strong>" . $theme->display('Name') . '</strong> ' . sprintf( __( 'You have version %1$s installed. Update to %2$s.' ), $theme->display('Version'), $theme->update['new_version'] ) . "</td> 322 </tr>"; 367 ?> 368 <tr class='active'> 369 <?php if ( current_user_can( 'update_themes' ) ) : ?> 370 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='<?php echo esc_attr( $stylesheet ); ?>' /></th> 371 <?php endif; ?> 372 <td class='plugin-title'> 373 <img src='<?php echo esc_url( $theme->get_screenshot() ); ?>' width='85' height='64' style='float:left; padding: 0 5px 5px' /> 374 <strong><?php echo esc_html( $theme->display('Name') ); ?></strong> 375 <?php echo sprintf( __( 'You have version %s installed.' ), esc_html( $theme->display( 'Version' ) ) ); ?> 376 377 <?php if ( current_user_can( 'update_themes' ) ) : ?> 378 <?php echo sprintf( __( 'Update to %s.' ), esc_html( $theme->update['new_version'] ) ); ?> 379 <?php else : ?> 380 <?php echo sprintf( __( '%s is available.' ), esc_html( $theme->update['new_version'] ) ); ?> 381 <?php endif; ?> 382 </td> 383 </tr> 384 <?php 323 385 } 324 386 ?> 325 387 </tbody> 326 388 </table> 327 <p><input id="upgrade-themes-2" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p> 328 </form> 389 390 <?php if ( current_user_can( 'update_themes' ) ) : ?> 391 <p><input id="upgrade-themes-2" class="button" type="submit" value="<?php esc_attr_e('Update Themes'); ?>" name="upgrade" /></p> 392 </form> 393 <?php endif; ?> 329 394 <?php 330 395 } 331 396 … … 510 575 echo ' <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>'; 511 576 echo '</p>'; 512 577 513 if ( $core = current_user_can( ' update_core' ) )578 if ( $core = current_user_can( 'view_core_updates' ) ) 514 579 core_upgrade_preamble(); 515 if ( $plugins = current_user_can( ' update_plugins' ) )580 if ( $plugins = current_user_can( 'view_plugin_updates' ) ) 516 581 list_plugin_updates(); 517 if ( $themes = current_user_can( ' update_themes' ) )582 if ( $themes = current_user_can( 'view_theme_updates' ) ) 518 583 list_theme_updates(); 519 584 if ( $core || $plugins || $themes ) 520 585 list_translation_updates(); … … 525 590 526 591 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { 527 592 528 if ( ! current_user_can( ' update_core' ) )529 wp_die( __( 'You do not have sufficient permissions to updatethis site.' ) );593 if ( ! current_user_can( 'view_core_updates' ) ) 594 wp_die( __( 'You do not have sufficient permissions to view updates for this site.' ) ); 530 595 531 596 check_admin_referer('upgrade-core'); 532 597 … … 550 615 551 616 } elseif ( 'do-plugin-upgrade' == $action ) { 552 617 553 if ( ! current_user_can( ' update_plugins' ) )554 wp_die( __( 'You do not have sufficient permissions to updatethis site.' ) );618 if ( ! current_user_can( 'view_plugin_updates' ) ) 619 wp_die( __( 'You do not have sufficient permissions to view updates for this site.' ) ); 555 620 556 621 check_admin_referer('upgrade-core'); 557 622 … … 579 644 580 645 } elseif ( 'do-theme-upgrade' == $action ) { 581 646 582 if ( ! current_user_can( ' update_themes' ) )583 wp_die( __( 'You do not have sufficient permissions to updatethis site.' ) );647 if ( ! current_user_can( 'view_theme_updates' ) ) 648 wp_die( __( 'You do not have sufficient permissions to view updates for this site.' ) ); 584 649 585 650 check_admin_referer('upgrade-core'); 586 651 -
src/wp-includes/capabilities.php
1228 1228 else 1229 1229 $caps[] = $cap; 1230 1230 break; 1231 case 'view_plugin_updates': 1232 case 'view_theme_updates': 1233 case 'view_core_updates': 1234 if ( is_multisite() && ! is_super_admin( $user_id ) ) 1235 $caps[] = 'do_not_allow'; 1236 else 1237 $caps[] = 'manage_options'; 1238 break; 1231 1239 case 'activate_plugins': 1232 1240 $caps[] = $cap; 1233 1241 if ( is_multisite() ) { -
src/wp-includes/update.php
450 450 function wp_get_update_data() { 451 451 $counts = array( 'plugins' => 0, 'themes' => 0, 'wordpress' => 0, 'translations' => 0 ); 452 452 453 if ( $plugins = current_user_can( ' update_plugins' ) ) {453 if ( $plugins = current_user_can( 'view_plugin_updates' ) ) { 454 454 $update_plugins = get_site_transient( 'update_plugins' ); 455 455 if ( ! empty( $update_plugins->response ) ) 456 456 $counts['plugins'] = count( $update_plugins->response ); 457 457 } 458 458 459 if ( $themes = current_user_can( ' update_themes' ) ) {459 if ( $themes = current_user_can( 'view_theme_updates' ) ) { 460 460 $update_themes = get_site_transient( 'update_themes' ); 461 461 if ( ! empty( $update_themes->response ) ) 462 462 $counts['themes'] = count( $update_themes->response ); 463 463 } 464 464 465 if ( ( $core = current_user_can( ' update_core' ) ) && function_exists( 'get_core_updates' ) ) {465 if ( ( $core = current_user_can( 'view_core_updates' ) ) && function_exists( 'get_core_updates' ) ) { 466 466 $update_wordpress = get_core_updates( array('dismissed' => false) ); 467 if ( ! empty( $update_wordpress ) && ! in_array( $update_wordpress[0]->response, array( 'development', 'latest') ) && current_user_can('update_core') )467 if ( ! empty( $update_wordpress ) && ! in_array( $update_wordpress[0]->response, array( 'development', 'latest' ) ) && current_user_can( 'view_core_updates' ) ) 468 468 $counts['wordpress'] = 1; 469 469 } 470 470