Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/10/2014 07:13:04 PM (11 years ago)
Author:
imath
Message:

Improve Group's Edit WP Admin Bar menu

Use the group's manage options nav to populate the different edit links of the group's Edit WP Admin Bar.
Introduce a new parameter show_in_admin_bar for the edit screen property of the Group Extension API to allow plugins add their edit link into this Admin Bar (if this parameter is set to true).

props boonebgorges

Fixes #6002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-loader.php

    r9127 r9131  
    508508                    'no_access_url'   => $group_link,
    509509                );
    510             }
    511 
    512             // If viewing an admin page, create the group admin subnav items
    513             if ( bp_is_group_admin_page() ) {
     510
    514511                $admin_link = trailingslashit( $group_link . 'admin' );
    515512
    516513                // Common params to all nav items
    517514                $default_params = array(
    518                     'parent_url'      => $admin_link,
    519                     'parent_slug'     => $this->current_group->slug . '_manage',
    520                     'screen_function' => 'groups_screen_group_admin',
    521                     'user_has_access' => bp_is_item_admin(),
     515                    'parent_url'        => $admin_link,
     516                    'parent_slug'       => $this->current_group->slug . '_manage',
     517                    'screen_function'   => 'groups_screen_group_admin',
     518                    'user_has_access'   => bp_is_item_admin(),
     519                    'show_in_admin_bar' => true,
    522520                );
    523521
Note: See TracChangeset for help on using the changeset viewer.