- Timestamp:
- 09/25/2015 12:02:25 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/classes/class-bp-messages-thread.php
r10038 r10139 1 1 <?php 2 2 /** 3 * BuddyPress Messages Classes 3 * BuddyPress Messages Classes. 4 4 * 5 5 * @package BuddyPress … … 7 7 */ 8 8 9 // Exit if accessed directly 9 // Exit if accessed directly. 10 10 defined( 'ABSPATH' ) || exit; 11 11 … … 13 13 * BuddyPress Message Thread class. 14 14 * 15 * @since BuddyPress (1.0.0)15 * @since 1.0.0 16 16 */ 17 17 class BP_Messages_Thread { … … 20 20 * The message thread ID. 21 21 * 22 * @since BuddyPress (1.0.0)22 * @since 1.0.0 23 23 * @var int 24 24 */ … … 28 28 * The current messages. 29 29 * 30 * @since BuddyPress (1.0.0)30 * @since 1.0.0 31 31 * @var array 32 32 */ … … 36 36 * The current recipients in the message thread. 37 37 * 38 * @since BuddyPress (1.0.0)38 * @since 1.0.0 39 39 * @var array 40 40 */ … … 44 44 * The user IDs of all messages in the message thread. 45 45 * 46 * @since BuddyPress (1.2.0)46 * @since 1.2.0 47 47 * @var array 48 48 */ … … 52 52 * The unread count for the logged-in user. 53 53 * 54 * @since BuddyPress (1.2.0)54 * @since 1.2.0 55 55 * @var int 56 56 */ … … 60 60 * The content of the last message in this thread. 61 61 * 62 * @since BuddyPress (1.2.0)62 * @since 1.2.0 63 63 * @var string 64 64 */ … … 68 68 * The date of the last message in this thread. 69 69 * 70 * @since BuddyPress (1.2.0)70 * @since 1.2.0 71 71 * @var string 72 72 */ … … 76 76 * The ID of the last message in this thread. 77 77 * 78 * @since BuddyPress (1.2.0)78 * @since 1.2.0 79 79 * @var int 80 80 */ … … 84 84 * The subject of the last message in this thread. 85 85 * 86 * @since BuddyPress (1.2.0)86 * @since 1.2.0 87 87 * @var string 88 88 */ … … 92 92 * The user ID of the author of the last message in this thread. 93 93 * 94 * @since BuddyPress (1.2.0)94 * @since 1.2.0 95 95 * @var int 96 96 */ … … 100 100 * Sort order of the messages in this thread (ASC or DESC). 101 101 * 102 * @since BuddyPress (1.5.0)102 * @since 1.5.0 103 103 * @var string 104 104 */ … … 108 108 * Constructor. 109 109 * 110 * @since BuddyPress (1.0.0)110 * @since 1.0.0 111 111 * 112 112 * @see BP_Messages_Thread::populate() for full description of parameters. … … 127 127 * Used in constructor. 128 128 * 129 * @since BuddyPress (1.0.0)129 * @since 1.0.0 130 130 * 131 131 * @param int $thread_id The message thread ID. … … 192 192 * Fires after a BP_Messages_Thread object has been populated. 193 193 * 194 * @since BuddyPress (2.2.0)194 * @since 2.2.0 195 195 * 196 196 * @param BP_Messages_Thread $this Message thread object. … … 202 202 * Mark a thread initialized in this class as read. 203 203 * 204 * @since BuddyPress (1.0.0)204 * @since 1.0.0 205 205 * 206 206 * @see BP_Messages_Thread::mark_as_read() … … 213 213 * Mark a thread initialized in this class as unread. 214 214 * 215 * @since BuddyPress (1.0.0)215 * @since 1.0.0 216 216 * 217 217 * @see BP_Messages_Thread::mark_as_unread() … … 224 224 * Returns recipients for a message thread. 225 225 * 226 * @since BuddyPress (1.0.0)227 * @since BuddyPress (2.3.0)Added $thread_id as a parameter.226 * @since 1.0.0 227 * @since 2.3.0 Added $thread_id as a parameter. 228 228 * 229 229 * @param int $thread_id The thread ID. … … 258 258 * Filters the recipients of a message thread. 259 259 * 260 * @since BuddyPress (2.2.0)260 * @since 2.2.0 261 261 * 262 262 * @param array $recipients Array of recipient objects. … … 271 271 * Get all messages associated with a thread. 272 272 * 273 * @since BuddyPress (2.3.0)273 * @since 2.3.0 274 274 * 275 275 * @param int $thread_id The message thread ID. … … 298 298 * Static method to get message recipients by thread ID. 299 299 * 300 * @since BuddyPress (2.3.0)300 * @since 2.3.0 301 301 * 302 302 * @param int $thread_id The thread ID. … … 315 315 * has marked the thread as deleted. 316 316 * 317 * @since BuddyPress (1.0.0)317 * @since 1.0.0 318 318 * 319 319 * @param int $thread_id The message thread ID. … … 329 329 * Fires before a message thread is marked as deleted. 330 330 * 331 * @since BuddyPress (2.2.0)331 * @since 2.2.0 332 332 * 333 333 * @param int $thread_id ID of the thread being deleted. … … 355 355 * Fires before an entire message thread is deleted. 356 356 * 357 * @since BuddyPress (2.2.0)357 * @since 2.2.0 358 358 * 359 359 * @param int $thread_id ID of the thread being deleted. … … 374 374 * Fires after a message is deleted. This hook is poorly named. 375 375 * 376 * @since BuddyPress (1.0.0)376 * @since 1.0.0 377 377 * 378 378 * @param int $message_id ID of the message. … … 388 388 * Fires after a message thread is either marked as deleted or deleted. 389 389 * 390 * @since BuddyPress (2.2.0)390 * @since 2.2.0 391 391 * 392 392 * @param int $thread_id ID of the thread being deleted. … … 401 401 * Get current message threads for a user. 402 402 * 403 * @since BuddyPress (1.0.0)403 * @since 1.0.0 404 404 * 405 405 * @param array $args { … … 536 536 * Filters the results of the query for a user's message threads. 537 537 * 538 * @since BuddyPress (2.2.0)538 * @since 2.2.0 539 539 * 540 540 * @param array $value { … … 555 555 * and creating the necessary SQL clauses. 556 556 * 557 * @since BuddyPress (2.2.0)557 * @since 2.2.0 558 558 * 559 559 * @param array $meta_query An array of meta_query filters. See the … … 586 586 * Mark a thread as read. 587 587 * 588 * @since BuddyPress (1.0.0)588 * @since 1.0.0 589 589 * 590 590 * @param int $thread_id The message thread ID. … … 604 604 * Mark a thread as unread. 605 605 * 606 * @since BuddyPress (1.0.0)606 * @since 1.0.0 607 607 * 608 608 * @param int $thread_id The message thread ID. … … 622 622 * Returns the total number of message threads for a user. 623 623 * 624 * @since BuddyPress (1.0.0)624 * @since 1.0.0 625 625 * 626 626 * @param int $user_id The user ID. … … 653 653 * Determine if the logged-in user is a sender of any message in a thread. 654 654 * 655 * @since BuddyPress (1.0.0)655 * @since 1.0.0 656 656 * 657 657 * @param int $thread_id The message thread ID. … … 676 676 * Returns the userlink of the last sender in a message thread. 677 677 * 678 * @since BuddyPress (1.0.0)678 * @since 1.0.0 679 679 * 680 680 * @param int $thread_id The message thread ID. … … 697 697 * Gets the unread message count for a user. 698 698 * 699 * @since BuddyPress (1.0.0)699 * @since 1.0.0 700 700 * 701 701 * @param int $user_id The user ID. … … 723 723 * Filters a user's unread message count. 724 724 * 725 * @since BuddyPress (2.2.0)725 * @since 2.2.0 726 726 * 727 727 * @param int $unread_count Unread message count. … … 734 734 * Checks whether a user is a part of a message thread discussion. 735 735 * 736 * @since BuddyPress (1.0.0)736 * @since 1.0.0 737 737 * 738 738 * @param int $thread_id The message thread ID. … … 759 759 * Checks whether a message thread exists. 760 760 * 761 * @since BuddyPress (1.0.0)761 * @since 1.0.0 762 762 * 763 763 * @param int $thread_id The message thread ID. … … 789 789 * "X Recipients" where "X" is the number of recipients in the message thread. 790 790 * 791 * @since BuddyPress (1.0.0)791 * @since 1.0.0 792 792 * 793 793 * @param array $recipients Array containing the message recipients (array of objects). … … 819 819 * Upgrade method for the older BP message thread DB table. 820 820 * 821 * @since BuddyPress (1.2.0)821 * @since 1.2.0 822 822 * 823 823 * @todo We should remove this. No one is going to upgrade from v1.1, right?
Note: See TracChangeset
for help on using the changeset viewer.