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_student_data( LLMS_Student $student )

Erase student data


Parameters Parameters

$student

(LLMS_Student) (Required)


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/privacy/class-llms-privacy-erasers.php

	private static function erase_student_data( $student ) {

		$messages = array();

		$props = parent::get_student_data_props();

		foreach ( $props as $prop => $name ) {

			$erased = false;

			$val = $student->get( $prop );
			if ( $val ) {
				$student->set( $prop, '' );
				$erased = true;
			}

			if ( apply_filters( 'llms_privacy_erase_student_data_prop', $erased, $prop, $student ) ) {

				/* Translators: %s Prop name. */
				$messages[] = sprintf( __( 'Removed student "%s"', 'lifterlms' ), $name );

			}
		}

		return apply_filters( 'llms_privacy_erase_student_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.