Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/23/2014 08:43:51 PM (12 years ago)
Author:
imath
Message:

Make sure to get the subdomain base on Multisite configs

Move the function to get the subdomain base out of the blogs component to be sure it will be retrieved (when registering a new blog) even if the blogs component is not active.

fixes #5530

File:
1 edited

Legend:

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

    r8662 r8683  
    10441044
    10451045/**
    1046  * Output the base URL for subdomain installations of WordPress Multisite.
    1047  *
    1048  * @since BuddyPress (1.6.0)
    1049  */
    1050 function bp_blogs_subdomain_base() {
    1051     echo bp_blogs_get_subdomain_base();
    1052 }
    1053     /**
    1054      * Return the base URL for subdomain installations of WordPress Multisite.
    1055      *
    1056      * @since BuddyPress (1.6.0)
    1057      *
    1058      * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com.
    1059      */
    1060     function bp_blogs_get_subdomain_base() {
    1061         global $current_site;
    1062 
    1063         return apply_filters( 'bp_blogs_subdomain_base', preg_replace( '|^www\.|', '', $current_site->domain ) . $current_site->path );
    1064     }
    1065 
    1066 /**
    10671046 * Process a blog registration submission.
    10681047 *
Note: See TracChangeset for help on using the changeset viewer.