Make WordPress Core


Ignore:
Timestamp:
02/09/2020 04:52:28 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r47198 r47219  
    650650                $value  = $_POST['wp_screen_options']['value'];
    651651
    652                 if ( $option != sanitize_key( $option ) ) {
     652                if ( sanitize_key( $option ) != $option ) {
    653653                        return;
    654654                }
     
    745745        $xpath = new DOMXPath( $doc );
    746746        $rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]' );
    747         if ( $rules->length == 0 ) {
     747        if ( 0 == $rules->length ) {
    748748                return false;
    749749        } else {
     
    12901290 */
    12911291function update_option_new_admin_email( $old_value, $value ) {
    1292         if ( $value == get_option( 'admin_email' ) || ! is_email( $value ) ) {
     1292        if ( get_option( 'admin_email' ) === $value || ! is_email( $value ) ) {
    12931293                return;
    12941294        }
Note: See TracChangeset for help on using the changeset viewer.