bp_get_root_blog_id()

Get the ID of the root blog.


Description Description

The "root blog" is the blog on a WordPress network where BuddyPress content appears (where member profile URLs resolve, where a given theme is loaded, etc.).


Top ↑

Return Return

(int) The root site ID.


Source Source

File: bp-core/bp-core-functions.php

function bp_get_root_blog_id() {

	/**
	 * Filters the ID for the root blog.
	 *
	 * @since 1.5.0
	 *
	 * @param int $root_blog_id ID for the root blog.
	 */
	return (int) apply_filters( 'bp_get_root_blog_id', (int) buddypress()->root_blog_id );
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.