From 5e43c07be4a0f412d81ee70b1b57435e526bc22c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 17 May 2020 09:37:12 +0000 Subject: [PATCH] Coding Standards: Fix WPCS issues in plugin and theme upgrader classes. See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47814 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-plugin-upgrader.php | 2 +- src/wp-admin/includes/class-theme-upgrader-skin.php | 2 +- src/wp-admin/includes/class-theme-upgrader.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/class-plugin-upgrader.php b/src/wp-admin/includes/class-plugin-upgrader.php index 214f371866..361b7a5c8d 100644 --- a/src/wp-admin/includes/class-plugin-upgrader.php +++ b/src/wp-admin/includes/class-plugin-upgrader.php @@ -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 ); diff --git a/src/wp-admin/includes/class-theme-upgrader-skin.php b/src/wp-admin/includes/class-theme-upgrader-skin.php index 31e540bca1..9be8894905 100644 --- a/src/wp-admin/includes/class-theme-upgrader-skin.php +++ b/src/wp-admin/includes/class-theme-upgrader-skin.php @@ -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( '' . diff --git a/src/wp-admin/includes/class-theme-upgrader.php b/src/wp-admin/includes/class-theme-upgrader.php index 9d561c0893..d5da2344c7 100644 --- a/src/wp-admin/includes/class-theme-upgrader.php +++ b/src/wp-admin/includes/class-theme-upgrader.php @@ -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 );