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)


Top ↑

Return Return

(array)


Top ↑

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 );
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.18.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.