| | 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 | */ |
| | 776 | function 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 | |