Coding Standards: Fix WPCS issues in wp-admin/plugin-editor.php
and wp-admin/theme-editor.php
.
See #49542. git-svn-id: https://develop.svn.wordpress.org/trunk@47845 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a6cb663c13
commit
1ce6af5284
src/wp-admin
@ -221,7 +221,7 @@ $content = esc_textarea( $content );
|
|||||||
<?php
|
<?php
|
||||||
foreach ( $plugins as $plugin_key => $a_plugin ) {
|
foreach ( $plugins as $plugin_key => $a_plugin ) {
|
||||||
$plugin_name = $a_plugin['Name'];
|
$plugin_name = $a_plugin['Name'];
|
||||||
if ( $plugin_key == $plugin ) {
|
if ( $plugin_key === $plugin ) {
|
||||||
$selected = " selected='selected'";
|
$selected = " selected='selected'";
|
||||||
} else {
|
} else {
|
||||||
$selected = '';
|
$selected = '';
|
||||||
|
@ -177,7 +177,7 @@ if ( ! empty( $posted_content ) ) {
|
|||||||
$file_description = get_file_description( $relative_file );
|
$file_description = get_file_description( $relative_file );
|
||||||
$file_show = array_search( $file, array_filter( $allowed_files ), true );
|
$file_show = array_search( $file, array_filter( $allowed_files ), true );
|
||||||
$description = esc_html( $file_description );
|
$description = esc_html( $file_description );
|
||||||
if ( $file_description != $file_show ) {
|
if ( $file_description !== $file_show ) {
|
||||||
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
|
$description .= ' <span>(' . esc_html( $file_show ) . ')</span>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -230,7 +230,7 @@ if ( $file_description != $file_show ) {
|
|||||||
continue;
|
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>';
|
echo "\n\t" . '<option value="' . esc_attr( $a_stylesheet ) . '"' . $selected . '>' . $a_theme->display( 'Name' ) . '</option>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -298,7 +298,7 @@ else :
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="editor-notices">
|
<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">
|
<div class="notice notice-warning inline">
|
||||||
<p>
|
<p>
|
||||||
<?php if ( is_writeable( $file ) ) : ?>
|
<?php if ( is_writeable( $file ) ) : ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user