[ Index ] |
PHP Cross Reference of BBPress |
[Source view] [Print] [Project Stats]
bbPress Common Template Tags Common template tags are ones that are used by more than one component, like forums, topics, replies, users, topic tags, etc...
File Size: | 2846 lines (76 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bbp_forums_url( $path = '/' ) X-Ref |
Output the forum URL param: string $path Additional path with leading slash since: 2.1.0 bbPress (r3979) |
bbp_get_forums_url( $path = '/' ) X-Ref |
Return the forum URL param: string $path Additional path with leading slash since: 2.1.0 bbPress (r3979) |
bbp_topics_url( $path = '/' ) X-Ref |
Output the forum URL param: string $path Additional path with leading slash since: 2.1.0 bbPress (r3979) |
bbp_get_topics_url( $path = '/' ) X-Ref |
Return the forum URL param: string $path Additional path with leading slash return: The URL to the topics archive since: 2.1.0 bbPress (r3979) |
bbp_head() X-Ref |
Add our custom head action to wp_head since: 2.0.0 bbPress (r2464) |
bbp_footer() X-Ref |
Add our custom footer action to wp_footer since: 2.0.0 bbPress (r2464) |
bbp_is_site_public( $site_id = 0 ) X-Ref |
Check if current site is public param: int $site_id return: bool True if site is public, false if private since: 2.0.0 bbPress (r3398) |
bbp_is_forum( $post_id = 0 ) X-Ref |
Check if current page is a bbPress forum param: int $post_id Possible post_id to check return: bool True if it's a forum page, false if not since: 2.0.0 bbPress (r2549) |
bbp_is_forum_archive() X-Ref |
Check if we are viewing a forum archive. return: bool since: 2.0.0 bbPress (r3251) |
bbp_is_single_forum() X-Ref |
Viewing a single forum return: bool since: 2.0.0 bbPress (r3338) |
bbp_is_forum_edit() X-Ref |
Check if current page is a forum edit page return: bool True if it's the forum edit page, false if not since: 2.1.0 bbPress (r3553) |
bbp_is_topic( $post_id = 0 ) X-Ref |
Check if current page is a bbPress topic param: int $post_id Possible post_id to check return: bool True if it's a topic page, false if not since: 2.0.0 bbPress (r2549) |
bbp_is_single_topic() X-Ref |
Viewing a single topic return: bool since: 2.0.0 bbPress (r3338) |
bbp_is_topic_archive() X-Ref |
Check if we are viewing a topic archive. return: bool since: 2.0.0 bbPress (r3251) |
bbp_is_topic_edit() X-Ref |
Check if current page is a topic edit page return: bool True if it's the topic edit page, false if not since: 2.0.0 bbPress (r2753) |
bbp_is_topic_merge() X-Ref |
Check if current page is a topic merge page return: bool True if it's the topic merge page, false if not since: 2.0.0 bbPress (r2756) |
bbp_is_topic_split() X-Ref |
Check if current page is a topic split page return: bool True if it's the topic split page, false if not since: 2.0.0 bbPress (r2756) |
bbp_is_topic_tag() X-Ref |
Check if the current page is a topic tag return: bool True if it's a topic tag, false if not since: 2.0.0 bbPress (r3311) |
bbp_is_topic_tag_edit() X-Ref |
Check if the current page is editing a topic tag return: bool True if editing a topic tag, false if not since: 2.0.0 bbPress (r3346) |
bbp_is_custom_post_type( $the_post = false ) X-Ref |
Check if the current post type is one that comes with bbPress param: mixed $the_post Optional. Post object or post ID. return: bool since: 2.0.0 bbPress (r3311) |
bbp_is_reply( $post_id = 0 ) X-Ref |
Check if current page is a bbPress reply param: int $post_id Possible post_id to check return: bool True if it's a reply page, false if not since: 2.0.0 bbPress (r2549) |
bbp_is_reply_edit() X-Ref |
Check if current page is a reply edit page return: bool True if it's the reply edit page, false if not since: 2.0.0 bbPress (r2753) |
bbp_is_reply_move() X-Ref |
Check if current page is a reply move page return: bool True if it's the reply move page, false if not |
bbp_is_single_reply() X-Ref |
Viewing a single reply return: bool since: 2.0.0 bbPress (r3344) |
bbp_is_favorites() X-Ref |
Check if current page is a bbPress user's favorites page (profile page) return: bool True if it's the favorites page, false if not since: 2.0.0 bbPress (r2652) |
bbp_is_subscriptions() X-Ref |
Check if current page is a bbPress user's subscriptions page (profile page) return: bool True if it's the subscriptions page, false if not since: 2.0.0 bbPress (r2652) |
bbp_is_topics_created() X-Ref |
Check if current page shows the topics created by a bbPress user (profile page) return: bool True if it's the topics created page, false if not since: 2.0.0 bbPress (r2688) |
bbp_is_replies_created() X-Ref |
Check if current page shows the replies created by a bbPress user (profile page) return: bool True if it's the replies created page, false if not since: 2.2.0 bbPress (r4225) |
bbp_is_user_home() X-Ref |
Check if current page is the currently logged in users author page return: bool True if it's the user's home, false if not since: 2.0.0 bbPress (r2688) |
bbp_is_user_home_edit() X-Ref |
Check if current page is the currently logged in users author edit page return: bool True if it's the user's home, false if not since: 2.1.0 bbPress (r3918) |
bbp_is_single_user() X-Ref |
Check if current page is a user profile page return: bool True if it's a user's profile page, false if not since: 2.0.0 bbPress (r2688) |
bbp_is_single_user_edit() X-Ref |
Check if current page is a user profile edit page return: bool True if it's a user's profile edit page, false if not since: 2.0.0 bbPress (r2688) |
bbp_is_single_user_profile() X-Ref |
Check if current page is a user profile page return: bool True if it's a user's profile page, false if not since: 2.2.0 bbPress (r4225) |
bbp_is_single_user_topics() X-Ref |
Check if current page is a user topics created page return: bool True if it's a user's topics page, false if not since: 2.2.0 bbPress (r4225) |
bbp_is_single_user_replies() X-Ref |
Check if current page is a user replies created page return: bool True if it's a user's replies page, false if not since: 2.2.0 bbPress (r4225) |
bbp_is_single_user_engagements() X-Ref |
Check if current page is a user engagements page return: bool True if it's a user's replies page, false if not since: 2.6.0 bbPress (r6320) |
bbp_is_single_view() X-Ref |
Check if current page is a view page return: bool Is it a view page? since: 2.0.0 bbPress (r2789) |
bbp_is_search() X-Ref |
Check if current page is a search page return: bool Is it a search page? since: 2.3.0 bbPress (r4579) |
bbp_is_search_results() X-Ref |
Check if current page is a search results page return: bool Is it a search page? since: 2.4.0 bbPress (r4919) |
bbp_is_edit() X-Ref |
Check if current page is an edit page return: bool True if it's the edit page, false if not since: 2.1.0 bbPress (r3585) |
bbp_body_class( $wp_classes = array() X-Ref |
Use the above is_() functions to output a body class for each scenario param: array $wp_classes param: array $custom_classes return: array Body Classes since: 2.0.0 bbPress (r2926) |
bbp_swap_no_js_body_class() X-Ref |
Output a small piece of JavaScript to replace the "bbp-no-js" body class with "bbp-js" to allow interactive & dynamic elements to work as intended. since: 2.6.10 bbPress (r7229) |
bbp_has_shortcode( $text = '' ) X-Ref |
Check if text contains a bbPress shortcode. Loops through registered bbPress shortcodes and keeps track of which ones were used in a blob of text. If no text is passed, the current global post content is assumed. A preliminary strpos() is performed before looping through each shortcode, to prevent unnecessarily processing. param: string $text return: bool since: 2.6.0 |
is_bbpress() X-Ref |
Use the above is_() functions to return if in any bbPress page return: bool In a bbPress page since: 2.0.0 bbPress (r3344) |
bbp_wp_login_action( $args = array() X-Ref |
Output the login form action url param: array $args This function supports these arguments: since: 2.0.0 bbPress (r2815) |
bbp_get_wp_login_action( $args = array() X-Ref |
Return the login form action url param: array $args This function supports these arguments: since: 2.6.0 bbPress (r5684) |
bbp_redirect_to_field( $redirect_to = '' ) X-Ref |
Output hidden request URI field for user forms. The referer link is the current Request URI from the server super global. To check the field manually, use bbp_get_redirect_to(). param: string $redirect_to Pass a URL to redirect to since: 2.0.0 bbPress (r2815) |
bbp_sanitize_val( $request = '', $input_type = 'text' ) X-Ref |
Echo sanitized $_REQUEST value. Use the $input_type parameter to properly process the value. This ensures correct sanitization of the value for the receiving input. param: string $request Name of $_REQUEST to look for param: string $input_type Type of input. Default: text. Accepts: since: 2.0.0 bbPress (r2815) |
bbp_get_sanitize_val( $request = '', $input_type = 'text' ) X-Ref |
Return sanitized $_REQUEST value. Use the $input_type parameter to properly process the value. This ensures correct sanitization of the value for the receiving input. param: string $request Name of $_REQUEST to look for param: string $input_type Type of input. Default: text. Accepts: return: string Sanitized value ready for screen display since: 2.0.0 bbPress (r2815) |
bbp_tab_index( $auto_increment = true ) X-Ref |
Output the current tab index of a given form Use this function to handle the tab indexing of user facing forms within a template file. Calling this function will automatically increment the global tab index by default. param: int $auto_increment Optional. Default true. Set to false to prevent since: 2.0.0 bbPress (r2810) |
bbp_get_tab_index( $auto_increment = true ) X-Ref |
Return the current tab index of a given form Use this function to handle the tab indexing of user facing forms within a template file. Calling this function will automatically increment the global tab index by default. param: int $auto_increment Optional. Default true. Set to false to return: int $bbp->tab_index The global tab index since: 2.0.0 bbPress (r2810) |
bbp_tab_index_attribute( $tab = false ) X-Ref |
Output a "tabindex" attribute for an element, if an index was passed. This helper function is in use, but it is generally considered impolite to override the "tabindex" attribute beyond what the browser naturally assigns. Most internal usages pass `false` which results in no attribute being used. param: mixed $tab False to skip, any integer to use since: 2.6.0 bbPress (r6424) |
bbp_get_tab_index_attribute( $tab = false ) X-Ref |
Return a "tabindex" attribute for an element, if an index was passed. This helper function is in use, but it is generally considered impolite to override the "tabindex" attribute beyond what the browser naturally assigns. Most internal usages pass `false` which results in no attribute being used. param: mixed $tab False to skip, any integer to use return: string since: 2.6.0 bbPress (r6424) |
bbp_dropdown( $args = array() X-Ref |
Output a select box allowing to pick which forum/topic a new topic/reply belongs in. Can be used for any post type, but is mostly used for topics and forums. param: array $args See {@link bbp_get_dropdown()} for arguments since: 2.0.0 bbPress (r2746) |
bbp_get_dropdown( $args = array() X-Ref |
Return a select box allowing to pick which forum/topic a new topic/reply belongs in. param: array $args The function supports these args: return: string The dropdown since: 2.0.0 bbPress (r2746) |
bbp_forum_form_fields() X-Ref |
Output the required hidden fields when creating/editing a forum since: 2.1.0 bbPress (r3553) |
bbp_topic_form_fields() X-Ref |
Output the required hidden fields when creating/editing a topic since: 2.0.0 bbPress (r2753) |
bbp_reply_form_fields() X-Ref |
Output the required hidden fields when creating/editing a reply since: 2.0.0 bbPress (r2753) |
bbp_edit_user_form_fields() X-Ref |
Output the required hidden fields when editing a user since: 2.0.0 bbPress (r2690) |
bbp_merge_topic_form_fields() X-Ref |
Merge topic form fields Output the required hidden fields when merging a topic since: 2.0.0 bbPress (r2756) |
bbp_split_topic_form_fields() X-Ref |
Split topic form fields Output the required hidden fields when splitting a topic since: 2.0.0 bbPress (r2756) |
bbp_move_reply_form_fields() X-Ref |
Move reply form fields Output the required hidden fields when moving a reply |
bbp_the_content( $args = array() X-Ref |
Output a textarea or TinyMCE if enabled param: array $args since: 2.1.0 bbPress (r3586) |
bbp_get_the_content( $args = array() X-Ref |
Return a textarea or TinyMCE if enabled param: array $args return: string HTML from output buffer since: 2.1.0 bbPress (r3586) |
bbp_get_tiny_mce_plugins( $plugins = array() X-Ref |
Edit TinyMCE plugins to match core behaviour param: array $plugins return: array since: 2.3.0 bbPress (r4574) |
bbp_get_teeny_mce_buttons( $buttons = array() X-Ref |
Edit TeenyMCE buttons to match allowedtags param: array $buttons return: array since: 2.3.0 bbPress (r4605) |
bbp_get_quicktags_settings( $settings = array() X-Ref |
Edit TinyMCE quicktags buttons to match allowedtags param: array $settings return: array Quicktags settings since: 2.3.0 bbPress (r4606) |
bbp_view_id( $view = '' ) X-Ref |
Output the view id param: string $view Optional. View id since: 2.0.0 bbPress (r2789) |
bbp_get_view_id( $view = '' ) X-Ref |
Get the view id Use view id if supplied, otherwise bbp_get_view_rewrite_id() query var. param: string $view Optional. View id. return: bool|string ID on success, false on failure since: 2.0.0 bbPress (r2789) |
bbp_view_title( $view = '' ) X-Ref |
Output the view name aka title param: string $view Optional. View id since: 2.0.0 bbPress (r2789) |
bbp_get_view_title( $view = '' ) X-Ref |
Get the view name aka title If a view id is supplied, that is used. Otherwise the bbp_view query var is checked for. param: string $view Optional. View id return: bool|string Title on success, false on failure since: 2.0.0 bbPress (r2789) |
bbp_view_url( $view = false ) X-Ref |
Output the view url param: string $view Optional. View id since: 2.0.0 bbPress (r2789) |
bbp_get_view_url( $view = false ) X-Ref |
Return the view url param: string $view Optional. View id return: string View url (or home url if the view was not found) since: 2.0.0 bbPress (r2789) |
bbp_is_query_name( $name = '' ) X-Ref |
Check the passed parameter against the current _bbp_query_name return: bool True if match, false if not since: 2.0.0 bbPress (r2980) |
bbp_get_query_name() X-Ref |
Get the '_bbp_query_name' setting return: string To return the query var value since: 2.0.0 bbPress (r2695) |
bbp_set_query_name( $name = '' ) X-Ref |
Set the '_bbp_query_name' setting to $name param: string $name What to set the query var to since: 2.0.0 bbPress (r2692) |
bbp_reset_query_name() X-Ref |
Used to clear the '_bbp_query_name' setting since: 2.0.0 bbPress (r2692) |
bbp_title_breadcrumb( $args = array() X-Ref |
Output the page title as a breadcrumb param: string $sep Separator. Defaults to '←' param: bool $current_page Include the current item param: bool $root Include the root page if one exists since: 2.0.0 bbPress (r2589) |
bbp_breadcrumb( $args = array() X-Ref |
Output a breadcrumb param: string $sep Separator. Defaults to '←' param: bool $current_page Include the current item param: bool $root Include the root page if one exists since: 2.0.0 bbPress (r2589) |
bbp_get_breadcrumb( $args = array() X-Ref |
Return a breadcrumb ( forum -> topic -> reply ) param: string $sep Separator. Defaults to '←' param: bool $current_page Include the current item param: bool $root Include the root page if one exists return: string Breadcrumbs since: 2.0.0 bbPress (r2589) |
bbp_allowed_tags() X-Ref |
Output all of the allowed tags in HTML format with attributes. This is useful for displaying in the post area, which elements and attributes are supported. As well as any plugins which want to display it. since: 2.0.0 bbPress (r2780) |
bbp_get_allowed_tags() X-Ref |
Display all of the allowed tags in HTML format with attributes. This is useful for displaying in the post area, which elements and attributes are supported. As well as any plugins which want to display it. return: string HTML allowed tags entity encoded. since: 2.0.0 bbPress (r2780) |
bbp_template_notices() X-Ref |
Display possible errors & messages inside a template file since: 2.0.0 bbPress (r2688) |
bbp_logout_link( $redirect_to = '' ) X-Ref |
Output the logout link param: string $redirect_to Redirect to url since: 2.0.0 bbPress (r2827) |
bbp_get_logout_link( $redirect_to = '' ) X-Ref |
Return the logout link param: string $redirect_to Redirect to url return: string The logout link since: 2.0.0 bbPress (r2827) |
bbp_title( $title = '', $sep = '»', $seplocation = '' ) X-Ref |
Custom page title for bbPress pages param: string $title Optional. The title (not used). param: string $sep Optional, default is '»'. How to separate the param: string $seplocation Optional. Direction to display title, 'right'. return: string The title since: 2.0.0 bbPress (r2788) |
Generated: Sun Mar 9 01:00:55 2025 | Cross-referenced by PHPXref 0.7.1 |