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-screens.php

    r6342 r7529  
    1616
    1717function friends_screen_my_friends() {
    18     global $bp;
    1918
    2019    // Delete any friendship acceptance notifications for the user when viewing a profile
    21     bp_core_delete_notifications_by_type( bp_loggedin_user_id(), $bp->friends->id, 'friendship_accepted' );
     20    bp_core_mark_all_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_accepted' );
    2221
    2322    do_action( 'friends_screen_my_friends' );
     
    6362    do_action( 'friends_screen_requests' );
    6463
    65     if ( isset( $_GET['new'] ) )
    66         bp_core_delete_notifications_by_type( bp_loggedin_user_id(), 'friends', 'friendship_request' );
     64    if ( isset( $_GET['new'] ) ) {
     65        bp_core_mark_all_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_request' );
     66    }
    6767
    6868    bp_core_load_template( apply_filters( 'friends_template_requests', 'members/single/home' ) );
Note: See TracChangeset for help on using the changeset viewer.