bp_get_directory_title( string $component = '' )
Get the directory title for a component.
Description
Used for the
Parameters
- $component
-
(string) (Optional) Component to get directory title for.
Default value: ''
Return
(string)
Source
File: bp-core/bp-core-template.php
function bp_get_directory_title( $component = '' ) { $title = ''; // Use the string provided by the component. if ( ! empty( buddypress()->{$component}->directory_title ) ) { $title = buddypress()->{$component}->directory_title; // If none is found, concatenate. } elseif ( isset( buddypress()->{$component}->name ) ) { $title = sprintf( __( '%s Directory', 'buddyboss' ), buddypress()->{$component}->name ); } /** * Filters the directory title for a component. * * @since BuddyPress 2.0.0 * * @param string $title Text to be used in <title> tag. * @param string $component Current componet being displayed. */ return apply_filters( 'bp_get_directory_title', $title, $component ); }
Changelog
Version | Description |
---|---|
BuddyPress 2.0.0 | Introduced. |
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.