← All changes
|
inc/ExternalPlugin/Elementor/Widgets/Course/CourseMaterialElementor.php
+31
-31
4.3.8
→
4.4.8
View file →
| @@ -1,31 +1,31 @@ | ||
| 1 | -<?php | |
| 2 | -namespace LearnPress\ExternalPlugin\Elementor\Widgets\Course; | |
| 3 | - | |
| 4 | -use LearnPress\ExternalPlugin\Elementor\LPElementorWidgetBase; | |
| 5 | -use LearnPress\Helpers\Config; | |
| 6 | -use Throwable; | |
| 7 | -class CourseMaterialElementor extends LPElementorWidgetBase { | |
| 8 | - public function __construct( $data = [], $args = null ) { | |
| 9 | - $this->title = esc_html__( 'Course/Lesson Material', 'learnpress' ); | |
| 10 | - $this->name = 'lp_course_material'; | |
| 11 | - $this->keywords = [ 'courses', 'lesson', 'material' ]; | |
| 12 | - $this->icon = 'eicon-document-file'; | |
| 13 | - parent::__construct( $data, $args ); | |
| 14 | - } | |
| 15 | - | |
| 16 | - protected function register_controls() { | |
| 17 | - $this->controls = Config::instance()->get( 'materials', 'elementor/course' ); | |
| 18 | - parent::register_controls(); | |
| 19 | - } | |
| 20 | - public function render() { | |
| 21 | - try { | |
| 22 | - $settings = $this->get_settings_for_display(); | |
| 23 | - echo '<pre>'; | |
| 24 | - print_r( $settings ); | |
| 25 | - echo '</pre>'; | |
| 26 | - } catch ( Throwable $e ) { | |
| 27 | - error_log( __METHOD__ . ': ' . $e->getMessage() ); | |
| 28 | - } | |
| 29 | - } | |
| 30 | -} | |
| 31 | - | |
| 1 | +<?php | |
| 2 | +namespace LearnPress\ExternalPlugin\Elementor\Widgets\Course; | |
| 3 | + | |
| 4 | +use LearnPress\ExternalPlugin\Elementor\LPElementorWidgetBase; | |
| 5 | +use LearnPress\Helpers\Config; | |
| 6 | +use Throwable; | |
| 7 | +class CourseMaterialElementor extends LPElementorWidgetBase { | |
| 8 | + public function __construct( $data = [], $args = null ) { | |
| 9 | + $this->title = esc_html__( 'Course/Lesson Material', 'learnpress' ); | |
| 10 | + $this->name = 'lp_course_material'; | |
| 11 | + $this->keywords = [ 'courses', 'lesson', 'material' ]; | |
| 12 | + $this->icon = 'eicon-document-file'; | |
| 13 | + parent::__construct( $data, $args ); | |
| 14 | + } | |
| 15 | + | |
| 16 | + protected function register_controls() { | |
| 17 | + $this->controls = Config::instance()->get( 'materials', 'elementor/course' ); | |
| 18 | + parent::register_controls(); | |
| 19 | + } | |
| 20 | + public function render() { | |
| 21 | + try { | |
| 22 | + $settings = $this->get_settings_for_display(); | |
| 23 | + echo '<pre>'; | |
| 24 | + print_r( $settings ); | |
| 25 | + echo '</pre>'; | |
| 26 | + } catch ( Throwable $e ) { | |
| 27 | + error_log( __METHOD__ . ': ' . $e->getMessage() ); | |
| 28 | + } | |
| 29 | + } | |
| 30 | +} | |
| 31 | + | |