bp_allowed_themes
Filters the allowed themes list for BuddyPress-specific themes.
Description
Parameters (1)
- 0. $themes (string)
- The path of the template to include.
Usage
- To run the hook, copy the example below.
- $themes = apply_filters( 'bp_allowed_themes', $themes );
- if ( !empty( $themes ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_allowed_themes callback
- function filter_bp_allowed_themes( $themes ) {
- // make filter magic happen here...
- return $themes;
- };
- // add the filter
- add_filter( 'bp_allowed_themes', 'filter_bp_allowed_themes', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_allowed_themes', 'filter_bp_allowed_themes', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-core/bp-core-dependency.php
- return apply_filters( 'bp_allowed_themes', $themes );