bp_is_root_component
Filters whether or not a component's URL should be in the root, not under a member page.
Description
Parameters (1)
- 0. $retval (bool)
- Whether or not URL should be in the root.
Usage
- To run the hook, copy the example below.
- $retval = apply_filters( 'bp_is_root_component', $retval );
- if ( !empty( $retval ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_is_root_component callback
- function filter_bp_is_root_component( $retval ) {
- // make filter magic happen here...
- return $retval;
- };
- // add the filter
- add_filter( 'bp_is_root_component', 'filter_bp_is_root_component', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_is_root_component', 'filter_bp_is_root_component', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-core/bp-core-template.php
- return (bool) apply_filters( 'bp_is_root_component', $retval );