Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

bbPress::setup_variables()

Smart defaults to many bbPress specific class variables.


Description Description


Source Source

File: bbpress.php

	private function setup_variables() {

		/** Identifiers *******************************************************/

		// Post type identifiers
		$this->forum_post_type   = apply_filters( 'bbp_forum_post_type',  'forum'     );
		$this->topic_post_type   = apply_filters( 'bbp_topic_post_type',  'topic'     );
		$this->topic_tag_tax_id  = apply_filters( 'bbp_topic_tag_tax_id', 'topic-tag' );
		$this->reply_post_type   = apply_filters( 'bbp_reply_post_type',  'reply'     );

		// Status identifiers
		$this->spam_status_id    = apply_filters( 'bbp_spam_post_status',    'spam'    );
		$this->closed_status_id  = apply_filters( 'bbp_closed_post_status',  'closed'  );
		$this->orphan_status_id  = apply_filters( 'bbp_orphan_post_status',  'orphan'  );
		$this->public_status_id  = apply_filters( 'bbp_public_post_status',  'publish' );
		$this->pending_status_id = apply_filters( 'bbp_pending_post_status', 'pending' );
		$this->private_status_id = apply_filters( 'bbp_private_post_status', 'private' );
		$this->hidden_status_id  = apply_filters( 'bbp_hidden_post_status',  'hidden'  );
		$this->trash_status_id   = apply_filters( 'bbp_trash_post_status',   'trash'   );

		// Other identifiers
		$this->user_id           = apply_filters( 'bbp_user_id',        'bbp_user'        );
		$this->tops_id           = apply_filters( 'bbp_tops_id',        'bbp_tops'        );
		$this->reps_id           = apply_filters( 'bbp_reps_id',        'bbp_reps'        );
		$this->favs_id           = apply_filters( 'bbp_favs_id',        'bbp_favs'        );
		$this->subs_id           = apply_filters( 'bbp_subs_id',        'bbp_subs'        );
		$this->view_id           = apply_filters( 'bbp_view_id',        'bbp_view'        );
		$this->edit_id           = apply_filters( 'bbp_edit_id',        'edit'            );
		$this->paged_id          = apply_filters( 'bbp_paged_id',       'paged'           );
		$this->search_id         = apply_filters( 'bbp_search_id',      'bbp_search'      );
		$this->engagements_id    = apply_filters( 'bbp_engagements_id', 'bbp_engagements' );

		/** Queries ***********************************************************/

		$this->current_view_id      = 0; // Current view id
		$this->current_forum_id     = 0; // Current forum id
		$this->current_topic_id     = 0; // Current topic id
		$this->current_reply_id     = 0; // Current reply id
		$this->current_topic_tag_id = 0; // Current topic tag id
		$this->current_user_id      = 0; // Current topic tag id

		$this->forum_query    = new WP_Query();       // Main forum query
		$this->topic_query    = new WP_Query();       // Main topic query
		$this->reply_query    = new WP_Query();       // Main reply query
		$this->search_query   = new WP_Query();       // Main search query
		$this->user_query     = new BBP_User_Query(); // Main user query

		/** Theme Compat ******************************************************/

		$this->theme_compat   = new stdClass(); // Base theme compatibility class
		$this->filters        = new stdClass(); // Used when adding/removing filters

		/** Users *************************************************************/

		$this->current_user   = new WP_User(); // Currently logged in user
		$this->displayed_user = new WP_User(); // Currently displayed user

		/** Misc **************************************************************/

		$this->domain         = 'bbpress';      // Unique identifier for retrieving translated strings
		$this->extend         = new stdClass(); // Plugins add data here
		$this->errors         = new WP_Error(); // Feedback

		/** Deprecated ********************************************************/

		$this->tab_index      = apply_filters( 'bbp_default_tab_index', 100 );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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