mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
strip www before adding subdomain when creating new site
git-svn-id: http://svn.automattic.com/wordpress/trunk@15050 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
35d800986f
commit
1c6f95023b
@ -167,7 +167,7 @@ switch ( $_GET['action'] ) {
|
||||
wp_die( __( 'Invalid email address.' ) );
|
||||
|
||||
if ( is_subdomain_install() ) {
|
||||
$newdomain = $domain . '.' . $current_site->domain;
|
||||
$newdomain = $domain . '.' . preg_replace( '|^www\.|', '', $current_site->domain );
|
||||
$path = $base;
|
||||
} else {
|
||||
$newdomain = $current_site->domain;
|
||||
|
@ -714,7 +714,7 @@ switch ( $action ) {
|
||||
<th scope="row"><?php _e( 'Site Address' ) ?></th>
|
||||
<td>
|
||||
<?php if ( is_subdomain_install() ) { ?>
|
||||
<input name="blog[domain]" type="text" class="regular-text" title="<?php _e( 'Domain' ) ?>"/>.<?php echo $current_site->domain;?>
|
||||
<input name="blog[domain]" type="text" class="regular-text" title="<?php _e( 'Domain' ) ?>"/>.<?php echo preg_replace( '|^www\.|', '', $current_site->domain );?>
|
||||
<?php } else {
|
||||
echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" type="text" title="<?php _e( 'Domain' ) ?>"/>
|
||||
<?php }
|
||||
|
@ -597,7 +597,7 @@ function wpmu_validate_blog_signup($blogname, $blog_title, $user = '') {
|
||||
|
||||
// Check if the domain/path has been used already.
|
||||
if ( is_subdomain_install() ) {
|
||||
$mydomain = "$blogname.$domain";
|
||||
$mydomain = $blogname . '.' . preg_replace( '|^www\.|', '', $domain );
|
||||
$path = $base;
|
||||
} else {
|
||||
$mydomain = "$domain";
|
||||
|
@ -78,15 +78,15 @@ function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
|
||||
if ( !is_subdomain_install() )
|
||||
echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="50" /><br />';
|
||||
else
|
||||
echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . '</span><br />';
|
||||
echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="50" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www\.|', '', $current_site->domain ) ) . '</span><br />';
|
||||
|
||||
if ( !is_user_logged_in() ) {
|
||||
print '(<strong>' . __( 'Your address will be ' );
|
||||
if ( !is_subdomain_install() )
|
||||
print $current_site->domain . $current_site->path . __( 'sitename' );
|
||||
else
|
||||
print __( 'domain.' ) . $current_site->domain . $current_site->path;
|
||||
echo '.)</strong> ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
|
||||
print __( 'domain.' ) . $site_domain . $current_site->path;
|
||||
echo '.</strong>) ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
|
||||
}
|
||||
|
||||
// Blog Title
|
||||
|
Loading…
Reference in New Issue
Block a user