Make WordPress Core

Changeset 47845


Ignore:
Timestamp:
05/22/2020 11:59:10 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Fix WPCS issues in wp-admin/plugin-editor.php and wp-admin/theme-editor.php.

See #49542.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/plugin-editor.php

    r47808 r47845  
    222222        foreach ( $plugins as $plugin_key => $a_plugin ) {
    223223            $plugin_name = $a_plugin['Name'];
    224             if ( $plugin_key == $plugin ) {
     224            if ( $plugin_key === $plugin ) {
    225225                $selected = " selected='selected'";
    226226            } else {
  • trunk/src/wp-admin/theme-editor.php

    r47844 r47845  
    178178$file_show        = array_search( $file, array_filter( $allowed_files ), true );
    179179$description      = esc_html( $file_description );
    180 if ( $file_description != $file_show ) {
     180if ( $file_description !== $file_show ) {
    181181    $description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
    182182}
     
    231231            }
    232232
    233             $selected = $a_stylesheet == $stylesheet ? ' selected="selected"' : '';
     233            $selected = ( $a_stylesheet === $stylesheet ) ? ' selected="selected"' : '';
    234234            echo "\n\t" . '<option value="' . esc_attr( $a_stylesheet ) . '"' . $selected . '>' . $a_theme->display( 'Name' ) . '</option>';
    235235        }
     
    299299        <div>
    300300            <div class="editor-notices">
    301                 <?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
     301                <?php if ( is_child_theme() && $theme->get_stylesheet() === get_template() ) : ?>
    302302                    <div class="notice notice-warning inline">
    303303                        <p>
Note: See TracChangeset for help on using the changeset viewer.