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 / Skins / CoursesLoopItem.php

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

51 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Skin Loop Item for Widget Courses
4 * Call list item on plugin Thim Elementor Kit.
5 *
6 * @since 4.2.5.7
7 * @version 1.0.0
8 */
9 namespace LearnPress\ExternalPlugin\Elementor\Widgets\Course\Skins;
10
11 use Elementor\Plugin;
12 use Elementor\Widget_Base;
13 use LearnPress\Helpers\Config;
14 use LP_Course;
15
16 class CoursesLoopItem extends SkinCoursesBase {
17 public $lp_el_skin_id = 'courses_loop_item';
18 public $lp_el_skin_title = 'Courses Loop Item';
19
20 public function controls_on_section_skin( Widget_Base $widget, $args ) {
21 // Only load on the Admin
22 if ( ! is_admin() ) {
23 return;
24 }
25
26 $this->parent = $widget;
27
28 Config::instance()->get(
29 'courses-loop-item',
30 'elementor/course/skin',
31 [ 'CoursesLoopItem' => $this ]
32 );
33 }
34
35 /**
36 * Render single item course
37 *
38 * @param LP_Course $course
39 * @param array $settings
40 *
41 * @return string
42 */
43 public static function render_course( LP_Course $course, array $settings = [] ): string {
44 global $post;
45 $post = get_post( $course->get_id() );
46 $id = $settings['lp_el_skin_courses_loop_item_template_id'] ?? 0;
47
48 return Plugin::instance()->frontend->get_builder_content( $id );
49 }
50 }
51