Contents
bp_get_root_blog_id()
Get the ID of the root blog.
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.).
Return
(int) The root site ID.
Source
File: bp-core/bp-core-functions.php
function bp_get_root_blog_id() { /** * Filters the ID for the root blog. * * @since BuddyPress 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 ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Related
Uses
Uses | Description |
---|---|
bp-loader.php: buddypress() |
The main function responsible for returning the one true BuddyBoss Instance to functions everywhere. |
class-buddypress.php: bp_get_root_blog_id |
Filters the BuddyPress Root blog ID. |
Used By | Description |
---|---|
bp-messages/classes/class-bp-rest-messages-endpoint.php: BP_REST_Messages_Endpoint::get_current_user_permissions() |
Get current user’s permission. |
bp-groups/bp-groups-functions.php: bp_group_get_count_by_group_type() |
Get group count of group type tabs groups. |
bp-core/compatibility/bp-incompatible-plugins-helper.php: bp_core_remove_authors_taxonomy_for_co_authors_plus() |
Remove the Author Taxonomies as that is added by Co-Authors Plus which is not used full. |
bp-core/classes/class-bp-admin.php: BP_Admin::bp_emails_add_sub_menu_page_admin_menu() | |
bp-blogs/bp-blogs-functions.php: bp_blogs_add_user_to_blog() |
Record a user’s association with a blog. |
bp-blogs/bp-blogs-functions.php: bp_blogs_record_existing_blogs() |
Populate the BP blogs table with existing blogs. |
bp-xprofile/bp-xprofile-admin.php: bp_core_get_users_admin_tabs() |
Register tabs for the BuddyBoss > Groups screens. |
bp-groups/classes/class-bp-groups-member.php: BP_Groups_Member::delete_all_for_user() |
Delete all group membership information for the specified user. |
bp-groups/bp-groups-functions.php: bp_get_group_ids_by_group_types() |
Get group count of group type tabs groups. |
bp-core/deprecated/buddyboss/1.1.8.php: bp_get_total_count_by_group_types() |
Get group count of group type tabs groups. |
bp-members/bp-members-functions.php: bp_members_add_role_after_activation() |
Add default WordPress role for new signups on the BP root blog. |
bp-members/bp-members-functions.php: bp_core_delete_account() |
Process account deletion requests. |
bp-members/bp-members-functions.php: bp_core_process_spammer_status() |
Process a spammed or unspammed user. |
bp-invites/bp-invites-admin.php: invites_admin_menu_order() |
Add Invites menu item to custom menus array. |
bp-core/bp-core-taxonomy.php: bp_get_taxonomy_term_site_id() |
Gets the ID of the site that BP should use for taxonomy term storage. |
bp-core/admin/bp-core-admin-tools.php: bp_admin_reinstall_emails() |
Delete emails and restore from defaults. |
bp-core/admin/bp-core-admin-pages.php: bp_admin_setting_callback_page_directory_dropdown() |
Pages drop downs callback |
bp-core/admin/bp-core-admin-functions.php: bp_member_type_import_submenu_page() |
Import profile types. |
bp-core/admin/bp-core-admin-functions.php: bp_core_get_groups_admin_tabs() |
Register tabs for the BuddyBoss > Groups screens. |
bp-core/bp-core-customizer-email.php: bp_email_get_redirect_to_customizer_url() |
Return a redirect url to the Customizer, previewing a randomly selected email. |
bp-core/deprecated/buddypress/1.7.php: bp_core_allow_default_theme() |
On multiblog installations you must first allow themes to be activated and show up on the theme selection screen. This function will let the BuddyPress bundled themes show up on the root blog selection screen and bypass this step. It also means that the themes won’t show for selection on other blogs. |
bp-core/bp-core-update.php: bp_version_updater() |
Initialize an update or installation of BuddyPress. |
bp-core/bp-core-update.php: bp_update_to_1_6() |
Remove unused metadata from database when upgrading from < 1.6.0. |
bp-core/deprecated/buddypress/2.1.php: bp_adminbar_logo() |
Output the BuddyBar logo. |
bp-core/bp-core-wpabstraction.php: switch_to_blog() |
Switch to specified blog. |
bp-core/bp-core-wpabstraction.php: restore_current_blog() |
Restore current blog. |
bp-core/classes/class-bp-admin.php: BP_Admin::emails_admin_menu_order() |
Add Emails menu item to custom menus array. |
bp-core/classes/class-bp-admin.php: BP_Admin::admin_menus() |
Register site- or network-admin nav menu elements. |
bp-core/bp-core-caps.php: bp_current_user_can() |
Check whether the current user has a given capability. |
bp-core/bp-core-caps.php: bp_user_can() |
Check whether the specified user has a given capability on a given site. |
bp-core/bp-core-functions.php: bp_get_email() |
Get an BP_Email object for the specified email type. |
bp-core/bp-core-functions.php: bp_upload_dir() |
Set data from the BP root blog’s upload directory. |
bp-core/bp-core-functions.php: bp_is_root_blog() |
Is this the root blog? |
bp-core/bp-core-functions.php: bp_core_get_root_domain() |
Return the domain for the root blog. |
bp-core/bp-core-functions.php: bp_core_get_directory_pages() |
Get names and slugs for BuddyPress component directory pages. |
bp-core/bp-core-functions.php: bp_core_add_page_mappings() |
Creates necessary directory pages. |
bp-core/bp-core-catchuri.php: bp_core_set_uri_globals() |
Analyze the URI and break it down into BuddyPress-usable chunks. |
bp-core/bp-core-options.php: bp_core_get_root_options() |
Fetch global BP options. |
bp-core/bp-core-options.php: bp_update_option() |
Save an option. |
bp-core/bp-core-options.php: bp_delete_option() |
Delete an option. |
bp-core/bp-core-options.php: bp_get_option() |
Retrieve an option. |
bp-core/bp-core-options.php: bp_add_option() |
Add an option. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.