Changeset 4049
- Timestamp:
- 02/17/2011 03:27:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r4048 r4049 1145 1145 } 1146 1146 1147 // When we are viewing a single group, add the group extension nav item 1148 if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) { 1149 if ( $this->enable_nav_item ) { 1150 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item ) { 1151 bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => $bp->groups->root_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 ) ); 1152 } 1153 1154 // When we are viewing the extension display page, set the title and options title 1155 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && $bp->current_action == $this->slug ) { 1156 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1157 add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1158 } 1159 } 1160 1161 // Hook the group home widget 1162 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) ) 1163 add_action( $this->display_hook, array( &$this, 'widget_display' ) ); 1164 } 1165 1147 1166 // Construct the admin edit tab for the new group extension 1148 1167 if ( !empty( $this->enable_edit_item ) && !empty( $bp->is_item_admin ) ) { … … 1165 1184 } 1166 1185 } 1167 1168 // When we are viewing a single group, add the group extension nav item1169 if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) {1170 if ( $this->enable_nav_item ) {1171 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item ) {1172 bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => $bp->groups->root_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 ) );1173 }1174 1175 // When we are viewing the extension display page, set the title and options title1176 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && $bp->current_action == $this->slug ) {1177 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );1178 add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );1179 }1180 }1181 1182 // Hook the group home widget1183 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )1184 add_action( $this->display_hook, array( &$this, 'widget_display' ) );1185 }1186 1186 } 1187 1187
Note: See TracChangeset
for help on using the changeset viewer.