Skip to:
Content

BuddyPress.org

Ticket #3132: 3132.patch

File 3132.patch, 934 bytes (added by boonebgorges, 15 years ago)
  • bp-core/bp-core-functions.php

    function bp_core_create_root_component_page() { 
    762762        bp_core_update_page_meta( $page_ids );
    763763}
    764764
     765/**
     766 * Is this BP_ROOT_BLOG?
     767 *
     768 * Checks against $wpdb->blogid, which provides greater support for switch_to_blog(). Always returns
     769 * true on non-multisite installations.
     770 *
     771 * @package BuddyPress
     772 * @since 1.3
     773 *
     774 * @return bool $is_root_blog Returns true if this is BP_ROOT_BLOG.
     775 */
     776function bp_is_root_blog() {
     777        global $wpdb;
     778       
     779        $is_root_blog = true;
     780       
     781        if ( is_multisite() && $wpdb->blogid != BP_ROOT_BLOG )
     782                $is_root_blog = false;
     783       
     784        return apply_filters( 'bp_is_root_blog', $is_root_blog );
     785}
     786
    765787/** Global Manipulators *******************************************************/
    766788
    767789/**