Changeset 42343 for trunk/src/wp-includes/ms-default-constants.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-default-constants.php
r41661 r42343 20 20 add_filter( 'default_site_option_ms_files_rewriting', '__return_true' ); 21 21 22 if ( ! get_site_option( 'ms_files_rewriting' ) ) 22 if ( ! get_site_option( 'ms_files_rewriting' ) ) { 23 23 return; 24 } 24 25 25 26 // Base uploads dir relative to ABSPATH 26 if ( ! defined( 'UPLOADBLOGSDIR' ) )27 if ( ! defined( 'UPLOADBLOGSDIR' ) ) { 27 28 define( 'UPLOADBLOGSDIR', 'wp-content/blogs.dir' ); 29 } 28 30 29 31 // Note, the main site in a post-MU network uses wp-content/uploads. … … 35 37 36 38 // Uploads dir relative to ABSPATH 37 if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) ) 39 if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) ) { 38 40 define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . '/blogs.dir/' . $site_id . '/files/' ); 41 } 39 42 } 40 43 } … … 45 48 * @since 3.0.0 46 49 */ 47 function ms_cookie_constants( 50 function ms_cookie_constants() { 48 51 $current_network = get_network(); 49 52 … … 51 54 * @since 1.2.0 52 55 */ 53 if ( ! defined( 'COOKIEPATH' ) )56 if ( ! defined( 'COOKIEPATH' ) ) { 54 57 define( 'COOKIEPATH', $current_network->path ); 58 } 55 59 56 60 /** 57 61 * @since 1.5.0 58 62 */ 59 if ( ! defined( 'SITECOOKIEPATH' ) )63 if ( ! defined( 'SITECOOKIEPATH' ) ) { 60 64 define( 'SITECOOKIEPATH', $current_network->path ); 65 } 61 66 62 67 /** 63 68 * @since 2.6.0 64 69 */ 65 if ( ! defined( 'ADMIN_COOKIE_PATH' ) ) {70 if ( ! defined( 'ADMIN_COOKIE_PATH' ) ) { 66 71 if ( ! is_subdomain_install() || trim( parse_url( get_option( 'siteurl' ), PHP_URL_PATH ), '/' ) ) { 67 72 define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH ); … … 74 79 * @since 2.0.0 75 80 */ 76 if ( !defined('COOKIE_DOMAIN') && is_subdomain_install() ) { 77 if ( !empty( $current_network->cookie_domain ) ) 78 define('COOKIE_DOMAIN', '.' . $current_network->cookie_domain); 79 else 80 define('COOKIE_DOMAIN', '.' . $current_network->domain); 81 if ( ! defined( 'COOKIE_DOMAIN' ) && is_subdomain_install() ) { 82 if ( ! empty( $current_network->cookie_domain ) ) { 83 define( 'COOKIE_DOMAIN', '.' . $current_network->cookie_domain ); 84 } else { 85 define( 'COOKIE_DOMAIN', '.' . $current_network->domain ); 86 } 81 87 } 82 88 } … … 93 99 /** 94 100 * Optional support for X-Sendfile header 101 * 95 102 * @since 3.0.0 96 103 */ 97 if ( ! defined( 'WPMU_SENDFILE' ) )104 if ( ! defined( 'WPMU_SENDFILE' ) ) { 98 105 define( 'WPMU_SENDFILE', false ); 106 } 99 107 100 108 /** 101 109 * Optional support for X-Accel-Redirect header 110 * 102 111 * @since 3.0.0 103 112 */ 104 if ( ! defined( 'WPMU_ACCEL_REDIRECT' ) )113 if ( ! defined( 'WPMU_ACCEL_REDIRECT' ) ) { 105 114 define( 'WPMU_ACCEL_REDIRECT', false ); 115 } 106 116 } 107 117 … … 120 130 */ 121 131 function ms_subdomain_constants() { 122 static $subdomain_error = null;132 static $subdomain_error = null; 123 133 static $subdomain_error_warn = null; 124 134 … … 139 149 trigger_error( __( '<strong>Conflicting values for the constants VHOST and SUBDOMAIN_INSTALL.</strong> The value of SUBDOMAIN_INSTALL will be assumed to be your subdomain configuration setting.' ) . ' ' . $vhost_deprecated, E_USER_WARNING ); 140 150 } else { 141 151 _deprecated_argument( 'define()', '3.0.0', $vhost_deprecated ); 142 152 } 143 153 return;
Note: See TracChangeset
for help on using the changeset viewer.