Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/23/2014 08:43:51 PM (5 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-members/bp-members-template.php

    r8677 r8683  
    15741574
    15751575/**
     1576 * Output the base URL for subdomain installations of WordPress Multisite.
     1577 *
     1578 * @since BuddyPress (2.1.0)
     1579 */
     1580function bp_signup_subdomain_base() {
     1581    echo bp_signup_get_subdomain_base();
     1582}
     1583    /**
     1584     * Return the base URL for subdomain installations of WordPress Multisite.
     1585     *
     1586     * Replaces bp_blogs_get_subdomain_base()
     1587     *
     1588     * @since BuddyPress (2.1.0)
     1589     *
     1590     * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com.
     1591     */
     1592    function bp_signup_get_subdomain_base() {
     1593        global $current_site;
     1594
     1595        // In case plugins are still using this filter
     1596        $subdomain_base = apply_filters( 'bp_blogs_subdomain_base', preg_replace( '|^www\.|', '', $current_site->domain ) . $current_site->path );
     1597
     1598        return apply_filters( 'bp_signup_subdomain_base', $subdomain_base );
     1599    }
     1600
     1601/**
    15761602 * Output the 'signup_blog_titl' value submitted at signup.
    15771603 */
Note: See TracChangeset for help on using the changeset viewer.