Upgrader: Make clearing the Plugin and Theme update caches optional during install and upgrade proceedures. See #22704
Built from https://develop.svn.wordpress.org/trunk@25272 git-svn-id: http://core.svn.wordpress.org/trunk@25238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1764,3 +1764,16 @@ function settings_fields($option_group) {
|
||||
echo '<input type="hidden" name="action" value="update" />';
|
||||
wp_nonce_field("$option_group-options");
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the Plugins cache used by get_plugins() and by default, the Plugin Update cache.
|
||||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @param bool $clear_update_cache Whether to clear the Plugin updates cache
|
||||
*/
|
||||
function wp_clean_plugins_cache( $clear_update_cache = true ) {
|
||||
if ( $clear_update_cache )
|
||||
delete_site_transient( 'update_plugins' );
|
||||
wp_cache_delete( 'plugins', 'plugins' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user