Make WordPress Core

Changeset 30696


Ignore:
Timestamp:
12/02/2014 01:51:10 AM (10 years ago)
Author:
johnbillion
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r30672 r30696  
    522522
    523523    if ( $plugins = current_user_can( 'update_plugins' ) ) {
     524        wp_update_plugins(); // Check for Plugin updates
    524525        $update_plugins = get_site_transient( 'update_plugins' );
    525526        if ( ! empty( $update_plugins->response ) )
     
    528529
    529530    if ( $themes = current_user_can( 'update_themes' ) ) {
     531        wp_update_themes(); // Check for Theme updates
    530532        $update_themes = get_site_transient( 'update_themes' );
    531533        if ( ! empty( $update_themes->response ) )
Note: See TracChangeset for help on using the changeset viewer.