Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in some legacy media functions.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
SergeyBiryukov committed Feb 1, 2025
1 parent 1111166 commit 4180ca6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function the_media_upload_tabs() {
foreach ( $tabs as $callback => $text ) {
$class = '';

if ( $current == $callback ) {
if ( $current === $callback ) {
$class = " class='current'";
}

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

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

// If this size is the default but that's not available, don't select it.
if ( $size == $check ) {
if ( $size === $check ) {
if ( $enabled ) {
$checked = " checked='checked'";
} else {
Expand Down

0 comments on commit 4180ca6

Please sign in to comment.