LLMS_Notification_View_Lesson_Complete::set_merge_data( string $code )
Replace merge codes with actual values
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.lesson.complete.php
protected function set_merge_data( $code ) { switch ( $code ) { case '{{COURSE_PROGRESS}}': $progress = $this->user->get_progress( $this->post->get( 'parent_course' ), 'course' ); $code = lifterlms_course_progress_bar( $progress, false, false, false ); break; case '{{COURSE_TITLE}}': $course = $this->post->get_course(); if ( $course ) { $code = $course->get( 'title' ); } else { $code = ''; } break; case '{{LESSON_TITLE}}': $code = $this->post->get( 'title' ); 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. |