Make WordPress Core

Changeset 47814


Ignore:
Timestamp:
05/17/2020 09:37:12 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Fix WPCS issues in plugin and theme upgrader classes.

See #49542.

Location:
trunk/src/wp-admin/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-plugin-upgrader.php

    r47414 r47814  
    554554        // If plugin is in its own directory, recursively delete the directory.
    555555        // Base check on if plugin includes directory separator AND that it's not the root plugin folder.
    556         if ( strpos( $plugin, '/' ) && $this_plugin_dir != $plugins_dir ) {
     556        if ( strpos( $plugin, '/' ) && $this_plugin_dir !== $plugins_dir ) {
    557557            $deleted = $wp_filesystem->delete( $this_plugin_dir, true );
    558558        } else {
  • trunk/src/wp-admin/includes/class-theme-upgrader-skin.php

    r45932 r47814  
    6666            );
    6767
    68             if ( get_stylesheet() == $stylesheet ) {
     68            if ( get_stylesheet() === $stylesheet ) {
    6969                if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
    7070                    $update_actions['preview'] = sprintf(
  • trunk/src/wp-admin/includes/class-theme-upgrader.php

    r47414 r47814  
    578578
    579579        // Ensure stylesheet name hasn't changed after the upgrade:
    580         if ( get_stylesheet() === $theme && $theme != $this->result['destination_name'] ) {
     580        if ( get_stylesheet() === $theme && $theme !== $this->result['destination_name'] ) {
    581581            wp_clean_themes_cache();
    582582            $stylesheet = $this->result['destination_name'];
Note: See TracChangeset for help on using the changeset viewer.