Changeset 6573 for trunk/src/includes/users/template.php
- Timestamp:
- 06/16/2017 09:20:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/users/template.php
r6568 r6573 170 170 * 171 171 * @param array $args All the arguments supported by {@link WP_User_Query} 172 * @uses BBP_User_Query To make query and get the users173 * @uses apply_filters() Calls 'bbp_has_users' with174 * bbPress::user_query::have_users()175 * and bbPress::user_query176 172 * @return object Multidimensional array of user information 177 173 */ … … 200 196 * @since 2.6.0 bbPress (r2464) 201 197 * 202 * @uses bbPress:user_query::have_users() To check if there are more users203 * available204 198 * @return object User information 205 199 */ … … 213 207 * @since 2.6.0 bbPress (r2464) 214 208 * 215 * @uses bbPress:user_query::the_user() To get the current user216 209 * @return object User information 217 210 */ … … 230 223 * @param bool $displayed_user_fallback Fallback on displayed user? 231 224 * @param bool $current_user_fallback Fallback on current user? 232 * @uses bbp_get_user_id() To get the user id233 225 */ 234 226 function bbp_user_id( $user_id = 0, $displayed_user_fallback = true, $current_user_fallback = false ) { … … 243 235 * @param bool $displayed_user_fallback Fallback on displayed user? 244 236 * @param bool $current_user_fallback Fallback on current user? 245 * @uses get_query_var() To get the 'bbp_user_id' query var246 * @uses apply_filters() Calls 'bbp_get_user_id' with the user id247 237 * @return int Validated user id 248 238 */ … … 279 269 * 280 270 * @since 2.0.0 bbPress (r2574) 281 *282 * @uses bbp_get_current_user_id() To get the current user id283 271 */ 284 272 function bbp_current_user_id() { … … 290 278 * @since 2.0.0 bbPress (r2574) 291 279 * 292 * @uses bbp_get_user_id() To get the current user id293 * @uses apply_filters() Calls 'bbp_get_current_user_id' with the id294 280 * @return int Current user id 295 281 */ … … 304 290 * 305 291 * @since 2.0.0 bbPress (r2688) 306 *307 * @uses bbp_get_displayed_user_id() To get the displayed user id308 292 */ 309 293 function bbp_displayed_user_id() { … … 315 299 * @since 2.0.0 bbPress (r2688) 316 300 * 317 * @uses bbp_get_user_id() To get the displayed user id318 * @uses apply_filters() Calls 'bbp_get_displayed_user_id' with the id319 301 * @return int Displayed user id 320 302 */ … … 336 318 * @param string $field Field to get 337 319 * @param string $filter How to filter the field value (null|raw|db|display|edit) 338 * @uses bbp_get_displayed_user_field() To get the field339 320 */ 340 321 function bbp_displayed_user_field( $field = '', $filter = 'display' ) { … … 354 335 * @see WP_User::__get() for more on how the value is retrieved 355 336 * @see sanitize_user_field() for more on how the value is sanitized 356 * @uses apply_filters() Calls 'bbp_get_displayed_user_field' with the value357 337 * @return string|bool Value of the field if it exists, else false 358 338 */ … … 382 362 * 383 363 * @since 2.0.0 bbPress (r2574) 384 *385 * @uses bbp_get_current_user_name() To get the current user name386 364 */ 387 365 function bbp_current_user_name() { … … 415 393 * 416 394 * @param int $size Size of the avatar. Defaults to 40 417 * @uses bbp_get_current_user_avatar() To get the current user avatar418 395 */ 419 396 function bbp_current_user_avatar( $size = 40 ) { … … 427 404 * 428 405 * @param int $size Size of the avatar. Defaults to 40 429 * @uses bbp_get_current_user_id() To get the current user id430 * @uses bbp_get_current_anonymous_user_data() To get the current431 * anonymous user's email432 * @uses get_avatar() To get the avatar433 * @uses apply_filters() Calls 'bbp_get_current_user_avatar' with the434 * avatar and size435 406 * @return string Current user avatar 436 407 */ … … 454 425 * 455 426 * @param int $user_id Optional. User id 456 * @uses bbp_get_user_profile_link() To get user profile link457 427 */ 458 428 function bbp_user_profile_link( $user_id = 0 ) { … … 465 435 * 466 436 * @param int $user_id Optional. User id 467 * @uses bbp_get_user_id() To get user id468 * @uses get_userdata() To get user data469 * @uses bbp_get_user_profile_url() To get user profile url470 * @uses apply_filters() Calls 'bbp_get_user_profile_link' with the user471 * profile link and user id472 437 * @return string User profile link 473 438 */ … … 549 514 * @param int $user_id Optional. User id 550 515 * @param string $user_nicename Optional. User nicename 551 * @uses bbp_get_user_profile_url() To get user profile url552 516 */ 553 517 function bbp_user_profile_url( $user_id = 0, $user_nicename = '' ) { … … 561 525 * @param int $user_id Optional. User id 562 526 * @param string $user_nicename Optional. User nicename 563 * @uses bbp_get_user_id() To get user id564 * @uses bbp_use_pretty_urls() To check if the site is using pretty URLs565 * @uses add_query_arg() To add custom args to the url566 * @uses home_url() To get blog home url567 * @uses apply_filters() Calls 'bbp_get_user_profile_url' with the user568 * profile url, user id and user nicename569 527 * @return string User profile url 570 528 */ … … 612 570 * 613 571 * @param int $user_id Optional. User id 614 * @uses bbp_get_user_profile_edit_link() To get user profile edit link615 572 */ 616 573 function bbp_user_profile_edit_link( $user_id = 0 ) { … … 623 580 * 624 581 * @param int $user_id Optional. User id 625 * @uses bbp_get_user_id() To get user id626 * @uses get_userdata() To get user data627 * @uses bbp_get_user_profile_edit_url() To get user profile edit url628 * @uses apply_filters() Calls 'bbp_get_user_profile_link' with the edit629 * link and user id630 582 * @return string User profile edit link 631 583 */ … … 652 604 * @param int $user_id Optional. User id 653 605 * @param string $user_nicename Optional. User nicename 654 * @uses bbp_get_user_profile_edit_url() To get user profile edit url655 606 */ 656 607 function bbp_user_profile_edit_url( $user_id = 0, $user_nicename = '' ) { … … 664 615 * @param int $user_id Optional. User id 665 616 * @param string $user_nicename Optional. User nicename 666 * @uses bbp_get_user_id() To get user id667 * @uses bbp_get_user_profile_url() To get the user profile url668 * @uses bbp_use_pretty_urls() To check if the site is using pretty URLs669 * @uses add_query_arg() To add custom args to the url670 * @uses home_url() To get blog home url671 * @uses apply_filters() Calls 'bbp_get_user_edit_profile_url' with the672 * edit profile url, user id and user nicename673 617 * @return string 674 618 */ … … 711 655 * 712 656 * @param int $user_id 713 * @uses bbp_get_user_display_role To get the user display role714 657 */ 715 658 function bbp_user_display_role( $user_id = 0 ) { … … 722 665 * 723 666 * @param int $user_id 724 * @uses bbp_get_user_id() to verify the user ID725 * @uses bbp_is_user_inactive() to check if user is inactive726 * @uses user_can() to check if user has special capabilities727 667 * @return string 728 668 */ … … 761 701 * 762 702 * @param array $args Optional. See {@link bbp_get_admin_link()} 763 * @uses bbp_get_admin_link() To get the admin link764 703 */ 765 704 function bbp_admin_link( $args = array() ) { … … 775 714 * - before: Before the lnk 776 715 * - after: After the link 777 * @uses current_user_can() To check if the current user can moderate778 * @uses admin_url() To get the admin url779 * @uses apply_filters() Calls 'bbp_get_admin_link' with the link & args780 716 * @return The link 781 717 */ … … 812 748 * 813 749 * @param array $args Optional. If it is an integer, it is used as post id. 814 * @uses bbp_get_author_ip() To get the post author link815 750 */ 816 751 function bbp_author_ip( $args = array() ) { … … 823 758 * 824 759 * @param array $args Optional. If an integer, it is used as reply id. 825 * @uses get_post_meta() To check if it's a topic page826 760 * @return string Author link of reply 827 761 */ … … 879 813 * 880 814 * @param int $post_id 881 * @uses bbp_get_author_display_name() to get the author name882 815 */ 883 816 function bbp_author_display_name( $post_id = 0 ) { … … 896 829 * @param int $post_id 897 830 * 898 * @uses bbp_is_topic_edit()899 * @uses bbp_get_topic_author_display_name()900 * @uses bbp_is_reply_edit()901 * @uses bbp_get_reply_author_display_name()902 * @uses bbp_current_anonymous_user_data()903 *904 831 * @return string The name of the author 905 832 */ … … 936 863 * 937 864 * @param int $post_id 938 * @uses bbp_get_author_email() to get the author email939 865 */ 940 866 function bbp_author_email( $post_id = 0 ) { … … 953 879 * @param int $post_id 954 880 * 955 * @uses bbp_is_topic_edit()956 * @uses bbp_get_topic_author_email()957 * @uses bbp_is_reply_edit()958 * @uses bbp_get_reply_author_email()959 * @uses bbp_current_anonymous_user_data()960 *961 881 * @return string The email of the author 962 882 */ … … 993 913 * 994 914 * @param int $post_id 995 * @uses bbp_get_author_url() to get the author url996 915 */ 997 916 function bbp_author_url( $post_id = 0 ) { … … 1010 929 * @param int $post_id 1011 930 * 1012 * @uses bbp_is_topic_edit()1013 * @uses bbp_get_topic_author_url()1014 * @uses bbp_is_reply_edit()1015 * @uses bbp_get_reply_author_url()1016 * @uses bbp_current_anonymous_user_data()1017 *1018 931 * @return string The url of the author 1019 932 */ … … 1049 962 * 1050 963 * @param int $user_id Optional. User id 1051 * @uses bbp_get_favorites_permalink() To get the favorites permalink1052 964 */ 1053 965 function bbp_favorites_permalink( $user_id = 0 ) { … … 1061 973 * 1062 974 * @param int $user_id Optional. User id 1063 * @uses bbp_get_user_profile_url() To get the user profile url1064 * @uses apply_filters() Calls 'bbp_get_favorites_permalink' with the1065 * user profile url and user id1066 975 * @return string Permanent link to user profile page 1067 976 */ … … 1129 1038 * @param int $user_id Optional. User id 1130 1039 * @param bool $wrap Optional. If you want to wrap the link in <span id="favorite-toggle">. 1131 * @uses bbp_get_user_favorites_link() To get the user favorites link1132 1040 */ 1133 1041 function bbp_user_favorites_link( $args = array(), $user_id = 0, $wrap = true ) { … … 1153 1061 * @param int $topic_id Optional. Topic id 1154 1062 * @param bool $wrap Optional. If you want to wrap the link in <span id="favorite-toggle">. See ajax_favorite() 1155 * @uses bbp_get_user_id() To get the user id1156 * @uses current_user_can() If the current user can edit the user1157 * @uses bbp_get_topic_id() To get the topic id1158 * @uses bbp_is_user_favorite() To check if the topic is user's favorite1159 * @uses bbp_get_favorites_permalink() To get the favorites permalink1160 * @uses bbp_get_topic_permalink() To get the topic permalink1161 * @uses bbp_is_favorites() Is it the favorites page?1162 * @uses apply_filters() Calls 'bbp_get_user_favorites_link' with the1163 * html, add args, remove args, user & topic id1164 1063 * @return string User favorites link 1165 1064 */ … … 1254 1153 * 1255 1154 * @param int $user_id Optional. User id 1256 * @uses bbp_get_subscriptions_permalink() To get the subscriptions link1257 1155 */ 1258 1156 function bbp_subscriptions_permalink( $user_id = 0 ) { … … 1266 1164 * 1267 1165 * @param int $user_id Optional. User id 1268 * @uses bbp_get_user_profile_url() To get the user profile url1269 * @uses apply_filters() Calls 'bbp_get_subscriptions_permalink' with1270 * the user profile url and user id1271 1166 * @return string Permanent link to user subscriptions page 1272 1167 */ … … 1344 1239 * @param int $user_id Optional. User id 1345 1240 * @param bool $wrap Optional. If you want to wrap the link in <span id="subscription-toggle">. 1346 * @uses bbp_get_user_subscribe_link() To get the subscribe link1347 1241 */ 1348 1242 function bbp_user_subscribe_link( $args = array(), $user_id = 0, $wrap = true ) { … … 1365 1259 * @param int $user_id Optional. User id 1366 1260 * @param bool $wrap Optional. If you want to wrap the link in <span id="subscription-toggle">. 1367 * @uses bbp_is_subscriptions_active() to check if subscriptions are active1368 * @uses bbp_get_user_id() To get the user id1369 * @uses bbp_get_user_id() To get the user id1370 * @uses bbp_get_topic_id() To get the topic id1371 * @uses bbp_get_forum_id() To get the forum id1372 * @uses current_user_can() To check if the current user can edit user1373 * @uses bbp_is_user_subscribed() To check if the user is subscribed1374 * @uses bbp_is_subscriptions() To check if it's the subscriptions page1375 * @uses bbp_get_subscriptions_permalink() To get subscriptions link1376 * @uses bbp_get_topic_permalink() To get topic link1377 * @uses apply_filters() Calls 'bbp_get_user_subscribe_link' with the1378 * link, args, user id & topic id1379 1261 * @return string Permanent link to topic 1380 1262 */ … … 1469 1351 * 1470 1352 * @since 2.0.0 bbPress (r2688) 1471 *1472 * @uses bbp_is_single_user() To check if it's the profile page1473 * @uses bbp_is_single_user_edit() To check if it's the profile edit page1474 1353 */ 1475 1354 function bbp_notice_edit_user_success() { … … 1498 1377 * 1499 1378 * @since 2.6.0 bbPress (r5660) 1500 *1501 * @uses bbp_get_displayed_user_id() To get the displayed user ID1502 * @uses bbp_is_user_home_edit() To check if it's the profile edit page1503 * @uses bbp_get_user_profile_edit_url() To get the displayed user profile edit URL1504 * @uses add_query_arg() To add dismiss query argument to URL1505 * @uses wp_nonce_url() To add nonce to URL1506 1379 */ 1507 1380 function bbp_notice_edit_user_pending_email() { … … 1548 1421 * 1549 1422 * @since 2.0.0 bbPress (r2688) 1550 *1551 * @uses is_multisite() To check if the blog is multisite1552 * @uses bbp_is_single_user() To check if it's the profile page1553 * @uses bbp_is_single_user_edit() To check if it's the profile edit page1554 * @uses current_user_can() To check if the current user can manage network1555 * options1556 * @uses bbp_get_displayed_user_id() To get the displayed user id1557 * @uses is_super_admin() To check if the user is super admin1558 * @uses bbp_is_user_home() To check if it's the user home1559 * @uses bbp_is_user_home_edit() To check if it's the user home edit1560 1423 */ 1561 1424 function bbp_notice_edit_user_is_super_admin() { … … 1692 1555 * 1693 1556 * @since 2.0.0 bbPress (r2688) 1694 *1695 * @uses wp_get_user_contact_methods() To get the contact methods1696 * @uses apply_filters() Calls 'bbp_edit_user_contact_methods' with the methods1697 1557 * @return string User contact methods 1698 1558 */ … … 1733 1593 * 1734 1594 * @param int $user_id Optional. User id 1735 * @uses bbp_get_user_topics_created_url() To get the favorites permalink1736 1595 */ 1737 1596 function bbp_user_topics_created_url( $user_id = 0 ) { … … 1744 1603 * 1745 1604 * @param int $user_id Optional. User id 1746 * @uses bbp_get_user_profile_url() To get the user profile url1747 * @uses apply_filters() Calls 'bbp_get_user_topics_created_url' with the1748 * user profile url and user id1749 1605 * @return string Permanent link to user profile page 1750 1606 */ … … 1790 1646 * 1791 1647 * @param int $user_id Optional. User id 1792 * @uses bbp_get_user_replies_created_url() To get the favorites permalink1793 1648 */ 1794 1649 function bbp_user_replies_created_url( $user_id = 0 ) { … … 1801 1656 * 1802 1657 * @param int $user_id Optional. User id 1803 * @uses bbp_get_user_profile_url() To get the user profile url1804 * @uses apply_filters() Calls 'bbp_get_user_replies_created_url' with the1805 * user profile url and user id1806 1658 * @return string Permanent link to user profile page 1807 1659 */ … … 1847 1699 * 1848 1700 * @param int $user_id Optional. User id 1849 * @uses bbp_get_user_engagements_url() To get the engagements permalink1850 1701 */ 1851 1702 function bbp_user_engagements_url( $user_id = 0 ) { … … 1858 1709 * 1859 1710 * @param int $user_id Optional. User id 1860 * @uses bbp_get_user_profile_url() To get the user profile url1861 * @uses apply_filters() Calls 'bbp_get_user_engagements_url' with the1862 * user profile url and user id1863 1711 * @return string Permanent link to user profile page 1864 1712 */ … … 1968 1816 * 1969 1817 * @since 2.0.0 bbPress (r2970) 1970 *1971 * @uses WP_Error bbPress::errors::add() To add an error or message1972 1818 */ 1973 1819 function bbp_login_notices() { … … 2013 1859 * 2014 1860 * @param string $url The URL to redirect to 2015 * @uses is_user_logged_in() Check if user is logged in2016 * @uses bbp_redirect() To safely redirect2017 * @uses bbp_get_user_profile_url() To get the profile url of the user2018 * @uses bbp_get_current_user_id() To get the current user id2019 1861 */ 2020 1862 function bbp_logged_in_redirect( $url = '' ) { … … 2036 1878 * 2037 1879 * @since 2.0.0 bbPress (r2815) 2038 *2039 * @uses apply_filters() To allow custom redirection2040 * @uses bbp_redirect_to_field() To output the hidden request url field2041 * @uses wp_nonce_field() To generate hidden nonce fields2042 1880 */ 2043 1881 function bbp_user_login_fields() { … … 2062 1900 * 2063 1901 * @since 2.0.0 bbPress (r2815) 2064 *2065 * @uses add_query_arg() To add query args2066 * @uses bbp_login_url() To get the login url2067 * @uses apply_filters() To allow custom redirection2068 * @uses bbp_redirect_to_field() To output the redirect to field2069 * @uses wp_nonce_field() To generate hidden nonce fields2070 1902 */ 2071 1903 function bbp_user_register_fields() { … … 2091 1923 * 2092 1924 * @since 2.0.0 bbPress (r2815) 2093 *2094 * @uses apply_filters() To allow custom redirection2095 * @uses bbp_redirect_to_field() Set referer2096 * @uses wp_nonce_field() To generate hidden nonce fields2097 1925 */ 2098 1926 function bbp_user_lost_pass_fields() { … … 2119 1947 * 2120 1948 * @param array $args Optional. If it is an integer, it is used as post id. 2121 * @uses bbp_get_author_link() To get the post author link2122 1949 */ 2123 1950 function bbp_author_link( $args = array() ) { … … 2130 1957 * 2131 1958 * @param array $args Optional. If an integer, it is used as reply id. 2132 * @uses bbp_is_topic() To check if it's a topic page2133 * @uses bbp_get_topic_author_link() To get the topic author link2134 * @uses bbp_is_reply() To check if it's a reply page2135 * @uses bbp_get_reply_author_link() To get the reply author link2136 * @uses get_post_field() To get the post author2137 * @uses bbp_is_reply_anonymous() To check if the reply is by an2138 * anonymous user2139 * @uses get_the_author_meta() To get the author name2140 * @uses bbp_get_user_profile_url() To get the author profile url2141 * @uses get_avatar() To get the author avatar2142 * @uses apply_filters() Calls 'bbp_get_reply_author_link' with the2143 * author link and args2144 1959 * @return string Author link of reply 2145 1960 */ … … 2228 2043 * @since 2.0.0 bbPress (r3127) 2229 2044 * 2230 * @uses bbp_get_current_user_id()2231 * @uses bbp_get_forum_id()2232 * @uses bbp_allow_anonymous()2233 * @uses bbp_parse_args()2234 * @uses bbp_get_user_id()2235 * @uses current_user_can()2236 * @uses bbp_is_user_keymaster()2237 * @uses bbp_is_forum_public()2238 * @uses bbp_is_forum_private()2239 * @uses bbp_is_forum_hidden()2240 * @uses current_user_can()2241 * @uses apply_filters()2242 *2243 2045 * @return bool 2244 2046 */ … … 2283 2085 * @since 2.0.0 bbPress (r3127) 2284 2086 * 2285 * @uses bbp_is_user_keymaster()2286 * @uses is_user_logged_in()2287 * @uses bbp_allow_anonymous()2288 * @uses bbp_is_user_active()2289 * @uses current_user_can()2290 * @uses apply_filters()2291 *2292 2087 * @return bool 2293 2088 */ … … 2319 2114 * @since 2.1.0 bbPress (r3549) 2320 2115 * 2321 * @uses bbp_is_user_keymaster()2322 * @uses bbp_is_user_active()2323 * @uses current_user_can()2324 * @uses apply_filters()2325 *2326 2116 * @return bool 2327 2117 */ … … 2349 2139 * @since 2.0.0 bbPress (r3127) 2350 2140 * 2351 * @uses bbp_is_user_keymaster()2352 * @uses is_user_logged_in()2353 * @uses bbp_allow_anonymous()2354 * @uses bbp_is_user_active()2355 * @uses current_user_can()2356 * @uses apply_filters()2357 *2358 2141 * @return bool 2359 2142 */ … … 2392 2175 * 2393 2176 * @since 2.0.0 bbPress (r3127) 2394 *2395 * @uses bbp_get_forum_post_type()2396 * @uses get_posts()2397 2177 * 2398 2178 * @param type $args … … 2426 2206 * @since 2.1.0 bbPress (r3549) 2427 2207 * 2428 * @uses bbp_is_user_keymaster()2429 * @uses bbp_is_forum_edit()2430 * @uses current_user_can()2431 * @uses bbp_get_forum_id()2432 *2433 2208 * @return bool 2434 2209 */ … … 2460 2235 * @since 2.0.0 bbPress (r3127) 2461 2236 * 2462 * @uses bbp_is_user_keymaster()2463 * @uses bbp_is_topic_edit()2464 * @uses current_user_can()2465 * @uses bbp_get_topic_id()2466 * @uses bbp_allow_anonymous()2467 * @uses is_user_logged_in()2468 *2469 2237 * @return bool 2470 2238 */ … … 2496 2264 * @since 2.0.0 bbPress (r3127) 2497 2265 * 2498 * @uses bbp_is_user_keymaster()2499 * @uses bbp_is_topic_edit()2500 * @uses current_user_can()2501 * @uses bbp_get_topic_id()2502 * @uses bbp_allow_anonymous()2503 * @uses is_user_logged_in()2504 *2505 2266 * @return bool 2506 2267 */ … … 2533 2294 * @since 2.5.0 bbPress (r5119) 2534 2295 * 2535 * @uses bbp_is_anonymous()2536 * @uses bbp_is_topic_edit()2537 * @uses bbp_is_topic_anonymous()2538 * @uses bbp_is_reply_edit()2539 * @uses bbp_is_reply_anonymous()2540 *2541 2296 * @return bool 2542 2297 */ … … 2572 2327 * @param int $forum_id Optional. Topic id 2573 2328 * @param array $args See {@link bbp_get_moderator_list()} 2574 * @uses bbp_get_moderator_list() To get the moderator list2575 2329 */ 2576 2330 function bbp_moderator_list( $forum_id = 0, $args = array() ) {
Note: See TracChangeset
for help on using the changeset viewer.