Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/08/2013 05:09:31 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Introduce bp_core_mark_all_notifications_by_type() and replace bp_core_delete_all_notifications_by_type() usages. Ensures notifications are toggled as acknowledged rather than deleted. See #5148.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-cache.php

    r6342 r7529  
    2424
    2525function friends_clear_friend_notifications() {
    26     global $bp;
    27 
    28     if ( isset( $_GET['new'] ) )
    29         bp_core_delete_notifications_by_type( bp_loggedin_user_id(), $bp->friends->id, 'friendship_accepted' );
     26    if ( isset( $_GET['new'] ) ) {
     27        bp_core_mark_all_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_accepted' );
     28    }
    3029}
    3130add_action( 'bp_activity_screen_my_activity', 'friends_clear_friend_notifications' );
Note: See TracChangeset for help on using the changeset viewer.