You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deprecate VHOST in favor of a boolean, SUBDOMAIN_INSTALL. Core will keep VHOST defined for plugins' sake, but you should only define SUBDOMAIN_INSTALL. Throws a notice if VHOST is defined, and a warning if they somehow conflict. Sunrise can still handle them. fixesWordPress#11796.
<div class="updated"><p><strong><?php_e( 'Notice: The Network feature is already enabled.' ); ?></strong> <?php_e( 'The original configuration steps are shown here for reference.' ); ?></p></div>
246
246
<?php } else {
247
-
$vhost = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" );
247
+
$subdomain_install = (bool) $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" );
<p><?php_e( 'Please complete the configuration steps. To create a new network, you will need to empty or remove the network database tables.' ); ?></p>
<li><p><?phpprintf( __( 'Add the following to your <code>wp-config.php</code> file in <code>%s</code> <strong>above</strong> the line reading <code>/* That’s all, stop editing! Happy blogging. */</code>:' ), ABSPATH ); ?></p>
<li><p><?phpprintf( __( 'Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:' ), ABSPATH ); ?></p>
Copy file name to clipboardExpand all lines: wp-includes/ms-default-constants.php
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -91,4 +91,50 @@ function ms_file_constants( ) {
91
91
if ( !defined( 'WPMU_ACCEL_REDIRECT' ) )
92
92
define( 'WPMU_ACCEL_REDIRECT', false );
93
93
}
94
+
95
+
/**
96
+
* Defines Multisite subdomain constants and handles warnings and notices.
97
+
*
98
+
* VHOST is deprecated in favor of SUBDOMAIN_INSTALL, which is a bool.
99
+
*
100
+
* On first call, the constants are checked and defined. On second call,
101
+
* we will have translations loaded and can trigger warnings easily.
102
+
*
103
+
* @since 3.0.0
104
+
*/
105
+
functionms_subdomain_constants() {
106
+
static$error = null;
107
+
static$error_warn = false;
108
+
109
+
if ( false === $error )
110
+
return;
111
+
112
+
if ( $error ) {
113
+
$vhost_deprecated = __( 'The constant <code>VHOST</code> <strong>is deprecated</strong>. Use the boolean constant <code>SUBDOMAIN_INSTALL</code> in wp-config.php to enable a subdomain configuration. Use is_subdomain_install() to check whether a subdomain configuration is enabled.' );
114
+
if ( $error_warn ) {
115
+
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 );
0 commit comments