Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/30/2013 03:47:27 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Refactor Friends component's approach to Notifications integration:

  • Relocate friends_clear_friendship_notifications() out of bp-friends-cache.php and into bp-friends-notifications.php
  • Introduce helper functions for handling the adding/marking/deleting of notifications. Hook these new functions into their respective actions rather than have them hardcoded and interspersed amongst the first-class code.
  • See #5266. Hat-tip r-a-y.
File:
1 edited

Legend:

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

    r7560 r7619  
    1919 */
    2020function friends_screen_my_friends() {
    21 
    22         // Delete any friendship acceptance notifications for the user when viewing a profile
    23         bp_core_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_accepted' );
    2421
    2522        do_action( 'friends_screen_my_friends' );
    … …  
    6764
    6865        do_action( 'friends_screen_requests' );
    69 
    70         if ( isset( $_GET['new'] ) ) {
    71                 bp_core_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->friends->id, 'friendship_request' );
    72         }
    7366
    7467        bp_core_load_template( apply_filters( 'friends_template_requests', 'members/single/home' ) );
Note: See TracChangeset for help on using the changeset viewer.