[buddypress-trac] [BuddyPress Trac] #4638: Change title in directory_dummy_post() and create_dummy_post()

buddypress-trac noreply at wordpress.org
Fri Jan 17 20:53:47 UTC 2014


#4638: Change title in directory_dummy_post() and create_dummy_post()
--------------------------+-----------------------------
 Reporter:  rogercoathup  |       Owner:
     Type:  enhancement   |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Theme         |     Version:  1.7
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------------

Comment (by maurogo):

 Hi,

 I added the following code in the theme functions file to remove the
 button:

 {{{
 function override_directory_dummy_post(){

     // Title based on ability to create groups
     if ( is_user_logged_in() && bp_user_can_create_groups() ) {
       $title = __( 'Groups', 'buddypress' );
     } else {
       $title = __( 'Groups', 'buddypress' );
     }

     bp_theme_compat_reset_post( array(
       'ID'             => 0,
       'post_title'     => $title,
       'post_author'    => 0,
       'post_date'      => 0,
       'post_content'   => '',
       'post_type'      => 'bp_group',
       'post_status'    => 'publish',
       'is_archive'     => true,
       'comment_status' => 'closed'
     ) );

 }
 add_action( 'bp_template_include_reset_dummy_post_data',
 'override_directory_dummy_post', 11 );
 }}}

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


More information about the buddypress-trac mailing list