Changeset 6573 for trunk/src/includes/forums/functions.php
- Timestamp:
- 06/16/2017 09:20:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/forums/functions.php
r6569 r6573 18 18 * 19 19 * @since 2.0.0 bbPress (r3349) 20 *21 * @uses bbp_parse_args()22 * @uses bbp_get_forum_post_type()23 * @uses wp_insert_post()24 * @uses update_post_meta()25 20 * 26 21 * @param array $forum_data Forum post data … … 115 110 * 116 111 * @param string $action The requested action to compare this function to 117 * @uses bbp_add_error() To add an error message118 * @uses bbp_verify_nonce_request() To verify the nonce and check the request119 * @uses bbp_is_anonymous() To check if an anonymous post is being made120 * @uses current_user_can() To check if the current user can publish forum121 * @uses bbp_get_current_user_id() To get the current user id122 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}123 * @uses bbp_is_forum_category() To check if the forum is a category124 * @uses bbp_is_forum_closed() To check if the forum is closed125 * @uses bbp_is_forum_private() To check if the forum is private126 * @uses bbp_check_for_flood() To check for flooding127 * @uses bbp_check_for_duplicate() To check for duplicates128 * @uses bbp_get_forum_post_type() To get the forum post type129 * @uses remove_filter() To remove kses filters if needed130 * @uses apply_filters() Calls 'bbp_new_forum_pre_title' with the content131 * @uses apply_filters() Calls 'bbp_new_forum_pre_content' with the content132 * @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors133 * @uses do_action() Calls 'bbp_new_forum' with the forum id, forum id,134 * anonymous data and reply author135 * @uses bbp_get_forum_permalink() To get the forum permalink136 * @uses bbp_redirect() To redirect to the forum link137 * @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error138 * messages139 112 */ 140 113 function bbp_new_forum_handler( $action = '' ) { … … 381 354 * 382 355 * @param string $action The requested action to compare this function to 383 * @uses bbPress:errors::add() To log various error messages384 * @uses bbp_get_forum() To get the forum385 * @uses bbp_verify_nonce_request() To verify the nonce and check the request386 * @uses bbp_is_forum_anonymous() To check if forum is by an anonymous user387 * @uses current_user_can() To check if the current user can edit the forum388 * @uses is_wp_error() To check if the value retrieved is a {@link WP_Error}389 * @uses bbp_is_forum_category() To check if the forum is a category390 * @uses bbp_is_forum_closed() To check if the forum is closed391 * @uses bbp_is_forum_private() To check if the forum is private392 * @uses remove_filter() To remove kses filters if needed393 * @uses apply_filters() Calls 'bbp_edit_forum_pre_title' with the title and394 * forum id395 * @uses apply_filters() Calls 'bbp_edit_forum_pre_content' with the content396 * and forum id397 * @uses bbPress::errors::get_error_codes() To get the {@link WP_Error} errors398 * @uses wp_save_post_revision() To save a forum revision399 * @uses bbp_update_forum_revision_log() To update the forum revision log400 * @uses wp_update_post() To update the forum401 * @uses do_action() Calls 'bbp_edit_forum' with the forum id, forum id,402 * anonymous data and reply author403 * @uses bbp_move_forum_handler() To handle movement of a forum from one forum404 * to another405 * @uses bbp_get_forum_permalink() To get the forum permalink406 * @uses bbp_redirect() To redirect to the forum link407 * @uses bbPress::errors::get_error_messages() To get the {@link WP_Error} error408 * messages409 356 */ 410 357 function bbp_edit_forum_handler( $action = '' ) { … … 640 587 * 641 588 * @param int $forum_id 642 * @uses bbp_is_forum_closed() To check if forum is closed643 * @uses bbp_close_forum() To close forum644 * @uses bbp_open_forum() To open forum645 * @uses bbp_is_forum_category() To check if forum is a category646 * @uses bbp_categorize_forum() To turn forum into a category647 * @uses bbp_normalize_forum() To turn category into forum648 * @uses bbp_get_public_status_id() To get the public status ID649 * @uses bbp_get_private_status_id() To get the private status ID650 * @uses bbp_get_hidden_status_id() To get the hidden status ID651 * @uses bbp_get_forum_visibility() To get the forums visibility652 * @uses bbp_hide_forum() To hide a forum653 * @uses bbp_privatize_forum() To make a forum private654 * @uses bbp_publicize_forum() To make a forum public655 589 * @return If forum ID is empty 656 590 */ … … 768 702 * 769 703 * @param int $forum_id forum id 770 * @uses do_action() Calls 'bbp_close_forum' with the forum id771 * @uses update_post_meta() To add the previous status to a meta772 * @uses do_action() Calls 'bbp_opened_forum' with the forum id773 704 * @return mixed False or {@link WP_Error} on failure, forum id on success 774 705 */ … … 792 723 * 793 724 * @param int $forum_id forum id 794 * @uses do_action() Calls 'bbp_open_forum' with the forum id795 * @uses get_post_meta() To get the previous status796 * @uses update_post_meta() To delete the previous status meta797 * @uses do_action() Calls 'bbp_opened_forum' with the forum id798 725 * @return mixed False or {@link WP_Error} on failure, forum id on success 799 726 */ … … 819 746 * 820 747 * @param int $forum_id Optional. Forum id 821 * @uses update_post_meta() To update the forum category meta822 748 * @return bool False on failure, true on success 823 749 */ … … 841 767 * 842 768 * @param int $forum_id Optional. Forum id 843 * @uses delete_post_meta() To delete the forum category meta844 769 * @return bool False on failure, true on success 845 770 */ … … 865 790 * 866 791 * @param int $forum_id Optional. Forum id 867 * @uses update_post_meta() To update the forum private meta868 792 * @return bool False on failure, true on success 869 793 */ … … 923 847 * 924 848 * @param int $forum_id Optional. Forum id 925 * @uses update_post_meta() To update the forum private meta926 849 * @return bool False on failure, true on success 927 850 */ … … 973 896 * 974 897 * @param int $forum_id Optional. Forum id 975 * @uses update_post_meta() To update the forum private meta976 898 * @return bool False on failure, true on success 977 899 */ … … 1022 944 * @since 2.4.0 bbPress (r5017) 1023 945 * 1024 * @uses delete_option() to delete private and hidden forum pointers1025 * @uses WP_Query() To query post IDs1026 * @uses is_wp_error() To return if error occurred1027 * @uses update_option() To update the private and hidden post ID pointers1028 946 * @return array An array of the status code and the message 1029 947 */ … … 1091 1009 * 1092 1010 * @param int $forum_id Get the forum ID to remove 1093 * @uses bbp_is_subscriptions_active() To check if the subscriptions are active1094 * @uses bbp_get_forum_id To get the forum id1095 * @uses bbp_get_forum_subscribers() To get the forum subscribers1096 * @uses bbp_remove_user_subscription() To remove the user subscription1097 1011 */ 1098 1012 function bbp_remove_forum_from_all_subscriptions( $forum_id = 0 ) { … … 1123 1037 * @param int $difference Optional. Default 1 1124 1038 * @param bool $update_ancestors Optional. Default true 1125 * @uses bbp_get_forum_id() To get the forum id 1126 * @uses update_post_meta() To update the forum's topic count meta 1127 * @uses apply_filters() Calls 'bbp_bump_forum_topic_count' with the topic 1128 * count, forum id, and difference 1039 * 1129 1040 * @return int Forum topic count 1130 1041 */ … … 1183 1094 * 1184 1095 * @param int $forum_id The forum id. 1185 *1186 * @uses bbp_is_topic() To get the topic id1187 * @uses bbp_get_topic_forum_id() To get the topics forum id1188 * @uses bbp_is_topic_published() To get the topics published status1189 * @uses bbp_is_topic_closed() To get the topics closed status1190 * @uses bbp_increase_forum_topic_count_hidden() To increase the forums hidden1191 * topic count by 11192 * @uses bbp_bump_forum_topic_count() To bump the forum topic count1193 *1194 1096 * @return void 1195 1097 */ … … 1223 1125 * @param int $forum_id The forum id. 1224 1126 * 1225 * @uses bbp_is_topic() To get the topic id1226 * @uses bbp_get_topic_forum_id() To get the topics forum id1227 * @uses bbp_bump_forum_topic_count() To bump the forum topic count1228 *1229 1127 * @return void 1230 1128 */ … … 1251 1149 * @param int $forum_id Optional. Forum id. 1252 1150 * @param int $difference Optional. Default 1 1253 * @uses bbp_get_forum_id() To get the forum id 1254 * @uses bbp_get_forum_topic_count_hidden To get the forum's hidden topic count 1255 * @uses update_post_meta() To update the forum's topic count meta 1256 * @uses apply_filters() Calls 'bbp_bump_forum_topic_count_hidden' with the 1257 * topic count, forum id, and difference 1151 * 1258 1152 * @return int Forum hidden topic count 1259 1153 */ … … 1285 1179 * @param int $forum_id The forum id. 1286 1180 * 1287 * @uses bbp_is_topic() To get the topic id1288 * @uses bbp_get_topic_forum_id() To get the topics forum id1289 * @uses bbp_bump_forum_topic_count_hidden() To bump the forum hidden topic count1290 *1291 1181 * @return void 1292 1182 */ … … 1313 1203 * @param int $forum_id The forum id. 1314 1204 * 1315 * @uses bbp_is_topic() To get the topic id1316 * @uses bbp_get_topic_forum_id() To get the topics forum id1317 * @uses bbp_bump_forum_topic_count_hidden() To bump the forums hidden topic1318 * count by -11319 *1320 1205 * @return void 1321 1206 */ … … 1343 1228 * @param int $difference Optional. Default 1 1344 1229 * @param bool $update_ancestors Optional. Default true 1345 * @uses bbp_get_forum_id() To get the forum id 1346 * @uses update_post_meta() To update the forum's topic count meta 1347 * @uses apply_filters() Calls 'bbp_bump_forum_reply_count' with the topic 1348 * count, forum id, and difference 1230 * 1349 1231 * @return int Forum topic count 1350 1232 */ … … 1404 1286 * @param int $forum_id The forum id. 1405 1287 * 1406 * @uses bbp_is_reply() To get the reply id1407 * @uses bbp_get_reply_forum_id() To get the replies forum id1408 * @uses bbp_is_reply_published() To get the replies published status1409 * @uses bbp_bump_forum_reply_count() To bump the forum reply count1410 *1411 1288 * @return void 1412 1289 */ … … 1433 1310 * @param int $forum_id The forum id. 1434 1311 * 1435 * @uses bbp_is_reply() To get the reply id1436 * @uses bbp_get_reply_forum_id() To get the replies forum id1437 * @uses bbp_bump_forum_reply_count() To bump the forum reply count1438 *1439 1312 * @return void 1440 1313 */ … … 1461 1334 * @param int $topic_id The topic id. 1462 1335 * 1463 * @uses bbp_get_public_child_ids() To get the topic's public child ids1464 * @uses bbp_get_reply_post_type() To get the reply post type1465 * @uses bbp_bump_forum_reply_count() To bump the forum reply count1466 * @uses bbp_get_topic_forum_id() To get the topics forum id1467 *1468 1336 * @return void 1469 1337 */ … … 1497 1365 * @param int $forum_id Optional. Forum id. 1498 1366 * @param int $topic_id Optional. Topic id. 1499 * @uses bbp_get_forum_id() To get the forum id1500 * @uses bbp_forum_query_subforum_ids() To get the subforum ids1501 * @uses bbp_update_forum_last_topic_id() To update the last topic id of child1502 * forums1503 * @uses bbp_get_topic_post_type() To get the topic post type1504 * @uses get_posts() To get the most recent topic in the forum1505 * @uses bbp_is_topic_published() To check if the topic is published1506 * @uses update_post_meta() To update the forum's last active id meta1507 * @uses apply_filters() Calls 'bbp_update_forum_last_topic_id' with the last1508 * topic id and forum id1509 1367 * @return int Id of the forums most recent topic 1510 1368 */ … … 1568 1426 * @param int $forum_id Optional. Forum id. 1569 1427 * @param int $reply_id Optional. Reply id. 1570 * @uses bbp_get_forum_id() To get the forum id1571 * @uses bbp_forum_query_subforum_ids() To get the subforum ids1572 * @uses bbp_update_forum_last_reply_id() To update the last reply id of child1573 * forums1574 * @uses bbp_forum_query_topic_ids() To get the topic ids in the forum1575 * @uses bbp_forum_query_last_reply_id() To get the forum's last reply id1576 * @uses bbp_is_reply_published() To make sure the reply is published1577 * @uses update_post_meta() To update the forum's last active id meta1578 * @uses apply_filters() Calls 'bbp_update_forum_last_reply_id' with the last1579 * reply id and forum id1580 1428 * @return int Id of the forums most recent reply 1581 1429 */ … … 1634 1482 * @param int $forum_id Optional. Forum id. 1635 1483 * @param int $active_id Optional. Active post id. 1636 * @uses bbp_get_forum_id() To get the forum id1637 * @uses bbp_forum_query_subforum_ids() To get the subforum ids1638 * @uses bbp_update_forum_last_active_id() To update the last active id of1639 * child forums1640 * @uses bbp_forum_query_topic_ids() To get the topic ids in the forum1641 * @uses bbp_forum_query_last_reply_id() To get the forum's last reply id1642 * @uses bbp_get_public_status_id() To get the public status id1643 * @uses get_post_status() To make sure the reply is published1644 * @uses update_post_meta() To update the forum's last active id meta1645 * @uses apply_filters() Calls 'bbp_update_forum_last_active_id' with the last1646 * active post id and forum id1647 1484 * @return int Id of the forums last active post 1648 1485 */ … … 1702 1539 * @param int $forum_id Optional. Topic id. 1703 1540 * @param string $new_time Optional. New time in mysql format. 1704 * @uses bbp_get_forum_id() To get the forum id 1705 * @uses bbp_get_forum_last_active_id() To get the forum's last post id 1706 * @uses get_post_field() To get the post date of the forum's last post 1707 * @uses update_post_meta() To update the forum last active time 1708 * @uses apply_filters() Calls 'bbp_update_forum_last_active' with the new time 1709 * and forum id 1541 * 1710 1542 * @return string MySQL timestamp of last active topic or reply 1711 1543 */ … … 1733 1565 * 1734 1566 * @param int $forum_id Optional. Forum id 1735 * @uses bbp_get_forum_id() To get the forum id1736 1567 * @return bool True on success, false on failure 1737 1568 */ … … 1759 1590 * is a topic or a forum. If it's a topic, its parent, 1760 1591 * i.e. the forum is automatically retrieved. 1761 * @param bool $total_count Optional. To return the total count or normal 1762 * count? 1763 * @uses bbp_get_forum_id() To get the forum id 1764 * @uses bbp_forum_query_subforum_ids() To get the subforum ids 1765 * @uses bbp_update_forum_topic_count() To update the forum topic count 1766 * @uses bbp_forum_query_topic_ids() To get the forum topic ids 1767 * @uses update_post_meta() To update the forum's topic count meta 1768 * @uses apply_filters() Calls 'bbp_update_forum_topic_count' with the topic 1769 * count and forum id 1592 * @param bool $total_count Optional. To return the total count or normal count? 1593 1770 1594 * @return int Forum topic count 1771 1595 */ … … 1805 1629 * @param int $forum_id Optional. Topic id to update. 1806 1630 * @param int $topic_count Optional. Set the topic count manually. 1807 * @uses bbp_is_topic() To check if the supplied id is a topic 1808 * @uses bbp_get_topic_id() To get the topic id 1809 * @uses bbp_get_topic_forum_id() To get the topic forum id 1810 * @uses bbp_get_forum_id() To get the forum id 1811 * @uses bbp_get_trash_status_id() To get the trash status id 1812 * @uses bbp_get_spam_status_id() To get the spam status id 1813 * @uses bbp_get_pending_status_id() To get the pending status id 1814 * @uses bbp_get_topic_post_type() To get the topic post type 1815 * @uses update_post_meta() To update the forum hidden topic count meta 1816 * @uses apply_filters() Calls 'bbp_update_forum_topic_count_hidden' with the 1817 * hidden topic count and forum id 1631 * 1818 1632 * @return int Topic hidden topic count 1819 1633 */ … … 1871 1685 * is a topic or a forum. If it's a topic, its parent, 1872 1686 * i.e. the forum is automatically retrieved. 1873 * @uses bbp_get_forum_id() To get the forum id 1874 * @uses bbp_forum_query_subforum_ids() To get the subforum ids 1875 * @uses bbp_update_forum_reply_count() To update the forum reply count 1876 * @uses bbp_forum_query_topic_ids() To get the forum topic ids 1877 * @uses bbp_get_public_status_id() To get the public status id 1878 * @uses bbp_get_reply_post_type() To get the reply post type 1879 * @uses update_post_meta() To update the forum's reply count meta 1880 * @uses apply_filters() Calls 'bbp_update_forum_reply_count' with the reply 1881 * count and forum id 1687 * 1882 1688 * @return int Forum reply count 1883 1689 */ … … 1942 1748 * - last_active_id: Last active post id 1943 1749 * - last_active_time: last active time 1944 * @uses bbp_update_forum_last_topic_id() To update the forum last topic id1945 * @uses bbp_update_forum_last_reply_id() To update the forum last reply id1946 * @uses bbp_update_forum_last_active_id() To update the last active post id1947 * @uses get_post_field() To get the post date of the last active id1948 * @uses bbp_update_forum_last_active_time() To update the last active time1949 * @uses bbp_update_forum_subforum_count() To update the subforum count1950 * @uses bbp_update_forum_topic_count() To update the forum topic count1951 * @uses bbp_update_forum_reply_count() To update the forum reply count1952 * @uses bbp_update_forum_topic_count_hidden() To update the hidden topic count1953 1750 */ 1954 1751 function bbp_update_forum( $args = array() ) { … … 2065 1862 * 2066 1863 * @since 2.0.0 bbPress (r3007) 2067 *2068 * @uses get_option() Returns the unserialized array of hidden forum ids2069 * @uses wp_parse_id_list() Make sure array items are ints2070 * @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids2071 * and forum id2072 1864 */ 2073 1865 function bbp_get_hidden_forum_ids() { … … 2087 1879 * 2088 1880 * @since 2.0.0 bbPress (r3007) 2089 *2090 * @uses get_option() Returns the unserialized array of private forum ids2091 * @uses wp_parse_id_list() Make sure array items are ints2092 * @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids2093 * and forum id2094 1881 */ 2095 1882 function bbp_get_private_forum_ids() { … … 2139 1926 * 2140 1927 * @param string Optional. The type of value to return. (string|array|meta_query) 2141 *2142 * @uses bbp_is_user_keymaster()2143 * @uses bbp_get_hidden_forum_ids()2144 * @uses bbp_get_private_forum_ids()2145 * @uses apply_filters()2146 1928 */ 2147 1929 function bbp_exclude_forum_ids( $type = 'string' ) { … … 2203 1985 * @param WP_Query $posts_query 2204 1986 * 2205 * @uses apply_filters()2206 * @uses bbp_exclude_forum_ids()2207 * @uses bbp_get_topic_post_type()2208 * @uses bbp_get_reply_post_type()2209 1987 * @return WP_Query 2210 1988 */ … … 2233 2011 2234 2012 /** Default ***********************************************************/ 2235 global $jjj; 2013 2236 2014 // Add all supported forum visibilities 2237 2015 $posts_query->set( 'post_status', array_keys( bbp_get_forum_visibilities() ) ); … … 2245 2023 } 2246 2024 2247 if ( true === $jjj ) {2248 var_dump( bbp_get_private_forum_ids() ); die;2249 }2250 2025 // Get any existing meta queries 2251 2026 $not_in = $posts_query->get( 'post__not_in', array() ); … … 2287 2062 * 2288 2063 * @param int $forum_id Forum id 2289 * @uses bbp_get_topic_post_type() To get the topic post type2290 * @uses bbp_get_public_child_ids() To get the topic ids2291 * @uses apply_filters() Calls 'bbp_forum_query_topic_ids' with the topic ids2292 * and forum id2293 2064 */ 2294 2065 function bbp_forum_query_topic_ids( $forum_id ) { … … 2307 2078 * 2308 2079 * @param int $forum_id Forum id 2309 * @uses bbp_get_forum_post_type() To get the forum post type2310 * @uses bbp_get_all_child_ids() To get the forum ids2311 * @uses apply_filters() Calls 'bbp_forum_query_subforum_ids' with the subforum2312 * ids and forum id2313 2080 */ 2314 2081 function bbp_forum_query_subforum_ids( $forum_id ) { … … 2327 2094 * @param int $forum_id Forum id. 2328 2095 * @param int $topic_ids Optional. Topic ids. 2329 * @uses bbp_get_forum_id() To validate the forum id2330 * @uses bbp_forum_query_topic_ids() To get the forum's topic ids2331 * @uses bbp_get_public_status_id() To get the public status id2332 * @uses bbp_get_reply_post_type() To get the reply post type2333 * @uses apply_filters() Calls 'bbp_forum_query_last_reply_id' with the reply id2334 * and forum id2335 2096 */ 2336 2097 function bbp_forum_query_last_reply_id( $forum_id = 0, $topic_ids = 0 ) { … … 2375 2136 * 2376 2137 * @since 2.0.0 bbPress (r2996) 2377 *2378 * @uses current_user_can() To check if the current user can read private forums2379 * @uses is_singular() To check if it's a singular page2380 * @uses bbp_is_user_keymaster() To check if user is a keymaster2381 * @uses bbp_get_forum_post_type() To get the forum post type2382 * @uses bbp_get_topic_post_type() To get the topic post type2383 * @uses bbp_get_reply_post_type() TO get the reply post type2384 * @uses bbp_get_topic_forum_id() To get the topic forum id2385 * @uses bbp_get_reply_forum_id() To get the reply forum id2386 * @uses bbp_is_forum_hidden() To check if the forum is hidden or not2387 * @uses bbp_set_404() To set a 404 status2388 2138 */ 2389 2139 function bbp_forum_enforce_hidden() { … … 2416 2166 $forum_id = bbp_get_reply_forum_id( $wp_query->post->ID ); 2417 2167 break; 2418 2419 2168 } 2420 2169 … … 2430 2179 * 2431 2180 * @since 2.0.0 bbPress (r2996) 2432 *2433 * @uses current_user_can() To check if the current user can read private forums2434 * @uses is_singular() To check if it's a singular page2435 * @uses bbp_is_user_keymaster() To check if user is a keymaster2436 * @uses bbp_get_forum_post_type() To get the forum post type2437 * @uses bbp_get_topic_post_type() To get the topic post type2438 * @uses bbp_get_reply_post_type() TO get the reply post type2439 * @uses bbp_get_topic_forum_id() To get the topic forum id2440 * @uses bbp_get_reply_forum_id() To get the reply forum id2441 * @uses bbp_is_forum_private() To check if the forum is private or not2442 * @uses bbp_set_404() To set a 404 status2443 2181 */ 2444 2182 function bbp_forum_enforce_private() { … … 2486 2224 * 2487 2225 * @since 2.1.0 bbPress (r3607) 2488 *2489 * @uses bbp_is_forum_edit()2490 * @uses current_user_can()2491 * @uses bbp_get_forum_id()2492 * @uses bbp_redirect()2493 * @uses bbp_get_forum_permalink()2494 2226 */ 2495 2227 function bbp_check_forum_edit() { … … 2512 2244 * 2513 2245 * @param int $forum_id 2514 * @uses bbp_get_forum_id() To validate the forum ID2515 * @uses bbp_is_forum() To make sure it's a forum2516 * @uses bbp_get_topic_post_type() To get the topic post type2517 * @uses bbp_topics() To make sure there are topics to loop through2518 * @uses wp_trash_post() To trash the post2519 * @uses update_post_meta() To update the forum meta of trashed topics2520 2246 * @return If forum is not valid 2521 2247 */ … … 2562 2288 * 2563 2289 * @param int $forum_id 2564 * @uses bbp_get_forum_id() To validate the forum ID2565 * @uses bbp_is_forum() To make sure it's a forum2566 * @uses bbp_get_public_status_id() To return public post status2567 * @uses bbp_get_closed_status_id() To return closed post status2568 * @uses bbp_get_pending_status_id() To return pending post status2569 * @uses bbp_get_topic_post_type() To get the topic post type2570 * @uses wp_trash_post() To trash the post2571 * @uses update_post_meta() To update the forum meta of trashed topics2572 2290 * @return If forum is not valid 2573 2291 */ … … 2631 2349 * 2632 2350 * @param int $forum_id 2633 * @uses bbp_get_forum_id() To validate the forum ID2634 * @uses bbp_is_forum() To make sure it's a forum2635 * @uses get_post_meta() To update the forum meta of trashed topics2636 * @uses wp_untrash_post() To trash the post2637 2351 * @return If forum is not valid 2638 2352 */ … … 2674 2388 * 2675 2389 * @since 2.1.0 bbPress (r3668) 2676 *2677 * @uses bbp_get_forum_id() To get the forum id2678 * @uses bbp_is_forum() To check if the passed id is a forum2679 * @uses do_action() Calls 'bbp_delete_forum' with the forum id2680 2390 */ 2681 2391 function bbp_delete_forum( $forum_id = 0 ) { … … 2697 2407 * 2698 2408 * @since 2.1.0 bbPress (r3668) 2699 *2700 * @uses bbp_get_forum_id() To get the forum id2701 * @uses bbp_is_forum() To check if the passed id is a forum2702 * @uses do_action() Calls 'bbp_trash_forum' with the forum id2703 2409 */ 2704 2410 function bbp_trash_forum( $forum_id = 0 ) { … … 2716 2422 * 2717 2423 * @since 2.1.0 bbPress (r3668) 2718 *2719 * @uses bbp_get_forum_id() To get the forum id2720 * @uses bbp_is_forum() To check if the passed id is a forum2721 * @uses do_action() Calls 'bbp_untrash_forum' with the forum id2722 2424 */ 2723 2425 function bbp_untrash_forum( $forum_id = 0 ) { … … 2741 2443 * @since 2.1.0 bbPress (r3668) 2742 2444 * @since 2.6.0 bbPress (r6526) Not recommend for usage 2743 *2744 * @uses bbp_get_forum_id() To get the forum id2745 * @uses bbp_is_forum() To check if the passed id is a forum2746 * @uses do_action() Calls 'bbp_deleted_forum' with the forum id2747 2445 */ 2748 2446 function bbp_deleted_forum( $forum_id = 0 ) { … … 2760 2458 * 2761 2459 * @since 2.1.0 bbPress (r3668) 2762 *2763 * @uses bbp_get_forum_id() To get the forum id2764 * @uses bbp_is_forum() To check if the passed id is a forum2765 * @uses do_action() Calls 'bbp_trashed_forum' with the forum id2766 2460 */ 2767 2461 function bbp_trashed_forum( $forum_id = 0 ) { … … 2779 2473 * 2780 2474 * @since 2.1.0 bbPress (r3668) 2781 *2782 * @uses bbp_get_forum_id() To get the forum id2783 * @uses bbp_is_forum() To check if the passed id is a forum2784 * @uses do_action() Calls 'bbp_untrashed_forum' with the forum id2785 2475 */ 2786 2476 function bbp_untrashed_forum( $forum_id = 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.