Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Privacy_Erasers::erase_notification_data( LLMS_Student $student )
Erase notifications for a student
Parameters Parameters
- $student
-
(LLMS_Student) (Required)
Return Return
(array)
Source Source
File: includes/privacy/class-llms-privacy-erasers.php
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | private static function erase_notification_data( $student ) { $messages = array (); global $wpdb ; $deleted = $wpdb ->query( $wpdb ->prepare( "DELETE FROM {$wpdb->prefix}lifterlms_notifications WHERE user_id = %d OR subscriber = %d" , $student ->get( 'id' ), $student ->get( 'id' ) ) ); if ( $deleted ) { // Translators: %d = number of notifications. $messages [] = sprintf( __( 'Removed %d notifications.' , 'lifterlms' ), $deleted ); } return apply_filters( 'llms_privacy_erase_notification_data' , $messages , $student ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.18.0 | Introduced. |