LLMS_Privacy_Exporters::certificate_data( string $email_address, int $page )
Export student certificate data by email address
Parameters Parameters
- $email_address
-
(string) (Required) Email address of the user to retrieve data for.
- $page
-
(int) (Required) Process page number.
Return Return
(array)
Source Source
File: includes/privacy/class-llms-privacy-exporters.php
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | public static function certificate_data( $email_address , $page ) { $data = array (); $student = self::get_student_by_email( $email_address ); if ( ! $student ) { return self::get_return( $data ); } $certs = self::get_student_certificates( $student ); if ( $certs ) { $group_label = __( 'Certificates' , 'lifterlms' ); $group_description = __( 'Student certificate data.' , 'lifterlms' ); foreach ( $certs as $cert ) { $data [] = array ( 'group_id' => 'lifterlms_certificates' , 'group_label' => $group_label , 'group_description' => $group_description , 'item_id' => sprintf( 'certificate-%d' , $cert ->get( 'id' ) ), 'data' => self::get_certificate_data( $cert ), ); } } return self::get_return( $data ); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.37.9 | Added $group_description to the group exporter. |
3.18.0 | Introduced. |