Skip to:
Content

BuddyPress.org

Changeset 3205


Ignore:
Timestamp:
08/21/2010 04:31:49 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2592 props travel-junkie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-groups/bp-groups-classes.php

    r3197 r3205  
    11501150
    11511151        if ( $this->enable_create_step ) {
    1152             /* Insert the group creation step for the new group extension */
     1152            // Insert the group creation step for the new group extension
    11531153            $bp->groups->group_creation_steps[$this->slug] = array( 'name' => $this->name, 'slug' => $this->slug, 'position' => $this->create_step_position );
    11541154
    1155             /* Attach the group creation step display content action */
     1155            // Attach the group creation step display content action
    11561156            add_action( 'groups_custom_create_steps', array( &$this, 'create_screen' ) );
    11571157
    1158             /* Attach the group creation step save content action */
     1158            // Attach the group creation step save content action
    11591159            add_action( 'groups_create_group_step_save_' . $this->slug, array( &$this, 'create_screen_save' ) );
    11601160        }
    11611161
    1162         /* Construct the admin edit tab for the new group extension */
     1162        // Construct the admin edit tab for the new group extension
    11631163        if ( $this->enable_edit_item ) {
    11641164            add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', 'if ( "' . esc_attr( $this->slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . $bp->root_domain . '/' . $bp->groups->slug . '/{$group_slug}/admin/' . esc_attr( $this->slug ) . '\">' . esc_attr( $this->name ) . '</a></li>";' ), 10, 2 );
    11651165
    1166             /* Catch the edit screen and forward it to the plugin template */
     1166            // Make sure user has access
     1167            if ( !$bp->is_item_admin )
     1168                return false;
     1169
     1170            // Catch the edit screen and forward it to the plugin template
    11671171            if ( $bp->current_component == $bp->groups->slug && 'admin' == $bp->current_action && $this->slug == $bp->action_variables[0] ) {
    11681172                add_action( 'wp', array( &$this, 'edit_screen_save' ) );
     
    11791183        }
    11801184
    1181         /* When we are viewing a single group, add the group extension nav item */
     1185        // When we are viewing a single group, add the group extension nav item
    11821186        if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) {
    11831187            if ( $this->enable_nav_item ) {
     
    11851189                    bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => BP_GROUPS_SLUG, 'parent_url' => bp_get_group_permalink( $bp->groups->current_group ), 'position' => $this->nav_item_position, 'item_css_id' => 'nav-' . $this->slug, 'screen_function' => array( &$this, '_display_hook' ), 'user_has_access' => $this->enable_nav_item ) );
    11861190
    1187                 /* When we are viewing the extension display page, set the title and options title */
     1191                // When we are viewing the extension display page, set the title and options title
    11881192                if ( $bp->current_component == $bp->groups->slug && $bp->is_single_item && $bp->current_action == $this->slug ) {
    11891193                    add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
     
    11921196            }
    11931197
    1194             /* Hook the group home widget */
     1198            // Hook the group home widget
    11951199            if ( $bp->current_component == $bp->groups->slug && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
    11961200                add_action( $this->display_hook, array( &$this, 'widget_display' ) );
Note: See TracChangeset for help on using the changeset viewer.