Make WordPress Core

Changeset 47115


Ignore:
Timestamp:
01/27/2020 02:28:12 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-admin/user/admin.php.

Apply the case-insensitive network-site comparisons added in [27725] for wp-admin/network/admin.php to wp-admin/user/admin.php too, for consistency.

Props rimadoshi.
Fixes #49300.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

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

    r38657 r47115  
    1818}
    1919
    20 $redirect_network_admin_request = 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path );
     20$redirect_network_admin_request = ( 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path ) );
    2121
    2222/**
     
    2828 */
    2929$redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request );
     30
    3031if ( $redirect_network_admin_request ) {
    3132    wp_redirect( network_admin_url() );
    3233    exit;
    3334}
     35
    3436unset( $redirect_network_admin_request );
  • trunk/src/wp-admin/user/admin.php

    r42343 r47115  
    1717}
    1818
    19 $redirect_user_admin_request = ( ( $current_blog->domain != $current_site->domain ) || ( $current_blog->path != $current_site->path ) );
     19$redirect_user_admin_request = ( 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path ) );
     20
    2021/**
    2122 * Filters whether to redirect the request to the User Admin in Multisite.
     
    2627 */
    2728$redirect_user_admin_request = apply_filters( 'redirect_user_admin_request', $redirect_user_admin_request );
     29
    2830if ( $redirect_user_admin_request ) {
    2931    wp_redirect( user_admin_url() );
    3032    exit;
    3133}
     34
    3235unset( $redirect_user_admin_request );
Note: See TracChangeset for help on using the changeset viewer.