Changeset 7531
- Timestamp:
- 11/08/2013 05:30:50 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-notifications.php
r7530 r7531 165 165 } 166 166 167 /** 168 * Delete all notifications for a user 169 * 170 * Used when clearing out all notifications for a user, whene deleted or spammed 171 * 172 * @since BuddyPress (1.0) 173 * @param int $user_id 174 * @param string $component_name 175 * @param string $component_action 176 * @return boolean True on success, false on fail 177 */ 178 function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) { 179 180 // Bail if notifications is not active 181 if ( ! bp_is_active( 'notifications' ) ) { 182 return false; 183 } 184 185 return bp_notifications_delete_notifications_from_user( $user_id, $component_name, $component_action ); 186 } 187 167 188 /** Mark **********************************************************************/ 168 189 … … 173 194 * has visited that component. 174 195 * 175 * @since BuddyPress (1. 0)196 * @since BuddyPress (1.9.0) 176 197 * @param int $user_id 177 198 * @param string $component_name … … 196 217 * has visited that component. 197 218 * 198 * @since BuddyPress (1. 0)219 * @since BuddyPress (1.9.0) 199 220 * @param int $user_id 200 221 * @param string $component_name … … 218 239 * Used when clearing out notifications for an entire component 219 240 * 220 * @since BuddyPress (1.9 )241 * @since BuddyPress (1.9.0) 221 242 * @param int $user_id 222 243 * @param string $component_name … … 235 256 236 257 /** 237 * Delete all notifications fora user238 * 239 * Used when clearing out all notifications for a user, whene deleted or spammed240 * 241 * @ since BuddyPress (1.0)242 * @param int $user_id243 * @ param string $component_name244 * @param string $component_action245 * @return boolean True on success, false on fail 246 */ 247 function bp_core_delete_notifications_from_user( $user_id, $component_name, $component_action ) { 248 249 // Bail if notifications is not active250 if ( ! bp_is_active( 'notifications' ) ) {251 return false; 252 }253 254 return bp_notifications_delete_notifications_from_user( $user_id, $component_name, $component_action ); 255 } 258 * Mark all notifications read/unread from a user 259 * 260 * @since BuddyPress (1.9.0) 261 * @param int $user_id 262 * @param string $component_name 263 * @param string $component_action 264 * @return boolean True on success, false on fail 265 */ 266 function bp_core_mark_notifications_from_user( $user_id, $component_name, $component_action, $is_new = false ) { 267 268 // Bail if notifications is not active 269 if ( ! bp_is_active( 'notifications' ) ) { 270 return false; 271 } 272 273 return bp_notifications_mark_notifications_from_user( $user_id, $component_name, $component_action, $is_new ); 274 } 275 276 /** Helpers *******************************************************************/ 256 277 257 278 /**
Note: See TracChangeset
for help on using the changeset viewer.