Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (8 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-settings.php

    r41875 r42343  
    5353// This block will process a request if the current network or current site objects
    5454// have not been populated in the global scope through something like `sunrise.php`.
    55 if ( !isset( $current_site ) || !isset( $current_blog ) ) {
     55if ( ! isset( $current_site ) || ! isset( $current_blog ) ) {
    5656
    5757    $domain = strtolower( stripslashes( $_SERVER['HTTP_HOST'] ) );
    5858    if ( substr( $domain, -3 ) == ':80' ) {
    59         $domain = substr( $domain, 0, -3 );
     59        $domain               = substr( $domain, 0, -3 );
    6060        $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -3 );
    6161    } elseif ( substr( $domain, -4 ) == ':443' ) {
    62         $domain = substr( $domain, 0, -4 );
     62        $domain               = substr( $domain, 0, -4 );
    6363        $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 );
    6464    }
     
    9797$wpdb->set_prefix( $table_prefix, false ); // $table_prefix can be set in sunrise.php
    9898$wpdb->set_blog_id( $current_blog->blog_id, $current_blog->site_id );
    99 $table_prefix = $wpdb->get_blog_prefix();
     99$table_prefix       = $wpdb->get_blog_prefix();
    100100$_wp_switched_stack = array();
    101 $switched = false;
     101$switched           = false;
    102102
    103103// need to init cache again after blog_id is set
Note: See TracChangeset for help on using the changeset viewer.