Show full posts on SWA

de | 16 juillet 2014

Afficher les articles complets sur le fil d’activité plutôt que des extraits.
Show full posts on activity feed instead of excerpts.

function bpfr_swa_show_full_posts( $content, $activity ) {
	
	if ( 'new_blog_post' == $activity->type ) {
		
        $post = get_post( $activity->secondary_item_id );
		
        if ( 'post' == $post->post_type )
		$content = apply_filters( 'the_content', $post->post_content );
	}
	
	return $content;
}
add_filter( 'bp_get_activity_content_body', 'bpfr_swa_show_full_posts', 10, 2 );
Partagez...Tweet about this on TwitterShare on Google+Share on FacebookEmail this to someone