PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
learnpress / inc / ExternalPlugin / Elementor / Widgets / Course / ListCoursesByPageElementor.php

ListCoursesByPageElementor.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.4.8, at inc/ExternalPlugin/Elementor/Widgets/Course/ListCoursesByPageElementor.php

71 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class ListCoursesByPageElementor
4 *
5 * @sicne 4.2.3
6 * @version 1.0.0
7 */
8
9 namespace LearnPress\ExternalPlugin\Elementor\Widgets\Course;
10
11 use LearnPress\ExternalPlugin\Elementor\LPElementorWidgetBase;
12 use LearnPress\ExternalPlugin\Elementor\Widgets\Course\Skins\CoursesList;
13 use LearnPress\ExternalPlugin\Elementor\Widgets\Course\Skins\CoursesGrid;
14 use LearnPress\ExternalPlugin\Elementor\Widgets\Course\Skins\CoursesLoopItem;
15 use LearnPress\Helpers\Config;
16
17 class ListCoursesByPageElementor extends LPElementorWidgetBase {
18 public function __construct( $data = [], $args = null ) {
19 $this->title = esc_html__( 'List Courses by Page', 'learnpress' );
20 $this->name = 'list_courses_by_page';
21 $this->keywords = [ 'list courses', 'by page' ];
22 $this->icon = 'eicon-post-list';
23
24 wp_register_style(
25 'lp-courses-by-page',
26 LP_PLUGIN_URL . 'assets/css/elementor/course/list-courses-by-page.css',
27 array(),
28 uniqid()
29 );
30
31 wp_register_script(
32 'lp-courses-by-page',
33 LP_PLUGIN_URL . 'assets/js/dist/elementor/courses.js',
34 array(),
35 uniqid(),
36 true
37 );
38 $this->add_style_depends( 'lp-courses-by-page' );
39 $this->add_script_depends( 'lp-courses-v2' );
40 parent::__construct( $data, $args );
41 }
42
43 protected function register_skins() {
44 $skins = [
45 'courses_grid' => CoursesGrid::class,
46 'courses_list' => CoursesList::class,
47 ];
48
49 if ( class_exists( \Thim_EL_Kit::class ) ) {
50 $skins['courses_loop_item'] = CoursesLoopItem::class;
51 }
52
53 foreach ( $skins as $skin ) {
54 $this->add_skin( new $skin( $this ) );
55 }
56 }
57
58 /**
59 * Register controls.
60 *
61 * @return void
62 */
63 protected function register_controls() {
64 $this->controls = Config::instance()->get(
65 'list-courses-by-page',
66 'elementor/course'
67 );
68 parent::register_controls();
69 }
70 }
71