Skip to:
Content

BuddyPress.org

Changeset 9862


Ignore:
Timestamp:
05/12/2015 04:39:07 AM (10 years ago)
Author:
tw2113
Message:

First pass at messages component docs cleanup.

See #6403.

Location:
trunk/src/bp-messages
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/bp-messages/bp-messages-actions.php

    r9819 r9862  
    22
    33/**
    4  * BuddyPress Messages Actions
     4 * BuddyPress Messages Actions.
    55 *
    66 * Action functions are exactly the same as screen functions, however they do
     
    103103 *
    104104 * @return bool|null Returns false on failure. Otherwise redirects back to the
    105  *         message box URL.
     105 *                   message box URL.
    106106 */
    107107function bp_messages_action_mark_read() {
     
    144144 *
    145145 * @return bool|null Returns false on failure. Otherwise redirects back to the
    146  *         message box URL.
     146 *                   message box URL.
    147147 */
    148148function bp_messages_action_mark_unread() {
     
    185185 *
    186186 * @return bool Returns false on failure. Otherwise redirects back to the
    187  *         message box URL.
     187 *              message box URL.
    188188 */
    189189function bp_messages_action_bulk_manage() {
  • TabularUnified trunk/src/bp-messages/bp-messages-cache.php

    r9819 r9862  
    22
    33/**
    4  * BuddyPress Messages Caching
     4 * BuddyPress Messages Caching.
    55 *
    66 * Caching functions handle the clearing of cached objects and pages on specific
     
    2222 * @since BuddyPress (2.2.0)
    2323 *
    24  * @param int|str|array $message_ids Accepts a single message_id, or a
    25  *        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.
    2626 */
    2727function bp_messages_update_meta_cache( $message_ids = false ) {
     
    7272 * @since BuddyPress (2.0.0)
    7373 *
    74  * @param int|array $thread_ids If single thread, the thread ID. Otherwise, an
    75  *  array of thread IDs
     74 * @param int|array $thread_ids If single thread, the thread ID.
     75 *                              Otherwise, an array of thread IDs.
    7676 */
    7777function bp_messages_clear_cache_on_message_delete( $thread_ids ) {
     
    9393 *
    9494 * @since BuddyPress (2.0.0)
     95 *
     96 * @param BP_Messages_Notice $notice
    9597 */
    9698function bp_notices_clear_cache( $notice ) {
  • TabularUnified trunk/src/bp-messages/bp-messages-filters.php

    r9819 r9862  
    22
    33/**
    4  * BuddyPress Messages Filters
     4 * BuddyPress Messages Filters.
    55 *
    6  * Apply WordPress defined filters to private messages
     6 * Apply WordPress defined filters to private messages.
    77 *
    88 * @package BuddyPress
  • TabularUnified trunk/src/bp-messages/bp-messages-functions.php

    r9845 r9862  
    22
    33/**
    4  * BuddyPress Messages Functions
     4 * BuddyPress Messages Functions.
    55 *
    66 * Business functions are where all the magic happens in BuddyPress. They will
     
    1919 * Create a new message.
    2020 *
    21  * @param array $args {
     21 * @param array|string $args {
    2222 *     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.
    3635 * }
    3736 * @return int|bool ID of the message thread on success, false on failure.
     
    174173 * @param string $subject Subject of the notice.
    175174 * @param string $message Content of the notice.
     175 *
    176176 * @return bool True on success, false on failure.
    177177 */
     
    207207 *
    208208 * @param int|array Thread ID or array of thread IDs.
     209 *
    209210 * @return bool True on success, false on failure.
    210211 */
     
    258259 *
    259260 * @param int $thread_id ID of the thread.
    260  * @param int $user_id Optional. ID of the user. Default: ID of the logged-in
    261  *        user.
     261 * @param int $user_id   Optional. ID of the user. Default: ID of the logged-in user.
     262 *
    262263 * @return int|null Message ID if the user has access, otherwise null.
    263264 */
     
    300301 *
    301302 * @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.
    304305 */
    305306function messages_add_callback_values( $recipients, $subject, $content ) {
     
    323324 * Get the unread messages count for a user.
    324325 *
    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 *
    327328 * @return int
    328329 */
     
    338339 * Check whether a user is the sender of a message.
    339340 *
    340  * @param int $user_id ID of the user.
     341 * @param int $user_id    ID of the user.
    341342 * @param int $message_id ID of the message.
     343 *
    342344 * @return int|null Returns the ID of the message if the user is the
    343  *         sender, otherwise null.
     345 *                  sender, otherwise null.
    344346 */
    345347function messages_is_user_sender( $user_id, $message_id ) {
     
    351353 *
    352354 * @param int $message_id ID of the message.
     355 *
    353356 * @return int|null The ID of the sender if found, otherwise null.
    354357 */
     
    361364 *
    362365 * @param int $thread_id ID of the thread.
     366 *
    363367 * @return int|null The message thread ID on success, null on failure.
    364368 */
     
    393397 *
    394398 * @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
    395406 */
    396407function bp_messages_delete_meta( $message_id, $meta_key = false, $meta_value = false, $delete_all = false ) {
     
    429440 *
    430441 * @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
    431448 */
    432449function bp_messages_get_meta( $message_id, $meta_key = '', $single = true ) {
     
    444461 *
    445462 * @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
    446471 */
    447472function bp_messages_update_meta( $message_id, $meta_key, $meta_value, $prev_value = '' ) {
     
    459484 *
    460485 * @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
    461495 */
    462496function bp_messages_add_meta( $message_id, $meta_key, $meta_value, $unique = false ) {
  • TabularUnified trunk/src/bp-messages/bp-messages-loader.php

    r9846 r9862  
    44 * BuddyPress Messages Loader
    55 *
    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.
    77 *
    88 * @package BuddyPress
     
    126126     *
    127127     * @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.
    129129     */
    130130    public function setup_nav( $main_nav = array(), $sub_nav = array() ) {
     
    224224     *
    225225     * @param array $wp_admin_nav See {BP_Component::setup_admin_bar()}
    226      *        for details.
     226     *                            for details.
    227227     */
    228228    public function setup_admin_bar( $wp_admin_nav = array() ) {
  • TabularUnified trunk/src/bp-messages/bp-messages-notifications.php

    r9819 r9862  
    2020 * @param array|BP_Messages_Message $raw_args {
    2121 *     Array of arguments. Also accepts a BP_Messages_Message object.
    22  *     @type array $recipients User IDs of recipients.
     22 *     @type array  $recipients    User IDs of recipients.
    2323 *     @type string $email_subject Subject line of message.
    2424 *     @type string $email_content Content of message.
    25  *     @type int $sender_id User ID of sender.
     25 *     @type int    $sender_id    User ID of sender.
    2626 * }
    2727 */
     
    154154 * @since BuddyPress (1.0.0)
    155155 *
    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 *
    163164 * @return string|array Formatted notifications.
    164165 */
     
    202203         *
    203204         * 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'.
    206207         *
    207208         * @param string $retval            Notification text.
     
    298299 * @since BuddyPress (2.0.0)
    299300 *
    300  * @param int   $message_id  ID of the thread.
     301 * @param int   $thread_id   ID of the thread.
    301302 * @param array $message_ids IDs of the messages.
    302303 */
  • TabularUnified trunk/src/bp-messages/bp-messages-screens.php

    r9819 r9862  
    22
    33/**
    4  * BuddyPress Messages Screens
     4 * BuddyPress Messages Screens.
    55 *
    66 * Screen functions are the controllers of BuddyPress. They will execute when
  • TabularUnified trunk/src/bp-messages/bp-messages-template.php

    r9846 r9862  
    22
    33/**
    4  * BuddyPress Messages Template Tags
     4 * BuddyPress Messages Template Tags.
    55 *
    66 * @package BuddyPress
     
    7373
    7474    /**
    75      * The current "box" view ('notices', 'sentbox', 'inbox')
     75     * The current "box" view ('notices', 'sentbox', 'inbox').
    7676     *
    7777     * @access public
     
    370370 * @global BP_Messages_Box_Template $messages_template
    371371 *
    372  * @param array $args {
     372 * @param array|string $args {
    373373 *     Array of arguments. All are optional.
    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.
     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.
    380380 *     @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_query Meta query arguments. Only applicable if $box is
    385  *           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.
    386386 * }
    387387 * @return bool True if there are threads to display, otherwise false.
     
    524524
    525525/**
    526  * Output the thread's last message content
     526 * Output the thread's last message content.
    527527 *
    528528 * When viewing your Inbox, the last message is the most recent message in
     
    538538}
    539539    /**
    540      * Return the thread's last message content
     540     * Return the thread's last message content.
    541541     *
    542542     * When viewing your Inbox, the last message is the most recent message in
     
    547547     *
    548548     * @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.
    550550     */
    551551    function bp_get_message_thread_content() {
     
    614614 *
    615615 * @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.
    617617 */
    618618function bp_message_thread_view_link( $thread_id = 0 ) {
     
    623623     *
    624624     * @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.
    626626     * @return string
    627627     */
     
    728728}
    729729    /**
    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.
    731731     *
    732732     * @since BuddyPress (2.2.0)
     
    849849 * @since BuddyPress (2.2.0)
    850850 *
    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.
    852852 */
    853853function bp_message_thread_total_count( $thread_id = false ) {
     
    859859     * @since BuddyPress (2.2.0)
    860860     *
    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     *
    863864     * @return int
    864865     */
     
    892893 * @since BuddyPress (2.2.0)
    893894 *
    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.
    895896 */
    896897function bp_message_thread_total_and_unread_count( $thread_id = false ) {
     
    900901     * Get markup for the current thread's total and unread count.
    901902     *
    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     *
    903905     * @return string Markup displaying the total and unread count for the thread.
    904906     */
     
    970972 * @see bp_get_message_thread_avatar() for a description of arguments.
    971973 *
    972  * @param array $args See {@link bp_get_message_thread_avatar()}.
     974 * @param array|string $args See {@link bp_get_message_thread_avatar()}.
    973975 */
    974976function bp_message_thread_avatar( $args = '' ) {
     
    981983     *      return values.
    982984     *
    983      * @param array $args {
     985     * @param array|string $args {
    984986     *     Arguments are listed here with an explanation of their defaults.
    985987     *     For more information about the arguments, see
    986988     *     {@link bp_core_fetch_avatar()}.
    987      *     @type string $type Default: 'thumb'.
    988      *     @type int|bool $width Default: false.
    989      *     @type int|bool $height Default: false.
    990      *     @type string $class Default: 'avatar'.
    991      *     @type string|bool $id Default: false.
    992      *     @type string $alt Default: '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]'.
    993995     * }
    994      * @return User avatar string.
     996     * @return string User avatar string.
    995997     */
    996998    function bp_get_message_thread_avatar( $args = '' ) {
     
    11451147     * Return the form action for Messages HTML forms.
    11461148     *
    1147      * @return string The form action
     1149     * @return string The form action.
    11481150     */
    11491151    function bp_get_messages_form_action() {
     
    11541156         * @since BuddyPress (1.0.0)
    11551157         *
    1156          * @param string The form action.
     1158         * @param string $value The form action.
    11571159         */
    11581160        return apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) );
     
    18281830     * Constructor method.
    18291831     *
    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
    18311837     */
    18321838    public function __construct( $thread_id = 0, $order = 'ASC', $args = array() ) {
     
    19381944 * Initialize the messages template loop for a specific thread.
    19391945 *
    1940  * @param array $args {
     1946 * @param array|string $args {
    19411947 *     Array of arguments. All are optional.
    1942  *     @type int $thread_id ID of the thread whose messages you are displaying.
    1943  *           Default: if viewing a thread, the thread ID will be parsed from
    1944  *           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 for
    1947  *           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.
    19481954 * }
    19491955 * @return bool True if there are messages to display, otherwise false.
     
    22542260
    22552261/**
    2256  * Output the ID for message sender within a single thread
     2262 * Output the ID for message sender within a single thread.
    22572263 *
    22582264 * @since BuddyPress (2.1.0)
     
    22622268}
    22632269    /**
    2264      * Return the ID for message sender within a single thread
     2270     * Return the ID for message sender within a single thread.
    22652271     *
    22662272     * @since BuddyPress (2.1.0)
     
    22882294 * Output the avatar for the current message sender.
    22892295 *
    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.
    22922298 */
    22932299function bp_the_thread_message_sender_avatar( $args = '' ) {
     
    22972303     * Get the avatar for the current message sender.
    22982304     *
    2299      * @param array $args {
     2305     * @param array|string $args {
    23002306     *     Array of arguments. See {@link bp_core_fetch_avatar()} for more
    23012307     *     complete details. All arguments are optional.
    2302      *     @type string $type Avatar type. Default: 'thumb'.
    2303      *     @type int $width Avatar 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.
    23052311     * }
    23062312     * @return string <img> tag containing the avatar.
     
    24452451     * @since BuddyPress (2.1.0)
    24462452     *
    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     *
    24482455     * @return int
    24492456     */
     
    25082515 * @since BuddyPress (2.2.0)
    25092516 *
    2510  * @param string $cache An empty string passed by BP_Embed::parse_oembed() for
    2511  *        functions like this one to filter.
    2512  * @param int $id The 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.
    25132520 * @param string $cachekey The cache key generated in BP_Embed::parse_oembed().
     2521 *
    25142522 * @return mixed The cached embeds for this message item.
    25152523 */
     
    25252533 * @since BuddyPress (2.2.0)
    25262534 *
    2527  * @param string $cache An empty string passed by BP_Embed::parse_oembed() for
    2528  *        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.
    25292537 * @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 *
    25312540 * @return bool True on success, false on failure.
    25322541 */
  • TabularUnified trunk/src/bp-messages/bp-messages-widgets.php

    r9819 r9862  
    11<?php
    22/**
    3  * BuddyPress Messages Widgets
     3 * BuddyPress Messages Widgets.
    44 *
    55 * @package BuddyPress
     
    4545     * @see WP_Widget::widget() for a description of parameters.
    4646     *
    47      * @param array $args See {@WP_Widget::widget()}.
    48      * @param array $args See {@WP_Widget::widget()}.
     47     * @param array $args     See {@WP_Widget::widget()}.
     48     * @param array $instance See {@WP_Widget::widget()}.
    4949     */
    5050    public function widget( $args, $instance ) {
     
    9696     * @param array $new_instance See {@WP_Widget::update()}.
    9797     * @param array $old_instance See {@WP_Widget::update()}.
     98     *
    9899     * @return array $instance See {@WP_Widget::update()}.
    99100     */
     
    110111     *
    111112     * @param array $instance See {@WP_Widget::form()}.
     113     *
     114     * @return string Widget form output.
    112115     */
    113116    public function form( $instance ) {
  • TabularUnified trunk/src/bp-messages/classes/class-bp-messages-message.php

    r9819 r9862  
    101101     *
    102102     * @return int|bool ID of the newly created message on success, false
    103      *         on failure.
     103     *                  on failure.
    104104     */
    105105    public function send() {
     
    121121         * @since BuddyPress (1.0.0)
    122122         *
    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.
    124124         */
    125125        do_action_ref_array( 'messages_message_before_save', array( &$this ) );
     
    167167         * @since BuddyPress (1.0.0)
    168168         *
    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.
    170170         */
    171171        do_action_ref_array( 'messages_message_after_save', array( &$this ) );
     
    193193     *
    194194     * @param array $recipient_usernames Usernames of recipients.
     195     *
    195196     * @return array
    196197     */
     
    214215     *
    215216     * @param int $thread_id ID of the thread.
     217     *
    216218     * @return int|null ID of the message if found, otherwise null.
    217219     */
     
    227229     * Check whether a user is the sender of a message.
    228230     *
    229      * @param int $user_id ID of the user.
     231     * @param int $user_id    ID of the user.
    230232     * @param int $message_id ID of the message.
     233     *
    231234     * @return int|null Returns the ID of the message if the user is the
    232      *         sender, otherwise null.
     235     *                  sender, otherwise null.
    233236     */
    234237    public static function is_user_sender( $user_id, $message_id ) {
     
    244247     *
    245248     * @param int $message_id ID of the message.
     249     *
    246250     * @return int|null The ID of the sender if found, otherwise null.
    247251     */
  • TabularUnified trunk/src/bp-messages/classes/class-bp-messages-notice.php

    r9819 r9862  
    110110         * @since BuddyPress (1.0.0)
    111111         *
    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.
    113113         */
    114114        do_action_ref_array( 'messages_notice_before_save', array( &$this ) );
     
    138138         * @since BuddyPress (1.0.0)
    139139         *
    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.
    141141         */
    142142        do_action_ref_array( 'messages_notice_after_save', array( &$this ) );
     
    184184         * @since BuddyPress (1.0.0)
    185185         *
    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.
    187187         */
    188188        do_action( 'messages_notice_before_delete', $this );
     
    203203     * Pulls up a list of notices.
    204204     *
    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.
    206206     *
    207207     * @since BuddyPress (1.0.0)
     
    209209     * @param array $args {
    210210     *     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.
    212212     *     @type int $pag_page The page number.  Defaults to 1.
    213213     * }
     
    256256     * @since BuddyPress (1.0.0)
    257257     *
    258      * @return object The BP_Messages_Notice object
     258     * @return object The BP_Messages_Notice object.
    259259     */
    260260    public static function get_active() {
  • TabularUnified trunk/src/bp-messages/classes/class-bp_messages-thread.php

    r9819 r9862  
    5757
    5858    /**
    59      * The content of the last message in this thread
     59     * The content of the last message in this thread.
    6060     *
    6161     * @since BuddyPress (1.2.0)
     
    6565
    6666    /**
    67      * The date of the last message in this thread
     67     * The date of the last message in this thread.
    6868     *
    6969     * @since BuddyPress (1.2.0)
     
    7373
    7474    /**
    75      * The ID of the last message in this thread
     75     * The ID of the last message in this thread.
    7676     *
    7777     * @since BuddyPress (1.2.0)
     
    8181
    8282    /**
    83      * The subject of the last message in this thread
     83     * The subject of the last message in this thread.
    8484     *
    8585     * @since BuddyPress (1.2.0)
     
    8989
    9090    /**
    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.
    9292     *
    9393     * @since BuddyPress (1.2.0)
     
    109109     * @since BuddyPress (1.0.0)
    110110     *
    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
    112116     */
    113117    public function __construct( $thread_id = false, $order = 'ASC', $args = array() ) {
     
    124128     * @since BuddyPress (1.0.0)
    125129     *
    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'.
    128132     * @param array $args {
    129133     *     Array of arguments.
    130134     *     @type bool $update_meta_cache Whether to pre-fetch metadata for
    131      *           queried message items. Default: true.
     135     *                                   queried message items. Default: true.
    132136     * }
    133137     * @return bool False on failure.
     
    182186         * @since BuddyPress (2.2.0)
    183187         *
    184          * @param BP_Messages_Thread Message thread object.
     188         * @param BP_Messages_Thread $this Message thread object.
    185189         */
    186190        do_action( 'bp_messages_thread_post_populate', $this );
     
    215219     * @since BuddyPress (2.3.0) Added $thread_id as a parameter.
    216220     *
    217      * @param int $thread_id The thread ID
     221     * @param int $thread_id The thread ID.
     222     *
    218223     * @return array
    219224     */
     
    257262     * @since BuddyPress (2.3.0)
    258263     *
    259      * @param int $thread_id The message thread ID
     264     * @param int $thread_id The message thread ID.
     265     *
    260266     * @return array
    261267     */
     
    282288     * @since BuddyPress (2.3.0)
    283289     *
    284      * @param  int $thread_id The thread ID
     290     * @param  int $thread_id The thread ID.
     291     *
    285292     * @return array
    286293     */
     
    298305     * @since BuddyPress (1.0.0)
    299306     *
    300      * @param int $thread_id The message thread ID
     307     * @param int $thread_id The message thread ID.
     308     *
    301309     * @return bool
    302310     */
     
    353361                 * @since BuddyPress (1.0.0)
    354362                 *
    355                  * @param int $message_id ID of the message
     363                 * @param int $message_id ID of the message.
    356364                 */
    357365                do_action( 'messages_thread_deleted_thread', $message_id );
     
    363371
    364372        /**
    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.
    366374         *
    367375         * @since BuddyPress (2.2.0)
     
    521529     *
    522530     * @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     *
    524533     * @return array $sql_array 'join' and 'where' clauses.
    525534     */
     
    587596     *
    588597     * @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'.
    593602     * @return int
    594603     */
     
    616625     *
    617626     * @param int $thread_id The message thread ID.
     627     *
    618628     * @return bool
    619629     */
     
    638648     *
    639649     * @param int $thread_id The message thread ID.
     650     *
    640651     * @return string|bool The user link on success. Boolean false on failure.
    641652     */
     
    658669     *
    659670     * @param int $user_id The user ID.
     671     *
    660672     * @return int
    661673     */
     
    694706     *
    695707     * @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.
    698711     */
    699712    public static function check_access( $thread_id, $user_id = 0 ) {
     
    717730     *
    718731     * @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.
    720734     */
    721735    public static function is_valid( $thread_id = 0 ) {
     
    745759     *
    746760     * @param array $recipients Array containing the message recipients (array of objects).
     761     *
    747762     * @return string
    748763     */
Note: See TracChangeset for help on using the changeset viewer.