BP_Registration_Theme_Compat::dummy_post()

Update the global $post with dummy data.

Description

Source

File: bp-members/classes/class-bp-registration-theme-compat.php

	public function dummy_post() {
		// Registration page.
		if ( bp_is_register_page() ) {
			$title = __( 'Create an Account', 'buddyboss' );

			if ( 'completed-confirmation' == bp_get_current_signup_step() ) {
				$title = __( 'We\'re almost there!', 'buddyboss' );
			}

		// Activation page.
		} else {
			$title = __( 'Activate Your Account', 'buddyboss' );

			if ( bp_account_was_activated() ) {
				$title = __( 'Account Activated', 'buddyboss' );
			}
		}

		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'
		) );
	}

Changelog

Changelog
Version Description
BuddyPress 1.7.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.