Make WordPress Core


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

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r47198 r47219  
    515515    $url = dirname( set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ) );
    516516
    517     if ( $url !== get_option( 'siteurl' ) ) {
     517    if ( get_option( 'siteurl' ) !== $url ) {
    518518        update_option( 'siteurl', $url );
    519519    }
     
    12831283            }
    12841284
    1285             if ( ( empty( $redirect_to ) || $redirect_to === 'wp-admin/' || $redirect_to === admin_url() ) ) {
     1285            if ( ( empty( $redirect_to ) || 'wp-admin/' === $redirect_to || admin_url() === $redirect_to ) ) {
    12861286                // If the user doesn't belong to a blog, send them to user admin. If the user can't edit posts, send them to their profile.
    12871287                if ( is_multisite() && ! get_active_blog_for_user( $user->ID ) && ! is_super_admin( $user->ID ) ) {
Note: See TracChangeset for help on using the changeset viewer.