Skip to:
Content
Pages
Categories
Search
Top
Bottom

admin nav


  • Erwin Gerrits
    Participant

    @egerrits

    I’m working on an Events component. I am having trouble for the admin menu to show up when the Event Admin is looking at his own Event. The normal “Activity, Blogs, Friends…” menu shows up (as if he is not the admin) rather than “Admin, Forum, Members, Invite” menu.

    I have tracked down the problem to bp-core-templatetags.php, and the following function:

    function bp_get_options_nav() {

    global $bp, $is_single_group;

    /* Only render this navigation when the logged in user is looking at one of their own pages. */

    if ( bp_is_home() || $is_single_group) {

    It seems to be hard-coded to only show the admin menu for Home or Group pages. If I add the Events, the admin menu does show up, like so:

    function bp_get_options_nav() {

    global $bp, $is_single_group, $is_single_event;

    /* Only render this navigation when the logged in user is looking at one of their own pages. */

    if ( bp_is_home() || $is_single_group || $is_single_event) {

    I must be missing an add_action that would solve this problem rather than hacking bp_core files….

    Also, how do I add a section to the user’s profile page? Like the “Friends” or “Groups” section, I would like to add an “Events” section.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘admin nav’ is closed to new replies.
Skip to toolbar