[ Index ] |
PHP Cross Reference of BBPress |
[Source view] [Print] [Project Stats]
bbPress Forum Functions
File Size: | 2798 lines (82 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bbp_insert_forum( $forum_data = array() X-Ref |
A wrapper for wp_insert_post() that also includes the necessary meta values for the forum to function properly. param: array $forum_data Forum post data param: array $forum_meta Forum meta data since: 2.0.0 bbPress (r3349) |
bbp_new_forum_handler( $action = '' ) X-Ref |
Handles the front end forum submission param: string $action The requested action to compare this function to |
bbp_edit_forum_handler( $action = '' ) X-Ref |
Handles the front end edit forum submission param: string $action The requested action to compare this function to |
bbp_save_forum_extras( $forum_id = 0 ) X-Ref |
Handle the saving of core forum metadata (Status, Visibility, and Type) param: int $forum_id return: If forum ID is empty since: 2.1.0 bbPress (r3678) |
bbp_close_forum( $forum_id = 0 ) X-Ref |
Closes a forum param: int $forum_id forum id return: mixed False or {@link WP_Error} on failure, forum id on success since: 2.0.0 bbPress (r2746) |
bbp_open_forum( $forum_id = 0 ) X-Ref |
Opens a forum param: int $forum_id forum id return: mixed False or {@link WP_Error} on failure, forum id on success since: 2.0.0 bbPress (r2746) |
bbp_categorize_forum( $forum_id = 0 ) X-Ref |
Make the forum a category param: int $forum_id Optional. Forum id return: bool False on failure, true on success since: 2.0.0 bbPress (r2746) |
bbp_normalize_forum( $forum_id = 0 ) X-Ref |
Remove the category status from a forum param: int $forum_id Optional. Forum id return: bool False on failure, true on success since: 2.0.0 bbPress (r2746) |
bbp_publicize_forum( $forum_id = 0, $current_visibility = '' ) X-Ref |
Mark the forum as public param: int $forum_id Optional. Forum id return: bool False on failure, true on success since: 2.0.0 bbPress (r2746) |
bbp_privatize_forum( $forum_id = 0, $current_visibility = '' ) X-Ref |
Mark the forum as private param: int $forum_id Optional. Forum id return: bool False on failure, true on success since: 2.0.0 bbPress (r2746) |
bbp_hide_forum( $forum_id = 0, $current_visibility = '' ) X-Ref |
Mark the forum as hidden param: int $forum_id Optional. Forum id return: bool False on failure, true on success since: 2.0.0 bbPress (r2996) |
bbp_repair_forum_visibility() X-Ref |
Recaches the private and hidden forums return: array An array of the status code and the message since: 2.4.0 bbPress (r5017) |
bbp_remove_forum_from_all_subscriptions( $forum_id = 0 ) X-Ref |
Remove a deleted forum from all user subscriptions param: int $forum_id Get the forum ID to remove since: 2.5.0 bbPress (r5156) |
bbp_bump_forum_topic_count( $forum_id = 0, $difference = 1, $update_ancestors = true ) X-Ref |
Bump the total topic count of a forum param: int $forum_id Optional. Forum id. param: int $difference Optional. Default 1 param: bool $update_ancestors Optional. Default true return: int Forum topic count since: 2.1.0 bbPress (r3825) |
bbp_increase_forum_topic_count( $forum_id = 0 ) X-Ref |
Increase the total topic count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_decrease_forum_topic_count( $forum_id = 0 ) X-Ref |
Decrease the total topic count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_bump_forum_topic_count_hidden( $forum_id = 0, $difference = 1, $update_ancestors = true ) X-Ref |
Bump the total topic count of a forum param: int $forum_id Optional. Forum id. param: int $difference Optional. Default 1 param: bool $update_ancestors Optional. Default true return: int Forum topic count since: 2.1.0 bbPress (r3825) |
bbp_increase_forum_topic_count_hidden( $forum_id = 0 ) X-Ref |
Increase the total hidden topic count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_decrease_forum_topic_count_hidden( $forum_id = 0 ) X-Ref |
Decrease the total hidden topic count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_bump_forum_reply_count( $forum_id = 0, $difference = 1, $update_ancestors = true ) X-Ref |
Bump the total topic count of a forum param: int $forum_id Optional. Forum id. param: int $difference Optional. Default 1 param: bool $update_ancestors Optional. Default true return: int Forum topic count since: 2.1.0 bbPress (r3825) |
bbp_bump_forum_reply_count_hidden( $forum_id = 0, $difference = 1, $update_ancestors = true ) X-Ref |
Bump the total topic count of a forum param: int $forum_id Optional. Forum id. param: int $difference Optional. Default 1 param: bool $update_ancestors Optional. Default true return: int Forum topic count since: 2.6.0 bbPress (r6922) |
bbp_increase_forum_reply_count( $forum_id = 0 ) X-Ref |
Increase the total reply count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_decrease_forum_reply_count( $forum_id = 0 ) X-Ref |
Decrease the total reply count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_increase_forum_reply_count_hidden( $forum_id = 0 ) X-Ref |
Increase the total hidden reply count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_decrease_forum_reply_count_hidden( $forum_id = 0 ) X-Ref |
Decrease the total hidden reply count of a forum by one. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_approved_unapproved_topic_update_forum_reply_count( $topic_id = 0 ) X-Ref |
Update forum reply counts when a topic is approved or unapproved. param: int $topic_id The topic id. return: void since: 2.6.0 bbPress (r6036) |
bbp_update_forum_last_topic_id( $forum_id = 0, $topic_id = 0 ) X-Ref |
Update the forum last topic id param: int $forum_id Optional. Forum id. param: int $topic_id Optional. Topic id. return: int Id of the forums most recent topic since: 2.0.0 bbPress (r2625) |
bbp_update_forum_last_reply_id( $forum_id = 0, $reply_id = 0 ) X-Ref |
Update the forum last reply id param: int $forum_id Optional. Forum id. param: int $reply_id Optional. Reply id. return: int Id of the forums most recent reply since: 2.0.0 bbPress (r2625) |
bbp_update_forum_last_active_id( $forum_id = 0, $active_id = 0 ) X-Ref |
Update the forum last active post id param: int $forum_id Optional. Forum id. param: int $active_id Optional. Active post id. return: int Id of the forums last active post since: 2.0.0 bbPress (r2860) |
bbp_update_forum_last_active_time( $forum_id = 0, $new_time = '' ) X-Ref |
Update the forums last active date/time (aka freshness) param: int $forum_id Optional. Topic id. param: string $new_time Optional. New time in mysql format. return: string MySQL timestamp of last active topic or reply since: 2.0.0 bbPress (r2680) |
bbp_update_forum_subforum_count( $forum_id = 0, $subforums = false ) X-Ref |
Update the forum sub-forum count param: int $forum_id Optional. Forum id param: int $subforums Optional. Number of subforums return: bool True on success, false on failure since: 2.0.0 bbPress (r2625) |
bbp_update_forum_topic_count( $forum_id = 0 ) X-Ref |
Adjust the total topic count of a forum param: int $forum_id Optional. Forum id or topic id. It is checked whether it param: bool $total_count Optional. To return the total count or normal count? return: int Forum topic count since: 2.0.0 bbPress (r2464) |
bbp_update_forum_topic_count_hidden( $forum_id = 0, $topic_count = false ) X-Ref |
Adjust the total hidden topic count of a forum (hidden includes trashed, spammed and pending topics) param: int $forum_id Optional. Topic id to update. param: int $topic_count Optional. Set the topic count manually. return: int Topic hidden topic count since: 2.0.0 bbPress (r2888) since: 2.6.0 bbPress (r5954) Replace direct queries with WP_Query() objects |
bbp_update_forum_reply_count( $forum_id = 0 ) X-Ref |
Adjust the total reply count of a forum param: int $forum_id Optional. Forum id or topic id. It is checked whether it return: int Forum reply count since: 2.0.0 bbPress (r2464) since: 2.6.0 bbPress (r5954) Replace direct queries with WP_Query() objects |
bbp_update_forum_reply_count_hidden( $forum_id = 0 ) X-Ref |
Adjust the total hidden reply count of a forum param: int $forum_id Optional. Forum id or topic id. It is checked whether it return: int Forum reply count since: 2.6.0 bbPress (r6922) |
bbp_update_forum( $args = array() X-Ref |
Updates the counts of a forum. This calls a few internal functions that all run manual queries against the database to get their results. As such, this function can be costly to run but is necessary to keep everything accurate. param: array $args Supports these arguments: since: 2.0.0 bbPress (r2908) |
bbp_get_forum_statuses( $forum_id = 0 ) X-Ref |
Return an associative array of available topic statuses Developers note: these statuses are actually stored as meta data, and Visibilities are stored in post_status. param: int $forum_id Optional. Forum id. return: array since: 2.4.0 bbPress (r5059) |
bbp_get_forum_types( $forum_id = 0 ) X-Ref |
Return an associative array of forum types param: int $forum_id Optional. Forum id. return: array since: 2.4.0 bbPress (r5059) |
bbp_get_forum_visibilities( $forum_id = 0) X-Ref |
Return an associative array of forum visibility Developers note: these visibilities are actually stored in post_status, and Statuses are stored in meta data. param: int $forum_id Optional. Forum id. return: array since: 2.4.0 bbPress (r5059) |
bbp_get_public_forum_statuses() X-Ref |
Return array of public forum statuses. return: array since: 2.6.0 bbPress (r6921) |
bbp_get_non_public_forum_statuses() X-Ref |
Return array of non-public forum statuses. return: array since: 2.6.0 bbPress (r6921) |
bbp_get_hidden_forum_ids() X-Ref |
Returns the hidden forum ids Only hidden forum ids are returned. Public and private ids are not. since: 2.0.0 bbPress (r3007) |
bbp_get_private_forum_ids() X-Ref |
Returns the private forum ids Only private forum ids are returned. Public and hidden ids are not. since: 2.0.0 bbPress (r3007) |
bbp_get_excluded_forum_ids() X-Ref |
Returns the forum IDs that should be excluded from various views & queries, based on the current user's capabilities. return: array Forum IDs to exclude, or an empty array since: 2.6.0 bbPress (r6425) |
bbp_exclude_forum_ids( $type = 'string' ) X-Ref |
Returns a meta_query that either includes or excludes hidden forum IDs from a query. param: string Optional. The type of value to return. (string|array|meta_query) since: 2.0.0 bbPress (r3291) |
bbp_pre_get_posts_normalize_forum_visibility( $posts_query = null ) X-Ref |
Adjusts forum, topic, and reply queries to exclude items that might be contained inside hidden or private forums that the user does not have the capability to view. Doing it with an action allows us to trap all WP_Query's rather than needing to hardcode this logic into each query. It also protects forum content for plugins that might be doing their own queries. param: WP_Query $posts_query return: WP_Query since: 2.0.0 bbPress (r3291) |
bbp_forum_query_topic_ids( $forum_id ) X-Ref |
Returns the forum's topic ids Only topics with published and closed statuses are returned param: int $forum_id Forum id since: 2.0.0 bbPress (r2908) |
bbp_forum_query_subforum_ids( $forum_id ) X-Ref |
Returns the forum's subforum ids Only forums with published status are returned param: int $forum_id Forum id since: 2.0.0 bbPress (r2908) |
bbp_forum_query_last_reply_id( $forum_id = 0, $topic_ids = 0 ) X-Ref |
Returns the forum's last reply id param: int $forum_id Forum id. param: int $topic_ids Optional. Topic ids. since: 2.0.0 bbPress (r2908) since: 2.6.0 bbPress (r5954) Replace direct queries with WP_Query() objects |
bbp_forum_enforce_hidden() X-Ref |
Check if it's a hidden forum or a topic or reply of a hidden forum and if the user can't view it, then sets a 404 since: 2.0.0 bbPress (r2996) |
bbp_forum_enforce_private() X-Ref |
Check if it's a private forum or a topic or reply of a private forum and if the user can't view it, then sets a 404 since: 2.0.0 bbPress (r2996) |
bbp_check_forum_edit() X-Ref |
Redirect if unauthorized user is attempting to edit a forum since: 2.1.0 bbPress (r3607) |
bbp_delete_forum_topics( $forum_id = 0 ) X-Ref |
Delete all topics (and their replies) for a specific forum ID param: int $forum_id return: If forum is not valid since: 2.1.0 bbPress (r3668) |
bbp_trash_forum_topics( $forum_id = 0 ) X-Ref |
Trash all topics inside a forum param: int $forum_id return: If forum is not valid since: 2.1.0 bbPress (r3668) |
bbp_untrash_forum_topics( $forum_id = 0 ) X-Ref |
Untrash all topics inside a forum param: int $forum_id return: If forum is not valid since: 2.1.0 bbPress (r3668) |
bbp_delete_forum( $forum_id = 0 ) X-Ref |
Called before deleting a forum. This function is supplemental to the actual forum deletion which is handled by WordPress core API functions. It is used to clean up after a forum that is being deleted. since: 2.1.0 bbPress (r3668) |
bbp_trash_forum( $forum_id = 0 ) X-Ref |
Called before trashing a forum This function is supplemental to the actual forum being trashed which is handled by WordPress core API functions. It is used to clean up after a forum that is being trashed. since: 2.1.0 bbPress (r3668) |
bbp_untrash_forum( $forum_id = 0 ) X-Ref |
Called before untrashing a forum since: 2.1.0 bbPress (r3668) |
bbp_deleted_forum( $forum_id = 0 ) X-Ref |
Called after deleting a forum Try not to use this action. All meta & taxonomy terms have already been deleted, making them impossible to use. since: 2.1.0 bbPress (r3668) since: 2.6.0 bbPress (r6526) Not recommend for usage |
bbp_trashed_forum( $forum_id = 0 ) X-Ref |
Called after trashing a forum since: 2.1.0 bbPress (r3668) |
bbp_untrashed_forum( $forum_id = 0 ) X-Ref |
Called after untrashing a forum since: 2.1.0 bbPress (r3668) |
Generated: Sun Mar 9 01:00:55 2025 | Cross-referenced by PHPXref 0.7.1 |