Changeset 9862
- Timestamp:
- 05/12/2015 04:39:07 AM (10 years ago)
- Location:
- trunk/src/bp-messages
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/bp-messages/bp-messages-actions.php ¶
r9819 r9862 2 2 3 3 /** 4 * BuddyPress Messages Actions 4 * BuddyPress Messages Actions. 5 5 * 6 6 * Action functions are exactly the same as screen functions, however they do … … 103 103 * 104 104 * @return bool|null Returns false on failure. Otherwise redirects back to the 105 * message box URL.105 * message box URL. 106 106 */ 107 107 function bp_messages_action_mark_read() { … … 144 144 * 145 145 * @return bool|null Returns false on failure. Otherwise redirects back to the 146 * message box URL.146 * message box URL. 147 147 */ 148 148 function bp_messages_action_mark_unread() { … … 185 185 * 186 186 * @return bool Returns false on failure. Otherwise redirects back to the 187 * message box URL.187 * message box URL. 188 188 */ 189 189 function bp_messages_action_bulk_manage() { -
TabularUnified trunk/src/bp-messages/bp-messages-cache.php ¶
r9819 r9862 2 2 3 3 /** 4 * BuddyPress Messages Caching 4 * BuddyPress Messages Caching. 5 5 * 6 6 * Caching functions handle the clearing of cached objects and pages on specific … … 22 22 * @since BuddyPress (2.2.0) 23 23 * 24 * @param int|str |array$message_ids Accepts a single message_id, or a25 * comma-separated list or array of message ids.24 * @param int|string|array|bool $message_ids Accepts a single message_id, or a 25 * comma-separated list or array of message ids. 26 26 */ 27 27 function bp_messages_update_meta_cache( $message_ids = false ) { … … 72 72 * @since BuddyPress (2.0.0) 73 73 * 74 * @param int|array $thread_ids If single thread, the thread ID. Otherwise, an75 * array of thread IDs74 * @param int|array $thread_ids If single thread, the thread ID. 75 * Otherwise, an array of thread IDs. 76 76 */ 77 77 function bp_messages_clear_cache_on_message_delete( $thread_ids ) { … … 93 93 * 94 94 * @since BuddyPress (2.0.0) 95 * 96 * @param BP_Messages_Notice $notice 95 97 */ 96 98 function bp_notices_clear_cache( $notice ) { -
TabularUnified trunk/src/bp-messages/bp-messages-filters.php ¶
r9819 r9862 2 2 3 3 /** 4 * BuddyPress Messages Filters 4 * BuddyPress Messages Filters. 5 5 * 6 * Apply WordPress defined filters to private messages 6 * Apply WordPress defined filters to private messages. 7 7 * 8 8 * @package BuddyPress -
TabularUnified trunk/src/bp-messages/bp-messages-functions.php ¶
r9845 r9862 2 2 3 3 /** 4 * BuddyPress Messages Functions 4 * BuddyPress Messages Functions. 5 5 * 6 6 * Business functions are where all the magic happens in BuddyPress. They will … … 19 19 * Create a new message. 20 20 * 21 * @param array $args {21 * @param array|string $args { 22 22 * Array of arguments. 23 * @type int $sender_id Optional. ID of the user who is sending the 24 * message. Default: ID of the logged-in user. 25 * @type int $thread_id Optional. ID of the parent thread. Leave blank to 26 * create a new thread for the message. 27 * @type array $recipients IDs or usernames of message recipients. If this 28 * is an existing thread, it is unnecessary to pass a $recipients 29 * argument - existing thread recipients will be assumed. 30 * @type string $subject Optional. Subject line for the message. For 31 * existing threads, the existing subject will be used. For new 32 * threads, 'No Subject' will be used if no $subject is provided. 33 * @type string $content Content of the message. Cannot be empty. 34 * @type string $date_sent Date sent, in 'Y-m-d H:i:s' format. Default: 35 * current date/time. 23 * @type int $sender_id Optional. ID of the user who is sending the 24 * message. Default: ID of the logged-in user. 25 * @type int $thread_id Optional. ID of the parent thread. Leave blank to 26 * create a new thread for the message. 27 * @type array $recipients IDs or usernames of message recipients. If this 28 * is an existing thread, it is unnecessary to pass a $recipients 29 * argument - existing thread recipients will be assumed. 30 * @type string $subject Optional. Subject line for the message. For 31 * existing threads, the existing subject will be used. For new 32 * threads, 'No Subject' will be used if no $subject is provided. 33 * @type string $content Content of the message. Cannot be empty. 34 * @type string $date_sent Date sent, in 'Y-m-d H:i:s' format. Default: current date/time. 36 35 * } 37 36 * @return int|bool ID of the message thread on success, false on failure. … … 174 173 * @param string $subject Subject of the notice. 175 174 * @param string $message Content of the notice. 175 * 176 176 * @return bool True on success, false on failure. 177 177 */ … … 207 207 * 208 208 * @param int|array Thread ID or array of thread IDs. 209 * 209 210 * @return bool True on success, false on failure. 210 211 */ … … 258 259 * 259 260 * @param int $thread_id ID of the thread. 260 * @param int $user_id Optional. ID of the user. Default: ID of the logged-in261 * user.261 * @param int $user_id Optional. ID of the user. Default: ID of the logged-in user. 262 * 262 263 * @return int|null Message ID if the user has access, otherwise null. 263 264 */ … … 300 301 * 301 302 * @param string $recipients Comma-separated list of recipient usernames. 302 * @param string $subject Subject of the message.303 * @param string $content Content of the message.303 * @param string $subject Subject of the message. 304 * @param string $content Content of the message. 304 305 */ 305 306 function messages_add_callback_values( $recipients, $subject, $content ) { … … 323 324 * Get the unread messages count for a user. 324 325 * 325 * @param int $user_id Optional. ID of the user. Default: ID of the 326 * logged-in user.326 * @param int $user_id Optional. ID of the user. Default: ID of the logged-in user. 327 * 327 328 * @return int 328 329 */ … … 338 339 * Check whether a user is the sender of a message. 339 340 * 340 * @param int $user_id ID of the user.341 * @param int $user_id ID of the user. 341 342 * @param int $message_id ID of the message. 343 * 342 344 * @return int|null Returns the ID of the message if the user is the 343 * sender, otherwise null.345 * sender, otherwise null. 344 346 */ 345 347 function messages_is_user_sender( $user_id, $message_id ) { … … 351 353 * 352 354 * @param int $message_id ID of the message. 355 * 353 356 * @return int|null The ID of the sender if found, otherwise null. 354 357 */ … … 361 364 * 362 365 * @param int $thread_id ID of the thread. 366 * 363 367 * @return int|null The message thread ID on success, null on failure. 364 368 */ … … 393 397 * 394 398 * @see delete_metadata() for full documentation excluding $meta_type variable. 399 * 400 * @param int $message_id ID of the message to have meta deleted for. 401 * @param string|bool $meta_key Meta key to delete. Default false. 402 * @param string|bool $meta_value Meta value to delete. Default false. 403 * @param bool $delete_all Whether or not to delete all meta data. 404 * 405 * @return bool 395 406 */ 396 407 function bp_messages_delete_meta( $message_id, $meta_key = false, $meta_value = false, $delete_all = false ) { … … 429 440 * 430 441 * @see get_metadata() for full documentation excluding $meta_type variable. 442 * 443 * @param int $message_id ID of the message to retrieve meta for. 444 * @param string $meta_key Meta key to retrieve. Default empty string. 445 * @param bool $single Whether or not to fetch all or a single value. 446 * 447 * @return mixed 431 448 */ 432 449 function bp_messages_get_meta( $message_id, $meta_key = '', $single = true ) { … … 444 461 * 445 462 * @see update_metadata() for full documentation excluding $meta_type variable. 463 * 464 * @param int $message_id ID of the message to have meta deleted for. 465 * @param string|bool $meta_key Meta key to update. 466 * @param string|bool $meta_value Meta value to update. 467 * @param string $prev_value If specified, only update existing metadata entries with 468 * the specified value. Otherwise, update all entries. 469 * 470 * @return mixed 446 471 */ 447 472 function bp_messages_update_meta( $message_id, $meta_key, $meta_value, $prev_value = '' ) { … … 459 484 * 460 485 * @see add_metadata() for full documentation excluding $meta_type variable. 486 * 487 * @param int $message_id ID of the message to have meta deleted for. 488 * @param string|bool $meta_key Meta key to update. 489 * @param string|bool $meta_value Meta value to update. 490 * @param bool $unique Whether the specified metadata key should be 491 * unique for the object. If true, and the object 492 * already has a value for the specified metadata key, 493 * no change will be made. 494 * @return mixed 461 495 */ 462 496 function bp_messages_add_meta( $message_id, $meta_key, $meta_value, $unique = false ) { -
TabularUnified trunk/src/bp-messages/bp-messages-loader.php ¶
r9846 r9862 4 4 * BuddyPress Messages Loader 5 5 * 6 * A private messages component, for users to send messages to each other 6 * A private messages component, for users to send messages to each other. 7 7 * 8 8 * @package BuddyPress … … 126 126 * 127 127 * @param array $main_nav See {BP_Component::setup_nav()} for details. 128 * @param array $sub_nav See {BP_Component::setup_nav()} for details.128 * @param array $sub_nav See {BP_Component::setup_nav()} for details. 129 129 */ 130 130 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { … … 224 224 * 225 225 * @param array $wp_admin_nav See {BP_Component::setup_admin_bar()} 226 * for details.226 * for details. 227 227 */ 228 228 public function setup_admin_bar( $wp_admin_nav = array() ) { -
TabularUnified trunk/src/bp-messages/bp-messages-notifications.php ¶
r9819 r9862 20 20 * @param array|BP_Messages_Message $raw_args { 21 21 * Array of arguments. Also accepts a BP_Messages_Message object. 22 * @type array $recipientsUser IDs of recipients.22 * @type array $recipients User IDs of recipients. 23 23 * @type string $email_subject Subject line of message. 24 24 * @type string $email_content Content of message. 25 * @type int $sender_idUser ID of sender.25 * @type int $sender_id User ID of sender. 26 26 * } 27 27 */ … … 154 154 * @since BuddyPress (1.0.0) 155 155 * 156 * @param string $action The kind of notification being rendered. 157 * @param int $item_id The primary item id. 158 * @param int $secondary_item_id The secondary item id. 159 * @param int $total_items The total number of messaging-related notifications 160 * waiting for the user 161 * @param string $format Return value format. 'string' for BuddyBar-compatible 162 * notifications; 'array' for WP Toolbar. Default: 'string'. 156 * @param string $action The kind of notification being rendered. 157 * @param int $item_id The primary item id. 158 * @param int $secondary_item_id The secondary item id. 159 * @param int $total_items The total number of messaging-related notifications 160 * waiting for the user. 161 * @param string $format Return value format. 'string' for BuddyBar-compatible 162 * notifications; 'array' for WP Toolbar. Default: 'string'. 163 * 163 164 * @return string|array Formatted notifications. 164 165 */ … … 202 203 * 203 204 * This is a dynamic filter. Possible filter names are: 204 * - 'bp_messages_multiple_new_message_notification' 205 * - 'bp_messages_single_new_message_notification' 205 * - 'bp_messages_multiple_new_message_notification'. 206 * - 'bp_messages_single_new_message_notification'. 206 207 * 207 208 * @param string $retval Notification text. … … 298 299 * @since BuddyPress (2.0.0) 299 300 * 300 * @param int $ message_idID of the thread.301 * @param int $thread_id ID of the thread. 301 302 * @param array $message_ids IDs of the messages. 302 303 */ -
TabularUnified trunk/src/bp-messages/bp-messages-screens.php ¶
r9819 r9862 2 2 3 3 /** 4 * BuddyPress Messages Screens 4 * BuddyPress Messages Screens. 5 5 * 6 6 * Screen functions are the controllers of BuddyPress. They will execute when -
TabularUnified 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 */ -
TabularUnified trunk/src/bp-messages/bp-messages-widgets.php ¶
r9819 r9862 1 1 <?php 2 2 /** 3 * BuddyPress Messages Widgets 3 * BuddyPress Messages Widgets. 4 4 * 5 5 * @package BuddyPress … … 45 45 * @see WP_Widget::widget() for a description of parameters. 46 46 * 47 * @param array $args See {@WP_Widget::widget()}.48 * @param array $ argsSee {@WP_Widget::widget()}.47 * @param array $args See {@WP_Widget::widget()}. 48 * @param array $instance See {@WP_Widget::widget()}. 49 49 */ 50 50 public function widget( $args, $instance ) { … … 96 96 * @param array $new_instance See {@WP_Widget::update()}. 97 97 * @param array $old_instance See {@WP_Widget::update()}. 98 * 98 99 * @return array $instance See {@WP_Widget::update()}. 99 100 */ … … 110 111 * 111 112 * @param array $instance See {@WP_Widget::form()}. 113 * 114 * @return string Widget form output. 112 115 */ 113 116 public function form( $instance ) { -
TabularUnified trunk/src/bp-messages/classes/class-bp-messages-message.php ¶
r9819 r9862 101 101 * 102 102 * @return int|bool ID of the newly created message on success, false 103 * on failure.103 * on failure. 104 104 */ 105 105 public function send() { … … 121 121 * @since BuddyPress (1.0.0) 122 122 * 123 * @param BP_Messages_Message Current instance of the message item being saved. Passed by reference.123 * @param BP_Messages_Message $this Current instance of the message item being saved. Passed by reference. 124 124 */ 125 125 do_action_ref_array( 'messages_message_before_save', array( &$this ) ); … … 167 167 * @since BuddyPress (1.0.0) 168 168 * 169 * @param BP_Messages_Message Current instance of the message item being saved. Passed by reference.169 * @param BP_Messages_Message $this Current instance of the message item being saved. Passed by reference. 170 170 */ 171 171 do_action_ref_array( 'messages_message_after_save', array( &$this ) ); … … 193 193 * 194 194 * @param array $recipient_usernames Usernames of recipients. 195 * 195 196 * @return array 196 197 */ … … 214 215 * 215 216 * @param int $thread_id ID of the thread. 217 * 216 218 * @return int|null ID of the message if found, otherwise null. 217 219 */ … … 227 229 * Check whether a user is the sender of a message. 228 230 * 229 * @param int $user_id ID of the user.231 * @param int $user_id ID of the user. 230 232 * @param int $message_id ID of the message. 233 * 231 234 * @return int|null Returns the ID of the message if the user is the 232 * sender, otherwise null.235 * sender, otherwise null. 233 236 */ 234 237 public static function is_user_sender( $user_id, $message_id ) { … … 244 247 * 245 248 * @param int $message_id ID of the message. 249 * 246 250 * @return int|null The ID of the sender if found, otherwise null. 247 251 */ -
TabularUnified trunk/src/bp-messages/classes/class-bp-messages-notice.php ¶
r9819 r9862 110 110 * @since BuddyPress (1.0.0) 111 111 * 112 * @param BP_Messages_Notice Current instance of the message notice item being saved. Passed by reference.112 * @param BP_Messages_Notice $this Current instance of the message notice item being saved. Passed by reference. 113 113 */ 114 114 do_action_ref_array( 'messages_notice_before_save', array( &$this ) ); … … 138 138 * @since BuddyPress (1.0.0) 139 139 * 140 * @param BP_Messages_Notice Current instance of the message item being saved. Passed by reference.140 * @param BP_Messages_Notice $this Current instance of the message item being saved. Passed by reference. 141 141 */ 142 142 do_action_ref_array( 'messages_notice_after_save', array( &$this ) ); … … 184 184 * @since BuddyPress (1.0.0) 185 185 * 186 * @param BP_Messages_Notice Current instance of the message notice item being deleted.186 * @param BP_Messages_Notice $this Current instance of the message notice item being deleted. 187 187 */ 188 188 do_action( 'messages_notice_before_delete', $this ); … … 203 203 * Pulls up a list of notices. 204 204 * 205 * To get all notices, pass a value of -1 to pag_num 205 * To get all notices, pass a value of -1 to pag_num. 206 206 * 207 207 * @since BuddyPress (1.0.0) … … 209 209 * @param array $args { 210 210 * Array of parameters. 211 * @type int $pag_num Number of notices per page. Defaults to 20.211 * @type int $pag_num Number of notices per page. Defaults to 20. 212 212 * @type int $pag_page The page number. Defaults to 1. 213 213 * } … … 256 256 * @since BuddyPress (1.0.0) 257 257 * 258 * @return object The BP_Messages_Notice object 258 * @return object The BP_Messages_Notice object. 259 259 */ 260 260 public static function get_active() { -
TabularUnified trunk/src/bp-messages/classes/class-bp_messages-thread.php ¶
r9819 r9862 57 57 58 58 /** 59 * The content of the last message in this thread 59 * The content of the last message in this thread. 60 60 * 61 61 * @since BuddyPress (1.2.0) … … 65 65 66 66 /** 67 * The date of the last message in this thread 67 * The date of the last message in this thread. 68 68 * 69 69 * @since BuddyPress (1.2.0) … … 73 73 74 74 /** 75 * The ID of the last message in this thread 75 * The ID of the last message in this thread. 76 76 * 77 77 * @since BuddyPress (1.2.0) … … 81 81 82 82 /** 83 * The subject of the last message in this thread 83 * The subject of the last message in this thread. 84 84 * 85 85 * @since BuddyPress (1.2.0) … … 89 89 90 90 /** 91 * The user ID of the author of the last message in this thread 91 * The user ID of the author of the last message in this thread. 92 92 * 93 93 * @since BuddyPress (1.2.0) … … 109 109 * @since BuddyPress (1.0.0) 110 110 * 111 * @see BP_Messages_Thread::populate() for full description of parameters 111 * @see BP_Messages_Thread::populate() for full description of parameters. 112 * 113 * @param bool $thread_id 114 * @param string $order 115 * @param array $args 112 116 */ 113 117 public function __construct( $thread_id = false, $order = 'ASC', $args = array() ) { … … 124 128 * @since BuddyPress (1.0.0) 125 129 * 126 * @param int $thread_id The message thread ID.127 * @param string $order The order to sort the messages. Either 'ASC' or 'DESC'.130 * @param int $thread_id The message thread ID. 131 * @param string $order The order to sort the messages. Either 'ASC' or 'DESC'. 128 132 * @param array $args { 129 133 * Array of arguments. 130 134 * @type bool $update_meta_cache Whether to pre-fetch metadata for 131 * queried message items. Default: true.135 * queried message items. Default: true. 132 136 * } 133 137 * @return bool False on failure. … … 182 186 * @since BuddyPress (2.2.0) 183 187 * 184 * @param BP_Messages_Thread Message thread object.188 * @param BP_Messages_Thread $this Message thread object. 185 189 */ 186 190 do_action( 'bp_messages_thread_post_populate', $this ); … … 215 219 * @since BuddyPress (2.3.0) Added $thread_id as a parameter. 216 220 * 217 * @param int $thread_id The thread ID 221 * @param int $thread_id The thread ID. 222 * 218 223 * @return array 219 224 */ … … 257 262 * @since BuddyPress (2.3.0) 258 263 * 259 * @param int $thread_id The message thread ID 264 * @param int $thread_id The message thread ID. 265 * 260 266 * @return array 261 267 */ … … 282 288 * @since BuddyPress (2.3.0) 283 289 * 284 * @param int $thread_id The thread ID 290 * @param int $thread_id The thread ID. 291 * 285 292 * @return array 286 293 */ … … 298 305 * @since BuddyPress (1.0.0) 299 306 * 300 * @param int $thread_id The message thread ID 307 * @param int $thread_id The message thread ID. 308 * 301 309 * @return bool 302 310 */ … … 353 361 * @since BuddyPress (1.0.0) 354 362 * 355 * @param int $message_id ID of the message 363 * @param int $message_id ID of the message. 356 364 */ 357 365 do_action( 'messages_thread_deleted_thread', $message_id ); … … 363 371 364 372 /** 365 * Fires after a message thread is either marked as deleted or deleted 373 * Fires after a message thread is either marked as deleted or deleted. 366 374 * 367 375 * @since BuddyPress (2.2.0) … … 521 529 * 522 530 * @param array $meta_query An array of meta_query filters. See the 523 * documentation for WP_Meta_Query for details. 531 * documentation for WP_Meta_Query for details. 532 * 524 533 * @return array $sql_array 'join' and 'where' clauses. 525 534 */ … … 587 596 * 588 597 * @param int $user_id The user ID. 589 * @param string $box The type of mailbox to get. Either 'inbox' or 'sentbox'.590 * Defaults to 'inbox'.591 * @param string $type The type of messages to get. Either 'all' or 'unread'592 * or 'read'. Defaults to 'all'.598 * @param string $box The type of mailbox to get. Either 'inbox' or 'sentbox'. 599 * Defaults to 'inbox'. 600 * @param string $type The type of messages to get. Either 'all' or 'unread'. 601 * or 'read'. Defaults to 'all'. 593 602 * @return int 594 603 */ … … 616 625 * 617 626 * @param int $thread_id The message thread ID. 627 * 618 628 * @return bool 619 629 */ … … 638 648 * 639 649 * @param int $thread_id The message thread ID. 650 * 640 651 * @return string|bool The user link on success. Boolean false on failure. 641 652 */ … … 658 669 * 659 670 * @param int $user_id The user ID. 671 * 660 672 * @return int 661 673 */ … … 694 706 * 695 707 * @param int $thread_id The message thread ID. 696 * @param int $user_id The user ID. 697 * @return int|null The recorded recipient ID on success, null on failure 708 * @param int $user_id The user ID. 709 * 710 * @return int|null The recorded recipient ID on success, null on failure. 698 711 */ 699 712 public static function check_access( $thread_id, $user_id = 0 ) { … … 717 730 * 718 731 * @param int $thread_id The message thread ID. 719 * @return int|null The message thread ID on success, null on failure 732 * 733 * @return int|null The message thread ID on success, null on failure. 720 734 */ 721 735 public static function is_valid( $thread_id = 0 ) { … … 745 759 * 746 760 * @param array $recipients Array containing the message recipients (array of objects). 761 * 747 762 * @return string 748 763 */
Note: See TracChangeset
for help on using the changeset viewer.