Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Changing navigation names of BuddyPress
<?php
function mb_profile_menu_tabs() {
global $bp;
$bp->bp_nav['groups']['name'] = str_replace( 'Groups', '', $bp->bp_nav['groups']['name'] );
$bp->bp_nav['friends']['name'] = str_replace( 'Friends', '好友', $bp->bp_nav['friends']['name'] );
$bp->bp_nav['messages']['name'] = str_replace( 'Messages', '信息', $bp->bp_nav['messages']['name'] );
$bp->bp_nav['notifications']['name'] = str_replace( 'Notifications', '通知', $bp->bp_nav['notifications']['name'] );
$bp->bp_nav['forums']['name'] = '论坛';
}
add_action( 'bp_setup_nav', 'mb_profile_menu_tabs', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment