bbPress Component Class.

The bbPress component class is responsible for simplifying the creation of components that share similar behaviors and routines. It is used internally by bbPress to create forums, topics and replies, but can be extended to create other really neat things.

package bbPress
subpackage Classes
since 2.0.0 bbPress (r2688)

 Methods

bbPress Component loader.

__construct(array $args = array()
since 2.0.0 bbPress (r2700)

Parameters

$args

array

Required. Supports these args:

  • name: Unique name (for internal identification)
  • id: Unique ID (normally for custom post type)
  • slug: Unique slug (used in query string and permalinks)
  • query: The loop for this component (WP_Query)
  • current_id: The current ID of the queried object

Add any additional rewrite tags.

add_rewrite_tags() 
since 2.0.0 bbPress (r2700)

Generate any additional rewrite rules.

generate_rewrite_rules($wp_rewrite) 
since 2.0.0 bbPress (r2700)

Parameters

$wp_rewrite

Setup the component post types.

register_post_types() 
since 2.0.0 bbPress (r2700)

Register component specific taxonomies.

register_taxonomies() 
since 2.0.0 bbPress (r2700)

Include required files.

includes() 
since 2.0.0 bbPress (r2700)
access private

Setup the actions.

setup_actions() 
since 2.0.0 bbPress (r2700)
access private

Component global variables.

setup_globals($args = array()
since 2.0.0 bbPress (r2700)
access private

Parameters

$args

 Properties

 

The current ID of the queried object.

$current_id : string

Default

 

ID (normally for custom post type).

$id : \Unique

Default

 

The loop for this component.

$query : \WP_Query

Default

 

Unique slug (used in query string and permalinks).

$slug : string

Default