bbp_theme_after_forum_freshness_link

bbp_theme_after_forum_freshness_link

bbp_theme_after_forum_freshness_link
Codex Home → bbp_theme_after_forum_freshness_link
Description
The 『bbp_theme_after_forum_freshness_link』 action is used to display content after the forum freshness link
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
add_action( 'bbp_theme_after_forum_freshness_link', 'jc_after_forum_freshness_link' );
function jc_after_forum_freshness_link() {
echo 'Hello world!';
}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_forum_reply_count

bbp_forum_reply_count

bbp_forum_reply_count
Codex Home → bbp_forum_reply_count
Description
The 『bbp_forum_reply_count』 function is used to display the total count of all replies to topics within a forum and sub forums
How to use it
1
$forum_id (optional) – Returns count for particular forum id
$total_count (optional) – Returns total count for all replies in forum and sub forums by default and returns total count for all replies in forum but not sub forums if true, must set $forum_id to work if true
Uses bbp_get_forum_reply_count()
Sample code example
1
Displays the total count of all replies within a forum and sub forums
1
Displays the count of all replies within a forum and not sub forums with a forum ID of 1

bbp_theme_before_topic_author

bbp_theme_before_topic_author

bbp_theme_before_topic_author
Codex Home → bbp_theme_before_topic_author
Description
The 『bbp_theme_before_topic_author』 action is used to display content before the author』s avatar and name in a forum
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
1234add_action( 'bbp_theme_before_topic_author', 'jc_before_topic_author' );function jc_before_topic_author() {     echo 'Hello world!';}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_theme_after_forum_sub_forums

bbp_theme_after_forum_sub_forums

bbp_theme_after_forum_sub_forums
Codex Home → bbp_theme_after_forum_sub_forums
Description
The 『bbp_theme_after_forum_sub_forums』 action is used to display content after each list of sub forum links.
Where it can be found
On line 26 of
/bbp-theme-compat/bbpress/loop-single-forum.php
/bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php
1
How to use it
Since this is an action, we can use add_action to hook into it.
Sample code example
1234add_action( 'bbp_theme_after_forum_sub_forums', 'jc_after_sub_forum_list' );function jc_after_sub_forum_list() {     echo 'Hello world!';}
Note: Always remember to prefix your functions to avoid conflicts!

bbp_get_forum_reply_count

bbp_get_forum_reply_count

bbp_get_forum_reply_count
Codex Home → bbp_get_forum_reply_count
Description
The 『bbp_get_forum_reply_count』 function is used to return the total count of all replies to topics within a forum and sub forums
How to use it

$forum_id (optional) – Returns count for particular forum id
$total_count (optional) – Returns total count for all replies in forum and sub forums by default and returns total count for all replies in forum but not sub forums if true, must set $forum_id to work if true
Used by bbp_forum_reply_count()
Sample code example

Returns the total count of all replies within a forum and sub forums

Returns the count of all replies within a forum and not sub forums with a forum ID of 1

bbp_author_link

bbp_author_link

bbp_author_link
Codex Home → bbp_author_link
Description
The 『bbp_author_link』 function is used to display the most recently active author』s avatar and username linked to their profile
How to use it

$args (optional) – Accepts an array of arguments to configure display ( post_id, link_title, type, size )
Uses bbp_get_author_link()
Sample code example

Displays the linked avatar and username for the most recently active author in a forum
1 ) ); ?>
Displays the most recently active user from the topic with an ID of 1
bbp_get_forum_last_active_id(), 'size' => 32 ) ); ?>
Displays the most recently active user within the forum and sets their avatar to a size of 32px wide and 32px tall
bbp_get_forum_last_active_id(), 'link_title' => 'Author profile' ) ); ?>
Displays the most recently active user within the forum and sets the title of their linked avatar and username to 「Author profile」
bbp_get_forum_last_active_id(), 'type' => 'avatar' ) ); ?>
Displays only the most recently active user』s avatar without their display name
bbp_get_forum_last_active_id(), 'type' => 'name' ) ); ?>
Displays only the most recently active user』s display name without their avatar
Related
bbp_reply_author_link()
bbp_topic_author_link()

bbp_loaded

bbp_loaded

bbp_loaded
Codex Home → bbp_loaded
The 『bbp_loaded』 action is hooked onto WordPress』s 『plugins_loaded』 action with default priority 10 in:
/includes/core/actions.php
It』s one of several 『piggy-back』 actions intended to help load code only when bbPress is active. It』s used to execute code early in the WordPress load order.
How it's hooked
add_action( 'plugins_loaded', 'bbp_loaded', 10 );
Where it's used
add_action( 'bbp_loaded', 'bbp_constants', 2 );
add_action( 'bbp_loaded', 'bbp_boot_strap_globals', 4 );
add_action( 'bbp_loaded', 'bbp_includes', 6 );
add_action( 'bbp_loaded', 'bbp_setup_globals', 8 );
add_action( 'bbp_loaded', 'bbp_setup_option_filters', 10 );
add_action( 'bbp_loaded', 'bbp_setup_user_option_filters', 12 );
add_action( 'bbp_loaded', 'bbp_register_theme_packages', 14 );
add_action( 'bbp_loaded', 'bbp_filter_user_roles_option', 16 );

bbp_list_forums

bbp_list_forums

bbp_list_forums
Codex Home → bbp_list_forums
The bbp_list_forums function is commonly used to display a list of sub forums. You can customise the returned data by passing the function some arguments.
The bbp_list_forums is a function located in includesforumstemplate.php.
To filter this array use:
add_filter( 'bbp_before_list_forums_parse_args', 'your_filter_name' );
An example list of arguments
array (
'before' => '

    ',
    'after' => '

',
'link_before' => '

  • ',
    'link_after' => '
  • ',
    'count_before' => ' (',
    'count_after' => ')',
    'count_sep' => ', ',
    'separator' => ', ',
    'forum_id' => '',
    'show_topic_count' => true,
    'show_reply_count' => true,
    )
    before
    The value you specify for 『before』 will be put at the start of the returned data.
    after
    The value you specify for 『after』 will be put at the end of the returned data.
    link_before
    The value you specify for 『link_before』 will appear before each row returned in the data.
    link_after
    The value you specify for 『link_after』 will appear after each row returned in the data.
    count_before
    If you have show_topic_count or show_reply_count set to true, then this will attach itself to the start of each count.
    count_after
    If you have show_topic_count or show_reply_count set to true, then this will attach itself to the end of each count.
    count_sep
    The value specified inside count_sep is what separates each count, for example if you specified a comma the returned count would be: 0,0
    separator
    The value specified inside separator is what separates each subforum, for example if you specified
    the returned subforums would be displayed one per line.
    forum_id
    If you specify a forum_id then only child forums of the forum_id will be returned.
    show_topic_count
    This is a boolean flag, set it to true or false depending on if you want topic counts to be returned.
    show_reply_count
    This is a boolean flag, set it to true or false depending on if you want reply counts to be returned.
    Common Code Examples
    bbp_list_forums(array (
    'before' => '

    ',
    'after' => '

    ',
    'link_before' => '

    ',
    'link_after' => '

    ',
    'separator' => '',
    ));
    Returns a list of forums without the comma between reply and topic counts.
    bbp_list_forums(array (
    'before' => '

    ',
    'after' => '

    ',
    'link_before' => '

    ',
    'link_after' => '

    ',
    'separator' => '',
    'count_before' => '',
    'count_after' => '',
    ));
    Returns a list of forums without the comma between and the brackets around the reply and topic counts.

    bbp_theme_before_forum_title

    bbp_theme_before_forum_title

    bbp_theme_before_forum_title
    Codex Home → bbp_theme_before_forum_title
    Description
    The 『bbp_theme_before_forum_title』 action is used to display content before each forum title on the forum index pages.
    Where it can be found
    On line 16 of
    /bbp-theme-compat/bbpress/loop-single-forum.php
    /bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php
    How to use it
    Since this is an action, we can use add_action to hook into it.
    Sample code example
    1234add_action( 'bbp_theme_before_forum_title', 'jc_before_forum_title' );function jc_before_forum_title() {     echo 'Hello world!';}
    Note: Always remember to prefix your functions to avoid conflicts!

    bbp_theme_after_forum_title

    bbp_theme_after_forum_title

    bbp_theme_after_forum_title
    Codex Home → bbp_theme_after_forum_title
    Description
    The 『bbp_theme_after_forum_title』 action is used to display content after each forum title on the forum index pages.
    Where it can be found
    On line 20 of
    /bbp-theme-compat/bbpress/loop-single-forum.php
    /bbp-themes/bbp-twentyten/bbpress/loop-single-forum.php

    How to use it
    Since this is an action, we can use add_action to hook into it.
    Sample code example
    add_action( 'bbp_theme_after_forum_title', 'jc_after_forum_title' );
    function jc_after_forum_title() {
    echo 'Hello world!';
    }
    Note: Always remember to prefix your functions to avoid conflicts!