Skip to:
Content

BuddyPress.org

Changeset 4389


Ignore:
Timestamp:
05/19/2011 03:57:24 PM (13 years ago)
Author:
boonebgorges
Message:

Strips leading www from root domain when creating new blogs. Fixes #3227. Props wpmuguru

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs/bp-blogs-template.php

    r4275 r4389  
    435435        echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span> <input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /><br />';
    436436    else
    437         echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /> <span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';
     437        echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /> <span class="suffix_address">.' . preg_replace( '|^www\.|', '', $current_site->domain ) . $current_site->path . '</span><br />';
    438438
    439439    if ( !is_user_logged_in() ) {
  • trunk/bp-themes/bp-default/registration/register.php

    r4347 r4389  
    182182
    183183                            <?php if ( is_subdomain_install() ) : ?>
    184                                 http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> .<?php echo str_replace( 'http://', '', site_url() ) ?>
     184                                http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" /> .<?php echo preg_replace( '|^https?://(?:www\.)|', '', site_url() ) ?>
    185185                            <?php else : ?>
    186186                                <?php echo site_url() ?>/ <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value() ?>" />
Note: See TracChangeset for help on using the changeset viewer.