← All changes
|
inc/ExternalPlugin/Elementor/Widgets/Course/Dynamic/CourseCountStudentDynamicElementor.php
+40
-40
4.3.9
→
4.4.8
View file →
| @@ -1,40 +1,40 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Class CourseCountStudentDynamicElementor | |
| 4 | - * | |
| 5 | - * Dynamic course count student elementor. | |
| 6 | - * | |
| 7 | - * @since 4.2.3.5 | |
| 8 | - * @version 1.0.0 | |
| 9 | - */ | |
| 10 | -namespace LearnPress\ExternalPlugin\Elementor\Widgets\Course\Dynamic; | |
| 11 | -use Elementor\Core\DynamicTags\Tag; | |
| 12 | -use LearnPress\ExternalPlugin\Elementor\LPDynamicElementor; | |
| 13 | -use LearnPress\TemplateHooks\Course\SingleCourseTemplate; | |
| 14 | -use Throwable; | |
| 15 | - | |
| 16 | -defined( 'ABSPATH' ) || exit; | |
| 17 | - | |
| 18 | -class CourseCountStudentDynamicElementor extends Tag { | |
| 19 | - use LPDynamicElementor; | |
| 20 | - | |
| 21 | - public function __construct( array $data = [] ) { | |
| 22 | - $this->lp_dynamic_title = 'Course Count Student'; | |
| 23 | - $this->lp_dynamic_name = 'course-count-student'; | |
| 24 | - parent::__construct( $data ); | |
| 25 | - } | |
| 26 | - | |
| 27 | - public function render() { | |
| 28 | - $singleCourseTemplate = SingleCourseTemplate::instance(); | |
| 29 | - | |
| 30 | - try { | |
| 31 | - $course = $this->get_course_model(); | |
| 32 | - if ( ! $course ) { | |
| 33 | - return; | |
| 34 | - } | |
| 35 | - echo $singleCourseTemplate->html_count_student( $course ); | |
| 36 | - } catch ( Throwable $e ) { | |
| 37 | - error_log( $e->getMessage() ); | |
| 38 | - } | |
| 39 | - } | |
| 40 | -} | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Class CourseCountStudentDynamicElementor | |
| 4 | + * | |
| 5 | + * Dynamic course count student elementor. | |
| 6 | + * | |
| 7 | + * @since 4.2.3.5 | |
| 8 | + * @version 1.0.0 | |
| 9 | + */ | |
| 10 | +namespace LearnPress\ExternalPlugin\Elementor\Widgets\Course\Dynamic; | |
| 11 | +use Elementor\Core\DynamicTags\Tag; | |
| 12 | +use LearnPress\ExternalPlugin\Elementor\LPDynamicElementor; | |
| 13 | +use LearnPress\TemplateHooks\Course\SingleCourseTemplate; | |
| 14 | +use Throwable; | |
| 15 | + | |
| 16 | +defined( 'ABSPATH' ) || exit; | |
| 17 | + | |
| 18 | +class CourseCountStudentDynamicElementor extends Tag { | |
| 19 | + use LPDynamicElementor; | |
| 20 | + | |
| 21 | + public function __construct( array $data = [] ) { | |
| 22 | + $this->lp_dynamic_title = 'Course Count Student'; | |
| 23 | + $this->lp_dynamic_name = 'course-count-student'; | |
| 24 | + parent::__construct( $data ); | |
| 25 | + } | |
| 26 | + | |
| 27 | + public function render() { | |
| 28 | + $singleCourseTemplate = SingleCourseTemplate::instance(); | |
| 29 | + | |
| 30 | + try { | |
| 31 | + $course = $this->get_course_model(); | |
| 32 | + if ( ! $course ) { | |
| 33 | + return; | |
| 34 | + } | |
| 35 | + echo $singleCourseTemplate->html_count_student( $course ); | |
| 36 | + } catch ( Throwable $e ) { | |
| 37 | + error_log( $e->getMessage() ); | |
| 38 | + } | |
| 39 | + } | |
| 40 | +} | |