How to modify bp_get_options_nav()?
-
Hi,
i copied the function bp_get_options_nav() from bp-core-template.php to my themes functions.php and named it my_bp_get_options_nav().
Now i want to modify the profile-link. i created this:if ( $subnav_item['css_id'] == 'user-xprofile') { $subnav_item['link'] = $subnav_item['link']."/edit/group/1"; }
But it doesn’t work. I guess it has to do with the apply_filters-call at the end of the foreach-loop, because it gets echoed:
echo apply_filters( 'bp_get_options_nav_' . $subnav_item['css_id'], '<li id="' . esc_attr( $subnav_item['css_id'] . '-' . $list_type . '-li' ) . '" ' . $selected . '><a id="' . esc_attr( $subnav_item['css_id'] ) . '" href="' . esc_url( $subnav_item['link'] ) . '">' . $subnav_item['name'] . '</a></li>', $subnav_item, $selected_item );
i also tried `echo apply_filters( ‘my_bp_get_options_nav_’ . $subnav_item[‘css_id’],…’
Does anybody know what i am missing?
thanks
- The topic ‘How to modify bp_get_options_nav()?’ is closed to new replies.