Advertisement
Guest User

Untitled

a guest
Jun 19th, 2010
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. // this gets called as a hook, but never shows on the page due to low precedence level - strange but works
  2. // it does however show up on /members/admin/groups/ so I hacked it so the name of the sub nav item does not show.
  3. function bp_gtags_setup_nav() {
  4.     global $bp;
  5.     bp_core_new_subnav_item( array( 'name' => ' ', 'slug' => $bp->gtags->slug, 'parent_slug' => BP_GROUPS_SLUG, 'parent_url' => $bp->root_domain .'/'. BP_GROUPS_SLUG . '/', 'screen_function' => 'gtags_display_hook', 'position' => 1 ) );
  6. }
  7. add_action( 'bp_setup_nav', 'bp_gtags_setup_nav', 1 );
  8.  
  9. function gtags_display_hook() {
  10.     global $bp;
  11.     add_action( 'bp_has_groups', 'gtags_show_groups_for_tag' );
  12.     bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'groups/index' ) );
  13. }
  14.  
  15.  
  16. function mybp(){
  17.     global $bp;
  18.     //echo '<pre>'; print_r( $bp ); echo '</pre>';  
  19. }
  20. //add_action('bp_before_footer','mybp');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement