Changeset 9862 for trunk/src/bp-messages/bp-messages-template.php
- Timestamp:
- 05/12/2015 04:39:07 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/bp-messages-template.php
r9846 r9862 2 2 3 3 /** 4 * BuddyPress Messages Template Tags 4 * BuddyPress Messages Template Tags. 5 5 * 6 6 * @package BuddyPress … … 73 73 74 74 /** 75 * The current "box" view ('notices', 'sentbox', 'inbox') 75 * The current "box" view ('notices', 'sentbox', 'inbox'). 76 76 * 77 77 * @access public … … 370 370 * @global BP_Messages_Box_Template $messages_template 371 371 * 372 * @param array $args {372 * @param array|string $args { 373 373 * Array of arguments. All are optional. 374 * @type int $user_idID of the user whose threads are being loaded.375 * Default: ID of the logged-in user.376 * @type string $box Current "box" view. If not provided here, the current377 * view will be inferred from the URL.378 * @type int $per_pageNumber of results to return per page. Default: 10.379 * @type int $maxMax results to return. Default: false.374 * @type int $user_id ID of the user whose threads are being loaded. 375 * Default: ID of the logged-in user. 376 * @type string $box Current "box" view. If not provided here, the current 377 * view will be inferred from the URL. 378 * @type int $per_page Number of results to return per page. Default: 10. 379 * @type int $max Max results to return. Default: false. 380 380 * @type string $search_terms Terms to which to limit results. Default: 381 * the value of $_REQUEST['s'].382 * @type string $page_arg URL argument used for the pagination param.383 * Default: 'mpage'.384 * @type array $meta_queryMeta query arguments. Only applicable if $box is385 * not 'notices'. See WP_Meta_Query more details.381 * the value of $_REQUEST['s']. 382 * @type string $page_arg URL argument used for the pagination param. 383 * Default: 'mpage'. 384 * @type array $meta_query Meta query arguments. Only applicable if $box is 385 * not 'notices'. See WP_Meta_Query more details. 386 386 * } 387 387 * @return bool True if there are threads to display, otherwise false. … … 524 524 525 525 /** 526 * Output the thread's last message content 526 * Output the thread's last message content. 527 527 * 528 528 * When viewing your Inbox, the last message is the most recent message in … … 538 538 } 539 539 /** 540 * Return the thread's last message content 540 * Return the thread's last message content. 541 541 * 542 542 * When viewing your Inbox, the last message is the most recent message in … … 547 547 * 548 548 * @since BuddyPress (2.0.0) 549 * @return string The raw content of the last message in the thread 549 * @return string The raw content of the last message in the thread. 550 550 */ 551 551 function bp_get_message_thread_content() { … … 614 614 * 615 615 * @param int $thread_id Optional. ID of the thread. Default: current thread 616 * being iterated on in the loop.616 * being iterated on in the loop. 617 617 */ 618 618 function bp_message_thread_view_link( $thread_id = 0 ) { … … 623 623 * 624 624 * @param int $thread_id Optional. ID of the thread. Default: current 625 * thread being iterated on in the loop.625 * thread being iterated on in the loop. 626 626 * @return string 627 627 */ … … 728 728 } 729 729 /** 730 * Return the URL used for marking a single message thread as read 730 * Return the URL used for marking a single message thread as read. 731 731 * 732 732 * @since BuddyPress (2.2.0) … … 849 849 * @since BuddyPress (2.2.0) 850 850 * 851 * @param int $thread_id Optional. ID of the thread. Defaults to current thread ID.851 * @param int|bool $thread_id Optional. ID of the thread. Defaults to current thread ID. 852 852 */ 853 853 function bp_message_thread_total_count( $thread_id = false ) { … … 859 859 * @since BuddyPress (2.2.0) 860 860 * 861 * @param int $thread_id Optional. ID of the thread. Defaults to 862 * current thread ID. 861 * @param int|bool $thread_id Optional. ID of the thread. 862 * Defaults to current thread ID. 863 * 863 864 * @return int 864 865 */ … … 892 893 * @since BuddyPress (2.2.0) 893 894 * 894 * @param int $thread_id Optional. ID of the thread. Default: current thread ID.895 * @param int|bool $thread_id Optional. ID of the thread. Default: current thread ID. 895 896 */ 896 897 function bp_message_thread_total_and_unread_count( $thread_id = false ) { … … 900 901 * Get markup for the current thread's total and unread count. 901 902 * 902 * @param int $thread_id Optional. ID of the thread. Default: current thread ID. 903 * @param int|bool $thread_id Optional. ID of the thread. Default: current thread ID. 904 * 903 905 * @return string Markup displaying the total and unread count for the thread. 904 906 */ … … 970 972 * @see bp_get_message_thread_avatar() for a description of arguments. 971 973 * 972 * @param array $args See {@link bp_get_message_thread_avatar()}.974 * @param array|string $args See {@link bp_get_message_thread_avatar()}. 973 975 */ 974 976 function bp_message_thread_avatar( $args = '' ) { … … 981 983 * return values. 982 984 * 983 * @param array $args {985 * @param array|string $args { 984 986 * Arguments are listed here with an explanation of their defaults. 985 987 * For more information about the arguments, see 986 988 * {@link bp_core_fetch_avatar()}. 987 * @type string $typeDefault: 'thumb'.988 * @type int|bool $widthDefault: false.989 * @type int|bool $height Default: false.990 * @type string $classDefault: 'avatar'.991 * @type string|bool $id Default: false.992 * @type string $altDefault: 'Profile picture of [display name]'.989 * @type string $type Default: 'thumb'. 990 * @type int|bool $width Default: false. 991 * @type int|bool $height Default: false. 992 * @type string $class Default: 'avatar'. 993 * @type string|bool $id Default: false. 994 * @type string $alt Default: 'Profile picture of [display name]'. 993 995 * } 994 * @return User avatar string.996 * @return string User avatar string. 995 997 */ 996 998 function bp_get_message_thread_avatar( $args = '' ) { … … 1145 1147 * Return the form action for Messages HTML forms. 1146 1148 * 1147 * @return string The form action 1149 * @return string The form action. 1148 1150 */ 1149 1151 function bp_get_messages_form_action() { … … 1154 1156 * @since BuddyPress (1.0.0) 1155 1157 * 1156 * @param string The form action.1158 * @param string $value The form action. 1157 1159 */ 1158 1160 return apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) ); … … 1828 1830 * Constructor method. 1829 1831 * 1830 * @see BP_Messages_Thread::populate() for full parameter info 1832 * @see BP_Messages_Thread::populate() for full parameter info. 1833 * 1834 * @param int $thread_id 1835 * @param string $order 1836 * @param array $args 1831 1837 */ 1832 1838 public function __construct( $thread_id = 0, $order = 'ASC', $args = array() ) { … … 1938 1944 * Initialize the messages template loop for a specific thread. 1939 1945 * 1940 * @param array $args {1946 * @param array|string $args { 1941 1947 * Array of arguments. All are optional. 1942 * @type int $thread_idID of the thread whose messages you are displaying.1943 * Default: if viewing a thread, the thread ID will be parsed from1944 * the URL (bp_action_variable( 0 )).1945 * @type string $order 'ASC' or 'DESC'. Default: 'ASC'.1946 * @type bool $update_meta_cache Whether to pre-fetch metadata for1947 * queried message items. Default: true.1948 * @type int $thread_id ID of the thread whose messages you are displaying. 1949 * Default: if viewing a thread, the thread ID will be parsed from 1950 * the URL (bp_action_variable( 0 )). 1951 * @type string $order 'ASC' or 'DESC'. Default: 'ASC'. 1952 * @type bool $update_meta_cache Whether to pre-fetch metadata for 1953 * queried message items. Default: true. 1948 1954 * } 1949 1955 * @return bool True if there are messages to display, otherwise false. … … 2254 2260 2255 2261 /** 2256 * Output the ID for message sender within a single thread 2262 * Output the ID for message sender within a single thread. 2257 2263 * 2258 2264 * @since BuddyPress (2.1.0) … … 2262 2268 } 2263 2269 /** 2264 * Return the ID for message sender within a single thread 2270 * Return the ID for message sender within a single thread. 2265 2271 * 2266 2272 * @since BuddyPress (2.1.0) … … 2288 2294 * Output the avatar for the current message sender. 2289 2295 * 2290 * @param array $args See {@link bp_get_the_thread_message_sender_avatar_thumb()}2291 * for a description.2296 * @param array|string $args See {@link bp_get_the_thread_message_sender_avatar_thumb()} 2297 * for a description. 2292 2298 */ 2293 2299 function bp_the_thread_message_sender_avatar( $args = '' ) { … … 2297 2303 * Get the avatar for the current message sender. 2298 2304 * 2299 * @param array $args {2305 * @param array|string $args { 2300 2306 * Array of arguments. See {@link bp_core_fetch_avatar()} for more 2301 2307 * complete details. All arguments are optional. 2302 * @type string $type Avatar type. Default: 'thumb'.2303 * @type int $widthAvatar width. Default: default for your $type.2304 * @type int $height Avatar height. Default: default for your $type.2308 * @type string $type Avatar type. Default: 'thumb'. 2309 * @type int $width Avatar width. Default: default for your $type. 2310 * @type int $height Avatar height. Default: default for your $type. 2305 2311 * } 2306 2312 * @return string <img> tag containing the avatar. … … 2445 2451 * @since BuddyPress (2.1.0) 2446 2452 * 2447 * @uses strtotime() To convert the message string into a usable timestamp 2453 * @uses strtotime() To convert the message string into a usable timestamp. 2454 * 2448 2455 * @return int 2449 2456 */ … … 2508 2515 * @since BuddyPress (2.2.0) 2509 2516 * 2510 * @param string $cache An empty string passed by BP_Embed::parse_oembed() for2511 * functions like this one to filter.2512 * @param int $idThe ID of the message item.2517 * @param string $cache An empty string passed by BP_Embed::parse_oembed() for 2518 * functions like this one to filter. 2519 * @param int $id The ID of the message item. 2513 2520 * @param string $cachekey The cache key generated in BP_Embed::parse_oembed(). 2521 * 2514 2522 * @return mixed The cached embeds for this message item. 2515 2523 */ … … 2525 2533 * @since BuddyPress (2.2.0) 2526 2534 * 2527 * @param string $cache An empty string passed by BP_Embed::parse_oembed() for2528 * functions like this one to filter.2535 * @param string $cache An empty string passed by BP_Embed::parse_oembed() for 2536 * functions like this one to filter. 2529 2537 * @param string $cachekey The cache key generated in BP_Embed::parse_oembed(). 2530 * @param int $id The ID of the message item. 2538 * @param int $id The ID of the message item. 2539 * 2531 2540 * @return bool True on success, false on failure. 2532 2541 */
Note: See TracChangeset
for help on using the changeset viewer.