WordPress.org

Make WordPress Core

Ticket #11881: 11881.fixes-setup-config-only.diff

File 11881.fixes-setup-config-only.diff, 2.3 KB (added by nacin, 5 years ago)

As a stopgap -- moves is_multisite() to new wp-includes/load.php and includes load.php from setup-config.php.

  • wp-settings.php

     
    99 * @package WordPress 
    1010 */ 
    1111 
    12  
    1312/** 
    14  * Whether Multisite support is enabled 
     13 * Stores the location of the WordPress directory of functions, classes, and core content. 
    1514 * 
    16  * @since 3.0 
    17  * 
    18  * @return bool True if multisite is enabled, false otherwise. 
     15 * @since 1.0.0 
    1916 */ 
    20 function is_multisite() { 
    21         if ( ( defined('MULTISITE') && MULTISITE ) || defined('VHOST') || defined('SUNRISE') ) 
    22                 return true; 
     17define('WPINC', 'wp-includes'); 
    2318 
    24         return false; 
    25 } 
     19require( ABSPATH . WPINC . '/load.php'); 
    2620 
    2721if ( !defined('WP_MEMORY_LIMIT') ) { 
    2822        if( is_multisite() ) { 
     
    255249if ( !defined('MEDIA_TRASH') ) 
    256250        define('MEDIA_TRASH', false); 
    257251 
    258 /** 
    259  * Stores the location of the WordPress directory of functions, classes, and core content. 
    260  * 
    261  * @since 1.0.0 
    262  */ 
    263 define('WPINC', 'wp-includes'); 
    264  
    265252if ( !defined('WP_LANG_DIR') ) { 
    266253        /** 
    267254         * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR 
  • wp-includes/load.php

     
     1<?php 
     2 
     3/** 
     4 * Initialization functions. 
     5 * 
     6 * @package WordPress 
     7 */ 
     8 
     9/** 
     10 * Whether Multisite support is enabled 
     11 * 
     12 * @since 3.0 
     13 * 
     14 * @return bool True if multisite is enabled, false otherwise. 
     15 */ 
     16function is_multisite() { 
     17        if ( ( defined('MULTISITE') && MULTISITE ) || defined('VHOST') || defined('SUNRISE') ) 
     18                return true; 
     19 
     20        return false; 
     21} 
     22 
     23?> 
     24 No newline at end of file 
  • wp-admin/setup-config.php

     
    3131define('ABSPATH', dirname(dirname(__FILE__)).'/'); 
    3232define('WPINC', 'wp-includes'); 
    3333define('WP_CONTENT_DIR', ABSPATH . 'wp-content'); 
     34define('WP_DEBUG', false); 
    3435/**#@-*/ 
    3536 
     37require_once(ABSPATH . WPINC . '/load.php'); 
    3638require_once(ABSPATH . WPINC . '/compat.php'); 
    3739require_once(ABSPATH . WPINC . '/functions.php'); 
    3840require_once(ABSPATH . WPINC . '/classes.php');