/bbp-includes/bbp-topic-template.php

Description

bbPress Topic Template Tags

Functions
bbp_form_topic_content (line 3287)

Output the value of topic content field

void bbp_form_topic_content ()
bbp_form_topic_edit_reason (line 3542)

Output the value of the topic edit reason

void bbp_form_topic_edit_reason ()
bbp_form_topic_forum (line 3415)

Output value of topic forum

void bbp_form_topic_forum ()
bbp_form_topic_log_edit (line 3510)

Output checked value of topic log edit field

void bbp_form_topic_log_edit ()
bbp_form_topic_subscribed (line 3452)

Output checked value of topic subscription

void bbp_form_topic_subscribed ()
bbp_form_topic_tags (line 3333)

Output value of topic tags field

void bbp_form_topic_tags ()
bbp_form_topic_title (line 3251)

Output the value of topic title field

void bbp_form_topic_title ()
bbp_forum_pagination_count (line 2648)

Output the pagination count

void bbp_forum_pagination_count ()
bbp_forum_pagination_links (line 2694)

Output pagination links

void bbp_forum_pagination_links ()
bbp_get_form_topic_content (line 3299)

Return the value of topic content field

  • return: Value of topic content field
  • since: bbPress (r2976)
  • usedby: bbp_form_topic_content() - To get value of topic content field
  • uses: apply_filters() - Calls 'bbp_get_form_topic_content' with the content
  • uses: bbp_is_topic_edit() - To check if it's the topic edit page
string bbp_get_form_topic_content ()
bbp_get_form_topic_edit_reason (line 3554)

Return the value of the topic edit reason

  • return: Topic edit reason value
  • since: bbPress (r2976)
  • usedby: bbp_form_topic_edit_reason() - To get the topic edit reason value
  • uses: apply_filters() - Calls 'bbp_get_form_topic_edit_reason' with the topic edit reason value
string bbp_get_form_topic_edit_reason ()
bbp_get_form_topic_forum (line 3428)

Return value of topic forum

string bbp_get_form_topic_forum ()
bbp_get_form_topic_log_edit (line 3522)

Return checked value of topic log edit field

  • return: Topic log edit checked value
  • since: bbPress (r2976)
  • usedby: bbp_form_topic_log_edit() - To get the topic log edit value
  • uses: apply_filters() - Calls 'bbp_get_form_topic_log_edit' with the log edit value
string bbp_get_form_topic_log_edit ()
bbp_get_form_topic_subscribed (line 3467)

Return checked value of topic subscription

  • return: Checked value of topic subscription
  • since: bbPress (r2976)
  • usedby: bbp_form_topic_subscribed() - To get the subscribed checkbox value
  • uses: bbp_is_user_subscribed() - To check if the user is subscribed to the topic
  • uses: bbp_is_topic_edit() - To check if it's the topic edit page
  • uses: apply_filters() - Calls 'bbp_get_form_topic_subscribed' with the option
string bbp_get_form_topic_subscribed ()
bbp_get_form_topic_tags (line 3345)

Return value of topic tags field

  • return: Value of topic tags field
  • since: bbPress (r2976)
  • usedby: bbp_form_topic_tags() - To get the value of topic tags field
  • uses: apply_filters() - Calls 'bbp_get_form_topic_tags' with the tags
  • uses: bbp_is_topic_edit() - To check if it's the topic edit page
string bbp_get_form_topic_tags ()
bbp_get_form_topic_title (line 3263)

Return the value of topic title field

  • return: Value of topic title field
  • since: bbPress (r2976)
  • usedby: bbp_form_topic_title() - To get the value of topic title field
  • uses: apply_filters() - Calls 'bbp_get_form_topic_title' with the title
  • uses: bbp_is_topic_edit() - To check if it's topic edit page
string bbp_get_form_topic_title ()
bbp_get_forum_pagination_count (line 2661)

Return the pagination count

  • return: Forum Pagintion count
  • since: bbPress (r2519)
  • usedby: bbp_forum_pagination_count() - To get the forum pagination count
  • uses: apply_filters() - Calls 'bbp_get_forum_pagination_count' with the pagination count
  • uses: bbp_number_format() - To format the number value
string bbp_get_forum_pagination_count ()
bbp_get_forum_pagination_links (line 2705)

Return pagination links

  • return: Pagination links
  • since: bbPress (r2519)
  • usedby: bbp_forum_pagination_links() - To get the pagination links
  • uses: bbPress::topic_query::pagination_links - To get the links
string bbp_get_forum_pagination_links ()
bbp_get_single_topic_description (line 2882)

Return a fancy description of the current topic, including total topics, total replies, and last activity.

string bbp_get_single_topic_description ([mixed $args = ''])
  • mixed $args: This function supports these arguments:
    • topic_id: Topic id
    • before: Before the text
    • after: After the text
    • size: Size of the avatar
bbp_get_topic (line 408)

Gets a topic

mixed bbp_get_topic (int|object  $topic, [string $output = OBJECT], [string $filter = 'raw'])
  • int|object $topic: Topic id or topic object
  • string $output: Optional. OBJECT, ARRAY_A, or ARRAY_N. Default = OBJECT
  • string $filter: Optional Sanitation filter. See sanitize_post()
bbp_get_topic_admin_links (line 2152)

Return admin links for topic.

Move topic functionality is handled by the edit topic page.

string bbp_get_topic_admin_links ([mixed $args = ''])
  • mixed $args: This function supports these arguments:
    • id: Optional. Topic id
    • before: Before the links
    • after: After the links
    • sep: Links separator
    • links: Topic admin links array
bbp_get_topic_archive_title (line 539)

Return the topic archive title

  • return: The topic archive title
  • since: bbPress (r3249)
  • uses: get_post_type_object() - Load the post type object
  • uses: get_the_title() - Use the page title at the root path
  • uses: get_post_type_labels() - Get labels for topic post type
  • uses: bbp_get_topic_post_type() - Get the topic post type ID
  • uses: apply_filters() - Allow output to be manipulated
  • uses: bbp_get_page_by_path() - Check if page exists at root path
string bbp_get_topic_archive_title ([string $title = ''])
  • string $title: Default text to use as title
bbp_get_topic_author (line 1132)

Return the author of the topic

  • return: Author of topic
  • since: bbPress (r2590)
  • uses: get_the_author_meta() - To get the display name of the author
  • usedby: bbp_topic_author() - To get the topic author
  • uses: get_post_meta() - To get the name of the anonymous poster
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: apply_filters() - Calls 'bbp_get_topic_author' with the author and topic id
  • uses: bbp_get_topic_author_id() - To get the topic author id
  • uses: bbp_is_topic_anonymous() - To check if the topic is by an anonymous user
string bbp_get_topic_author ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_author_avatar (line 1259)

Return the author avatar of the topic

string bbp_get_topic_author_avatar ([int $topic_id = 0], [int $size = 40])
  • int $topic_id: Optional. Topic id
  • int $size: Optional. Avatar size. Defaults to 40
bbp_get_topic_author_display_name (line 1201)

Return the author display_name of the topic

string bbp_get_topic_author_display_name ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_author_email (line 1451)

Return the topic author email address

  • return: Topic author email address
  • since: bbPress (r3445)
  • uses: get_userdata() - To get the user data
  • usedby: bbp_topic_author_email() - To get the topic author email
  • uses: get_post_meta() - To get the anonymous poster's email
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: apply_filters() - Calls bbp_get_topic_author_email with the author email & topic id
  • uses: bbp_get_topic_author_id() - To get the topic author id
  • uses: bbp_is_topic_anonymous() - To check if the topic is by an anonymous user
string bbp_get_topic_author_email ([int $topic_id = 0])
  • int $topic_id: Optional. Reply id
bbp_get_topic_author_id (line 1166)

Return the author ID of the topic

string bbp_get_topic_author_id ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_author_link (line 1306)

Return the author link of the topic

string bbp_get_topic_author_link ([mixed|int $args = ''])
  • mixed|int $args: If it is an integer, it is used as topic id. Optional.
bbp_get_topic_author_role (line 1501)

Return the topic author role

string bbp_get_topic_author_role ([array $args = array()])
  • array $args: Optional.
bbp_get_topic_author_url (line 1406)

Return the author url of the topic

string bbp_get_topic_author_url ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_class (line 2099)

Return the row class of a topic

string bbp_get_topic_class ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_close_link (line 2427)

Return the close link of the topic

  • return: Topic close link
  • since: bbPress (r2727)
  • uses: esc_url() - To escape the url
  • uses: wp_nonce_url() - To nonce the url
  • usedby: bbp_get_topic_admin_links() - To get the topic close link
  • usedby: bbp_topic_close_link() - To get the topic close link
  • uses: current_user_can() - To check if the current user can edit the topic
  • uses: bbp_is_topic_open() - To check if the topic is open
  • uses: add_query_arg() - To add custom args to the url
  • uses: apply_filters() - Calls 'bbp_get_topic_close_link' with the link and args
  • uses: bbp_get_topic() - To get the topic
  • uses: bbp_get_topic_id() - To get the topic id
string bbp_get_topic_close_link ([mixed $args = ''])
  • mixed $args: This function supports these args:
    • id: Optional. Topic id
    • link_before: Before the link
    • link_after: After the link
    • close_text: Close text
    • open_text: Open text
bbp_get_topic_content (line 584)

Return the content of the topic

  • return: Content of the topic
  • since: bbPress (r2780)
  • usedby: BBP_BuddyPress::topic_create()
  • usedby: bbp_topic_content() - To get the topic content
  • usedby: bbp_get_topic_excerpt() - To get the topic content
  • uses: post_password_required() - To check if the topic requires pass
  • uses: get_the_password_form() - To get the password form
  • uses: apply_filters() - Calls 'bbp_get_topic_content' with the content and topic id
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: get_post_field() - To get the content post field
string bbp_get_topic_content ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_edit_link (line 2237)

Return the edit link of the topic

string bbp_get_topic_edit_link ([mixed $args = ''])
  • mixed $args: This function supports these args:
    • id: Optional. Topic id
    • link_before: Before the link
    • link_after: After the link
    • edit_text: Edit text
bbp_get_topic_edit_url (line 2294)

Return URL to the topic edit page

string bbp_get_topic_edit_url ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_excerpt (line 623)

Return the excerpt of the topic

  • return: topic Excerpt
  • since: bbPress (r2780)
  • usedby: bbp_topic_excerpt() - To get the topic excerpt
  • uses: get_post_field() - To get the excerpt
  • uses: bbp_get_topic_content() - To get the topic content
  • uses: apply_filters() - Calls 'bbp_get_topic_excerpt' with the excerpt, topic id and length
  • uses: bbp_get_topic_id() - To get the topic id
string bbp_get_topic_excerpt ([int $topic_id = 0], [int $length = 100])
  • int $topic_id: Optional. topic id
  • int $length: Optional. Length of the excerpt. Defaults to 100 letters
bbp_get_topic_forum_id (line 1572)

Return the forum id a topic belongs to

int bbp_get_topic_forum_id ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_forum_title (line 1542)

Return the title of the forum a topic belongs to

string bbp_get_topic_forum_title ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_freshness_link (line 1809)

Returns link to the most recent activity inside a topic, complete with link attributes and content.

string bbp_get_topic_freshness_link ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_id (line 363)

Return the topic id

int bbp_get_topic_id ([$topic_id $topic_id = 0])
  • $topic_id $topic_id: Optional. Used to check emptiness
bbp_get_topic_last_active_id (line 1602)

Return the topics last active ID

int bbp_get_topic_last_active_id ([int $topic_id = 0])
  • int $topic_id: Optional. Forum id
bbp_get_topic_last_active_time (line 1636)

Return the topics last update date/time (aka freshness)

string bbp_get_topic_last_active_time ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_last_reply_id (line 1681)

Return the topics last update date/time (aka freshness)

int bbp_get_topic_last_reply_id ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_last_reply_permalink (line 1740)

Return the link to the last reply in a topic

string bbp_get_topic_last_reply_permalink ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_last_reply_title (line 1711)

Return the title of the last reply inside a topic

string bbp_get_topic_last_reply_title ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_last_reply_url (line 1770)

Return the link to the last reply in a topic

string bbp_get_topic_last_reply_url ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_merge_link (line 2559)

Return the merge link of the topic

string bbp_get_topic_merge_link ([mixed $args = ''])
  • mixed $args: This function supports these args:
    • id: Optional. Topic id
    • link_before: Before the link
    • link_after: After the link
    • merge_text: Merge text
bbp_get_topic_pagination (line 722)

Returns pagination links of a topic within the topic loop

  • return: Pagination links
  • since: bbPress (r2966)
  • uses: paginate_links() - To paginate the links
  • uses: trailingslashit() - To add a trailing slash
  • uses: user_trailingslashit() - To add a trailing slash
  • usedby: bbp_topic_pagination() - To get the topic pagination links
  • uses: WP_Rewrite::using_permalinks() - To check if the blog is using permalinks
  • uses: get_permalink() - To get the permalink of the topic
  • uses: get_option() - To get replies per page option
  • uses: add_query_arg() - To add query args
  • uses: apply_filters() - Calls 'bbp_get_topic_pagination' with the links and arguments
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: bbp_get_topic_reply_count() - To get topic reply count
  • uses: bbp_show_topic_lead() - Are we showing the topic as a lead?
string bbp_get_topic_pagination ([mixed $args = ''])
  • mixed $args: This function supports these arguments:
    • topic_id: Topic id
    • before: Before the links
    • after: After the links
bbp_get_topic_permalink (line 468)

Return the link to the topic

string bbp_get_topic_permalink ([int $topic_id = 0], [$string $redirect_to = ''])
  • int $topic_id: Optional. Topic id
  • $string $redirect_to: Optional. Pass a redirect value for use with shortcodes and other fun things.
bbp_get_topic_post_count (line 1943)

Return total post count of a topic

  • return: Post count
  • since: bbPress (r2954)
  • usedby: bbp_topic_post_count() - To get the topic post count
  • uses: get_post_meta() - To get the topic post count meta
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: apply_filters() - Calls 'bbp_get_topic_post_count' with the post count and topic id
int bbp_get_topic_post_count ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_post_date (line 667)

Return the post date and time of a topic

string bbp_get_topic_post_date ([int $topic_id = 0], [bool $humanize = false], [bool $gmt = false])
  • int $topic_id: Optional. Topic id.
  • bool $humanize: Optional. Humanize output using time_since
  • bool $gmt: Optional. Use GMT
bbp_get_topic_post_type (line 34)

Return the unique id of the custom post type for topics

string bbp_get_topic_post_type ()
bbp_get_topic_raw_revision_log (line 882)

Return the raw revision log of the topic

  • return: Raw revision log of the topic
  • since: bbPress (r2782)
  • usedby: bbp_get_topic_revision_log() - To get the raw revision log
  • usedby: bbp_update_topic_revision_log() - To get the raw topic revision log
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: apply_filters() - Calls 'bbp_get_topic_raw_revision_log' with the log and topic id
  • uses: get_post_meta() - To get the revision log meta
string bbp_get_topic_raw_revision_log ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_replies_link (line 1854)

Return the replies link of the topic

void bbp_get_topic_replies_link ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_reply_count (line 1913)

Return total reply count of a topic

int bbp_get_topic_reply_count ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_reply_count_hidden (line 1975)

Return total hidden reply count of a topic (hidden includes trashed and spammed replies)

  • return: Topic hidden reply count
  • since: bbPress (r2740)
  • usedby: bbp_topic_reply_count_hidden() - To get the topic hidden reply count
  • usedby: bbp_get_topic_replies_link() - To get the topic hidden reply count
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: apply_filters() - Calls 'bbp_get_topic_reply_count_hidden' with the hidden reply count and topic id
  • uses: get_post_meta() - To get the hidden reply count
int bbp_get_topic_reply_count_hidden ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_revisions (line 903)

Return the revisions of the topic

string bbp_get_topic_revisions ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_revision_count (line 921)

Return the revision count of the topic

  • return: Topic revision count
  • since: bbPress (r2782)
  • uses: bbp_get_topic_revisions() - To get the topic revisions
  • uses: apply_filters() - Calls 'bbp_get_topic_revision_count' with the revision count and topic id
string bbp_get_topic_revision_count ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_revision_log (line 828)

Return the formatted revision log of the topic

string bbp_get_topic_revision_log ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_spam_link (line 2614)

Return the spam link of the topic

  • return: Topic spam link
  • since: bbPress (r2727)
  • uses: esc_url() - To escape the url
  • uses: wp_nonce_url() - To nonce the url
  • usedby: bbp_get_topic_admin_links() - To get the topic spam link
  • usedby: bbp_topic_spam_link() - Topic spam link
  • uses: current_user_can() - To check if the current user can edit the topic
  • uses: bbp_is_topic_spam() - To check if the topic is marked as spam
  • uses: add_query_arg() - To add custom args to the url
  • uses: apply_filters() - Calls 'bbp_get_topic_spam_link' with the link and args
  • uses: bbp_get_topic() - To get the topic
  • uses: bbp_get_topic_id() - To get the topic id
string bbp_get_topic_spam_link ([mixed $args = ''])
  • mixed $args: This function supports these args:
    • id: Optional. Topic id
    • link_before: Before the link
    • link_after: After the link
    • spam_text: Spam text
    • unspam_text: Unspam text
bbp_get_topic_status (line 948)

Return the status of the topic

string bbp_get_topic_status ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_stick_link (line 2488)

Return the stick link of the topic

  • return: Topic stick link
  • since: bbPress (r2754)
  • uses: esc_url() - To escape the url
  • uses: wp_nonce_url() - To nonce the url
  • usedby: bbp_get_topic_admin_links() - To get the topic stick link
  • usedby: bbp_topic_stick_link() - To get the topic stick link
  • uses: current_user_can() - To check if the current user can edit the topic
  • uses: bbp_is_topic_sticky() - To check if the topic is a sticky
  • uses: add_query_arg() - To add custom args to the url
  • uses: apply_filters() - Calls 'bbp_get_topic_stick_link' with the link and args
  • uses: bbp_get_topic() - To get the topic
  • uses: bbp_get_topic_id() - To get the topic id
string bbp_get_topic_stick_link ([mixed $args = ''])
  • mixed $args: This function supports these args:
    • id: Optional. Topic id
    • link_before: Before the link
    • link_after: After the link
    • stick_text: Stick text
    • unstick_text: Unstick text
    • super_text: Stick to front text
bbp_get_topic_tag_description (line 3211)

Return the description of the current tag

  • return: Term Name
  • since: bbPress (r3109)
  • usedby: bbp_topic_tag_description()
  • uses: get_term_by()
  • uses: get_queried_object()
  • uses: apply_filters()
  • uses: get_query_var()
string bbp_get_topic_tag_description ([array $args = array()])
  • array $args: before|after|tag
bbp_get_topic_tag_edit_link (line 3155)

Return the link of the current tag

  • return: Term Name
  • since: bbPress (r3348)
  • usedby: bbp_topic_tag_edit_link()
  • uses: get_term_by()
  • uses: get_queried_object()
  • uses: apply_filters()
  • uses: get_query_var()
string bbp_get_topic_tag_edit_link ([ $tag = ''])
  • $tag
bbp_get_topic_tag_id (line 2979)

Return the id of the current tag

string bbp_get_topic_tag_id ([ $tag = ''])
  • $tag
bbp_get_topic_tag_link (line 3111)

Return the link of the current tag

string bbp_get_topic_tag_link ([ $tag = ''])
  • $tag
bbp_get_topic_tag_list (line 2034)

Return the tags of a topic

string bbp_get_topic_tag_list ([int $topic_id = 0], [array $args = ''])
  • int $topic_id: Optional. Topic id
  • array $args: This function supports these arguments:
    • before: Before the tag list
    • sep: Tag separator
    • after: After the tag list
bbp_get_topic_tag_name (line 3023)

Return the name of the current tag

  • return: Term Name
  • since: bbPress (r3109)
  • usedby: bbp_topic_tag_name()
  • uses: get_term_by()
  • uses: get_queried_object()
  • uses: apply_filters()
  • uses: get_query_var()
string bbp_get_topic_tag_name ([ $tag = ''])
  • $tag
bbp_get_topic_tag_slug (line 3067)

Return the slug of the current tag

  • return: Term Name
  • since: bbPress (r3109)
  • usedby: bbp_body_class()
  • usedby: bbp_topic_tag_slug()
  • uses: get_term_by()
  • uses: get_query_var()
  • uses: apply_filters()
  • uses: get_queried_object()
string bbp_get_topic_tag_slug ([ $tag = ''])
  • $tag
bbp_get_topic_tag_tax_id (line 2953)

Return the unique id of the topic tag taxonomy

string bbp_get_topic_tag_tax_id ()
bbp_get_topic_title (line 506)

Return the title of the topic

string bbp_get_topic_title ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_get_topic_trash_link (line 2356)

Return the trash link of the topic

  • return: Topic trash link
  • since: bbPress (r2727)
  • uses: esc_url() - To escape the url
  • uses: wp_nonce_url() - To nonce the url
  • usedby: bbp_get_topic_admin_links() - To get the topic trash link
  • usedby: bbp_topic_trash_link() - To get the topic trash link
  • uses: current_user_can() - To check if the current user can delete the topic
  • uses: bbp_get_topic_status() - To get the topic status
  • uses: add_query_arg() - To add custom args to the url
  • uses: apply_filters() - Calls 'bbp_get_topic_trash_link' with the link and args
  • uses: bbp_get_topic() - To get the topic
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: bbp_is_topic_trash() - To check if the topic is trashed
string bbp_get_topic_trash_link ([mixed $args = ''])
  • mixed $args: This function supports these args:
    • id: Optional. Topic id
    • link_before: Before the link
    • link_after: After the link
    • sep: Links separator
    • trash_text: Trash text
    • restore_text: Restore text
    • delete_text: Delete text
bbp_get_topic_voice_count (line 2005)

Return total voice count of a topic

  • return: Voice count of the topic
  • since: bbPress (r2567)
  • usedby: bbp_get_single_topic_description() - To get the topic voice count
  • usedby: bbp_topic_voice_count() - To get the topic voice count
  • uses: bbp_get_topic_id() - To get the topic id
  • uses: apply_filters() - Calls 'bbp_get_topic_voice_count' with the voice count and topic id
  • uses: get_post_meta() - To get the voice count meta
int bbp_get_topic_voice_count ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_has_topics (line 85)

The main topic loop. WordPress makes this easy for us

  • return: array of topic information
  • since: bbPress (r2485)
  • uses: WP_Query - To make query and get the topics
  • uses: wpdb::get_results() - To execute our query and get the results
  • uses: is_page() - To check if it's a page
  • uses: WP_Rewrite::using_permalinks() - To check if the blog is using permalinks
  • uses: paginate_links() - To paginate the links
  • usedby: bbp_display_topics_feed_rss2()
  • usedby: bbp_get_user_topics_started() - To get the topics created by the user
  • usedby: bbp_get_user_subscriptions() - To get the topics
  • usedby: bbp_get_user_favorites() - To get the topics
  • usedby: bbp_view_query() - To make the topics query
  • uses: get_permalink() - To get the permalink
  • uses: current_user_can() - To check if the current user can edit other's topics
  • uses: bbp_get_forum_id() - To get the forum id
  • uses: apply_filters() - Calls 'bbp_has_topics' with bbPres::topic_query::have_posts() and bbPres::topic_query
  • uses: apply_filters() - Calls 'bbp_topics_pagination' with the pagination args
  • uses: add_query_arg() - To add custom args to the url
  • uses: bbp_get_paged() - To get the current page value
  • uses: bbp_get_stickies() - To get the forum stickies
  • uses: bbp_is_single_forum() - To check if it's a forum
  • uses: bbp_get_topic_post_type() - To get the topic post type
  • uses: bbp_get_super_stickies() - To get the super stickies
  • uses: bbp_is_user_bozo() - To add the bozo post status
object Multidimensional bbp_has_topics ([mixed $args = ''])
  • mixed $args: All the arguments supported by WP_Query
bbp_is_topic_anonymous (line 1088)

Is the posted by an anonymous user?

bool bbp_is_topic_anonymous ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_is_topic_closed (line 980)

Is the topic closed to new replies?

  • return: True if closed, false if not.
  • since: bbPress (r2746)
  • usedby: bbp_is_topic_open() - To check if the topic is closed
  • uses: apply_filters() - Calls 'bbp_is_topic_closed' with the topic id
  • uses: bbp_get_topic_status() - To get the topic status
bool bbp_is_topic_closed ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_is_topic_open (line 965)

Is the topic open to new replies?

bool bbp_is_topic_open ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_is_topic_published (line 1039)

Is the topic not spam or deleted?

bool bbp_is_topic_published ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_is_topic_spam (line 1055)

Is the topic marked as spam?

bool bbp_is_topic_spam ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_is_topic_sticky (line 1000)

Is the topic a sticky or super sticky?

bool bbp_is_topic_sticky ([int $topic_id = 0], [int $check_super = true])
  • int $topic_id: Optional. Topic id
  • int $check_super: Optional. If set to true and if the topic is not a normal sticky, it is checked if it is a super sticky or not. Defaults to true.
bbp_is_topic_super_sticky (line 1021)

Is the topic a super sticky?

bool bbp_is_topic_super_sticky ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_is_topic_trash (line 1071)

Is the topic trashed?

bool bbp_is_topic_trash ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_show_lead_topic (line 47)

The plugin version of bbPress comes with two topic display options:

  • Traditional: Topics are included in the reply loop (default)
  • New Style: Topics appear as "lead" posts, ahead of replies

bool bbp_show_lead_topic ([$show_lead $show_lead = false])
  • $show_lead $show_lead: Optional. Default false
bbp_single_topic_description (line 2858)

Output a fancy description of the current topic, including total topics, total replies, and last activity.

void bbp_single_topic_description ([array $args = ''])
bbp_the_topic (line 330)

Loads up the current topic in the loop

object Topic bbp_the_topic ()
bbp_topics (line 310)

Whether there are more topics available in the loop

object Topic bbp_topics ()
bbp_topic_admin_links (line 2125)

Output admin links for topic

void bbp_topic_admin_links ([mixed $args = ''])
bbp_topic_archive_title (line 520)

Output the topic archive title

  • since: bbPress (r3249)
void bbp_topic_archive_title ([string $title = ''])
  • string $title: Default text to use as title
bbp_topic_author (line 1113)

Output the author of the topic

void bbp_topic_author ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_author_avatar (line 1239)

Output the author avatar of the topic

void bbp_topic_author_avatar ([int $topic_id = 0], [int $size = 40])
  • int $topic_id: Optional. Topic id
  • int $size: Optional. Avatar size. Defaults to 40
bbp_topic_author_display_name (line 1182)

Output the author display_name of the topic

void bbp_topic_author_display_name ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_author_email (line 1432)

Output the topic author email address

void bbp_topic_author_email ([int $topic_id = 0])
  • int $topic_id: Optional. Reply id
bbp_topic_author_id (line 1151)

Output the author ID of the topic

void bbp_topic_author_id ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_author_link (line 1282)

Output the author link of the topic

void bbp_topic_author_link ([mixed|int $args = ''])
  • mixed|int $args: If it is an integer, it is used as topic_id. Optional.
bbp_topic_author_role (line 1485)

Output the topic author role

void bbp_topic_author_role ([array $args = array()])
  • array $args: Optional.
bbp_topic_author_url (line 1386)

Output the author url of the topic

void bbp_topic_author_url ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_class (line 2082)

Output the row class of a topic

void bbp_topic_class ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_close_link (line 2401)

Output the close link of the topic

void bbp_topic_close_link ([mixed $args = ''])
bbp_topic_content (line 567)

Output the content of the topic

void bbp_topic_content ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_content_append_revisions (line 788)

Append revisions to the topic content

  • return: Content with the revisions appended
  • since: bbPress (r2782)
  • uses: bbp_get_topic_revision_log() - To get the topic revision log
  • uses: apply_filters() - Calls 'bbp_topic_append_revisions' with the processed content, original content and topic id
string bbp_topic_content_append_revisions ([string $content = ''], [int $topic_id = 0])
  • string $content: Optional. Content to which we need to append the revisions to
  • int $topic_id: Optional. Topic id
bbp_topic_edit_link (line 2214)

Output the edit link of the topic

void bbp_topic_edit_link ([mixed $args = ''])
bbp_topic_edit_url (line 2278)

Output URL to the topic edit page

void bbp_topic_edit_url ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_excerpt (line 605)

Output the excerpt of the topic

void bbp_topic_excerpt ([int $topic_id = 0], [int $length = 100])
  • int $topic_id: Optional. Topic id
  • int $length: Optional. Length of the excerpt. Defaults to 100 letters
bbp_topic_forum_id (line 1557)

Output the forum id a topic belongs to

void bbp_topic_forum_id ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_forum_title (line 1527)

Output the title of the forum a topic belongs to

void bbp_topic_forum_title ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_freshness_link (line 1791)

Output link to the most recent activity inside a topic, complete with link attributes and content.

void bbp_topic_freshness_link ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_id (line 341)

Output the topic id

void bbp_topic_id ([ $topic_id = 0])
  • $topic_id
bbp_topic_last_active_id (line 1587)

Output the topics last active ID

void bbp_topic_last_active_id ([int $topic_id = 0])
  • int $topic_id: Optional. Forum id
bbp_topic_last_active_time (line 1617)

Output the topics last update date/time (aka freshness)

void bbp_topic_last_active_time ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_last_reply_id (line 1666)

Output the id of the topics last reply

void bbp_topic_last_reply_id ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_last_reply_permalink (line 1724)

Output the link to the last reply in a topic

void bbp_topic_last_reply_permalink ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_last_reply_title (line 1697)

Output the title of the last reply inside a topic

void bbp_topic_last_reply_title ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_last_reply_url (line 1753)

Output the link to the last reply in a topic

void bbp_topic_last_reply_url ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_merge_link (line 2536)

Output the merge link of the topic

void bbp_topic_merge_link ([mixed $args = ''])
  • mixed $args
bbp_topic_notices (line 2726)

Displays topic notices

  • since: bbPress (r2744)
  • uses: bbp_is_single_topic() - To check if it's a topic page
  • uses: bbp_get_topic_status() - To get the topic status
  • uses: bbPress::errors::add() - To add the notices to the error handler
  • uses: apply_filters() - Calls 'bbp_topic_notices' with the notice text, topic status and topic id
  • uses: bbp_get_topic_id() - To get the topic id
void bbp_topic_notices ()
bbp_topic_pagination (line 695)

Output pagination links of a topic within the topic loop

void bbp_topic_pagination ([mixed $args = ''])
bbp_topic_permalink (line 450)

Output the link to the topic in the topic loop

void bbp_topic_permalink ([int $topic_id = 0], [$string $redirect_to = ''])
  • int $topic_id: Optional. Topic id
  • $string $redirect_to: Optional. Pass a redirect value for use with shortcodes and other fun things.
bbp_topic_post_count (line 1928)

Output total post count of a topic

void bbp_topic_post_count ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_post_date (line 651)

Output the post date and time of a topic

void bbp_topic_post_date ([int $topic_id = 0], [bool $humanize = false], [bool $gmt = false])
  • int $topic_id: Optional. Topic id.
  • bool $humanize: Optional. Humanize output using time_since
  • bool $gmt: Optional. Use GMT
bbp_topic_post_type (line 22)

Output the unique id of the custom post type for topics

void bbp_topic_post_type ()
bbp_topic_replies_link (line 1831)

Output the replies link of the topic

void bbp_topic_replies_link ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_reply_count (line 1898)

Output total reply count of a topic

void bbp_topic_reply_count ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_reply_count_hidden (line 1959)

Output total hidden reply count of a topic (hidden includes trashed and spammed replies)

void bbp_topic_reply_count_hidden ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_revision_log (line 808)

Output the revision log of the topic

void bbp_topic_revision_log ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_row_actions (line 3323)

Allow topic rows to have adminstrative actions

  • todo: Links and filter
  • since: bbPress (r3653)
  • uses: do_action()
void bbp_topic_row_actions ()
bbp_topic_spam_link (line 2588)

Output the spam link of the topic

void bbp_topic_spam_link ([mixed $args = ''])
bbp_topic_status (line 933)

Output the status of the topic

void bbp_topic_status ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_stick_link (line 2460)

Output the stick link of the topic

void bbp_topic_stick_link ([mixed $args = ''])
bbp_topic_tag_description (line 3195)

Output the description of the current tag

void bbp_topic_tag_description ([ $args = array()])
  • $args
bbp_topic_tag_edit_link (line 3140)

Output the link of the current tag

void bbp_topic_tag_edit_link ([ $tag = ''])
  • $tag
bbp_topic_tag_id (line 2964)

Output the id of the current tag

void bbp_topic_tag_id ([ $tag = ''])
  • $tag
bbp_topic_tag_link (line 3096)

Output the link of the current tag

void bbp_topic_tag_link ([ $tag = ''])
  • $tag
bbp_topic_tag_list (line 2019)

Output a the tags of a topic

void bbp_topic_tag_list ([int $topic_id = 0], [mixed $args = ''])
bbp_topic_tag_name (line 3008)

Output the name of the current tag

void bbp_topic_tag_name ([ $tag = ''])
  • $tag
bbp_topic_tag_slug (line 3052)

Output the slug of the current tag

void bbp_topic_tag_slug ([ $tag = ''])
  • $tag
bbp_topic_tag_tax_id (line 2942)

Output the unique id of the topic tag taxonomy

void bbp_topic_tag_tax_id ()
bbp_topic_title (line 491)

Output the title of the topic

void bbp_topic_title ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id
bbp_topic_trash_link (line 2326)

Output the trash link of the topic

void bbp_topic_trash_link ([mixed $args = ''])
bbp_topic_type_select (line 2780)

Displays topic type select box (normal/sticky/super sticky)

void bbp_topic_type_select ([$args $args = ''])
  • $args $args: This function supports these arguments:
    • stick_text: Sticky text
    • super_text: Super Sticky text
    • unstick_text: Unstick (normal) text
    • select_id: Select id. Defaults to bbp_stick_topic
    • tab: Tabindex
    • topic_id: Topic id
bbp_topic_voice_count (line 1990)

Output total voice count of a topic

void bbp_topic_voice_count ([int $topic_id = 0])
  • int $topic_id: Optional. Topic id

Documentation generated on Thu, 23 Oct 2014 01:48:26 +0100 by phpDocumentor 1.4.3