Changeset 6573 for trunk/src/includes/common/functions.php
- Timestamp:
- 06/16/2017 09:20:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/functions.php
r6554 r6573 41 41 * @param string $original_link Original Link to be modified 42 42 * @param bool $force Override bbp_get_view_all() check 43 * @uses current_user_can() To check if the current user can moderate44 * @uses add_query_arg() To add 'view' arg to the url45 * @uses apply_filters() Calls 'bbp_add_view_all' with the link and original link46 43 * @return string The link with 'view=all' appended if necessary 47 44 */ … … 63 60 * 64 61 * @param string $original_link Original Link to be modified 65 * @uses current_user_can() To check if the current user can moderate66 * @uses remove_query_arg() To remove 'view' arg from the url67 * @uses apply_filters() Calls 'bbp_add_view_all' with the link and original link68 62 * @return string The link with 'view=all' appended if necessary 69 63 */ … … 82 76 * @since 2.0.0 bbPress (r3325) 83 77 * 84 * @uses current_user_can() To check if the current user can moderate85 * @uses apply_filters() Calls 'bbp_get_view_all' with the link and original link86 78 * @return bool Whether current user can and is viewing all 87 79 */ … … 98 90 * @since 2.0.0 bbPress (r2628) 99 91 * 100 * @uses get_query_var() To get the 'paged' value101 92 * @return int Current page number 102 93 */ … … 148 139 * @param array $data Post data 149 140 * @param array $postarr Original post array (includes post id) 150 * @uses bbp_get_topic_post_type() To get the topic post type151 * @uses bbp_get_reply_post_type() To get the reply post type152 * @uses bbp_is_topic_anonymous() To check if the topic is by an anonymous user153 * @uses bbp_is_reply_anonymous() To check if the reply is by an anonymous user154 141 * @return array Data 155 142 */ … … 185 172 * 186 173 * @param string $post_date_gmt 187 *188 * @uses bbp_allow_content_edit()() To make sure editing is allowed189 * @uses get_option() Get the edit lock time190 * @uses current_time() Get the current time191 * @uses strtotime() Convert strings to time192 * @uses apply_filters() Allow output to be manipulated193 174 * 194 175 * @return bool True if date is past, False if not … … 291 272 * - count_tags: Count tags? If set to false, empty tags are also not counted 292 273 * - count_empty_tags: Count empty tags? 293 * @uses bbp_get_total_users() To count the number of registered users294 * @uses bbp_get_forum_post_type() To get the forum post type295 * @uses bbp_get_topic_post_type() To get the topic post type296 * @uses bbp_get_reply_post_type() To get the reply post type297 * @uses wp_count_posts() To count the number of forums, topics and replies298 * @uses wp_count_terms() To count the number of topic tags299 * @uses current_user_can() To check if the user is capable of doing things300 * @uses bbp_number_format_i18n() To format the number301 * @uses apply_filters() Calls 'bbp_get_statistics' with the statistics and args302 274 * @return object Walked forum tree 303 275 */ … … 517 489 * 518 490 * @param array $args Optional. If no args are there, then $_POST values are 519 * used.520 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_name' with the521 * anonymous user name522 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_email' with the523 * anonymous user email524 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_website' with the525 * anonymous user website526 491 * @return bool|array False on errors, values in an array on success 527 492 */ … … 642 607 * 643 608 * @param array $post_data Contains information about the comment 644 * @uses current_user_can() To check if the current user can throttle645 * @uses get_meta_sql() To generate the meta database for checking anonymous email646 * @uses apply_filters() Calls 'bbp_check_for_duplicate_query' with the647 * duplicate check query and post data648 * @uses wpdb::get_var() To execute our query and get the var back649 * @uses get_post_meta() To get the anonymous user email post meta650 * @uses do_action() Calls 'bbp_post_duplicate_trigger' with the post data when651 * it is found that it is a duplicate652 609 * @return bool True if it is not a duplicate, false if it is 653 610 */ … … 729 686 * @param int $author_id Optional. Supply if it's a post by a logged in user. 730 687 * Do not supply if supplying $anonymous_data. 731 *732 * @suse bbp_allow_content_throttle() To make sure flood checking is enabled733 * @uses get_option() To get the throttle time734 * @uses get_transient() To get the last posted transient of the ip735 * @uses bbp_get_user_last_posted() To get the last posted time of the user736 * @uses current_user_can() To check if the current user can throttle737 *738 688 * @return bool True if there is no flooding, false if there is 739 689 */ … … 785 735 * @param string $title The title of the content 786 736 * @param string $content The content being posted 787 * @uses bbp_is_user_keymaster() Allow keymasters to bypass blacklist788 * @uses bbp_current_author_ip() To get current user IP address789 * @uses bbp_current_author_ua() To get current user agent790 737 * @return bool True if test is passed, false if fail 791 738 */ … … 923 870 * @param string $title The title of the content 924 871 * @param string $content The content being posted 925 * @uses bbp_is_user_keymaster() Allow keymasters to bypass blacklist926 * @uses bbp_current_author_ip() To get current user IP address927 * @uses bbp_current_author_ua() To get current user agent928 872 * @return bool True if test is passed, false if fail 929 873 */ … … 1079 1023 * sanitized (see {@link bbp_filter_anonymous_post_data()} 1080 1024 * @param int $reply_author ID of the topic author ID 1081 *1082 * @uses bbp_is_subscriptions_active() To check if the subscriptions are active1083 * @uses bbp_get_reply_id() To validate the reply ID1084 * @uses bbp_get_topic_id() To validate the topic ID1085 * @uses bbp_get_forum_id() To validate the forum ID1086 * @uses bbp_get_reply() To get the reply1087 * @uses bbp_is_reply_published() To make sure the reply is published1088 * @uses bbp_get_topic_id() To validate the topic ID1089 * @uses bbp_get_topic() To get the reply's topic1090 * @uses bbp_is_topic_published() To make sure the topic is published1091 * @uses bbp_get_reply_author_display_name() To get the reply author's display name1092 * @uses do_action() Calls 'bbp_pre_notify_subscribers' with the reply id,1093 * topic id and user id1094 * @uses bbp_get_topic_subscribers() To get the topic subscribers1095 * @uses apply_filters() Calls 'bbp_subscription_mail_message' with the1096 * message, reply id, topic id and user id1097 * @uses apply_filters() Calls 'bbp_subscription_mail_title' with the1098 * topic title, reply id, topic id and user id1099 * @uses apply_filters() Calls 'bbp_subscription_mail_headers'1100 * @uses get_userdata() To get the user data1101 * @uses wp_mail() To send the mail1102 * @uses do_action() Calls 'bbp_post_notify_subscribers' with the reply id,1103 * topic id and user id1104 1025 * @return bool True on success, false on failure 1105 1026 */ … … 1250 1171 * sanitized (see {@link bbp_filter_anonymous_post_data()} 1251 1172 * @param int $topic_author ID of the topic author ID 1252 *1253 * @uses bbp_is_subscriptions_active() To check if the subscriptions are active1254 * @uses bbp_get_topic_id() To validate the topic ID1255 * @uses bbp_get_forum_id() To validate the forum ID1256 * @uses bbp_is_topic_published() To make sure the topic is published1257 * @uses bbp_get_forum_subscribers() To get the forum subscribers1258 * @uses bbp_get_topic_author_display_name() To get the topic author's display name1259 * @uses do_action() Calls 'bbp_pre_notify_forum_subscribers' with the topic id,1260 * forum id and user id1261 * @uses apply_filters() Calls 'bbp_forum_subscription_mail_message' with the1262 * message, topic id, forum id and user id1263 * @uses apply_filters() Calls 'bbp_forum_subscription_mail_title' with the1264 * topic title, topic id, forum id and user id1265 * @uses apply_filters() Calls 'bbp_forum_subscription_mail_headers'1266 * @uses get_userdata() To get the user data1267 * @uses wp_mail() To send the mail1268 * @uses do_action() Calls 'bbp_post_notify_forum_subscribers' with the topic,1269 * id, forum id and user id1270 1173 * @return bool True on success, false on failure 1271 1174 */ … … 1425 1328 * @param string $url URL 1426 1329 * @param string $redirect_to Where to redirect to? 1427 * @uses add_query_arg() To add args to the url1428 * @uses apply_filters() Calls 'bbp_logout_url' with the url and redirect to1429 1330 * @return string The url 1430 1331 */ … … 1553 1454 * @param int $parent_id Parent id. 1554 1455 * @param string $post_type Post type. Defaults to 'post'. 1555 * @uses bbp_get_public_status_id() To get the public status id1556 * @uses bbp_get_topic_post_type() To get the topic post type1557 * @uses bbp_get_closed_status_id() To get the closed status id1558 * @uses WP_Query To get get the posts1559 * @uses apply_filters() Calls 'bbp_get_public_child_last_id' with the child1560 * id, parent id and post type1561 1456 * @return int The last active post_id 1562 1457 */ … … 1608 1503 * @param int $parent_id Parent id. 1609 1504 * @param string $post_type Post type. Defaults to 'post'. 1610 * @uses bbp_get_public_status_id() To get the public status id1611 * @uses bbp_get_topic_post_type() To get the topic post type1612 * @uses bbp_get_closed_status_id() To get the closed status id1613 * @uses WP_Query To get get the posts1614 * @uses apply_filters() Calls 'bbp_get_public_child_count' with the child1615 * count, parent id and post type1616 1505 * @return int The number of children 1617 1506 */ … … 1659 1548 * @param int $parent_id Parent id. 1660 1549 * @param string $post_type Post type. Defaults to 'post'. 1661 * @uses bbp_get_public_status_id() To get the public status id 1662 * @uses bbp_get_topic_post_type() To get the topic post type 1663 * @uses bbp_get_closed_status_id() To get the closed status id 1664 * @uses WP_Query To get get the posts 1665 * @uses apply_filters() Calls 'bbp_get_public_child_ids' with the child ids, 1666 * parent id and post type 1550 * 1667 1551 * @return array The array of children 1668 1552 */ … … 1709 1593 * @param int $parent_id Parent id 1710 1594 * @param string $post_type Post type. Defaults to 'post' 1711 * @uses wp_cache_get() To check if there is a cache of the children 1712 * @uses bbp_get_public_status_id() To get the public status id 1713 * @uses bbp_get_private_status_id() To get the private status id 1714 * @uses bbp_get_hidden_status_id() To get the hidden status id 1715 * @uses bbp_get_pending_status_id() To get the pending status id 1716 * @uses bbp_get_closed_status_id() To get the closed status id 1717 * @uses bbp_get_trash_status_id() To get the trash status id 1718 * @uses bbp_get_spam_status_id() To get the spam status id 1719 * @uses bbp_get_forum_post_type() To get the forum post type 1720 * @uses bbp_get_topic_post_type() To get the topic post type 1721 * @uses bbp_get_reply_post_type() To get the reply post type 1722 * @uses wpdb::prepare() To prepare the query 1723 * @uses wpdb::get_col() To get the result of the query in an array 1724 * @uses wp_cache_set() To set the cache for future use 1725 * @uses apply_filters() Calls 'bbp_get_all_child_ids' with the child ids, 1726 * parent id and post type 1595 * 1727 1596 * @return array The array of children 1728 1597 */ … … 1820 1689 * @since 2.1.0 bbPress (r4022) 1821 1690 * 1822 * @uses do_action() Calls 'bbp_check_referer' on $action.1823 1691 * @param string $action Action nonce 1824 1692 * @param string $query_arg where to look for nonce in $_REQUEST … … 2121 1989 * @since 2.0.0 bbPress (r3304) 2122 1990 * 2123 * @uses get_option() To see if pretty permalinks are enabled2124 * @uses get_page_by_path() To see if page exists at path2125 *2126 1991 * @param string $path 2127 1992 * @return mixed False if no page, Page object if true … … 2153 2018 * 2154 2019 * @global WP_Query $wp_query 2155 * @uses WP_Query::set_404()2156 2020 */ 2157 2021 function bbp_set_404() {
Note: See TracChangeset
for help on using the changeset viewer.