WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (3 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-settings.php

    r42201 r42343  
    4646// Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
    4747@ini_set( 'magic_quotes_runtime', 0 );
    48 @ini_set( 'magic_quotes_sybase',  0 );
     48@ini_set( 'magic_quotes_sybase', 0 );
    4949
    5050// WordPress calculates offsets from UTC.
     
    129129
    130130// Stop most of WordPress from being loaded if we just want the basics.
    131 if ( SHORTINIT )
     131if ( SHORTINIT ) {
    132132    return false;
     133}
    133134
    134135// Load the L10n library.
     
    278279do_action( 'muplugins_loaded' );
    279280
    280 if ( is_multisite() )
    281     ms_cookie_constants(  );
     281if ( is_multisite() ) {
     282    ms_cookie_constants();
     283}
    282284
    283285// Define constants after multisite is loaded.
     
    315317
    316318// Run wp_cache_postload() if object cache is enabled and the function exists.
    317 if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
     319if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) {
    318320    wp_cache_postload();
     321}
    319322
    320323/**
     
    342345/**
    343346 * WordPress Query object
     347 *
    344348 * @global WP_Query $wp_the_query
    345349 * @since 2.0.0
     
    350354 * Holds the reference to @see $wp_the_query
    351355 * Use this global for WordPress queries
     356 *
    352357 * @global WP_Query $wp_query
    353358 * @since 1.5.0
     
    357362/**
    358363 * Holds the WordPress Rewrite object for creating pretty URLs
     364 *
    359365 * @global WP_Rewrite $wp_rewrite
    360366 * @since 1.5.0
     
    364370/**
    365371 * WordPress Object
     372 *
    366373 * @global WP $wp
    367374 * @since 2.0.0
     
    371378/**
    372379 * WordPress Widget Factory Object
     380 *
    373381 * @global WP_Widget_Factory $wp_widget_factory
    374382 * @since 2.8.0
     
    378386/**
    379387 * WordPress User Roles
     388 *
    380389 * @global WP_Roles $wp_roles
    381390 * @since 2.0.0
     
    391400
    392401// Define the template related constants.
    393 wp_templating_constants(  );
     402wp_templating_constants();
    394403
    395404// Load the default text localization domain.
    396405load_default_textdomain();
    397406
    398 $locale = get_locale();
     407$locale      = get_locale();
    399408$locale_file = WP_LANG_DIR . "/$locale.php";
    400 if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
     409if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
    401410    require( $locale_file );
     411}
    402412unset( $locale_file );
    403413
    404414/**
    405415 * WordPress Locale object for loading locale domain date and various strings.
     416 *
    406417 * @global WP_Locale $wp_locale
    407418 * @since 2.1.0
     
    421432// Load the functions for the active theme, for both parent and child theme if applicable.
    422433if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
    423     if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
     434    if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) {
    424435        include( STYLESHEETPATH . '/functions.php' );
    425     if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
     436    }
     437    if ( file_exists( TEMPLATEPATH . '/functions.php' ) ) {
    426438        include( TEMPLATEPATH . '/functions.php' );
     439    }
    427440}
    428441
     
    456469        die();
    457470    }
    458     unset($file);
     471    unset( $file );
    459472}
    460473
Note: See TracChangeset for help on using the changeset viewer.