我知道这不是正确的方法,您应该始终编辑模板,但我只是编辑了核心好友按导航功能。你会看到下面我添加的谷歌链接。
function bp_get_displayed_user_nav() {
global $bp;
foreach ( (array) $bp->bp_nav as $user_nav_item ) {
if ( empty( $user_nav_item[\'show_for_displayed_user\'] ) && !bp_is_my_profile() )
continue;
$selected = \'\';
if ( bp_is_current_component( $user_nav_item[\'slug\'] ) ) {
$selected = \' class="current selected"\';
}
if ( bp_loggedin_user_domain() ) {
$link = str_replace( bp_loggedin_user_domain(), bp_displayed_user_domain(), $user_nav_item[\'link\'] );
} else {
$link = trailingslashit( bp_displayed_user_domain() . $user_nav_item[\'link\'] );
}
echo apply_filters_ref_array( \'bp_get_displayed_user_nav_\' . $user_nav_item[\'css_id\'], array( \'<li id="\' . $user_nav_item[\'css_id\'] . \'-personal-li" \' . $selected . \'><a id="user-\' . $user_nav_item[\'css_id\'] . \'" href="\' . $link . \'">\' . $user_nav_item[\'name\'] . \'</a></li>\', &$user_nav_item ) );
}
echo "<li id=\\"css-personal-li\\"><a href=\'http://www.google.com\'>Google</a></li>";
}