Changeset 3205
- Timestamp:
- 08/21/2010 04:31:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-groups/bp-groups-classes.php
r3197 r3205 1150 1150 1151 1151 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 1153 1153 $bp->groups->group_creation_steps[$this->slug] = array( 'name' => $this->name, 'slug' => $this->slug, 'position' => $this->create_step_position ); 1154 1154 1155 / * Attach the group creation step display content action */1155 // Attach the group creation step display content action 1156 1156 add_action( 'groups_custom_create_steps', array( &$this, 'create_screen' ) ); 1157 1157 1158 / * Attach the group creation step save content action */1158 // Attach the group creation step save content action 1159 1159 add_action( 'groups_create_group_step_save_' . $this->slug, array( &$this, 'create_screen_save' ) ); 1160 1160 } 1161 1161 1162 / * Construct the admin edit tab for the new group extension */1162 // Construct the admin edit tab for the new group extension 1163 1163 if ( $this->enable_edit_item ) { 1164 1164 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 ); 1165 1165 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 1167 1171 if ( $bp->current_component == $bp->groups->slug && 'admin' == $bp->current_action && $this->slug == $bp->action_variables[0] ) { 1168 1172 add_action( 'wp', array( &$this, 'edit_screen_save' ) ); … … 1179 1183 } 1180 1184 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 1182 1186 if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) { 1183 1187 if ( $this->enable_nav_item ) { … … 1185 1189 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 ) ); 1186 1190 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 1188 1192 if ( $bp->current_component == $bp->groups->slug && $bp->is_single_item && $bp->current_action == $this->slug ) { 1189 1193 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); … … 1192 1196 } 1193 1197 1194 / * Hook the group home widget */1198 // Hook the group home widget 1195 1199 if ( $bp->current_component == $bp->groups->slug && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) ) 1196 1200 add_action( $this->display_hook, array( &$this, 'widget_display' ) );
Note: See TracChangeset
for help on using the changeset viewer.