From 7d9eb8fc95e2df3ed1a6cc1a55d606a87ca247dd Mon Sep 17 00:00:00 2001
From: Sergey Biryukov
Date: Sat, 3 Feb 2024 14:22:44 +0000
Subject: [PATCH] Coding Standards: Use strict comparison in
`wp-admin/update-core.php`.
Follow-up to [11273], [25784], [54654].
Props wpfy, mukesh27, azaozz, viralsampat.
Fixes #58061, #60415.
git-svn-id: https://develop.svn.wordpress.org/trunk@57529 602fd350-edb4-49c9-b593-d223f7449a82
---
src/wp-admin/update-core.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php
index c34ac06f24..80fbd530b2 100644
--- a/src/wp-admin/update-core.php
+++ b/src/wp-admin/update-core.php
@@ -42,7 +42,7 @@ function list_core_update( $update ) {
if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) {
$version_string = $update->current;
- } elseif ( 'en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version ) {
+ } elseif ( 'en_US' === $update->locale && $update->packages->partial && $wp_version === $update->partial_version ) {
$updates = get_core_updates();
if ( $updates && 1 === count( $updates ) ) {
// If the only available update is a partial builds, it doesn't need a language-specific version string.
@@ -179,9 +179,9 @@ function list_core_update( $update ) {
}
echo '
';
- if ( 'en_US' !== $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package != $update->locale ) ) {
+ if ( 'en_US' !== $update->locale && ( ! isset( $wp_local_package ) || $wp_local_package !== $update->locale ) ) {
echo '' . __( 'This localized version contains both the translation and various other localization fixes.' ) . '
';
- } elseif ( 'en_US' === $update->locale && 'en_US' !== get_locale() && ( ! $update->packages->partial && $wp_version == $update->partial_version ) ) {
+ } elseif ( 'en_US' === $update->locale && 'en_US' !== get_locale() && ( ! $update->packages->partial && $wp_version === $update->partial_version ) ) {
// Partial builds don't need language-specific warnings.
echo '' . sprintf(
/* translators: %s: WordPress version. */