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