LLMS_Widget_Course_Progress::widget( array $args, array $instance )
Front-end display of widget
Description Description
See also See also
Parameters Parameters
- $args
-
(array) (Required) Widget arguments.
- $instance
-
(array) (Required) Saved values from database.
Return Return
(void)
Source Source
File: includes/widgets/class.llms.widget.course.progress.php
public function widget( $args, $instance ) { $check_enrollment = ( ! isset( $instance['check_enrollment'] ) ) ? 1 : $instance['check_enrollment']; $course_progress = do_shortcode( '[lifterlms_course_progress check_enrollment=' . $check_enrollment . ']' ); // Do not show the widget title if no progress bar is displayed. if ( empty( $course_progress ) ) { return; } echo $args['before_widget']; if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; } echo $course_progress; echo $args['after_widget']; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.38.0 | Introduced. |