Changeset 6573 for trunk/src/includes/topics/functions.php
- Timestamp:
- 06/16/2017 09:20:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r6544 r6573 18 18 * 19 19 * @since 2.0.0 bbPress (r3349) 20 *21 * @uses bbp_parse_args()22 * @uses bbp_get_topic_post_type()23 * @uses wp_insert_post()24 * @uses update_post_meta()25 20 * 26 21 * @param array $topic_data Forum post data … … 98 93 * 99 94 * @param string $action The requested action to compare this function to 100 * @uses bbp_add_error() To add an error message101 * @uses bbp_verify_nonce_request() To verify the nonce and check the referer102 * @uses bbp_is_anonymous() To check if an anonymous post is being made103 * @uses current_user_can() To check if the current user can publish topic104 * @uses bbp_get_current_user_id() To get the current user id105 * @uses bbp_filter_anonymous_post_data() To filter anonymous data106 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}107 * @uses bbp_is_forum_category() To check if the forum is a category108 * @uses bbp_is_forum_closed() To check if the forum is closed109 * @uses bbp_is_forum_private() To check if the forum is private110 * @uses bbp_check_for_flood() To check for flooding111 * @uses bbp_check_for_duplicate() To check for duplicates112 * @uses bbp_get_topic_post_type() To get the topic post type113 * @uses remove_filter() To remove kses filters if needed114 * @uses apply_filters() Calls 'bbp_new_topic_pre_title' with the content115 * @uses apply_filters() Calls 'bbp_new_topic_pre_content' with the content116 * @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors117 * @uses wp_insert_post() To insert the topic118 * @uses get_post_field() To get the post status119 * @uses bbp_get_closed_status_id() To get the closed status id120 * @uses bbp_close_topic() To close topics121 * @uses bbp_get_trash_status_id() To get the trash status id122 * @uses wp_trash_post() To trash topics123 * @uses bbp_get_spam_status_id() To get the spam status id124 * @uses add_post_meta() To add spam status meta to spam topics125 * @uses do_action() Calls 'bbp_new_topic' with the topic id, forum id,126 * anonymous data and reply author127 * @uses bbp_get_topic_permalink() To get the topic permalink128 * @uses bbp_redirect() To redirect to the topic link129 * @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error130 * messages131 95 */ 132 96 function bbp_new_topic_handler( $action = '' ) { … … 441 405 * 442 406 * @param string $action The requested action to compare this function to 443 * @uses bbp_add_error() To add an error message444 * @uses bbp_get_topic() To get the topic445 * @uses bbp_verify_nonce_request() To verify the nonce and check the request446 * @uses bbp_is_topic_anonymous() To check if topic is by an anonymous user447 * @uses current_user_can() To check if the current user can edit the topic448 * @uses bbp_filter_anonymous_post_data() To filter anonymous data449 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}450 * @uses bbp_is_forum_category() To check if the forum is a category451 * @uses bbp_is_forum_closed() To check if the forum is closed452 * @uses bbp_is_forum_private() To check if the forum is private453 * @uses remove_filter() To remove kses filters if needed454 * @uses apply_filters() Calls 'bbp_edit_topic_pre_title' with the title and455 * topic id456 * @uses apply_filters() Calls 'bbp_edit_topic_pre_content' with the content457 * and topic id458 * @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors459 * @uses wp_save_post_revision() To save a topic revision460 * @uses bbp_update_topic_revision_log() To update the topic revision log461 * @uses bbp_stick_topic() To stick or super stick the topic462 * @uses bbp_unstick_topic() To unstick the topic463 * @uses wp_update_post() To update the topic464 * @uses do_action() Calls 'bbp_edit_topic' with the topic id, forum id,465 * anonymous data and reply author466 * @uses bbp_move_topic_handler() To handle movement of a topic from one forum467 * to another468 * @uses bbp_get_topic_permalink() To get the topic permalink469 * @uses bbp_redirect() To redirect to the topic link470 * @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error471 * messages472 407 */ 473 408 function bbp_edit_topic_handler( $action = '' ) { … … 783 718 * @param int $author_id Author id 784 719 * @param bool $is_edit Optional. Is the post being edited? Defaults to false. 785 * @uses bbp_get_topic_id() To get the topic id786 * @uses bbp_get_forum_id() To get the forum id787 * @uses bbp_get_current_user_id() To get the current user id788 * @uses bbp_get_topic_forum_id() To get the topic forum id789 * @uses update_post_meta() To update the topic metas790 * @uses set_transient() To update the flood check transient for the ip791 * @uses bbp_update_user_last_posted() To update the users last posted time792 * @uses bbp_is_subscriptions_active() To check if the subscriptions feature is793 * activated or not794 * @uses bbp_is_user_subscribed() To check if the user is subscribed795 * @uses bbp_remove_user_subscription() To remove the user's subscription796 * @uses bbp_add_user_subscription() To add the user's subscription797 * @uses bbp_update_topic_forum_id() To update the topic's forum id798 * @uses bbp_update_topic_topic_id() To update the topic's topic id799 * @uses bbp_update_topic_last_reply_id() To update the last reply id topic meta800 * @uses bbp_update_topic_last_active_id() To update the topic last active id801 * @uses bbp_update_topic_last_active_time() To update the last active topic meta802 * @uses bbp_update_topic_reply_count() To update the topic reply count803 * @uses bbp_update_topic_reply_count_hidden() To udpate the topic hidden reply count804 * @uses bbp_update_topic_voice_count() To update the topic voice count805 * @uses bbp_update_topic_walker() To udpate the topic's ancestors806 720 */ 807 721 function bbp_update_topic( $topic_id = 0, $forum_id = 0, $anonymous_data = array(), $author_id = 0, $is_edit = false ) { … … 924 838 * @param int $reply_id Optional. Reply id 925 839 * @param bool $refresh Reset all the previous parameters? Defaults to true. 926 * @uses bbp_get_topic_id() To get the topic id927 * @uses bbp_get_topic_forum_id() To get the topic forum id928 * @uses get_post_ancestors() To get the topic's ancestors929 * @uses bbp_is_forum() To check if the ancestor is a forum930 * @uses bbp_update_forum() To update the forum931 840 */ 932 841 function bbp_update_topic_walker( $topic_id, $last_active_time = '', $forum_id = 0, $reply_id = 0, $refresh = true ) { … … 992 901 * @param int $old_forum_id Old forum id. 993 902 * @param int $new_forum_id New forum id. 994 * @uses bbp_get_topic_id() To get the topic id995 * @uses bbp_get_forum_id() To get the forum id996 * @uses bbp_clean_post_cache() To clean the old and new forum post caches997 * @uses bbp_update_topic_forum_id() To update the topic forum id998 * @uses wp_update_post() To update the topic post parent`999 * @uses bbp_get_stickies() To get the old forums sticky topics1000 * @uses delete_post_meta() To delete the forum sticky meta1001 * @uses update_post_meta() To update the old forum sticky meta1002 * @uses bbp_stick_topic() To stick the topic in the new forum1003 * @uses bbp_get_reply_post_type() To get the reply post type1004 * @uses bbp_get_all_child_ids() To get all the child ids1005 * @uses bbp_update_reply_forum_id() To update the reply forum id1006 * @uses get_post_ancestors() To get the topic's ancestors1007 * @uses bbp_get_public_child_ids() To get all the public child ids1008 * @uses get_post_field() To get the topic's post status1009 * @uses bbp_get_public_status_id() To get the public status id1010 * @uses bbp_decrease_forum_topic_count() To bump the forum topic count by -11011 * @uses bbp_bump_forum_reply_count() To bump the forum reply count1012 * @uses bbp_increase_forum_topic_count() To bump the forum topic count by 11013 * @uses bbp_decrease_forum_topic_count_hidden() To bump the forum topic hidden count by -11014 * @uses bbp_increase_forum_topic_count_hidden() To bump the forum topic hidden count by 11015 * @uses bbp_is_forum() To check if the ancestor is a forum1016 * @uses bbp_update_forum() To update the forum1017 903 */ 1018 904 function bbp_move_topic_handler( $topic_id, $old_forum_id, $new_forum_id ) { … … 1155 1041 * 1156 1042 * @param string $action The requested action to compare this function to 1157 * @uses bbp_add_error() To add an error message1158 * @uses bbp_get_topic() To get the topics1159 * @uses bbp_verify_nonce_request() To verify the nonce and check the request1160 * @uses current_user_can() To check if the current user can edit the topics1161 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}1162 * @uses do_action() Calls 'bbp_merge_topic' with the destination and source1163 * topic ids1164 * @uses bbp_get_topic_subscribers() To get the source topic subscribers1165 * @uses bbp_add_user_subscription() To add the user subscription1166 * @uses bbp_remove_user_subscription() To remove the user subscription1167 * @uses bbp_get_topic_favoriters() To get the source topic favoriters1168 * @uses bbp_add_user_favorite() To add the user favorite1169 * @uses bbp_remove_user_favorite() To remove the user favorite1170 * @uses wp_get_post_terms() To get the source topic tags1171 * @uses wp_set_post_terms() To set the topic tags1172 * @uses wp_delete_object_term_relationships() To delete the topic tags1173 * @uses bbp_open_topic() To open the topic1174 * @uses bbp_unstick_topic() To unstick the topic1175 * @uses bbp_get_reply_post_type() To get the reply post type1176 * @uses get_posts() To get the replies1177 * @uses wp_update_post() To update the topic1178 * @uses bbp_update_reply_topic_id() To update the reply topic id1179 * @uses bbp_get_topic_forum_id() To get the topic forum id1180 * @uses bbp_update_reply_forum_id() To update the reply forum id1181 * @uses do_action() Calls 'bbp_merged_topic_reply' with the reply id and1182 * destination topic id1183 * @uses do_action() Calls 'bbp_merged_topic' with the destination and source1184 * topic ids and source topic's forum id1185 * @uses bbp_get_topic_permalink() To get the topic permalink1186 * @uses bbp_redirect() To redirect to the topic link1187 1043 */ 1188 1044 function bbp_merge_topic_handler( $action = '' ) { … … 1410 1266 * @param int $source_topic_id Source topic id 1411 1267 * @param int $source_topic_forum_id Source topic's forum id 1412 * @uses bbp_update_forum_topic_count() To update the forum topic counts1413 * @uses bbp_update_forum_reply_count() To update the forum reply counts1414 * @uses bbp_update_topic_reply_count() To update the topic reply counts1415 * @uses bbp_update_topic_voice_count() To update the topic voice counts1416 * @uses bbp_update_topic_reply_count_hidden() To update the topic hidden reply1417 * count1418 * @uses do_action() Calls 'bbp_merge_topic_count' with the destination topic1419 * id, source topic id & source topic forum id1420 1268 */ 1421 1269 function bbp_merge_topic_count( $destination_topic_id, $source_topic_id, $source_topic_forum_id ) { … … 1451 1299 * 1452 1300 * @param string $action The requested action to compare this function to 1453 * @uses bbp_add_error() To add an error message1454 * @uses bbp_get_reply() To get the reply1455 * @uses bbp_get_topic() To get the topics1456 * @uses bbp_verify_nonce_request() To verify the nonce and check the request1457 * @uses current_user_can() To check if the current user can edit the topics1458 * @uses bbp_get_topic_post_type() To get the topic post type1459 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}1460 * @uses do_action() Calls 'bbp_pre_split_topic' with the from reply id, source1461 * and destination topic ids1462 * @uses bbp_get_topic_subscribers() To get the source topic subscribers1463 * @uses bbp_add_user_subscription() To add the user subscription1464 * @uses bbp_get_topic_favoriters() To get the source topic favoriters1465 * @uses bbp_add_user_favorite() To add the user favorite1466 * @uses wp_get_post_terms() To get the source topic tags1467 * @uses wp_set_post_terms() To set the topic tags1468 * @uses bbp_get_reply_post_type() To get the reply post type1469 * @uses wpdb::prepare() To prepare our database query1470 * @uses wpdb::get_results() To execute the database query and get results1471 * @uses wp_update_post() To update the replies1472 * @uses bbp_update_reply_topic_id() To update the reply topic id1473 * @uses bbp_get_topic_forum_id() To get the topic forum id1474 * @uses bbp_update_reply_forum_id() To update the reply forum id1475 * @uses do_action() Calls 'bbp_split_topic_reply' with the reply id and1476 * destination topic id1477 * @uses bbp_update_topic_last_reply_id() To update the topic last reply id1478 * @uses bbp_update_topic_last_active_time() To update the topic last active meta1479 * @uses do_action() Calls 'bbp_post_split_topic' with the destination and1480 * source topic ids and source topic's forum id1481 * @uses bbp_get_topic_permalink() To get the topic permalink1482 * @uses bbp_redirect() To redirect to the topic link1483 1301 */ 1484 1302 function bbp_split_topic_handler( $action = '' ) { … … 1790 1608 * @param int $source_topic_id Source topic id 1791 1609 * @param int $destination_topic_id Destination topic id 1792 * @uses bbp_update_forum_topic_count() To update the forum topic counts1793 * @uses bbp_update_forum_reply_count() To update the forum reply counts1794 * @uses bbp_update_topic_reply_count() To update the topic reply counts1795 * @uses bbp_update_topic_voice_count() To update the topic voice counts1796 * @uses bbp_update_topic_reply_count_hidden() To update the topic hidden reply1797 * count1798 * @uses do_action() Calls 'bbp_split_topic_count' with the from reply id,1799 * source topic id & destination topic id1800 1610 */ 1801 1611 function bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_topic_id ) { … … 1828 1638 * 1829 1639 * @param string $action The requested action to compare this function to 1830 * @uses bbp_verify_nonce_request() To verify the nonce and check the request1831 * @uses current_user_can() To check if the current user can edit/delete tags1832 * @uses bbp_add_error() To add an error message1833 * @uses wp_update_term() To update the topic tag1834 * @uses get_term_link() To get the topic tag url1835 * @uses term_exists() To check if the topic tag already exists1836 * @uses wp_insert_term() To insert a topic tag1837 * @uses wp_delete_term() To delete the topic tag1838 * @uses home_url() To get the blog's home page url1839 * @uses do_action() Calls actions based on the actions with associated args1840 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}1841 * @uses bbp_redirect() To redirect to the url1842 1640 */ 1843 1641 function bbp_edit_topic_tag_handler( $action = '' ) { … … 2082 1880 * 2083 1881 * @param int $forum_id Optional. If not passed, super stickies are returned. 2084 * @uses bbp_get_super_stickies() To get the super stickies2085 * @uses get_post_meta() To get the forum stickies2086 * @uses apply_filters() Calls 'bbp_get_stickies' with the stickies and forum id2087 1882 * @return array IDs of sticky topics of a forum or super stickies 2088 1883 */ … … 2108 1903 * @since 2.0.0 bbPress (r2592) 2109 1904 * 2110 * @uses get_option() To get super sticky topics2111 * @uses apply_filters() Calls 'bbp_get_super_stickies' with the stickies2112 1905 * @return array IDs of super sticky topics 2113 1906 */ … … 2135 1928 * 2136 1929 * @param string $action The requested action to compare this function to 2137 * @uses bbp_get_topic() To get the topic2138 * @uses current_user_can() To check if the user is capable of editing or2139 * deleting the topic2140 * @uses bbp_get_topic_post_type() To get the topic post type2141 * @uses check_ajax_referer() To verify the nonce and check the referer2142 * @uses bbp_is_topic_open() To check if the topic is open2143 * @uses bbp_close_topic() To close the topic2144 * @uses bbp_open_topic() To open the topic2145 * @uses bbp_is_topic_sticky() To check if the topic is a sticky2146 * @uses bbp_unstick_topic() To unstick the topic2147 * @uses bbp_stick_topic() To stick the topic2148 * @uses bbp_is_topic_spam() To check if the topic is marked as spam2149 * @uses bbp_spam_topic() To make the topic as spam2150 * @uses bbp_unspam_topic() To unmark the topic as spam2151 * @uses wp_trash_post() To trash the topic2152 * @uses wp_untrash_post() To untrash the topic2153 * @uses wp_delete_post() To delete the topic2154 * @uses do_action() Calls 'bbp_toggle_topic_handler' with success, post data2155 * and action2156 * @uses bbp_get_forum_permalink() To get the forum link2157 * @uses bbp_get_topic_permalink() To get the topic link2158 * @uses bbp_redirect() To redirect to the topic2159 * @uses bbPress::errors:add() To log the error messages2160 1930 */ 2161 1931 function bbp_toggle_topic_handler( $action = '' ) { … … 2386 2156 * 2387 2157 * @param int $topic_id Get the topic id to remove 2388 * @uses bbp_get_topic_id To get the topic id2389 * @uses bbp_get_topic_favoriters() To get the topic's favoriters2390 * @uses bbp_remove_user_favorite() To remove the topic from user's favorites2391 2158 */ 2392 2159 function bbp_remove_topic_from_all_favorites( $topic_id = 0 ) { … … 2419 2186 * 2420 2187 * @param int $topic_id Get the topic id to remove 2421 * @uses bbp_is_subscriptions_active() To check if the subscriptions are active2422 * @uses bbp_get_topic_id To get the topic id2423 * @uses bbp_get_topic_subscribers() To get the topic subscribers2424 * @uses bbp_remove_user_subscription() To remove the user subscription2425 2188 */ 2426 2189 function bbp_remove_topic_from_all_subscriptions( $topic_id = 0 ) { … … 2450 2213 * @param int $topic_id Optional. Topic id. 2451 2214 * @param int $difference Optional. Default 1 2452 * @uses bbp_get_topic_id() To get the topic id2453 * @uses bbp_get_topic_reply_count() To get the topic reply count2454 * @uses update_post_meta() To update the topic's reply count meta2455 * @uses apply_filters() Calls 'bbp_bump_topic_reply_count' with the reply2456 * count, topic id, and difference2457 2215 * @return int Topic reply count 2458 2216 */ … … 2484 2242 * @param int $topic_id The topic id. 2485 2243 * 2486 * @uses bbp_is_reply() To check if the passed topic id is a reply2487 * @uses bbp_get_reply_topic_id() To get the replies topic id2488 * @uses bbp_is_reply_published() To check if the reply is published2489 * @uses bbp_increase_topic_reply_count_hidden() To increase the topics reply2490 * hidden count by 12491 * @uses bbp_bump_topic_reply_count() To bump the topic reply count2492 *2493 2244 * @return void 2494 2245 */ … … 2522 2273 * @param int $topic_id The topic id. 2523 2274 * 2524 * @uses bbp_is_reply() To check if the passed topic id is a reply2525 * @uses bbp_get_reply_topic_id() To get the replies topic id2526 * @uses bbp_bump_topic_reply_count() To bump the topic reply count2527 *2528 2275 * @return void 2529 2276 */ … … 2550 2297 * @param int $topic_id Optional. Topic id. 2551 2298 * @param int $difference Optional. Default 1 2552 * @uses bbp_get_topic_id() To get the topic id2553 * @uses bbp_get_topic_reply_count_hidden To get the topic's hidden reply count2554 * @uses update_post_meta() To update the topic's reply count meta2555 * @uses apply_filters() Calls 'bbp_bump_topic_reply_count_hidden' with the2556 * reply count, topic id, and difference2557 2299 * @return int Topic hidden reply count 2558 2300 */ … … 2584 2326 * @param int $topic_id The topic id. 2585 2327 * 2586 * @uses bbp_is_reply() To check if the passed topic id is a reply2587 * @uses bbp_get_reply_topic_id() To get the topic id2588 * @uses bbp_bump_topic_reply_count_hidden() To bump topic hidden reply count2589 *2590 2328 * @return void 2591 2329 */ … … 2612 2350 * @param int $topic_id The topic id. 2613 2351 * 2614 * @uses bbp_is_reply() To check if the passed topic id is a reply2615 * @uses bbp_get_reply_topic_id() To get the topic id2616 * @uses bbp_bump_topic_reply_count_hidden() To bump topic hidden reply count2617 *2618 2352 * @return void 2619 2353 */ … … 2641 2375 * @param int $forum_id The forum id. 2642 2376 * 2643 * @uses bbp_get_topic_status() To get the post status2644 * @uses bbp_get_public_status_id() To get the public status id2645 * @uses bbp_increase_forum_topic_count() To bump the topic's forum topic count by 12646 * @uses bbp_increase_forum_topic_count_hidden() To bump the topic's forum topic2647 * hidden count by 12648 *2649 2377 * @return void 2650 2378 */ … … 2670 2398 * @param int $topic_id Optional. Topic id to update 2671 2399 * @param int $forum_id Optional. Forum id 2672 * @uses bbp_is_reply() TO check if the passed topic id is a reply2673 * @uses bbp_get_reply_topic_id() To get the reply topic id2674 * @uses bbp_get_topic_id() To get the topic id2675 * @uses get_post_field() To get the post parent of the topic id2676 * @uses bbp_get_forum_id() To get the forum id2677 * @uses update_post_meta() To update the topic forum id meta2678 * @uses apply_filters() Calls 'bbp_update_topic_forum_id' with the forum id2679 * and topic id2680 2400 * @return int Forum id 2681 2401 */ … … 2706 2426 * 2707 2427 * @param int $topic_id Optional. Topic id to update 2708 * @uses bbp_get_topic_id() To get the topic id2709 * @uses update_post_meta() To update the topic's topic id meta2710 * @uses apply_filters() Calls 'bbp_update_topic_topic_id' with the topic id2711 2428 * @return int Topic id 2712 2429 */ … … 2727 2444 * @param int $topic_id Optional. Topic id to update 2728 2445 * @param int $reply_count Optional. Set the reply count manually. 2729 * @uses bbp_is_reply() To check if the passed topic id is a reply2730 * @uses bbp_get_reply_topic_id() To get the reply topic id2731 * @uses bbp_get_topic_id() To get the topic id2732 * @uses bbp_get_reply_post_type() To get the reply post type2733 * @uses bbp_get_public_child_count() To get the reply count2734 * @uses update_post_meta() To update the topic reply count meta2735 * @uses apply_filters() Calls 'bbp_update_topic_reply_count' with the reply2736 * count and topic id2737 2446 * @return int Topic reply count 2738 2447 */ … … 2765 2474 * @param int $topic_id Optional. Topic id to update 2766 2475 * @param int $reply_count Optional. Set the reply count manually 2767 * @uses bbp_is_reply() To check if the passed topic id is a reply2768 * @uses bbp_get_reply_topic_id() To get the reply topic id2769 * @uses bbp_get_topic_id() To get the topic id2770 * @uses bbp_get_trash_status_id() To get the trash status id2771 * @uses bbp_get_spam_status_id() To get the spam status id2772 * @uses bbp_get_pending_status_id() To get the pending status id2773 * @uses bbp_get_reply_post_type() To get the reply post type2774 * @uses wpdb::prepare() To prepare our database query2775 * @uses wpdb::get_var() To execute our query and get the var back2776 * @uses update_post_meta() To update the topic hidden reply count meta2777 * @uses apply_filters() Calls 'bbp_update_topic_reply_count_hidden' with the2778 * hidden reply count and topic id2779 2476 * @return int Topic hidden reply count 2780 2477 */ … … 2810 2507 * @param int $topic_id Optional. Topic id to update 2811 2508 * @param int $active_id Optional. active id 2812 * @uses bbp_is_reply() To check if the passed topic id is a reply2813 * @uses bbp_get_reply_topic_id() To get the reply topic id2814 * @uses bbp_get_topic_id() To get the topic id2815 * @uses bbp_get_reply_post_type() To get the reply post type2816 * @uses bbp_get_public_child_last_id() To get the last public reply id2817 * @uses bbp_get_active_id() To get the active id2818 * @uses update_post_meta() To update the topic last active id meta2819 * @uses apply_filters() Calls 'bbp_update_topic_last_active_id' with the active2820 * id and topic id2821 2509 * @return int Active id 2822 2510 */ … … 2856 2544 * @param int $topic_id Optional. Topic id. 2857 2545 * @param string $new_time Optional. New time in mysql format. 2858 * @uses bbp_is_reply() To check if the passed topic id is a reply2859 * @uses bbp_get_topic_id() To get the topic id2860 * @uses bbp_get_reply_topic_id() To get the reply topic id2861 * @uses get_post_field() To get the timestamp of the newest topic reply2862 * @uses bbp_get_public_child_last_id() To get the newest topic reply id2863 * @uses bbp_get_reply_post_type() To get the reply post type2864 * @uses update_post_meta() To update the topic last active time meta2865 2546 * @return string MySQL timestamp of last active reply 2866 2547 */ … … 2893 2574 * @param int $topic_id Optional. Topic id to update 2894 2575 * @param int $reply_id Optional. Reply id 2895 * @uses bbp_is_reply() To check if the passed topic id is a reply2896 * @uses bbp_get_reply_id() To get the reply id2897 * @uses bbp_get_reply_topic_id() To get the reply topic id2898 * @uses bbp_get_topic_id() To get the topic id2899 * @uses bbp_get_reply_post_type() To get the reply post type2900 * @uses bbp_get_public_child_last_id() To get the last public reply id2901 * @uses update_post_meta() To update the topic last reply id meta2902 * @uses apply_filters() Calls 'bbp_update_topic_last_reply_id' with the reply2903 * id and topic id2904 2576 * @return int Reply id 2905 2577 */ … … 2942 2614 * 2943 2615 * @param int $topic_id Optional. Topic id to update 2944 * @uses bbp_is_reply() To check if the passed topic id is a reply2945 * @uses bbp_get_reply_topic_id() To get the reply topic id2946 * @uses bbp_get_topic_id() To get the topic id2947 * @uses bbp_get_reply_topic_id() To get the reply topic id2948 * @uses bbp_get_reply_post_type() To get the reply post type2949 * @uses bbp_get_topic_post_type() To get the topic post type2950 * @uses wpdb::prepare() To prepare our database query2951 * @uses wpdb::get_var() To execute our query and get the column back2952 * @uses update_post_meta() To update the topic voice count meta2953 * @uses apply_filters() Calls 'bbp_update_topic_voice_count' with the voice2954 * count and topic id2955 2616 * @return int Voice count 2956 2617 */ … … 2983 2644 * 2984 2645 * @param int $topic_id Optional. Topic id to update 2985 * @uses bbp_is_reply() To check if the passed topic id is a reply2986 * @uses bbp_get_reply_topic_id() To get the reply topic id2987 * @uses bbp_get_topic_id() To get the topic id2988 * @uses bbp_get_reply_topic_id() To get the reply topic id2989 * @uses bbp_get_reply_post_type() To get the reply post type2990 * @uses bbp_get_topic_post_type() To get the topic post type2991 * @uses wpdb::prepare() To prepare our database query2992 * @uses wpdb::get_var() To execute our query and get the column back2993 * @uses update_post_meta() To update the topic anonymous reply count meta2994 * @uses apply_filters() Calls 'bbp_update_topic_anonymous_reply_count' with the2995 * anonymous reply count and topic id2996 2646 * @return int Anonymous reply count 2997 2647 */ … … 3024 2674 * - reason: Reason for editing 3025 2675 * - revision_id: Revision id 3026 * @uses bbp_get_topic_id() To get the topic id3027 * @uses bbp_format_revision_reason() To format the reason3028 * @uses bbp_get_topic_raw_revision_log() To get the raw topic revision log3029 * @uses update_post_meta() To update the topic revision log meta3030 2676 * @return mixed False on failure, true on success 3031 2677 */ … … 3062 2708 * 3063 2709 * @param int $topic_id Topic id 3064 * @uses bbp_get_topic() To get the topic3065 * @uses get_post_meta() To get the topic status meta3066 * @uses bbp_get_closed_status_id() to get the closed status3067 * @uses bbp_get_public_status_id() to get the public status3068 * @uses do_action() Calls 'bbp_close_topic' with the topic id3069 * @uses add_post_meta() To add the previous status to a meta3070 * @uses post_type_supports() To check if revisions are enabled3071 * @uses bbp_get_topic_post_type() To get the topic post type3072 * @uses remove_post_type_support() To temporarily remove topic revisions3073 * @uses wp_update_post() To update the topic with the new status3074 * @uses add_post_type_support() To restore topic revisions3075 * @uses do_action() Calls 'bbp_closed_topic' with the topic id3076 2710 * @return mixed False or {@link WP_Error} on failure, topic id on success 3077 2711 */ … … 3132 2766 * 3133 2767 * @param int $topic_id Topic id 3134 * @uses bbp_get_topic() To get the topic3135 * @uses do_action() Calls 'bbp_open_topic' with the topic id3136 * @uses get_post_meta() To get the previous status3137 * @uses delete_post_meta() To delete the previous status meta3138 * @uses post_type_supports() To check if revisions are enabled3139 * @uses bbp_get_topic_post_type() To get the topic post type3140 * @uses remove_post_type_support() To temporarily remove topic revisions3141 * @uses wp_update_post() To update the topic with the new status3142 * @uses add_post_type_support() To restore topic revisions3143 * @uses do_action() Calls 'bbp_opened_topic' with the topic id3144 2768 * @return mixed False or {@link WP_Error} on failure, topic id on success 3145 2769 */ … … 3202 2826 * 3203 2827 * @param int $topic_id Topic id 3204 * @uses bbp_get_topic() To get the topic3205 * @uses do_action() Calls 'bbp_spam_topic' with the topic id3206 * @uses add_post_meta() To add the previous status to a meta3207 * @uses wp_update_post() To update the topic with the new status3208 * @uses do_action() Calls 'bbp_spammed_topic' with the topic id3209 2828 * @return mixed False or {@link WP_Error} on failure, topic id on success 3210 2829 */ … … 3340 2959 * 3341 2960 * @param int $topic_id Topic id 3342 * @uses bbp_get_topic() To get the topic3343 * @uses do_action() Calls 'bbp_unspam_topic' with the topic id3344 * @uses get_post_meta() To get the previous status3345 * @uses delete_post_meta() To delete the previous status meta3346 * @uses wp_update_post() To update the topic with the new status3347 * @uses do_action() Calls 'bbp_unspammed_topic' with the topic id3348 2961 * @return mixed False or {@link WP_Error} on failure, topic id on success 3349 2962 */ … … 3459 3072 * @param int $topic_id Optional. Topic id 3460 3073 * @param int $super Should we make the topic a super sticky? 3461 * @uses bbp_get_topic_id() To get the topic id3462 * @uses bbp_unstick_topic() To unstick the topic3463 * @uses bbp_get_topic_forum_id() To get the topic forum id3464 * @uses bbp_get_stickies() To get the stickies3465 * @uses do_action() 'bbp_stick_topic' with topic id and bool super3466 * @uses update_option() To update the super stickies option3467 * @uses update_post_meta() To update the forum stickies meta3468 * @uses do_action() Calls 'bbp_stuck_topic' with the topic id, bool super3469 * and success3470 3074 * @return bool True on success, false on failure 3471 3075 */ … … 3520 3124 * 3521 3125 * @param int $topic_id Topic id 3522 * @uses bbp_get_topic() To get the topic3523 * @uses bbp_get_pending_status_id() To get the pending status id3524 * @uses do_action() Calls 'bbp_approve_topic' with the topic id3525 * @uses bbp_get_public_status_id() To get the public status id3526 * @uses remove_action() To remove the auto save post revision action3527 * @uses wp_update_post() To update the topic with the new status3528 * @uses do_action() Calls 'bbp_approved_topic' with the topic id3529 3126 * @return mixed False or {@link WP_Error} on failure, topic id on success 3530 3127 */ … … 3567 3164 * 3568 3165 * @param int $topic_id Topic id 3569 * @uses bbp_get_topic() To get the topic3570 * @uses bbp_get_pending_status_id() To get the pending status id3571 * @uses do_action() Calls 'bbp_unapprove_topic' with the topic id3572 * @uses remove_action() To remove the auto save post revision action3573 * @uses wp_update_post() To update the topic with the new status3574 * @uses do_action() Calls 'bbp_unapproved_topic' with the topic id3575 3166 * @return mixed False or {@link WP_Error} on failure, topic id on success 3576 3167 */ … … 3613 3204 * 3614 3205 * @param int $topic_id Optional. Topic id 3615 * @uses bbp_get_topic_id() To get the topic id3616 * @uses bbp_is_topic_super_sticky() To check if the topic is a super sticky3617 * @uses bbp_get_topic_forum_id() To get the topic forum id3618 * @uses bbp_get_stickies() To get the forum stickies3619 * @uses do_action() Calls 'bbp_unstick_topic' with the topic id3620 * @uses delete_option() To delete the super stickies option3621 * @uses update_option() To update the super stickies option3622 * @uses delete_post_meta() To delete the forum stickies meta3623 * @uses update_post_meta() To update the forum stickies meta3624 * @uses do_action() Calls 'bbp_unstuck_topic' with the topic id and success3625 3206 * @return bool Always true. 3626 3207 */ … … 3662 3243 * handled by WordPress core API functions. It is used to clean up after 3663 3244 * a topic that is being deleted. 3664 *3665 * @uses bbp_get_topic_id() To get the topic id3666 * @uses bbp_is_topic() To check if the passed id is a topic3667 * @uses do_action() Calls 'bbp_delete_topic' with the topic id3668 * @uses bbp_has_replies() To check if the topic has replies3669 * @uses bbp_replies() To loop through the replies3670 * @uses bbp_the_reply() To set a reply as the current reply in the loop3671 * @uses bbp_get_reply_id() To get the reply id3672 * @uses wp_delete_post() To delete the reply3673 3245 */ 3674 3246 function bbp_delete_topic( $topic_id = 0 ) { … … 3728 3300 * handled by WordPress core API functions. It is used to clean up after 3729 3301 * a topic that is being trashed. 3730 *3731 * @uses bbp_get_topic_id() To get the topic id3732 * @uses bbp_is_topic() To check if the passed id is a topic3733 * @uses do_action() Calls 'bbp_trash_topic' with the topic id3734 * @uses wp_trash_post() To trash the reply3735 * @uses update_post_meta() To save a list of just trashed replies for future use3736 3302 */ 3737 3303 function bbp_trash_topic( $topic_id = 0 ) { … … 3796 3362 /** 3797 3363 * Called before untrashing a topic 3798 *3799 * @uses bbp_get_topic_id() To get the topic id3800 * @uses bbp_is_topic() To check if the passed id is a topic3801 * @uses do_action() Calls 'bbp_untrash_topic' with the topic id3802 * @uses get_post_meta() To get the list of replies which were trashed with the3803 * topic3804 * @uses wp_untrash_post() To untrash the reply3805 3364 */ 3806 3365 function bbp_untrash_topic( $topic_id = 0 ) { … … 3855 3414 * 3856 3415 * @since 2.0.0 bbPress (r2993) 3857 *3858 * @uses bbp_get_topic_id() To get the topic id3859 * @uses bbp_is_topic() To check if the passed id is a topic3860 * @uses do_action() Calls 'bbp_deleted_topic' with the topic id3861 3416 */ 3862 3417 function bbp_deleted_topic( $topic_id = 0 ) { … … 3874 3429 * 3875 3430 * @since 2.0.0 bbPress (r2993) 3876 *3877 * @uses bbp_get_topic_id() To get the topic id3878 * @uses bbp_is_topic() To check if the passed id is a topic3879 * @uses do_action() Calls 'bbp_trashed_topic' with the topic id3880 3431 */ 3881 3432 function bbp_trashed_topic( $topic_id = 0 ) { … … 3893 3444 * 3894 3445 * @since 2.0.0 bbPress (r2993) 3895 *3896 * @uses bbp_get_topic_id() To get the topic id3897 * @uses bbp_is_topic() To check if the passed id is a topic3898 * @uses do_action() Calls 'bbp_untrashed_topic' with the topic id3899 3446 */ 3900 3447 function bbp_untrashed_topic( $topic_id = 0 ) { … … 3914 3461 * 3915 3462 * @since 2.0.0 bbPress (r3540) 3916 *3917 * @param int $default Default replies per page (15)3918 * @uses get_option() To get the setting3919 * @uses apply_filters() To allow the return value to be manipulated3920 3463 * @return int 3921 3464 */ … … 3940 3483 * 3941 3484 * @param int $default Default replies per page (25) 3942 * @uses get_option() To get the setting3943 * @uses apply_filters() To allow the return value to be manipulated3944 3485 * @return int 3945 3486 */ … … 4084 3625 * 4085 3626 * @since 2.0.0 bbPress (r3171) 4086 *4087 * @uses bbp_version()4088 * @uses bbp_is_single_topic()4089 * @uses bbp_user_can_view_forum()4090 * @uses bbp_get_topic_forum_id()4091 * @uses bbp_show_lead_topic()4092 * @uses bbp_topic_permalink()4093 * @uses bbp_topic_title()4094 * @uses bbp_get_topic_reply_count()4095 * @uses bbp_topic_content()4096 * @uses bbp_has_topics()4097 * @uses bbp_topics()4098 * @uses bbp_the_topic()4099 * @uses get_bloginfo_rss()4100 * @uses get_option()4101 * @uses self_link()4102 * @uses the_author()4103 * @uses get_post_time()4104 * @uses rss_enclosure()4105 * @uses do_action()4106 * @uses apply_filters()4107 3627 * 4108 3628 * @param array $topics_query … … 4191 3711 * 4192 3712 * @since 2.1.0 bbPress (r3605) 4193 *4194 * @uses bbp_is_topic_edit()4195 * @uses current_user_can()4196 * @uses bbp_get_topic_id()4197 * @uses bbp_redirect()4198 * @uses bbp_get_topic_permalink()4199 3713 */ 4200 3714 function bbp_check_topic_edit() { … … 4215 3729 * 4216 3730 * @since 2.1.0 bbPress (r3605) 4217 *4218 * @uses bbp_is_topic_tag_edit()4219 * @uses current_user_can()4220 * @uses bbp_get_topic_tag_id()4221 * @uses bbp_redirect()4222 * @uses bbp_get_topic_tag_link()4223 3731 */ 4224 3732 function bbp_check_topic_tag_edit() {
Note: See TracChangeset
for help on using the changeset viewer.