Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#513 closed defect (bug) (fixed)

Custom Component Admin Menu missing

Reported by: egerrits Owned by:
Milestone: Priority: major
Severity: Version: 1.0
Component: Keywords: admin menu
Cc:

Description

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.

Change History (4)

#1 @apeatling
13 years ago

Nice catch, I'll add this tomorrow.

#2 @apeatling
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [1145]) Fixes #513

#3 @apeatling
13 years ago

You can now use

$bp->is_single_item

It must be set to true when you want to use the subnav menu.

#4 @(none)
12 years ago

  • Milestone Core 1.0 deleted

Milestone Core 1.0 deleted

Note: See TracTickets for help on using tickets.