Make WordPress Core

Ticket #30369: 30369.2.patch

File 30369.2.patch, 1.8 KB (added by SergeyBiryukov, 12 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    13701370                remove_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
    13711371
    13721372                if ( $parsed_args['clear_update_cache'] ) {
    1373                         wp_clean_themes_cache( true );
    1374                         wp_clean_plugins_cache( true );
    1375                         delete_site_transient( 'update_core' );
     1373                        _clear_update_transients();
    13761374                }
    13771375
    13781376                return $results;
     
    22002198                        }
    22012199
    22022200                        // Clear existing caches
    2203                         wp_clean_plugins_cache();
    2204                         wp_clean_themes_cache();
    2205                         delete_site_transient( 'update_core' );
     2201                        _clear_update_transients();
    22062202
    22072203                        wp_version_check();  // check for Core updates
    22082204                        wp_update_themes();  // Check for Theme updates
  • 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
     
    669680add_action( 'wp_update_themes', 'wp_update_themes' );
    670681add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );
    671682
     683add_action( 'update_option_WPLANG', '_clear_update_transients' , 10, 0 );
     684
    672685add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );
    673686
    674687add_action('init', 'wp_schedule_update_checks');