bp_nouveau_get_nav_link_text()
Retrieve the html text of the link for the current nav item.
Description
Return
(string) The html text for the nav item.
Source
File: bp-templates/bp-nouveau/includes/template-tags.php
function bp_nouveau_get_nav_link_text() {
$bp_nouveau = bp_nouveau();
$nav_item = $bp_nouveau->current_nav_item;
$link_text = '';
if ( 'directory' === $bp_nouveau->displayed_nav && ! empty( $nav_item->text ) ) {
$link_text = _bp_strip_spans_from_title( $nav_item->text );
} elseif (
( 'groups' === $bp_nouveau->displayed_nav || 'personal' === $bp_nouveau->displayed_nav )
&&
! empty( $nav_item->name )
) {
$link_text = _bp_strip_spans_from_title( $nav_item->name );
}
/**
* Filter to edit the html text of the nav.
*
* @since BuddyPress 3.0.0
*
* @param string $link_text The html text of the nav item.
* @param object $nav_item The current nav item object.
* @param string $value The current nav in use (eg: 'directory', 'groups', 'personal', etc..).
*/
return apply_filters( 'bp_nouveau_get_nav_link_text', $link_text, $nav_item, $bp_nouveau->displayed_nav );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 3.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.