Changeset 3980
- Timestamp:
- 02/01/2011 02:56:33 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-hooks.php
r3962 r3980 29 29 30 30 // Setup widgets 31 add_action( 'bp_loaded', 'bp_setup_widgets');31 add_action( 'bp_loaded', 'bp_setup_widgets' ); 32 32 33 33 // Setup admin bar -
trunk/bp-groups/bp-groups-classes.php
r3954 r3980 1169 1169 if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) { 1170 1170 if ( $this->enable_nav_item ) { 1171 if ( $bp->current_component == $bp->groups->slug && $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_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 ) ); 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 } 1173 1174 1174 1175 // When we are viewing the extension display page, set the title and options title 1175 if ( $bp->current_component == $bp->groups->slug&& $bp->is_single_item && $bp->current_action == $this->slug ) {1176 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && $bp->current_action == $this->slug ) { 1176 1177 add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); 1177 1178 add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); … … 1180 1181 1181 1182 // Hook the group home widget 1182 if ( $bp->current_component == $bp->groups->slug&& $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )1183 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) ) 1183 1184 add_action( $this->display_hook, array( &$this, 'widget_display' ) ); 1184 1185 } … … 1198 1199 1199 1200 /* Register the group extension on the bp_init action so we have access to all plugins */ 1200 add_action( 'bp_init', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( " wp", array( &$extension, "_register" ), 2);' ), 11 );1201 add_action( 'bp_init', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( "bp_init", array( &$extension, "_register" ), 1 );' ), 11 ); 1201 1202 } 1202 1203
Note: See TracChangeset
for help on using the changeset viewer.