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(string $name = '', array $args = array()) : null
| since |
2.2.0 bbPress (r4252) |
Parameters
$name
stringName of the inaccessible method.
$args
arrayArguments passed to the method.
Returns
null
A dummy magic method to prevent bbPress from being cloned.
__clone()
| since |
2.0.0 bbPress (r2464) |
Magic method for getting bbPress variables.
__get(string $key) : mixed
| since |
2.1.0 bbPress (r3951) |
Parameters
$key
stringRuntime data key.
Returns
mixedStored value, or null if the key is not set.
Magic method for checking the existence of a certain custom field.
__isset(string $key) : boolean
| since |
2.1.0 bbPress (r3951) |
Parameters
$key
stringRuntime data key.
Returns
booleanWhether the key has a non-null value.
Magic method for setting bbPress variables.
__set(string $key, mixed $value)
| since |
2.1.0 bbPress (r3951) |
Parameters
$key
stringRuntime data key.
$value
mixedValue to store.
Magic method for unsetting bbPress variables.
__unset(string $key)
| since |
2.3.0 bbPress (r4628) |
Parameters
$key
stringRuntime data key to remove.
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
| 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 |
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 |
bbPress|null $instance Singleton instance, created on first use. |
| 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 the bbPress blocks.
register_blocks()
| since |
2.7.0 bbPress (r7382) |
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) |
| global |
stdClass[] $wp_post_statuses Registered post status objects, keyed by status name. |
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 taxonomy.
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()
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
Current user object after setup; false before setup.
$current_user : \WP_User | false
Add-ons append to this (Akismet, BuddyPress, etc...)
$extend : \stdClass
Storage of options not in the database.
$not_options : array
Overloads get_option().
$options : array
Dynamically initialized user roles.
$roles : array
Overloads get_user_meta().
$user_options : array
Topic views.
$views : 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
This is a precautionary measure, to avoid potential errors produced by
unanticipated direct manipulation of critical run-time data.