[ 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. since: 2.0.0 bbPress (r3349) param: array $topic_data Forum post data param: array $topic_meta Forum meta data |
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. since: 2.0.0 bbPress (r2800) 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. |
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. since: 2.0.0 bbPress (r2907) param: int $topic_id The topic id. param: int $old_forum_id Old forum id. param: int $new_forum_id New forum id. |
bbp_merge_topic_handler( $action = '' ) X-Ref |
Merge topic handler Handles the front end merge topic submission since: 2.0.0 bbPress (r2756) param: string $action The requested action to compare this function to |
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. since: 2.0.0 bbPress (r2756) 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 |
bbp_split_topic_handler( $action = '' ) X-Ref |
Split topic handler Handles the front end split topic submission since: 2.0.0 bbPress (r2756) param: string $action The requested action to compare this function to |
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. since: 2.0.0 bbPress (r2756) param: int $from_reply_id From reply id param: int $source_topic_id Source topic id param: int $destination_topic_id Destination topic id |
bbp_edit_topic_tag_handler( $action = '' ) X-Ref |
Handles the front end tag management (renaming, merging, destroying) since: 2.0.0 bbPress (r2768) param: string $action The requested action to compare this function to |
bbp_get_topic_statuses( $topic_id = 0 ) X-Ref |
Return an associative array of available topic statuses since: 2.4.0 bbPress (r5059) return: array param: int $topic_id Optional. Topic id. |
bbp_get_topic_types( $topic_id = 0 ) X-Ref |
Return an associative array of topic sticky types since: 2.4.0 bbPress (r5059) return: array param: int $topic_id Optional. Topic id. |
bbp_get_topic_toggles( $topic_id = 0 ) X-Ref |
Return array of available topic toggle actions since: 2.6.0 bbPress (r6133) return: array param: int $topic_id Optional. Topic id. |
bbp_get_public_topic_statuses() X-Ref |
Return array of public topic statuses. since: 2.6.0 bbPress (r6383) return: array |
bbp_get_non_public_topic_statuses() X-Ref |
Return array of non-public topic statuses. since: 2.6.0 bbPress (r6642) return: array |
bbp_get_stickies( $forum_id = 0 ) X-Ref |
Return sticky topics of a forum since: 2.0.0 bbPress (r2592) return: array IDs of sticky topics of a forum or super stickies param: int $forum_id Optional. If not passed, super stickies are returned. |
bbp_get_super_stickies() X-Ref |
Return topics stuck to front page of the forums since: 2.0.0 bbPress (r2592) return: array IDs of super sticky topics |
bbp_toggle_topic_handler( $action = '' ) X-Ref |
Handles the front end opening/closing, spamming/unspamming, sticking/unsticking and trashing/untrashing/deleting of topics since: 2.0.0 bbPress (r2727) param: string $action The requested action to compare this function to |
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. since: 2.6.0 bbPress (r6133) param: array $args |
bbp_remove_topic_from_all_favorites( $topic_id = 0 ) X-Ref |
Remove a deleted topic from all user favorites since: 2.0.0 bbPress (r2652) param: int $topic_id Get the topic id to remove |
bbp_remove_topic_from_all_subscriptions( $topic_id = 0 ) X-Ref |
Remove a deleted topic from all user subscriptions since: 2.0.0 bbPress (r2652) param: int $topic_id Get the topic id to remove |
bbp_bump_topic_reply_count( $topic_id = 0, $difference = 1 ) X-Ref |
Bump the total reply count of a topic since: 2.1.0 bbPress (r3825) return: int Topic reply count param: int $topic_id Optional. Topic id. param: int $difference Optional. Default 1 |
bbp_increase_topic_reply_count( $topic_id = 0 ) X-Ref |
Increase the total reply count of a topic by one. since: 2.6.0 bbPress (r6036) return: void param: int $topic_id The topic id. |
bbp_decrease_topic_reply_count( $topic_id = 0 ) X-Ref |
Decrease the total reply count of a topic by one. since: 2.6.0 bbPress (r6036) return: void param: int $topic_id The topic id. |
bbp_bump_topic_reply_count_hidden( $topic_id = 0, $difference = 1 ) X-Ref |
Bump the total hidden reply count of a topic since: 2.1.0 bbPress (r3825) return: int Topic hidden reply count param: int $topic_id Optional. Topic id. param: int $difference Optional. Default 1 |
bbp_increase_topic_reply_count_hidden( $topic_id = 0 ) X-Ref |
Increase the total hidden reply count of a topic by one. since: 2.6.0 bbPress (r6036) return: void param: int $topic_id The topic id. |
bbp_decrease_topic_reply_count_hidden( $topic_id = 0 ) X-Ref |
Decrease the total hidden reply count of a topic by one. since: 2.6.0 bbPress (r6036) return: void param: int $topic_id The topic id. |
bbp_insert_topic_update_counts( $topic_id = 0, $forum_id = 0 ) X-Ref |
Update counts after a topic is inserted via `bbp_insert_topic`. since: 2.6.0 bbPress (r6036) return: void param: int $topic_id The topic id. param: int $forum_id The forum id. |
bbp_update_topic_forum_id( $topic_id = 0, $forum_id = 0 ) X-Ref |
Update the topic's forum id since: 2.0.0 bbPress (r2855) return: int Forum id param: int $topic_id Optional. Topic id to update param: int $forum_id Optional. Forum id |
bbp_update_topic_topic_id( $topic_id = 0 ) X-Ref |
Update the topic's topic id since: 2.0.0 bbPress (r2954) return: int Topic id param: int $topic_id Optional. Topic id to update |
bbp_update_topic_reply_count( $topic_id = 0, $reply_count = false ) X-Ref |
Adjust the total reply count of a topic since: 2.0.0 bbPress (r2467) return: int Topic reply count param: int $topic_id Optional. Topic id to update param: int $reply_count Optional. Set the reply count manually. |
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) since: 2.0.0 bbPress (r2740) return: int Topic hidden reply count param: int $topic_id Optional. Topic id to update param: int $reply_count Optional. Set the reply count manually |
bbp_update_topic_last_active_id( $topic_id = 0, $active_id = 0 ) X-Ref |
Update the topic with the last active post ID since: 2.0.0 bbPress (r2888) return: int Active id param: int $topic_id Optional. Topic id to update param: int $active_id Optional. active id |
bbp_update_topic_last_active_time( $topic_id = 0, $new_time = '' ) X-Ref |
Update the topics last active date/time (aka freshness) since: 2.0.0 bbPress (r2680) return: string MySQL timestamp of last active reply param: int $topic_id Optional. Topic id. param: string $new_time Optional. New time in mysql format. |
bbp_update_topic_last_reply_id( $topic_id = 0, $reply_id = 0 ) X-Ref |
Update the topic with the most recent reply ID since: 2.0.0 bbPress (r2625) return: int Reply id param: int $topic_id Optional. Topic id to update param: int $reply_id Optional. Reply id |
bbp_update_topic_voice_count( $topic_id = 0 ) X-Ref |
Adjust the total voice count of a topic since: 2.0.0 bbPress (r2567) since: 2.6.0 bbPress (r6515) This must be called after any engagement changes return: int Voice count param: int $topic_id Optional. Topic id to update |
bbp_update_topic_anonymous_reply_count( $topic_id = 0 ) X-Ref |
Adjust the total anonymous reply count of a topic since: 2.0.0 bbPress (r2567) return: int Anonymous reply count param: int $topic_id Optional. Topic id to update |
bbp_update_topic_revision_log( $args = array() X-Ref |
Update the revision log of the topic since: 2.0.0 bbPress (r2782) return: mixed False on failure, true on success param: array $args Supports these args: |
bbp_close_topic( $topic_id = 0 ) X-Ref |
Closes a topic since: 2.0.0 bbPress (r2740) return: mixed False or {@link WP_Error} on failure, topic id on success param: int $topic_id Topic id |
bbp_open_topic( $topic_id = 0 ) X-Ref |
Opens a topic since: 2.0.0 bbPress (r2740) return: mixed False or {@link WP_Error} on failure, topic id on success param: int $topic_id Topic id |
bbp_spam_topic( $topic_id = 0 ) X-Ref |
Marks a topic as spam since: 2.0.0 bbPress (r2740) return: mixed False or {@link WP_Error} on failure, topic id on success param: int $topic_id Topic id |
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. since: 2.6.0 bbPress (r5405) param: int $topic_id |
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. since: 2.6.0 bbPress (r5405) param: int $topic_id |
bbp_unspam_topic( $topic_id = 0 ) X-Ref |
Unspams a topic since: 2.0.0 bbPress (r2740) return: mixed False or {@link WP_Error} on failure, topic id on success param: int $topic_id Topic id |
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. since: 2.6.0 bbPress (r5405) param: int $topic_id |
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. since: 2.6.0 bbPress (r5405) param: int $topic_id |
bbp_stick_topic( $topic_id = 0, $super = false ) X-Ref |
Sticks a topic to a forum or front since: 2.0.0 bbPress (r2754) return: bool True on success, false on failure param: int $topic_id Optional. Topic id param: int $super Should we make the topic a super sticky? |
bbp_approve_topic( $topic_id = 0 ) X-Ref |
Approves a pending topic since: 2.6.0 bbPress (r5503) return: mixed False or {@link WP_Error} on failure, topic id on success param: int $topic_id Topic id |
bbp_unapprove_topic( $topic_id = 0 ) X-Ref |
Unapproves a topic since: 2.6.0 bbPress (r5503) return: mixed False or {@link WP_Error} on failure, topic id on success param: int $topic_id Topic id |
bbp_unstick_topic( $topic_id = 0 ) X-Ref |
Unsticks a topic both from front and it's forum since: 2.0.0 bbPress (r2754) return: bool Always true. param: int $topic_id Optional. Topic id |
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. since: 2.6.0 bbPress (r5405) param: int $topic_id |
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. since: 2.6.0 bbPress (r5405) param: int $topic_id |
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. since: 2.6.0 bbPress (r5405) param: int $topic_id |
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 since: 2.0.0 bbPress (r3540) return: int |
bbp_get_topics_per_rss_page( $default = 25 ) X-Ref |
Return the topics per RSS page setting since: 2.0.0 bbPress (r3540) return: int param: int $default Default replies per page (25) |
bbp_get_topic_tags( $topic_id = 0 ) X-Ref |
Get topic tags for a specific topic ID since: 2.6.0 bbPress (r5836) return: string param: int $topic_id |
bbp_get_topic_tag_names( $topic_id = 0, $sep = ', ' ) X-Ref |
Get topic tags for a specific topic ID since: 2.2.0 bbPress (r4165) return: string param: int $topic_id param: string $sep |
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. since: 2.6.0 bbPress (r6253) param: array $terms List of Term taxonomy IDs. param: object $taxonomy Current taxonomy object of terms. |
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. since: 2.0.0 bbPress (r3171) param: array $topics_query |
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: Sat Dec 21 01:00:52 2024 | Cross-referenced by PHPXref 0.7.1 |