Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/23/2021 02:03:02 AM (2 years ago)
Author:
espellcaste
Message:

Making PHPDoc Improvements to the BP Notifications (component) files.

See #8553

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-functions.php

    r12605 r13091  
    3030 *     @type string $date_notified     Timestamp for the notification.
    3131 * }
    32  * @return int|bool ID of the newly created notification on success, false
    33  *                  on failure.
     32 * @return int|bool ID of the newly created notification on success, false on failure.
    3433 */
    3534function bp_notifications_add_notification( $args = array() ) {
     
    9695 *
    9796 * @param int $id ID of the notification to delete.
    98  * @return false|int True on success, false on failure.
     97 * @return false|int Integer on success, false on failure.
    9998 */
    10099function bp_notifications_delete_notification( $id ) {
     
    115114 * @param int      $id     ID of the notification.
    116115 * @param int|bool $is_new 0 for read, 1 for unread.
    117  * @return false|int True on success, false on failure.
     116 * @return false|int Number of rows updated on success, false on failure.
    118117 */
    119118function bp_notifications_mark_notification( $id, $is_new = false ) {
     
    147146    if ( false === $notifications ) {
    148147        $notifications = BP_Notifications_Notification::get( array(
    149             'user_id' => $user_id
     148            'user_id' => $user_id,
    150149        ) );
    151150        wp_cache_set( 'all_for_user_' . $user_id, $notifications, 'bp_notifications' );
     
    483482    return BP_Notifications_Notification::update(
    484483        array(
    485             'is_new' => $is_new
     484            'is_new' => $is_new,
    486485        ),
    487486        array(
    488487            'user_id'          => $user_id,
    489488            'component_name'   => $component_name,
    490             'component_action' => $component_action
     489            'component_action' => $component_action,
    491490        )
    492491    );
     
    512511    return BP_Notifications_Notification::update(
    513512        array(
    514             'is_new' => $is_new
     513            'is_new' => $is_new,
    515514        ),
    516515        array(
     
    519518            'secondary_item_id' => $secondary_item_id,
    520519            'component_name'    => $component_name,
    521             'component_action'  => $component_action
     520            'component_action'  => $component_action,
    522521        )
    523522    );
     
    541540    return BP_Notifications_Notification::update(
    542541        array(
    543             'is_new' => $is_new
     542            'is_new' => $is_new,
    544543        ),
    545544        array(
     
    547546            'secondary_item_id' => $secondary_item_id,
    548547            'component_name'    => $component_name,
    549             'component_action'  => $component_action
     548            'component_action'  => $component_action,
    550549        )
    551550    );
     
    572571    return BP_Notifications_Notification::update(
    573572        array(
    574             'is_new' => $is_new
     573            'is_new' => $is_new,
    575574        ),
    576575        array(
    577576            'item_id'          => $user_id,
    578577            'component_name'   => $component_name,
    579             'component_action' => $component_action
     578            'component_action' => $component_action,
    580579        )
    581580    );
Note: See TracChangeset for help on using the changeset viewer.