Make WordPress Core

Changeset 56219


Ignore:
Timestamp:
07/12/2023 09:44:30 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-includes/class-wp-network.php.

Follow-up to [41380], [41861], [45910].

Props aristath, poena, afercia, SergeyBiryukov.
See #57839.

File:
1 edited

Legend:

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

    r55990 r56219  
    229229                 */
    230230                $main_site_id = (int) apply_filters( 'pre_get_main_site_id', null, $this );
     231
    231232                if ( 0 < $main_site_id ) {
    232233                        return $main_site_id;
     
    237238                }
    238239
    239                 if ( ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) && DOMAIN_CURRENT_SITE === $this->domain && PATH_CURRENT_SITE === $this->path )
    240                         || ( defined( 'SITE_ID_CURRENT_SITE' ) && SITE_ID_CURRENT_SITE == $this->id ) ) {
     240                if ( ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' )
     241                        && DOMAIN_CURRENT_SITE === $this->domain && PATH_CURRENT_SITE === $this->path )
     242                        || ( defined( 'SITE_ID_CURRENT_SITE' ) && (int) SITE_ID_CURRENT_SITE === $this->id )
     243                ) {
    241244                        if ( defined( 'BLOG_ID_CURRENT_SITE' ) ) {
    242245                                $this->blog_id = (string) BLOG_ID_CURRENT_SITE;
Note: See TracChangeset for help on using the changeset viewer.