bbPress Shortcode Class

since 2.0.0 bbPress (r3031)
package bbPress

 Methods

Add the register_shortcodes action to bbp_init

__construct() 
since 2.0.0 bbPress (r3031)

Display a breadcrumb

display_breadcrumb() : string
since 2.0.0 bbPress (r3302)

Returns

string

Display the contents of a specific forum ID in an output buffer and return to ensure that post/page contents are displayed first.

display_forum(array $attr, string $content = '') : string
since 2.0.0 bbPress (r3031)

Parameters

$attr

array

$content

string

Returns

string

Display the forum form in an output buffer and return to ensure post/page contents are displayed first.

display_forum_form() 
since 2.1.0 bbPress (r3566)

Display an index of all visible root level forums in an output buffer and return to ensure that post/page contents are displayed first.

display_forum_index() : string
since 2.0.0 bbPress (r3031)

Returns

string

Display a lost password form

display_lost_pass() : string
since 2.0.0 bbPress (r3302)

Returns

string

Display a register form

display_register() : string
since 2.0.0 bbPress (r3302)

Returns

string

Display the contents of a specific reply ID in an output buffer and return to ensure that post/page contents are displayed first.

display_reply(array $attr, string $content = '') : string
since 2.0.0 bbPress (r3031)

Parameters

$attr

array

$content

string

Returns

string

Display the reply form in an output buffer and return to ensure post/page contents are displayed first.

display_reply_form() 
since 2.0.0 bbPress (r3031)

Display the search form in an output buffer and return to ensure post/page contents are displayed first.

display_search_form() 
since 2.3.0 bbPress (r4585)

Display forum statistics

display_stats() : string
since 2.3.0 bbPress (r4509)

Returns

string

Display the contents of a specific topic ID in an output buffer and return to ensure that post/page contents are displayed first.

display_topic(array $attr, string $content = '') : string
since 2.0.0 bbPress (r3031)

Parameters

$attr

array

$content

string

Returns

string

Display the topic form in an output buffer and return to ensure post/page contents are displayed first.

display_topic_form(array $attr = array(), string $content = '') : string

Supports 'forum_id' attribute to display the topic form for a particular forum. This currently has styling issues from not being wrapped in

which will need to be sorted out later.
since 2.0.0 bbPress (r3031)

Parameters

$attr

array

$content

string

Returns

string

Display an index of all visible root level topics in an output buffer and return to ensure that post/page contents are displayed first.

display_topic_index() : string
since 2.0.0 bbPress (r3031)

Returns

string

Filter the query for the topic index

display_topic_index_query(array $args = array()) : array
since 2.1.0 bbPress (r3637)

Parameters

$args

array

Returns

array

Display the contents of a specific topic tag in an output buffer and return to ensure that post/page contents are displayed first.

display_topic_tag_form() : string
since 2.0.0 bbPress (r3346)

Returns

string

Display a tag cloud of all topic tags in an output buffer and return to ensure that post/page contents are displayed first.

display_topic_tags() : string
since 2.0.0 bbPress (r3110)

Returns

string

Display the contents of a specific topic tag in an output buffer and return to ensure that post/page contents are displayed first.

display_topics_of_tag(array $attr, string $content = '') : string
since 2.0.0 bbPress (r3110)

Parameters

$attr

array

$content

string

Returns

string

Filter the query for topic tags

display_topics_of_tag_query(array $args = array()) : array
since 2.1.0 bbPress (r3637)

Parameters

$args

array

Returns

array

Display the contents of a specific view in an output buffer and return to ensure that post/page contents are displayed first.

display_view(array $attr, string $content = '') : string
since 2.0.0 bbPress (r3031)

Parameters

$attr

array

$content

string

Returns

string

Register the bbPress shortcodes

add_shortcodes() 
since 2.0.0 bbPress (r3031)

Return the contents of the output buffer and flush its contents.

end() : string
since 2.0.0 bbPress (r3079)

Returns

stringContents of output buffer.

Shortcode globals

setup_globals() 
since 2.0.0 bbPress (r3143)
access private

Start an output buffer.

start(string $query_name = ''

This is used to put the contents of the shortcode into a variable rather than outputting the HTML at run-time. This allows shortcodes to appear in the correct location in the_content() instead of when it's created.

since 2.0.0 bbPress (r3079)

Parameters

$query_name

string

Unset some globals in the $bbp object that hold query related info

unset_globals() 
since 2.0.0 bbPress (r3034)

 Properties

 

Shortcode => function.

$codes : array

Default

array()