Coding Standards: Use strict comparison in some legacy media functions.
Some checks failed
Cleanup Pull Requests / Clean up pull requests (push) Waiting to run
Coding Standards / PHP coding standards (push) Waiting to run
Coding Standards / JavaScript coding standards (push) Waiting to run
Coding Standards / Slack Notifications (push) Blocked by required conditions
Coding Standards / Failed workflow tasks (push) Blocked by required conditions
End-to-end Tests / Test with SCRIPT_DEBUG disabled (push) Waiting to run
End-to-end Tests / Test with SCRIPT_DEBUG enabled (push) Waiting to run
End-to-end Tests / Slack Notifications (push) Blocked by required conditions
End-to-end Tests / Failed workflow tasks (push) Blocked by required conditions
JavaScript Tests / QUnit Tests (push) Waiting to run
JavaScript Tests / Slack Notifications (push) Blocked by required conditions
JavaScript Tests / Failed workflow tasks (push) Blocked by required conditions
Performance Tests / Determine Matrix (push) Waiting to run
Performance Tests / ${{ matrix.multisite && 'Multisite' || 'Single Site' }} ${{ matrix.memcached && 'Memcached' || 'Default' }} (push) Blocked by required conditions
Performance Tests / Compare (push) Blocked by required conditions
Performance Tests / Slack Notifications (push) Blocked by required conditions
Performance Tests / Failed workflow tasks (push) Blocked by required conditions
PHP Compatibility / Check PHP compatibility (push) Waiting to run
PHP Compatibility / Slack Notifications (push) Blocked by required conditions
PHP Compatibility / Failed workflow tasks (push) Blocked by required conditions
PHPUnit Tests / PHP 7.2 (push) Waiting to run
PHPUnit Tests / PHP 7.3 (push) Waiting to run
PHPUnit Tests / PHP 7.4 (push) Waiting to run
PHPUnit Tests / PHP 8.0 (push) Waiting to run
PHPUnit Tests / PHP 8.1 (push) Waiting to run
PHPUnit Tests / PHP 8.2 (push) Waiting to run
PHPUnit Tests / PHP 8.3 (push) Waiting to run
PHPUnit Tests / PHP 8.4 (push) Waiting to run
PHPUnit Tests / html-api-html5lib-tests (push) Waiting to run
PHPUnit Tests / Slack Notifications (push) Blocked by required conditions
PHPUnit Tests / Failed workflow tasks (push) Blocked by required conditions
Test Build Processes / Core running from build (push) Waiting to run
Test Build Processes / Core running from src (push) Waiting to run
Test Build Processes / Gutenberg running from build (push) Waiting to run
Test Build Processes / Gutenberg running from src (push) Waiting to run
Test Build Processes / Slack Notifications (push) Blocked by required conditions
Test Build Processes / Failed workflow tasks (push) Blocked by required conditions
Lint GitHub Actions workflow files / Lint GitHub Action files (push) Has been cancelled

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
This commit is contained in:
Sergey Biryukov 2025-02-01 20:50:13 +00:00
parent 1111166932
commit 4180ca6425

View File

@ -93,7 +93,7 @@ function the_media_upload_tabs() {
foreach ( $tabs as $callback => $text ) {
$class = '';
if ( $current == $callback ) {
if ( $current === $callback ) {
$class = " class='current'";
}
@ -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>";
}
@ -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 {