WordPress.org

Make WordPress Core


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

Coding Standards: Use Yoda conditions where appropriate.

See #49222.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/rest-api.php

    r47122 r47219  
    373373    if ( is_ssl() && isset( $_SERVER['SERVER_NAME'] ) ) {
    374374        // If the current host is the same as the REST URL host, force the REST URL scheme to HTTPS.
    375         if ( $_SERVER['SERVER_NAME'] === parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) ) {
     375        if ( parse_url( get_home_url( $blog_id ), PHP_URL_HOST ) === $_SERVER['SERVER_NAME'] ) {
    376376            $url = set_url_scheme( $url, 'https' );
    377377        }
Note: See TracChangeset for help on using the changeset viewer.