Changeset 4983 for trunk/bp-groups/bp-groups-classes.php
- Timestamp:
- 08/15/2011 04:36:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r4961 r4983 1228 1228 1229 1229 // When we are viewing a single group, add the group extension nav item 1230 if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access) ) {1231 if ( $this-> enable_nav_item) {1232 if ( bp_is_groups_component() && $bp->is_single_item ) {1230 if ( bp_is_group() ) { 1231 if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) { 1232 if ( $this->enable_nav_item ) { 1233 1233 bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => $bp->groups->current_group->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 ) ); 1234 1235 // When we are viewing the extension display page, set the title and options title 1236 if ( bp_is_current_action( $this->slug ) ) { 1237 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1238 add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1239 } 1234 1240 } 1235 1241 1236 // When we are viewing the extension display page, set the title and options title 1237 if ( bp_is_groups_component() && $bp->is_single_item && $bp->current_action == $this->slug ) { 1238 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1239 add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1240 } 1242 // Hook the group home widget 1243 if ( !bp_current_action() && bp_is_current_action( 'home' ) ) 1244 add_action( $this->display_hook, array( &$this, 'widget_display' ) ); 1241 1245 } 1242 1243 // Hook the group home widget1244 if ( bp_is_groups_component() && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )1245 add_action( $this->display_hook, array( &$this, 'widget_display' ) );1246 1246 } 1247 1247
Note: See TracChangeset
for help on using the changeset viewer.