Make WordPress Core


Ignore:
Timestamp:
11/24/2014 10:49:13 PM (12 years ago)
Author:
ocean90
Message:

Clear update caches when site language is changed.

The update screen has a re-install button which could show the wrong language locale after the site language was changed. That's because the update data is cached.
Introduce _wp_clear_update_cache() as a helper function to clean up the update cache.

props SergeyBiryukov, ocean90.
fixes #30369.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r30384 r30554  
    13731373
    13741374                if ( $parsed_args['clear_update_cache'] ) {
    1375                         wp_clean_themes_cache( true );
    1376                         wp_clean_plugins_cache( true );
    1377                         delete_site_transient( 'update_core' );
     1375                        _wp_clear_update_cache();
    13781376                }
    13791377
     
    22182216
    22192217                        // Clear existing caches
    2220                         wp_clean_plugins_cache();
    2221                         wp_clean_themes_cache();
    2222                         delete_site_transient( 'update_core' );
     2218                        _wp_clear_update_cache();
    22232219
    22242220                        wp_version_check();  // check for Core updates
Note: See TracChangeset for help on using the changeset viewer.