Coding Standards: Fix WPCS issues in plugin and theme upgrader classes.
See #49542. Built from https://develop.svn.wordpress.org/trunk@47814 git-svn-id: http://core.svn.wordpress.org/trunk@47590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f9b60d3334
commit
91936df3d1
|
@ -553,7 +553,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
|||
|
||||
// If plugin is in its own directory, recursively delete the directory.
|
||||
// Base check on if plugin includes directory separator AND that it's not the root plugin folder.
|
||||
if ( strpos( $plugin, '/' ) && $this_plugin_dir != $plugins_dir ) {
|
||||
if ( strpos( $plugin, '/' ) && $this_plugin_dir !== $plugins_dir ) {
|
||||
$deleted = $wp_filesystem->delete( $this_plugin_dir, true );
|
||||
} else {
|
||||
$deleted = $wp_filesystem->delete( $plugins_dir . $plugin );
|
||||
|
|
|
@ -65,7 +65,7 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
|
|||
admin_url( 'customize.php' )
|
||||
);
|
||||
|
||||
if ( get_stylesheet() == $stylesheet ) {
|
||||
if ( get_stylesheet() === $stylesheet ) {
|
||||
if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
|
||||
$update_actions['preview'] = sprintf(
|
||||
'<a href="%s" class="hide-if-no-customize load-customize">' .
|
||||
|
|
|
@ -577,7 +577,7 @@ class Theme_Upgrader extends WP_Upgrader {
|
|||
}
|
||||
|
||||
// Ensure stylesheet name hasn't changed after the upgrade:
|
||||
if ( get_stylesheet() === $theme && $theme != $this->result['destination_name'] ) {
|
||||
if ( get_stylesheet() === $theme && $theme !== $this->result['destination_name'] ) {
|
||||
wp_clean_themes_cache();
|
||||
$stylesheet = $this->result['destination_name'];
|
||||
switch_theme( $stylesheet );
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-47813';
|
||||
$wp_version = '5.5-alpha-47814';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue