[ Index ] |
PHP Cross Reference of BBPress |
[Source view] [Print] [Project Stats]
bbPress Topic Functions
File Size: | 3887 lines (117 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
bbp_insert_topic( $topic_data = array() X-Ref |
A wrapper for wp_insert_post() that also includes the necessary meta values for the topic to function properly. param: array $topic_data Forum post data param: array $topic_meta Forum meta data since: 2.0.0 bbPress (r3349) |
bbp_new_topic_handler( $action = '' ) X-Ref |
Handles the front end topic submission param: string $action The requested action to compare this function to |
bbp_edit_topic_handler( $action = '' ) X-Ref |
Handles the front end edit topic submission param: string $action The requested action to compare this function to |
bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = array() X-Ref |
Handle all the extra meta stuff from posting a new topic param: int $topic_id Optional. Topic id param: int $forum_id Optional. Forum id param: array $anonymous_data Optional - if it's an anonymous post. Do not param: int $author_id Author id param: bool $is_edit Optional. Is the post being edited? Defaults to false. |
bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id = 0, $reply_id = 0, $refresh = true ) X-Ref |
Walks up the post_parent tree from the current topic_id, and updates the meta data of forums above it. This calls several 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: int $topic_id Topic id param: string $last_active_time Optional. Last active time param: int $forum_id Optional. Forum id param: int $reply_id Optional. Reply id param: bool $refresh Reset all the previous parameters? Defaults to true. since: 2.0.0 bbPress (r2800) |
bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) X-Ref |
Handle the moving of a topic from one forum to another. This includes walking up the old and new branches and updating the counts. param: int $topic_id The topic id. param: int $old_forum_id Old forum id. param: int $new_forum_id New forum id. since: 2.0.0 bbPress (r2907) |
bbp_merge_topic_handler( $action = '' ) X-Ref |
Merge topic handler Handles the front end merge topic submission param: string $action The requested action to compare this function to since: 2.0.0 bbPress (r2756) |
bbp_merge_topic_count( $destination_topic_id, $source_topic_id, $source_topic_forum_id ) X-Ref |
Fix counts on topic merge When a topic is merged, update the counts of source and destination topic and their forums. param: int $destination_topic_id Destination topic id param: int $source_topic_id Source topic id param: int $source_topic_forum_id Source topic's forum id since: 2.0.0 bbPress (r2756) |
bbp_split_topic_handler( $action = '' ) X-Ref |
Split topic handler Handles the front end split topic submission param: string $action The requested action to compare this function to since: 2.0.0 bbPress (r2756) |
bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_topic_id ) X-Ref |
Fix counts on topic split When a topic is split, update the counts of source and destination topic and their forums. param: int $from_reply_id From reply id param: int $source_topic_id Source topic id param: int $destination_topic_id Destination topic id since: 2.0.0 bbPress (r2756) |
bbp_edit_topic_tag_handler( $action = '' ) X-Ref |
Handles the front end tag management (renaming, merging, destroying) param: string $action The requested action to compare this function to since: 2.0.0 bbPress (r2768) |
bbp_get_topic_statuses( $topic_id = 0 ) X-Ref |
Return an associative array of available topic statuses param: int $topic_id Optional. Topic id. return: array since: 2.4.0 bbPress (r5059) |
bbp_get_topic_types( $topic_id = 0 ) X-Ref |
Return an associative array of topic sticky types param: int $topic_id Optional. Topic id. return: array since: 2.4.0 bbPress (r5059) |
bbp_get_topic_toggles( $topic_id = 0 ) X-Ref |
Return array of available topic toggle actions param: int $topic_id Optional. Topic id. return: array since: 2.6.0 bbPress (r6133) |
bbp_get_public_topic_statuses() X-Ref |
Return array of public topic statuses. return: array since: 2.6.0 bbPress (r6383) |
bbp_get_non_public_topic_statuses() X-Ref |
Return array of non-public topic statuses. return: array since: 2.6.0 bbPress (r6642) |
bbp_get_stickies( $forum_id = 0 ) X-Ref |
Return sticky topics of a forum param: int $forum_id Optional. If not passed, super stickies are returned. return: array IDs of sticky topics of a forum or super stickies since: 2.0.0 bbPress (r2592) |
bbp_get_super_stickies() X-Ref |
Return topics stuck to front page of the forums return: array IDs of super sticky topics since: 2.0.0 bbPress (r2592) |
bbp_toggle_topic_handler( $action = '' ) X-Ref |
Handles the front end opening/closing, spamming/unspamming, sticking/unsticking and trashing/untrashing/deleting of topics param: string $action The requested action to compare this function to since: 2.0.0 bbPress (r2727) |
bbp_toggle_topic( $args = array() X-Ref |
Do the actual topic toggling This function is used by `bbp_toggle_topic_handler()` to do the actual heavy lifting when it comes to toggling topic. It only really makes sense to call within that context, so if you need to call this function directly, make sure you're also doing what the handler does too. param: array $args since: 2.6.0 bbPress (r6133) |
bbp_remove_topic_from_all_favorites( $topic_id = 0 ) X-Ref |
Remove a deleted topic from all user favorites param: int $topic_id Get the topic id to remove since: 2.0.0 bbPress (r2652) |
bbp_remove_topic_from_all_subscriptions( $topic_id = 0 ) X-Ref |
Remove a deleted topic from all user subscriptions param: int $topic_id Get the topic id to remove since: 2.0.0 bbPress (r2652) |
bbp_bump_topic_reply_count( $topic_id = 0, $difference = 1 ) X-Ref |
Bump the total reply count of a topic param: int $topic_id Optional. Topic id. param: int $difference Optional. Default 1 return: int Topic reply count since: 2.1.0 bbPress (r3825) |
bbp_increase_topic_reply_count( $topic_id = 0 ) X-Ref |
Increase the total reply count of a topic by one. param: int $topic_id The topic id. return: void since: 2.6.0 bbPress (r6036) |
bbp_decrease_topic_reply_count( $topic_id = 0 ) X-Ref |
Decrease the total reply count of a topic by one. param: int $topic_id The topic id. return: void since: 2.6.0 bbPress (r6036) |
bbp_bump_topic_reply_count_hidden( $topic_id = 0, $difference = 1 ) X-Ref |
Bump the total hidden reply count of a topic param: int $topic_id Optional. Topic id. param: int $difference Optional. Default 1 return: int Topic hidden reply count since: 2.1.0 bbPress (r3825) |
bbp_increase_topic_reply_count_hidden( $topic_id = 0 ) X-Ref |
Increase the total hidden reply count of a topic by one. param: int $topic_id The topic id. return: void since: 2.6.0 bbPress (r6036) |
bbp_decrease_topic_reply_count_hidden( $topic_id = 0 ) X-Ref |
Decrease the total hidden reply count of a topic by one. param: int $topic_id The topic id. return: void since: 2.6.0 bbPress (r6036) |
bbp_insert_topic_update_counts( $topic_id = 0, $forum_id = 0 ) X-Ref |
Update counts after a topic is inserted via `bbp_insert_topic`. param: int $topic_id The topic id. param: int $forum_id The forum id. return: void since: 2.6.0 bbPress (r6036) |
bbp_update_topic_forum_id( $topic_id = 0, $forum_id = 0 ) X-Ref |
Update the topic's forum id param: int $topic_id Optional. Topic id to update param: int $forum_id Optional. Forum id return: int Forum id since: 2.0.0 bbPress (r2855) |
bbp_update_topic_topic_id( $topic_id = 0 ) X-Ref |
Update the topic's topic id param: int $topic_id Optional. Topic id to update return: int Topic id since: 2.0.0 bbPress (r2954) |
bbp_update_topic_reply_count( $topic_id = 0, $reply_count = false ) X-Ref |
Adjust the total reply count of a topic param: int $topic_id Optional. Topic id to update param: int $reply_count Optional. Set the reply count manually. return: int Topic reply count since: 2.0.0 bbPress (r2467) |
bbp_update_topic_reply_count_hidden( $topic_id = 0, $reply_count = false ) X-Ref |
Adjust the total hidden reply count of a topic (hidden includes trashed, spammed and pending replies) param: int $topic_id Optional. Topic id to update param: int $reply_count Optional. Set the reply count manually return: int Topic hidden reply count since: 2.0.0 bbPress (r2740) |
bbp_update_topic_last_active_id( $topic_id = 0, $active_id = 0 ) X-Ref |
Update the topic with the last active post ID param: int $topic_id Optional. Topic id to update param: int $active_id Optional. active id return: int Active id since: 2.0.0 bbPress (r2888) |
bbp_update_topic_last_active_time( $topic_id = 0, $new_time = '' ) X-Ref |
Update the topics last active date/time (aka freshness) param: int $topic_id Optional. Topic id. param: string $new_time Optional. New time in mysql format. return: string MySQL timestamp of last active reply since: 2.0.0 bbPress (r2680) |
bbp_update_topic_last_reply_id( $topic_id = 0, $reply_id = 0 ) X-Ref |
Update the topic with the most recent reply ID param: int $topic_id Optional. Topic id to update param: int $reply_id Optional. Reply id return: int Reply id since: 2.0.0 bbPress (r2625) |
bbp_update_topic_voice_count( $topic_id = 0 ) X-Ref |
Adjust the total voice count of a topic param: int $topic_id Optional. Topic id to update return: int Voice count since: 2.0.0 bbPress (r2567) since: 2.6.0 bbPress (r6515) This must be called after any engagement changes |
bbp_update_topic_anonymous_reply_count( $topic_id = 0 ) X-Ref |
Adjust the total anonymous reply count of a topic param: int $topic_id Optional. Topic id to update return: int Anonymous reply count since: 2.0.0 bbPress (r2567) |
bbp_update_topic_revision_log( $args = array() X-Ref |
Update the revision log of the topic param: array $args Supports these args: return: mixed False on failure, true on success since: 2.0.0 bbPress (r2782) |
bbp_close_topic( $topic_id = 0 ) X-Ref |
Closes a topic param: int $topic_id Topic id return: mixed False or {@link WP_Error} on failure, topic id on success since: 2.0.0 bbPress (r2740) |
bbp_open_topic( $topic_id = 0 ) X-Ref |
Opens a topic param: int $topic_id Topic id return: mixed False or {@link WP_Error} on failure, topic id on success since: 2.0.0 bbPress (r2740) |
bbp_spam_topic( $topic_id = 0 ) X-Ref |
Marks a topic as spam param: int $topic_id Topic id return: mixed False or {@link WP_Error} on failure, topic id on success since: 2.0.0 bbPress (r2740) |
bbp_spam_topic_replies( $topic_id = 0 ) X-Ref |
Trash replies to a topic when it's marked as spam Usually you'll want to do this before the topic itself is marked as spam. param: int $topic_id since: 2.6.0 bbPress (r5405) |
bbp_spam_topic_tags( $topic_id = 0 ) X-Ref |
Store the tags to a topic in post meta before it's marked as spam so they can be retrieved and unspammed later. Usually you'll want to do this before the topic itself is marked as spam. param: int $topic_id since: 2.6.0 bbPress (r5405) |
bbp_unspam_topic( $topic_id = 0 ) X-Ref |
Unspams a topic param: int $topic_id Topic id return: mixed False or {@link WP_Error} on failure, topic id on success since: 2.0.0 bbPress (r2740) |
bbp_unspam_topic_replies( $topic_id = 0 ) X-Ref |
Untrash replies to a topic previously marked as spam. Usually you'll want to do this after the topic is unspammed. param: int $topic_id since: 2.6.0 bbPress (r5405) |
bbp_unspam_topic_tags( $topic_id = 0 ) X-Ref |
Retrieve tags to a topic from post meta before it's unmarked as spam so they. Usually you'll want to do this before the topic itself is unmarked as spam. param: int $topic_id since: 2.6.0 bbPress (r5405) |
bbp_stick_topic( $topic_id = 0, $super = false ) X-Ref |
Sticks a topic to a forum or front param: int $topic_id Optional. Topic id param: int $super Should we make the topic a super sticky? return: bool True on success, false on failure since: 2.0.0 bbPress (r2754) |
bbp_approve_topic( $topic_id = 0 ) X-Ref |
Approves a pending topic param: int $topic_id Topic id return: mixed False or {@link WP_Error} on failure, topic id on success since: 2.6.0 bbPress (r5503) |
bbp_unapprove_topic( $topic_id = 0 ) X-Ref |
Unapproves a topic param: int $topic_id Topic id return: mixed False or {@link WP_Error} on failure, topic id on success since: 2.6.0 bbPress (r5503) |
bbp_unstick_topic( $topic_id = 0 ) X-Ref |
Unsticks a topic both from front and it's forum param: int $topic_id Optional. Topic id return: bool Always true. since: 2.0.0 bbPress (r2754) |
bbp_delete_topic( $topic_id = 0 ) X-Ref |
Called before deleting a topic. This function is supplemental to the actual topic deletion which is handled by WordPress core API functions. It is used to clean up after a topic that is being deleted. |
bbp_delete_topic_replies( $topic_id = 0 ) X-Ref |
Delete replies to a topic when it's deleted Usually you'll want to do this before the topic itself is deleted. param: int $topic_id since: 2.6.0 bbPress (r5405) |
bbp_trash_topic( $topic_id = 0 ) X-Ref |
Called before trashing a topic This function is supplemental to the actual topic being trashed which is handled by WordPress core API functions. It is used to clean up after a topic that is being trashed. |
bbp_trash_topic_replies( $topic_id = 0 ) X-Ref |
Trash replies to a topic when it's trashed. Usually you'll want to do this before the topic itself is marked as spam. param: int $topic_id since: 2.6.0 bbPress (r5405) |
bbp_untrash_topic( $topic_id = 0 ) X-Ref |
Called before untrashing a topic |
bbp_untrash_topic_replies( $topic_id = 0 ) X-Ref |
Untrash replies to a topic previously trashed. Usually you'll want to do this after the topic is unspammed. param: int $topic_id since: 2.6.0 bbPress (r5405) |
bbp_deleted_topic( $topic_id = 0 ) X-Ref |
Called after deleting a topic since: 2.0.0 bbPress (r2993) |
bbp_trashed_topic( $topic_id = 0 ) X-Ref |
Called after trashing a topic since: 2.0.0 bbPress (r2993) |
bbp_untrashed_topic( $topic_id = 0 ) X-Ref |
Called after untrashing a topic since: 2.0.0 bbPress (r2993) |
bbp_get_topics_per_page( $default = 15 ) X-Ref |
Return the topics per page setting return: int since: 2.0.0 bbPress (r3540) |
bbp_get_topics_per_rss_page( $default = 25 ) X-Ref |
Return the topics per RSS page setting param: int $default Default replies per page (25) return: int since: 2.0.0 bbPress (r3540) |
bbp_get_topic_tags( $topic_id = 0 ) X-Ref |
Get topic tags for a specific topic ID param: int $topic_id return: string since: 2.6.0 bbPress (r5836) |
bbp_get_topic_tag_names( $topic_id = 0, $sep = ', ' ) X-Ref |
Get topic tags for a specific topic ID param: int $topic_id param: string $sep return: string since: 2.2.0 bbPress (r4165) |
bbp_update_topic_tag_count( $terms, $taxonomy ) X-Ref |
Will update topic-tag count based on object type. Function for the default callback for topic-tag taxonomies. param: array $terms List of Term taxonomy IDs. param: object $taxonomy Current taxonomy object of terms. since: 2.6.0 bbPress (r6253) |
bbp_topic_content_autoembed() X-Ref |
Check if autoembeds are enabled and hook them in if so since: 2.1.0 bbPress (r3752) |
bbp_display_topics_feed_rss2( $topics_query = array() X-Ref |
Output an RSS2 feed of topics, based on the query passed. param: array $topics_query since: 2.0.0 bbPress (r3171) |
bbp_check_topic_edit() X-Ref |
Redirect if unauthorized user is attempting to edit a topic since: 2.1.0 bbPress (r3605) |
bbp_check_topic_tag_edit() X-Ref |
Redirect if unauthorized user is attempting to edit a topic tag since: 2.1.0 bbPress (r3605) |
Generated: Sun Mar 9 01:00:55 2025 | Cross-referenced by PHPXref 0.7.1 |