Ticket #13071: 13071.2.patch
File 13071.2.patch, 1.7 KB (added by , 8 years ago) |
---|
-
src/wp-admin/includes/admin-filters.php
96 96 add_action( 'profile_update', 'default_password_nag_edit_user', 10, 2 ); 97 97 98 98 // Update hooks. 99 add_action( 'a dmin_init', 'wp_plugin_update_rows' );100 add_action( 'a dmin_init', 'wp_theme_update_rows' );99 add_action( 'after_plugin_row', 'wp_plugin_update_rows', 10, 0 ); // Needs to run after wp_update_plugins(). 100 add_action( 'after_theme_row', 'wp_theme_update_rows', 10, 0 ); // Needs to run after wp_update_themes(). 101 101 102 102 add_action( 'admin_notices', 'update_nag', 3 ); 103 103 add_action( 'admin_notices', 'maintenance_nag', 10 ); -
src/wp-admin/includes/update.php
296 296 * @since 2.9.0 297 297 */ 298 298 function wp_plugin_update_rows() { 299 if ( !current_user_can('update_plugins' ) ) 299 remove_action( 'after_plugin_row', 'wp_plugin_update_rows' ); 300 301 if ( ! current_user_can( 'update_plugins' ) ) { 300 302 return; 303 } 301 304 302 305 $plugins = get_site_transient( 'update_plugins' ); 303 306 if ( isset($plugins->response) && is_array($plugins->response) ) { … … 432 435 * @since 3.1.0 433 436 */ 434 437 function wp_theme_update_rows() { 435 if ( !current_user_can('update_themes' ) ) 438 remove_action( 'after_theme_row', 'wp_theme_update_rows' ); 439 440 if ( ! current_user_can( 'update_themes' ) ) { 436 441 return; 442 } 437 443 438 444 $themes = get_site_transient( 'update_themes' ); 439 445 if ( isset($themes->response) && is_array($themes->response) ) {