Skip to:
Content

BuddyPress.org


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

Refactor Activity component's approach to Notifications integration:

  • 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.
File:
1 edited

Legend:

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

    r7537 r7622  
    128128    bp_core_load_template( apply_filters( 'bp_activity_template_mention_activity', 'members/single/home' ) );
    129129}
    130 
    131 /**
    132  * Remove activity notifications when a user clicks on them.
    133  *
    134  * @since BuddyPress (1.5)
    135  *
    136  * @uses bp_core_mark_all_notifications_by_type()
    137  */
    138 function bp_activity_remove_screen_notifications() {
    139     bp_core_mark_notifications_by_type( bp_loggedin_user_id(), buddypress()->activity->id, 'new_at_mention' );
    140 }
    141 add_action( 'bp_activity_screen_my_activity',               'bp_activity_remove_screen_notifications' );
    142 add_action( 'bp_activity_screen_single_activity_permalink', 'bp_activity_remove_screen_notifications' );
    143 add_action( 'bp_activity_screen_mentions',                  'bp_activity_remove_screen_notifications' );
    144130
    145131/**
Note: See TracChangeset for help on using the changeset viewer.