Upgrade/Install: Pass correct argument to clear_destination
in Theme_Upgrader::install()
.
Follow-up to [48390]. Props afragen, sabernhardt. Fixes #9757. Built from https://develop.svn.wordpress.org/trunk@48685 git-svn-id: http://core.svn.wordpress.org/trunk@48447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c5ef3b7976
commit
d351100eba
@ -127,6 +127,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||||||
$this->install_strings();
|
$this->install_strings();
|
||||||
|
|
||||||
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
|
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
|
||||||
|
|
||||||
if ( $parsed_args['clear_update_cache'] ) {
|
if ( $parsed_args['clear_update_cache'] ) {
|
||||||
// Clear cache so wp_update_plugins() knows about the new plugin.
|
// Clear cache so wp_update_plugins() knows about the new plugin.
|
||||||
add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
|
add_action( 'upgrader_process_complete', 'wp_clean_plugins_cache', 9, 0 );
|
||||||
|
@ -239,6 +239,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
|
|
||||||
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
|
add_filter( 'upgrader_source_selection', array( $this, 'check_package' ) );
|
||||||
add_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ), 10, 3 );
|
add_filter( 'upgrader_post_install', array( $this, 'check_parent_theme_filter' ), 10, 3 );
|
||||||
|
|
||||||
if ( $parsed_args['clear_update_cache'] ) {
|
if ( $parsed_args['clear_update_cache'] ) {
|
||||||
// Clear cache so wp_update_themes() knows about the new theme.
|
// Clear cache so wp_update_themes() knows about the new theme.
|
||||||
add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
|
add_action( 'upgrader_process_complete', 'wp_clean_themes_cache', 9, 0 );
|
||||||
@ -248,7 +249,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||||||
array(
|
array(
|
||||||
'package' => $package,
|
'package' => $package,
|
||||||
'destination' => get_theme_root(),
|
'destination' => get_theme_root(),
|
||||||
'clear_destination' => $args['overwrite_package'],
|
'clear_destination' => $parsed_args['overwrite_package'],
|
||||||
'clear_working' => true,
|
'clear_working' => true,
|
||||||
'hook_extra' => array(
|
'hook_extra' => array(
|
||||||
'type' => 'theme',
|
'type' => 'theme',
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.6-alpha-48684';
|
$wp_version = '5.6-alpha-48685';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user