Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Modify text in admin bar


dpolant
Participant

@dpolant

The admin bar links are generated in the component files, like bp-groups.php, bp-wire.php, etc. Here’s how you can set the text of these links without altering the core files.

function change_text(){
global $bp;
$bp->bp_nav[activity]['name'] = 'test'
}
add_action('wp', 'change_text');

This sets the text of the activity link to ‘test.’ If you just want to change the name of another link, use this same function and replace ‘activity’ with the slug of the component link you want to change.

To set other text in the nav, do a print_r on $bp->bp_nav, navigate the array and set your value. You can change link urls, position, and other things as well.

Remember, you have to add this code to a plugin or your custom.php.

Skip to toolbar