LLMS_Notification_View_Certificate_Earned::set_merge_data( string $code )
Replace merge codes with actual values
Description Description
Parameters Parameters
- $code
-
(string) (Required) the merge code to ge merged data for
Return Return
(string)
Source Source
File: includes/notifications/views/class.llms.notification.view.certificate.earned.php
protected function set_merge_data( $code ) { $cert = new LLMS_User_Certificate( $this->notification->post_id ); switch ( $code ) { case '{{CERTIFICATE_CONTENT}}': $code = $cert->get( 'content' ); break; case '{{CERTIFICATE_TITLE}}': $code = $cert->get( 'certificate_title' ); break; case '{{CERTIFICATE_URL}}': $code = get_permalink( $cert->get( 'id' ) ); break; case '{{MINI_CERTIFICATE}}': $code = $this->get_mini_html( $this->set_merge_data( '{{CERTIFICATE_TITLE}}' ), $this->set_merge_data( '{{CERTIFICATE_CONTENT}}' ) ); break; case '{{STUDENT_NAME}}': $code = $this->is_for_self() ? __( 'you', 'lifterlms' ) : $this->user->get_name(); break; } return $code; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.8.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: