Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/23/2012 06:17:14 PM (13 years ago)
Author:
boonebgorges
Message:

Adds template tag bp_get_group_current_admin_tab() and implements throughout BuddyPress for accessing current group admin tab data.
Adds current admin tab slug to the body class in the group admin section.
Fixes #4095

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-screens.php

    r5729 r5942  
    483483    global $bp;
    484484
    485     if ( bp_is_groups_component() && bp_is_action_variable( 'edit-details', 0 ) ) {
     485    if ( 'edit-details' == bp_get_group_current_admin_tab() ) {
    486486
    487487        if ( bp_is_item_admin() || bp_is_item_mod() ) {
     
    515515    global $bp;
    516516
    517     if ( bp_is_groups_component() && bp_is_action_variable( 'group-settings', 0 ) ) {
     517    if ( 'group-settings' == bp_get_group_current_admin_tab() ) {
    518518
    519519        if ( ! bp_is_item_admin() )
     
    557557    global $bp;
    558558
    559     if ( bp_is_groups_component() && bp_is_action_variable( 'group-avatar', 0 ) ) {
     559    if ( 'group-avatar' == bp_get_group_current_admin_tab() ) {
    560560
    561561        // If the logged-in user doesn't have permission or if avatar uploads are disabled, then stop here
     
    621621    global $bp;
    622622
    623     if ( bp_is_groups_component() && bp_is_action_variable( 'manage-members', 0 ) ) {
     623    if ( 'manage-members' == bp_get_group_current_admin_tab() ) {
    624624
    625625        if ( ! bp_is_item_admin() )
     
    736736    global $bp;
    737737
    738     if ( bp_is_groups_component() && bp_is_action_variable( 'membership-requests', 0 ) ) {
     738    if ( 'membership-requests' == bp_get_group_current_admin_tab() ) {
    739739
    740740        if ( ! bp_is_item_admin() || ( 'public' == $bp->groups->current_group->status ) )
     
    785785    global $bp;
    786786
    787     if ( bp_is_groups_component() && bp_is_action_variable( 'delete-group', 0 ) ) {
     787    if ( 'delete-group' == bp_get_group_current_admin_tab() ) {
    788788
    789789        if ( ! bp_is_item_admin() && !bp_current_user_can( 'bp_moderate' ) )
Note: See TracChangeset for help on using the changeset viewer.