Main bbPress Class.

"Word hard. Stay bumble."

since 2.0.0 bbPress (r2464)
package bbPress

 Methods

Magic method to prevent notices and errors from invalid method calls.

__call($name = '', $args = array()
since 2.2.0 bbPress (r4252)

Parameters

$name

$args

A dummy magic method to prevent bbPress from being cloned.

__clone() 
since 2.0.0 bbPress (r2464)

Magic method for getting bbPress variables.

__get($key) 
since 2.1.0 bbPress (r3951)

Parameters

$key

Magic method for checking the existence of a certain custom field.

__isset($key) 
since 2.1.0 bbPress (r3951)

Parameters

$key

Magic method for setting bbPress variables.

__set($key, $value) 
since 2.1.0 bbPress (r3951)

Parameters

$key

$value

Magic method for unsetting bbPress variables.

__unset($key) 
since 2.3.0 bbPress (r4628)

Parameters

$key

A dummy magic method to prevent bbPress from being unserialized.

__wakeup() 
since 2.0.0 bbPress (r2464)

Add permalink structures for new archive-style destinations.

add_permastructs() 
Static
  • Users
  • Topic Views
  • Search
since 2.4.0 bbPress (r4930)

Add bbPress-specific rewrite rules for uri's that are not setup for us by way of custom post types or taxonomies. This includes: - Front-end editing - Topic views - User profiles

add_rewrite_rules() 
Static
since 2.0.0 bbPress (r2688)
todo Extract into an API

Add the bbPress-specific rewrite tags.

add_rewrite_tags() 
Static
since 2.0.0 bbPress (r2753)

Main bbPress Instance.

instance() : \bbPress
Static

bbPress is fun. Please load it only one time. For this, we thank you.

Insures that only one instance of bbPress exists in memory at any one time. Also prevents needing to define globals all over the place.

since 2.1.0 bbPress (r3757)
staticvar object $instance
see

Returns

\bbPressThe one true bbPress.

Load the translation file for current language. Checks the deprecated languages folder inside the bbPress plugin first, and then the default WordPress languages folder.

load_textdomain() 

Note that custom translation files inside the bbPress plugin folder will be removed on bbPress updates. If you're creating custom translation files, please use the global language folder.

since 2.0.0 bbPress (r2596)

Register bbPress meta-data.

register_meta() 

Counts added in 2.6.0 to avoid negative values.

since 2.6.0 bbPress (r6300)

Register the post statuses used by bbPress.

register_post_statuses() 
Static

We do some manipulation of the 'trash' status so trashed topics and replies can be viewed from within the theme.

since 2.0.0 bbPress (r2727)

Setup the post types for forums, topics and replies.

register_post_types() 
Static
since 2.0.0 bbPress (r2597)

Register the bbPress shortcodes.

register_shortcodes() 
since 2.0.0 bbPress (r3031)

Register the topic tag and forum moderator taxonomies.

register_taxonomies() 
Static
since 2.0.0 bbPress (r2464) Added bbp_get_topic_tag_tax_id() taxonomy

Register bundled theme packages.

register_theme_packages() 

Note that since we currently have complete control over bbp-themes and the bbp-theme-compat folders, it's fine to hardcode these here. If at a later date we need to automate this, and API will need to be built.

since 2.1.0 bbPress (r3829)

Register the bbPress views.

register_views() 
Static
since 2.0.0 bbPress (r2789)

Initialize forum-specific roles.

roles_init() 
since 2.6.0

Setup the currently logged-in user.

setup_current_user() 
since 2.0.0 bbPress (r2697)

Setup the user engagements strategy.

setup_engagements() 
since 2.6.0 bbPress (r6875)

Setup the default bbPress theme compatibility location.

setup_theme() 
since 2.1.0 bbPress (r3778)

A dummy constructor to prevent bbPress from being loaded more than once.

__construct() 
since 2.0.0 bbPress (r2464)
see
see

Include required files.

includes() 
since 2.0.0 bbPress (r2626)
access private

Setup the default hooks and actions.

setup_actions() 
since 2.0.0 bbPress (r2644)
access private

Setup the environment variables to allow the rest of bbPress to function more easily.

setup_environment() 
since 2.0.0 bbPress (r2626)
access private

Smart defaults to many bbPress specific class variables.

setup_variables() 
since 2.6.0 bbPress (r6330)

 Properties

 

False when not logged in; WP_User object when logged in.

$current_user : mixed

Default

false
 

Add-ons append to this (Akismet, BuddyPress, etc...)

$extend : \stdClass

Default

 

Storage of options not in the database.

$not_options : array

Default

array()
 

Overloads get_option().

$options : array

Default

array()
 

Dynamically initialized user roles.

$roles : array

Default

array()
 

Overloads get_user_meta().

$user_options : array

Default

array()
 

Topic views.

$views : array

Default

array()
 

bbPress uses many variables, several of which can be filtered to customize the way it operates. Most of those variables are stored in this private array via PHP magic methods.

$data : array

Default

array()

This is a precautionary measure, to avoid potential errors produced by unanticipated direct manipulation of critical run-time data.