[buddypress-trac] [BuddyPress Trac] #7673: Group Creation Link On Member Profile

buddypress-trac noreply at wordpress.org
Tue Jan 30 02:56:26 UTC 2018


#7673: Group Creation Link On Member Profile
-------------------------+------------------------------
 Reporter:  Destac       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  low          |   Milestone:  Awaiting Review
Component:  Groups       |     Version:  2.9.2
 Severity:  minor        |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by Destac):

 I am going to attach the PHP code I added to my functions.php file as well
 for users who stumble across this ticket wanting to add this navigation
 item to their own websites.

 {{{#!php
 <?php
 function buddypress_group_setup_nav() {
 if( bp_is_active( 'groups' ) ) {
     global $bp;
     bp_core_new_subnav_item( array(
         'parent_id' => 'groups',
         'name' => __( 'Create a Group', 'buddypress' ),
         'slug' => 'create',
         'parent_url' => $bp->loggedin_user->domain . $bp->groups->slug .
 '/',
         'parent_slug' => $bp->groups->slug,
         'screen_function' =>
 'group_document_list_function_to_show_screen',
         'position' => 55
     ) );
   }
 }
 add_action( 'bp_setup_nav', 'buddypress_group_setup_nav', PHP_INT_MAX );
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7673#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list