bp_get_title_parts
Filter BuddyPress title parts before joining.
Description
Returns (array)
Parameters (1)
- 0. $bp_title_parts (array)
- Current
BuddyPress
title parts.
Usage
- To run the hook, copy the example below.
- $bp_title_parts = apply_filters( 'bp_get_title_parts', $bp_title_parts );
- if ( !empty( $bp_title_parts ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the bp_get_title_parts callback
- function filter_bp_get_title_parts( $bp_title_parts ) {
- // make filter magic happen here...
- return $bp_title_parts;
- };
- // add the filter
- add_filter( 'bp_get_title_parts', 'filter_bp_get_title_parts', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'bp_get_title_parts', 'filter_bp_get_title_parts', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /bp-core/bp-core-template.php
- return (array) apply_filters( 'bp_get_title_parts', $bp_title_parts );