mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Ensure the theme and plugin update checks are always in sync with the current theme and plugin versions before fetching cached update data. This change only triggers a request to the update API when necessary.
Fixes #13071 Props bswatson Built from https://develop.svn.wordpress.org/trunk@30696 git-svn-id: http://core.svn.wordpress.org/trunk@30686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad297dab6d
commit
b0a2416040
@ -521,12 +521,14 @@ function wp_get_update_data() {
|
||||
$counts = array( 'plugins' => 0, 'themes' => 0, 'wordpress' => 0, 'translations' => 0 );
|
||||
|
||||
if ( $plugins = current_user_can( 'update_plugins' ) ) {
|
||||
wp_update_plugins(); // Check for Plugin updates
|
||||
$update_plugins = get_site_transient( 'update_plugins' );
|
||||
if ( ! empty( $update_plugins->response ) )
|
||||
$counts['plugins'] = count( $update_plugins->response );
|
||||
}
|
||||
|
||||
if ( $themes = current_user_can( 'update_themes' ) ) {
|
||||
wp_update_themes(); // Check for Theme updates
|
||||
$update_themes = get_site_transient( 'update_themes' );
|
||||
if ( ! empty( $update_themes->response ) )
|
||||
$counts['themes'] = count( $update_themes->response );
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-beta2-30695';
|
||||
$wp_version = '4.1-beta2-30696';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user