#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. */
$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. */
$is_single_group | $is_single_event) { |
I must be missing an add_action that would solve this problem rather than hacking bp_core files.
Nice catch, I'll add this tomorrow.