Make WordPress Core

Ticket #31503: 31503.diff

File 31503.diff, 840 bytes (added by TobiasBg, 10 years ago)
  • src/wp-includes/update.php

    diff --git src/wp-includes/update.php src/wp-includes/update.php
    index c73ee0a..87cc3ce 100644
    function wp_schedule_update_checks() { 
    654654 * @since 4.1.0
    655655 */
    656656function wp_clean_update_cache() {
     657        // In case `wp_clean_plugins_cache()` does not exist, clear the transient directly.
    657658        if ( function_exists( 'wp_clean_plugins_cache' ) ) {
    658659                wp_clean_plugins_cache();
    659660        } else {
    660661                delete_site_transient( 'update_plugins' );
    661662        }
    662         wp_clean_plugins_cache();
    663         wp_clean_themes_cache();
     663
     664        // In case `wp_clean_themes_cache()` does not exist, clear the transient directly.
     665        if ( function_exists( 'wp_clean_themes_cache' ) ) {
     666                wp_clean_themes_cache();
     667        } else {
     668                delete_site_transient( 'update_themes' );
     669        }
     670
    664671        delete_site_transient( 'update_core' );
    665672}
    666673