Make WordPress Core

Ticket #30369: 30369.patch

File 30369.patch, 967 bytes (added by ocean90, 12 years ago)
  • src/wp-includes/update.php

     
    648648        }
    649649}
    650650
     651/**
     652 * Clear existing update caches for plugins, themes, and core.
     653 *
     654 * @since 4.1.0
     655 */
     656function _clear_update_transients() {
     657        wp_clean_plugins_cache();
     658        wp_clean_themes_cache();
     659        delete_site_transient( 'update_core' );
     660}
     661
    651662if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) )
    652663        return;
    653664
     
    662673add_action( 'wp_update_plugins', 'wp_update_plugins' );
    663674add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );
    664675
     676add_action( 'update_option_WPLANG', '_clear_update_transients' , 10, 0 );
     677
    665678add_action( 'load-themes.php', 'wp_update_themes' );
    666679add_action( 'load-update.php', 'wp_update_themes' );
    667680add_action( 'load-update-core.php', 'wp_update_themes' );