Changeset 6573 for trunk/src/includes/common/template.php
- Timestamp:
- 06/16/2017 09:20:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/template.php
r6498 r6573 21 21 * @since 2.1.0 bbPress (r3979) 22 22 * 23 * @uses bbp_get_forums_url() To get the forums URL24 23 * @param string $path Additional path with leading slash 25 24 */ … … 32 31 * @since 2.1.0 bbPress (r3979) 33 32 * 34 * @uses home_url() To get the home URL35 * @uses bbp_get_root_slug() To get the forum root location36 33 * @param string $path Additional path with leading slash 37 34 */ … … 45 42 * @since 2.1.0 bbPress (r3979) 46 43 * 47 * @uses bbp_get_topics_url() To get the topics URL48 44 * @param string $path Additional path with leading slash 49 45 */ … … 56 52 * @since 2.1.0 bbPress (r3979) 57 53 * 58 * @uses home_url() To get the home URL59 * @uses bbp_get_topic_archive_slug() To get the topics archive location60 54 * @param string $path Additional path with leading slash 61 55 * @return The URL to the topics archive … … 71 65 * 72 66 * @since 2.0.0 bbPress (r2464) 73 * 74 * @uses do_action() Calls 'bbp_head' 75 */ 67 */ 76 68 function bbp_head() { 77 69 do_action( 'bbp_head' ); … … 82 74 * 83 75 * @since 2.0.0 bbPress (r2464) 84 *85 * @uses do_action() Calls 'bbp_footer'86 76 */ 87 77 function bbp_footer() { … … 97 87 * 98 88 * @param int $site_id 99 * @uses get_current_blog_id()100 * @uses get_blog_option()101 * @uses apply_filters()102 89 * @return bool True if site is public, false if private 103 90 */ … … 122 109 * 123 110 * @param int $post_id Possible post_id to check 124 * @uses bbp_get_forum_post_type() To get the forum post type125 111 * @return bool True if it's a forum page, false if not 126 112 */ … … 144 130 * @since 2.0.0 bbPress (r3251) 145 131 * 146 * @uses is_post_type_archive() To check if we are looking at the forum archive147 * @uses bbp_get_forum_post_type() To get the forum post type ID148 *149 132 * @return bool 150 133 */ … … 168 151 * 169 152 * @since 2.0.0 bbPress (r3338) 170 *171 * @uses is_single()172 * @uses bbp_get_forum_post_type()173 * @uses get_post_type()174 * @uses apply_filters()175 153 * 176 154 * @return bool … … 200 178 * @since 2.1.0 bbPress (r3553) 201 179 * 202 * @uses WP_Query Checks if WP_Query::bbp_is_forum_edit is true203 180 * @return bool True if it's the forum edit page, false if not 204 181 */ … … 228 205 * 229 206 * @param int $post_id Possible post_id to check 230 * @uses bbp_get_topic_post_type() To get the topic post type231 * @uses get_post_type() To get the post type of the post id232 207 * @return bool True if it's a topic page, false if not 233 208 */ … … 250 225 * 251 226 * @since 2.0.0 bbPress (r3338) 252 *253 * @uses is_single()254 * @uses bbp_get_topic_post_type()255 * @uses get_post_type()256 * @uses apply_filters()257 227 * 258 228 * @return bool … … 282 252 * @since 2.0.0 bbPress (r3251) 283 253 * 284 * @uses is_post_type_archive() To check if we are looking at the topic archive285 * @uses bbp_get_topic_post_type() To get the topic post type ID286 *287 254 * @return bool 288 255 */ … … 306 273 * @since 2.0.0 bbPress (r2753) 307 274 * 308 * @uses WP_Query Checks if WP_Query::bbp_is_topic_edit is true309 275 * @return bool True if it's the topic edit page, false if not 310 276 */ … … 333 299 * @since 2.0.0 bbPress (r2756) 334 300 * 335 * @uses bbp_is_topic_edit() To check if it's a topic edit page336 301 * @return bool True if it's the topic merge page, false if not 337 302 */ … … 355 320 * @since 2.0.0 bbPress (r2756) 356 321 * 357 * @uses bbp_is_topic_edit() To check if it's a topic edit page358 322 * @return bool True if it's the topic split page, false if not 359 323 */ … … 408 372 * @since 2.0.0 bbPress (r3346) 409 373 * 410 * @uses WP_Query Checks if WP_Query::bbp_is_topic_tag_edit is true411 374 * @return bool True if editing a topic tag, false if not 412 375 */ … … 441 404 * 442 405 * @param mixed $the_post Optional. Post object or post ID. 443 * @uses get_post_type()444 * @uses bbp_get_forum_post_type()445 * @uses bbp_get_topic_post_type()446 * @uses bbp_get_reply_post_type()447 406 * 448 407 * @return bool … … 472 431 * 473 432 * @param int $post_id Possible post_id to check 474 * @uses bbp_get_reply_post_type() To get the reply post type475 * @uses get_post_type() To get the post type of the post id476 433 * @return bool True if it's a reply page, false if not 477 434 */ … … 495 452 * @since 2.0.0 bbPress (r2753) 496 453 * 497 * @uses WP_Query Checks if WP_Query::bbp_is_reply_edit is true498 454 * @return bool True if it's the reply edit page, false if not 499 455 */ … … 520 476 * Check if current page is a reply move page 521 477 * 522 * @uses bbp_is_reply_move() To check if it's a reply move page523 478 * @return bool True if it's the reply move page, false if not 524 479 */ … … 541 496 * 542 497 * @since 2.0.0 bbPress (r3344) 543 *544 * @uses is_single()545 * @uses bbp_get_reply_post_type()546 * @uses get_post_type()547 * @uses apply_filters()548 498 * 549 499 * @return bool … … 663 613 * @since 2.0.0 bbPress (r2688) 664 614 * 665 * @uses bbp_is_single_user() Check query variable666 * @uses is_user_logged_in() Must be logged in to be home667 * @uses bbp_get_displayed_user_id()668 * @uses bbp_get_current_user_id()669 615 * @return bool True if it's the user's home, false if not 670 616 */ … … 689 635 * @since 2.1.0 bbPress (r3918) 690 636 * 691 * @uses bbp_is_single_user_edit() Check query variable692 * @uses is_user_logged_in() Must be logged in to be home693 * @uses bbp_get_displayed_user_id()694 * @uses bbp_get_current_user_id()695 637 * @return bool True if it's the user's home, false if not 696 638 */ … … 713 655 * @since 2.0.0 bbPress (r2688) 714 656 * 715 * @uses WP_Query Checks if WP_Query::bbp_is_single_user is set to true716 657 * @return bool True if it's a user's profile page, false if not 717 658 */ … … 736 677 * @since 2.0.0 bbPress (r2688) 737 678 * 738 * @uses WP_Query Checks if WP_Query::bbp_is_single_user_edit is set to true739 679 * @return bool True if it's a user's profile edit page, false if not 740 680 */ … … 759 699 * @since 2.2.0 bbPress (r4225) 760 700 * 761 * @uses WP_Query Checks if WP_Query::bbp_is_single_user_profile is set to true762 701 * @return bool True if it's a user's profile page, false if not 763 702 */ … … 782 721 * @since 2.2.0 bbPress (r4225) 783 722 * 784 * @uses WP_Query Checks if WP_Query::bbp_is_single_user_topics is set to true785 723 * @return bool True if it's a user's topics page, false if not 786 724 */ … … 805 743 * @since 2.2.0 bbPress (r4225) 806 744 * 807 * @uses WP_Query Checks if WP_Query::bbp_is_single_user_replies is set to true808 745 * @return bool True if it's a user's replies page, false if not 809 746 */ … … 828 765 * @since 2.6.0 bbPress (r6320) 829 766 * 830 * @uses WP_Query Checks if WP_Query::bbp_is_single_user_engagements is set to true831 767 * @return bool True if it's a user's replies page, false if not 832 768 */ … … 852 788 * 853 789 * @global WP_Query $wp_query To check if WP_Query::bbp_is_view is true 854 * @uses bbp_is_query_name() To get the query name855 790 * @return bool Is it a view page? 856 791 */ … … 881 816 * 882 817 * @global WP_Query $wp_query To check if WP_Query::bbp_is_search is true 883 * @uses bbp_is_query_name() To get the query name884 818 * @return bool Is it a search page? 885 819 */ … … 920 854 * 921 855 * @global WP_Query $wp_query To check if WP_Query::bbp_is_search is true 922 * @uses bbp_is_query_name() To get the query name923 856 * @return bool Is it a search page? 924 857 */ … … 958 891 * @since 2.1.0 bbPress (r3585) 959 892 * 960 * @uses WP_Query Checks if WP_Query::bbp_is_edit is true961 893 * @return bool True if it's the edit page, false if not 962 894 */ … … 983 915 * @param array $wp_classes 984 916 * @param array $custom_classes 985 * @uses bbp_is_single_forum()986 * @uses bbp_is_single_topic()987 * @uses bbp_is_topic_edit()988 * @uses bbp_is_topic_merge()989 * @uses bbp_is_topic_split()990 * @uses bbp_is_single_reply()991 * @uses bbp_is_reply_edit()992 * @uses bbp_is_reply_move()993 * @uses bbp_is_single_view()994 * @uses bbp_is_single_user_edit()995 * @uses bbp_is_single_user()996 * @uses bbp_is_user_home()997 * @uses bbp_is_subscriptions()998 * @uses bbp_is_favorites()999 * @uses bbp_is_topics_created()1000 * @uses bbp_is_replies_created()1001 * @uses bbp_is_forum_archive()1002 * @uses bbp_is_topic_archive()1003 * @uses bbp_is_topic_tag()1004 * @uses bbp_is_topic_tag_edit()1005 * @uses bbp_get_topic_tag_tax_id()1006 * @uses bbp_get_topic_tag_slug()1007 * @uses bbp_get_topic_tag_id()1008 917 * @return array Body Classes 1009 918 */ … … 1147 1056 * @since 2.6.0 1148 1057 * 1149 * @uses is_singular()1150 * @uses bbp_get_global_post_field()1151 * @uses has_shortcode();1152 *1153 1058 * @param string $text 1154 1059 * @return bool … … 1191 1096 * @since 2.0.0 bbPress (r3344) 1192 1097 * 1193 * @uses bbp_is_single_forum()1194 * @uses bbp_is_single_topic()1195 * @uses bbp_is_topic_edit()1196 * @uses bbp_is_topic_merge()1197 * @uses bbp_is_topic_split()1198 * @uses bbp_is_single_reply()1199 * @uses bbp_is_reply_edit()1200 * @uses bbp_is_reply_move()1201 * @uses bbp_is_single_view()1202 * @uses bbp_is_single_user_edit()1203 * @uses bbp_is_single_user()1204 * @uses bbp_is_user_home()1205 * @uses bbp_is_subscriptions()1206 * @uses bbp_is_favorites()1207 * @uses bbp_is_topics_created()1208 * @uses bbp_is_replies_created()1209 * @uses bbp_has_shortcode()1210 *1211 1098 * @return bool In a bbPress page 1212 1099 */ … … 1317 1204 * - action: The action being taken 1318 1205 * - context: The context the action is being taken from 1319 * @uses add_query_arg() To add a arg to the url1320 * @uses site_url() Toget the site url1321 * @uses apply_filters() Calls 'bbp_wp_login_action' with the url and args1322 1206 */ 1323 1207 function bbp_wp_login_action( $args = array() ) { … … 1333 1217 * - action: The action being taken 1334 1218 * - context: The context the action is being taken from 1335 * @uses add_query_arg() To add a arg to the url1336 * @uses site_url() Toget the site url1337 * @uses apply_filters() Calls 'bbp_wp_login_action' with the url and args1338 1219 */ 1339 1220 function bbp_get_wp_login_action( $args = array() ) { … … 1366 1247 * 1367 1248 * @param string $redirect_to Pass a URL to redirect to 1368 *1369 * @uses wp_get_referer() To get the referer1370 * @uses esc_attr() To escape the url1371 * @uses apply_filters() Calls 'bbp_redirect_to_field', passes field and to1372 1249 */ 1373 1250 function bbp_redirect_to_field( $redirect_to = '' ) { … … 1401 1278 * @param string $input_type Type of input. Default: text. Accepts: 1402 1279 * textarea|password|select|radio|checkbox 1403 * @uses bbp_get_sanitize_val() To sanitize the value.1404 1280 */ 1405 1281 function bbp_sanitize_val( $request = '', $input_type = 'text' ) { … … 1417 1293 * @param string $input_type Type of input. Default: text. Accepts: 1418 1294 * textarea|password|select|radio|checkbox 1419 * @uses esc_attr() To escape the string 1420 * @uses apply_filters() Calls 'bbp_get_sanitize_val' with the sanitized 1421 * value, request and input type 1295 * 1422 1296 * @return string Sanitized value ready for screen display 1423 1297 */ … … 1483 1357 * 1484 1358 * @link https://bbpress.trac.wordpress.org/attachment/ticket/2714 Trac Ticket 1485 * @uses apply_filters Allows return value to be filtered1486 1359 * @param int $auto_increment Optional. Default true. Set to false to 1487 1360 * prevent the increment … … 1581 1454 * - disable_categories: Disable forum categories and closed forums? 1582 1455 * Defaults to true. Only for forums and when 1583 * the category option is displayed.1584 * @uses BBP_Walker_Dropdown() As the default walker to generate the1585 * dropdown1586 * @uses current_user_can() To check if the current user can read1587 * private forums1588 * @uses bbp_get_forum_post_type() To get the forum post type1589 * @uses bbp_get_topic_post_type() To get the topic post type1590 * @uses walk_page_dropdown_tree() To generate the dropdown using the1591 * walker1592 * @uses apply_filters() Calls 'bbp_get_dropdown' with the dropdown1593 * and args1594 1456 * @return string The dropdown 1595 1457 */ … … 1733 1595 * 1734 1596 * @since 2.1.0 bbPress (r3553) 1735 *1736 * @uses bbp_is_forum_edit() To check if it's the forum edit page1737 * @uses wp_nonce_field() To generate hidden nonce fields1738 * @uses bbp_forum_id() To output the forum id1739 * @uses bbp_is_single_forum() To check if it's a forum page1740 * @uses bbp_forum_id() To output the forum id1741 1597 */ 1742 1598 function bbp_forum_form_fields() { … … 1776 1632 * 1777 1633 * @since 2.0.0 bbPress (r2753) 1778 *1779 * @uses bbp_is_topic_edit() To check if it's the topic edit page1780 * @uses wp_nonce_field() To generate hidden nonce fields1781 * @uses bbp_topic_id() To output the topic id1782 * @uses bbp_is_single_forum() To check if it's a forum page1783 * @uses bbp_forum_id() To output the forum id1784 1634 */ 1785 1635 function bbp_topic_form_fields() { … … 1819 1669 * 1820 1670 * @since 2.0.0 bbPress (r2753) 1821 *1822 * @uses bbp_is_reply_edit() To check if it's the reply edit page1823 * @uses wp_nonce_field() To generate hidden nonce fields1824 * @uses bbp_reply_id() To output the reply id1825 * @uses bbp_topic_id() To output the topic id1826 * @uses bbp_forum_id() To output the forum id1827 1671 */ 1828 1672 function bbp_reply_form_fields() { … … 1862 1706 * 1863 1707 * @since 2.0.0 bbPress (r2690) 1864 *1865 * @uses bbp_displayed_user_id() To output the displayed user id1866 * @uses wp_nonce_field() To generate a hidden referer field1867 1708 */ 1868 1709 function bbp_edit_user_form_fields() { … … 1881 1722 * 1882 1723 * @since 2.0.0 bbPress (r2756) 1883 *1884 * @uses wp_nonce_field() To generate a hidden nonce field1885 * @uses bbp_topic_id() To output the topic id1886 1724 */ 1887 1725 function bbp_merge_topic_form_fields() { … … 1900 1738 * 1901 1739 * @since 2.0.0 bbPress (r2756) 1902 *1903 * @uses wp_nonce_field() To generate a hidden nonce field1904 1740 */ 1905 1741 function bbp_split_topic_form_fields() { … … 1916 1752 * 1917 1753 * Output the required hidden fields when moving a reply 1918 *1919 * @uses wp_nonce_field() To generate a hidden nonce field1920 1754 */ 1921 1755 function bbp_move_reply_form_fields() { … … 1934 1768 * 1935 1769 * @param array $args 1936 * @uses bbp_get_the_content() To return the content to output1937 1770 */ 1938 1771 function bbp_the_content( $args = array() ) { … … 1945 1778 * 1946 1779 * @param array $args 1947 *1948 * @uses apply_filter() To filter args and output1949 * @uses wp_parse_pargs() To compare args1950 * @uses bbp_use_wp_editor() To see if WP editor is in use1951 * @uses bbp_is_edit() To see if we are editing something1952 * @uses wp_editor() To output the WordPress editor1953 1780 * 1954 1781 * @return string HTML from output buffer … … 2132 1959 * 2133 1960 * @param string $view Optional. View id 2134 * @uses bbp_get_view_id() To get the view id2135 1961 */ 2136 1962 function bbp_view_id( $view = '' ) { … … 2146 1972 * 2147 1973 * @param string $view Optional. View id. 2148 * @uses sanitize_title() To sanitize the view id2149 * @uses get_query_var() To get the view id query variable2150 * @uses bbp_get_view_rewrite_id() To get the view rewrite ID2151 1974 * @return bool|string ID on success, false on failure 2152 1975 */ … … 2175 1998 * 2176 1999 * @param string $view Optional. View id 2177 * @uses bbp_get_view_title() To get the view title2178 2000 */ 2179 2001 function bbp_view_title( $view = '' ) { … … 2190 2012 * 2191 2013 * @param string $view Optional. View id 2192 * @uses bbp_get_view_id() To get the view id2193 2014 * @return bool|string Title on success, false on failure 2194 2015 */ … … 2210 2031 * 2211 2032 * @param string $view Optional. View id 2212 * @uses bbp_get_view_url() To get the view url2213 2033 */ 2214 2034 function bbp_view_url( $view = false ) { … … 2221 2041 * 2222 2042 * @param string $view Optional. View id 2223 * @uses sanitize_title() To sanitize the view id2224 * @uses home_url() To get blog home url2225 * @uses add_query_arg() To add custom args to the url2226 * @uses apply_filters() Calls 'bbp_get_view_url' with the view url,2227 2043 * used view id 2228 2044 * @return string View url (or home url if the view was not found) … … 2259 2075 * @since 2.0.0 bbPress (r2980) 2260 2076 * 2261 * @uses bbp_get_query_name() Get the query var '_bbp_query_name'2262 2077 * @return bool True if match, false if not 2263 2078 */ … … 2271 2086 * @since 2.0.0 bbPress (r2695) 2272 2087 * 2273 * @uses get_query_var() To get the query var '_bbp_query_name'2274 2088 * @return string To return the query var value 2275 2089 */ … … 2284 2098 * 2285 2099 * @param string $name What to set the query var to 2286 * @uses set_query_var() To set the query var '_bbp_query_name'2287 2100 */ 2288 2101 function bbp_set_query_name( $name = '' ) { … … 2295 2108 * @since 2.0.0 bbPress (r2692) 2296 2109 * 2297 * @uses bbp_set_query_name() To set the query var '_bbp_query_name' value to ''2298 2110 */ 2299 2111 function bbp_reset_query_name() { … … 2311 2123 * @param bool $current_page Include the current item 2312 2124 * @param bool $root Include the root page if one exists 2313 * @uses bbp_get_breadcrumb() To get the breadcrumb2314 2125 */ 2315 2126 function bbp_title_breadcrumb( $args = array() ) { … … 2325 2136 * @param bool $current_page Include the current item 2326 2137 * @param bool $root Include the root page if one exists 2327 * @uses bbp_get_breadcrumb() To get the breadcrumb2328 2138 */ 2329 2139 function bbp_breadcrumb( $args = array() ) { … … 2339 2149 * @param bool $root Include the root page if one exists 2340 2150 * 2341 * @uses get_post() To get the post2342 * @uses bbp_get_forum_permalink() To get the forum link2343 * @uses bbp_get_topic_permalink() To get the topic link2344 * @uses bbp_get_reply_permalink() To get the reply link2345 * @uses get_permalink() To get the permalink2346 * @uses bbp_get_forum_post_type() To get the forum post type2347 * @uses bbp_get_topic_post_type() To get the topic post type2348 * @uses bbp_get_reply_post_type() To get the reply post type2349 * @uses bbp_get_forum_title() To get the forum title2350 * @uses bbp_get_topic_title() To get the topic title2351 * @uses bbp_get_reply_title() To get the reply title2352 * @uses get_the_title() To get the title2353 * @uses apply_filters() Calls 'bbp_get_breadcrumb' with the crumbs2354 2151 * @return string Breadcrumbs 2355 2152 */ … … 2623 2420 * 2624 2421 * @since 2.0.0 bbPress (r2780) 2625 *2626 * @uses bbp_get_allowed_tags()2627 2422 */ 2628 2423 function bbp_allowed_tags() { … … 2637 2432 * @since 2.0.0 bbPress (r2780) 2638 2433 * 2639 * @uses bbp_kses_allowed_tags() To get the allowed tags2640 * @uses apply_filters() Calls 'bbp_allowed_tags' with the tags2641 2434 * @return string HTML allowed tags entity encoded. 2642 2435 */ … … 2665 2458 * 2666 2459 * @since 2.0.0 bbPress (r2688) 2667 *2668 * @uses WP_Error bbPress::errors::get_error_codes() To get the error codes2669 * @uses WP_Error bbPress::errors::get_error_data() To get the error data2670 * @uses WP_Error bbPress::errors::get_error_messages() To get the error2671 * messages2672 * @uses is_wp_error() To check if it's a {@link WP_Error}2673 2460 */ 2674 2461 function bbp_template_notices() { … … 2732 2519 * 2733 2520 * @param string $redirect_to Redirect to url 2734 * @uses bbp_get_logout_link() To get the logout link2735 2521 */ 2736 2522 function bbp_logout_link( $redirect_to = '' ) { … … 2743 2529 * 2744 2530 * @param string $redirect_to Redirect to url 2745 * @uses wp_logout_url() To get the logout url2746 * @uses apply_filters() Calls 'bbp_get_logout_link' with the logout link and2747 2531 * redirect to url 2748 2532 * @return string The logout link … … 2768 2552 * various items within the page title. 2769 2553 * @param string $seplocation Optional. Direction to display title, 'right'. 2770 * @uses bbp_is_single_user() To check if it's a user profile page2771 * @uses bbp_is_single_user_edit() To check if it's a user profile edit page2772 * @uses bbp_is_user_home() To check if the profile page is of the current user2773 * @uses get_query_var() To get the user id2774 * @uses get_userdata() To get the user data2775 * @uses bbp_is_single_forum() To check if it's a forum2776 * @uses bbp_get_forum_title() To get the forum title2777 * @uses bbp_is_single_topic() To check if it's a topic2778 * @uses bbp_get_topic_title() To get the topic title2779 * @uses bbp_is_single_reply() To check if it's a reply2780 * @uses bbp_get_reply_title() To get the reply title2781 * @uses is_tax() To check if it's the tag page2782 * @uses get_queried_object() To get the queried object2783 * @uses bbp_is_single_view() To check if it's a view2784 * @uses bbp_get_view_title() To get the view title2785 * @uses apply_filters() Calls 'bbp_raw_title' with the title2786 * @uses apply_filters() Calls 'bbp_profile_page_wp_title' with the title,2787 2554 * separator and separator location 2788 2555 * @return string The title
Note: See TracChangeset
for help on using the changeset viewer.