[buddypress-trac] [BuddyPress] #3719: Certain group tab start help for a plug in

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Oct 28 16:01:45 UTC 2011


#3719: Certain group tab start help for a plug in
--------------------------+---------------------------------------
 Reporter:  TimCarey      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Groups        |    Version:  1.5
 Severity:  normal        |   Keywords:  1.5 plug in redirect,help
--------------------------+---------------------------------------
 I am the creator of the BP Group frontpage plug in.  In the code of my
 plug in I make sure that the tab related to my plug in comes up first when
 someone goes to a group instead of home.  Since version 1.5 this is not
 happening.  I really could use any advice you can give relating to this.
 My code that I used to accomplish the certain tab come up first task is as
 follows.  Code was originally given to me and but I don't know who.

 {{{

 function tac_redirect_to_frontpage() {
         global $bp;

         $path = clean_url( $_SERVER['REQUEST_URI'] );

         $path = apply_filters( 'bp_uri', $path );

         if ( bp_is_group_home() && strpos( $path,
 $bp->bp_options_nav['groups']['home']['slug'] ) === false )
                 bp_core_redirect( $path .
 $bp->bp_options_nav['groups']['frontpage']['slug'] . '/' );
 }
 add_action( 'wp', 'tac_redirect_to_frontpage' );

 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3719>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list