' . __( 'Create a Blog', 'buddypress' ) . ''; } else { $title = __( 'Blogs', 'buddypress' ); } bp_theme_compat_reset_post( array( 'ID' => 0, 'post_title' => $title, 'post_author' => 0, 'post_date' => 0, 'post_content' => '', 'post_type' => 'bp_blogs', 'post_status' => 'publish', 'is_archive' => true, 'comment_status' => 'closed' ) ); } /** * Filter the_content with the groups index template part * * @since BuddyPress (1.7) */ public function directory_content() { bp_buffer_template_part( 'blogs/index' ); } /** Create ****************************************************************/ /** * Update the global $post with create screen data * * @since BuddyPress (1.7) */ public function create_dummy_post() { // Title based on ability to create blogs if ( is_user_logged_in() && bp_blog_signup_enabled() ) { $title = '' . __( 'Blogs', 'buddypress' ) . ' ' . __( 'Create a Blog', 'buddypress' ); } else { $title = __( 'Blogs', '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' ) ); } /** * Filter the_content with the create screen template part * * @since BuddyPress (1.7) */ public function create_content() { bp_buffer_template_part( 'blogs/create' ); } } new BP_Blogs_Theme_Compat();