BP_Blogs_Theme_Compat::create_dummy_post()

Update the global $post with create screen data.


Source Source

File: bp-blogs/classes/class-bp-blogs-theme-compat.php

	public function create_dummy_post() {

		// Title based on ability to create blogs.
		if ( is_user_logged_in() && bp_blog_signup_enabled() ) {
			$title = __( 'Create a Site', 'buddypress' );
		} else {
			$title = __( 'Sites', 'buddypress' );
		}

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


Top ↑

Changelog Changelog

Changelog
Version Description
1.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.