bp_is_current_component_core()
Is the current component an active core component?
Description Description
Use this function when you need to check if the current component is an active core component of BuddyPress. If the current component is inactive, it will return false. If the current component is not part of BuddyPress core, it will return false. If the current component is active, and is part of BuddyPress core, it will return true.
Return Return
(bool) True if the current component is active and is one of BP's packaged components.
Source Source
File: bp-core/bp-core-template.php
function bp_is_current_component_core() { $retval = false; foreach ( bp_core_get_packaged_component_ids() as $active_component ) { if ( bp_is_current_component( $active_component ) ) { $retval = true; break; } } return $retval; }
Changelog Changelog
Version | Description |
---|---|
1.7.0 | Introduced. |