Coding Standards: Use Yoda conditions where appropriate.

See #49222.

git-svn-id: https://develop.svn.wordpress.org/trunk@47219 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-02-09 16:52:28 +00:00
parent 40ffe0ef06
commit 130751cda3
124 changed files with 554 additions and 554 deletions
+3 -3
View File
@@ -56,7 +56,7 @@ function get_core_updates( $options = array() ) {
$updates = $from_api->updates;
$result = array();
foreach ( $updates as $update ) {
if ( $update->response == 'autoupdate' ) {
if ( 'autoupdate' === $update->response ) {
continue;
}
@@ -291,7 +291,7 @@ function update_nag() {
$cur = get_preferred_from_update_core();
if ( ! isset( $cur->response ) || $cur->response != 'upgrade' ) {
if ( ! isset( $cur->response ) || 'upgrade' !== $cur->response ) {
return false;
}
@@ -337,7 +337,7 @@ function update_right_now_message() {
if ( current_user_can( 'update_core' ) ) {
$cur = get_preferred_from_update_core();
if ( isset( $cur->response ) && $cur->response == 'upgrade' ) {
if ( isset( $cur->response ) && 'upgrade' === $cur->response ) {
$msg .= sprintf(
'<a href="%s" class="button" aria-describedby="wp-version">%s</a> ',
network_admin_url( 'update-core.php' ),