Skip to content

Commit

Permalink
Coding Standards: Fix WPCS issues in wp-admin/plugin-editor.php and…
Browse files Browse the repository at this point in the history
… `wp-admin/theme-editor.php`.

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47845 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed May 22, 2020
1 parent a6cb663 commit 1ce6af5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/wp-admin/plugin-editor.php
Expand Up @@ -221,7 +221,7 @@
<?php
foreach ( $plugins as $plugin_key => $a_plugin ) {
$plugin_name = $a_plugin['Name'];
if ( $plugin_key == $plugin ) {
if ( $plugin_key === $plugin ) {
$selected = " selected='selected'";
} else {
$selected = '';
Expand Down
6 changes: 3 additions & 3 deletions src/wp-admin/theme-editor.php
Expand Up @@ -177,7 +177,7 @@
$file_description = get_file_description( $relative_file );
$file_show = array_search( $file, array_filter( $allowed_files ), true );
$description = esc_html( $file_description );
if ( $file_description != $file_show ) {
if ( $file_description !== $file_show ) {
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
}
?>
Expand Down Expand Up @@ -230,7 +230,7 @@
continue;
}

$selected = $a_stylesheet == $stylesheet ? ' selected="selected"' : '';
$selected = ( $a_stylesheet === $stylesheet ) ? ' selected="selected"' : '';
echo "\n\t" . '<option value="' . esc_attr( $a_stylesheet ) . '"' . $selected . '>' . $a_theme->display( 'Name' ) . '</option>';
}
?>
Expand Down Expand Up @@ -298,7 +298,7 @@

<div>
<div class="editor-notices">
<?php if ( is_child_theme() && $theme->get_stylesheet() == get_template() ) : ?>
<?php if ( is_child_theme() && $theme->get_stylesheet() === get_template() ) : ?>
<div class="notice notice-warning inline">
<p>
<?php if ( is_writeable( $file ) ) : ?>
Expand Down

0 comments on commit 1ce6af5

Please sign in to comment.