Skip to content

Commit 4180ca6

Browse files
Coding Standards: Use strict comparison in some legacy media functions.
Follow-up to [7062], [8653], [12188]. Props aristath, poena, afercia, SergeyBiryukov. See #62279. git-svn-id: https://develop.svn.wordpress.org/trunk@59750 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 1111166 commit 4180ca6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wp-admin/includes/media.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function the_media_upload_tabs() {
9393
foreach ( $tabs as $callback => $text ) {
9494
$class = '';
9595

96-
if ( $current == $callback ) {
96+
if ( $current === $callback ) {
9797
$class = " class='current'";
9898
}
9999

@@ -1172,7 +1172,7 @@ function image_align_input_fields( $post, $checked = '' ) {
11721172
foreach ( $alignments as $name => $label ) {
11731173
$name = esc_attr( $name );
11741174
$output[] = "<input type='radio' name='attachments[{$post->ID}][align]' id='image-align-{$name}-{$post->ID}' value='$name'" .
1175-
( $checked == $name ? " checked='checked'" : '' ) .
1175+
( $checked === $name ? " checked='checked'" : '' ) .
11761176
" /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>$label</label>";
11771177
}
11781178

@@ -1222,7 +1222,7 @@ function image_size_input_fields( $post, $check = '' ) {
12221222
$css_id = "image-size-{$size}-{$post->ID}";
12231223

12241224
// If this size is the default but that's not available, don't select it.
1225-
if ( $size == $check ) {
1225+
if ( $size === $check ) {
12261226
if ( $enabled ) {
12271227
$checked = " checked='checked'";
12281228
} else {

0 commit comments

Comments
 (0)