Changeset 14884
- Timestamp:
- 05/25/2010 03:16:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/network.php
r14871 r14884 51 51 } 52 52 /** 53 * Allow folderinstall54 * 55 * @since 3.0.0 56 * @return bool Whether folderinstall is allowed57 */ 58 function allow_ folder_install() {53 * Allow subdirectory install 54 * 55 * @since 3.0.0 56 * @return bool Whether subdirectory install is allowed 57 */ 58 function allow_subdirectory_install() { 59 59 global $wpdb; 60 if ( apply_filters( 'allow_ folder_install', false ) )60 if ( apply_filters( 'allow_subdirectory_install', false ) ) 61 61 return true; 62 62 … … 162 162 } elseif ( apache_mod_loaded('mod_rewrite') ) { // assume nothing 163 163 $subdomain_install = true; 164 } elseif ( !allow_ folder_install() ) {164 } elseif ( !allow_subdirectory_install() ) { 165 165 $subdomain_install = true; 166 166 } else { … … 173 173 } 174 174 175 if ( allow_subdomain_install() && allow_ folder_install() ) : ?>175 if ( allow_subdomain_install() && allow_subdirectory_install() ) : ?> 176 176 <h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3> 177 177 <p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>' ); ?></p> … … 212 212 <tr> 213 213 <th scope="row"><?php esc_html_e( 'Sub-directory Install' ); ?></th> 214 <td><?php _e( 'Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.' ); ?></td> 214 <td><?php 215 _e( 'Because you are using <code>localhost</code>, the sites in your WordPress network must use sub-directories. Consider using <code>localhost.localdomain</code> if you wish to use sub-domains.' ); 216 // Uh oh: 217 if ( !allow_subdirectory_install() ) 218 echo ' <strong>' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . '</strong>'; 219 ?></td> 215 220 </tr> 216 221 <?php elseif ( !allow_subdomain_install() ) : ?> 217 222 <tr> 218 223 <th scope="row"><?php esc_html_e( 'Sub-directory Install' ); ?></th> 219 <td><?php _e( 'Because your install is in a directory, the sites in your WordPress network must use sub-directories.' ); ?></td> 220 </tr> 221 <?php elseif ( !allow_folder_install() ) : ?> 224 <td><?php 225 _e( 'Because your install is in a directory, the sites in your WordPress network must use sub-directories.' ); 226 // Uh oh: 227 if ( !allow_subdirectory_install() ) 228 echo ' <strong>' . __( 'Warning!' ) . ' ' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . '</strong>'; 229 ?></td> 230 </tr> 231 <?php elseif ( !allow_subdirectory_install() ) : ?> 222 232 <tr> 223 233 <th scope="row"><?php esc_html_e( 'Sub-domain Install' ); ?></th> 224 <td><?php _e( 'Because your install is over 1 month old, the sites in your WordPress network must use sub-domains.' ); ?></td> 234 <td><?php _e( 'Because your install is not new, the sites in your WordPress network must use sub-domains.' ); 235 echo ' <strong>' . __( 'The main site in a sub-directory install will need to use a modified permalink structure, potentially breaking existing links.' ) . '</strong>'; 236 ?></td> 225 237 </tr> 226 238 <?php endif; ?> … … 267 279 268 280 if ( $_POST ) { 269 $subdomain_install = allow_subdomain_install() ? ( allow_ folder_install() ? ! empty( $_POST['subdomain_install'] ) : true ) : false;281 $subdomain_install = allow_subdomain_install() ? ( allow_subdirectory_install() ? ! empty( $_POST['subdomain_install'] ) : true ) : false; 270 282 } else { 271 283 if ( is_multisite() ) {
Note: See TracChangeset
for help on using the changeset viewer.