Upgrade/Install: Check if the theme installer skin's `overwrite` property exists in `Theme_Upgrader::install_strings()`.
This ensures consistency with `Plugin_Upgrader::install_strings()` and resolves an issue caused by the property not existing in other upgrader implementations. Props schlessera, azaozz. See #50670. Built from https://develop.svn.wordpress.org/trunk@48493 git-svn-id: http://core.svn.wordpress.org/trunk@48255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
17f6c106c3
commit
64a4066874
|
@ -94,16 +94,18 @@ class Theme_Upgrader extends WP_Upgrader {
|
||||||
/* translators: %s: Theme error. */
|
/* translators: %s: Theme error. */
|
||||||
$this->strings['current_theme_has_errors'] = __( 'The current theme has the following error: "%s".' );
|
$this->strings['current_theme_has_errors'] = __( 'The current theme has the following error: "%s".' );
|
||||||
|
|
||||||
if ( 'update-theme' === $this->skin->overwrite ) {
|
if ( ! empty( $this->skin->overwrite ) ) {
|
||||||
$this->strings['installing_package'] = __( 'Updating the theme…' );
|
if ( 'update-theme' === $this->skin->overwrite ) {
|
||||||
$this->strings['process_failed'] = __( 'Theme update failed.' );
|
$this->strings['installing_package'] = __( 'Updating the theme…' );
|
||||||
$this->strings['process_success'] = __( 'Theme updated successfully.' );
|
$this->strings['process_failed'] = __( 'Theme update failed.' );
|
||||||
}
|
$this->strings['process_success'] = __( 'Theme updated successfully.' );
|
||||||
|
}
|
||||||
|
|
||||||
if ( 'downgrade-theme' === $this->skin->overwrite ) {
|
if ( 'downgrade-theme' === $this->skin->overwrite ) {
|
||||||
$this->strings['installing_package'] = __( 'Downgrading the theme…' );
|
$this->strings['installing_package'] = __( 'Downgrading the theme…' );
|
||||||
$this->strings['process_failed'] = __( 'Theme downgrade failed.' );
|
$this->strings['process_failed'] = __( 'Theme downgrade failed.' );
|
||||||
$this->strings['process_success'] = __( 'Theme downgraded successfully.' );
|
$this->strings['process_success'] = __( 'Theme downgraded successfully.' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-beta2-48492';
|
$wp_version = '5.5-beta2-48493';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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