PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.2.1
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.2.1
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 4.2.1 All 138 releases
learnpress / inc / lp-widget-functions.php

lp-widget-functions.php in LearnPress – WordPress LMS Plugin for Create and Sell Online Courses 4.2.1, at inc/lp-widget-functions.php

48 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Include & register widget.
4 *
5 * @package LearnPress/Widgets
6 * @author ThimPress <Nhamdv>
7 * @version 4.0.0
8 */
9
10 defined( 'ABSPATH' ) || exit;
11
12 require_once dirname( __FILE__ ) . '/widgets/course-extra.php';
13 require_once dirname( __FILE__ ) . '/widgets/course-info.php';
14 require_once dirname( __FILE__ ) . '/widgets/course-progress.php';
15 require_once dirname( __FILE__ ) . '/widgets/featured-courses.php';
16 require_once dirname( __FILE__ ) . '/widgets/popular-courses.php';
17 require_once dirname( __FILE__ ) . '/widgets/recent-courses.php';
18
19 add_action(
20 'widgets_init',
21 function() {
22 register_widget( 'LP_Widget_Course_Extra' );
23 register_widget( 'LP_Widget_Course_Info' );
24 register_widget( 'LP_Widget_Course_Progress' );
25 register_widget( 'LP_Widget_Featured_Courses' );
26 register_widget( 'LP_Widget_Popular_Courses' );
27 register_widget( 'LP_Widget_Recent_Courses' );
28 }
29 );
30
31 add_action(
32 'wp_enqueue_scripts',
33 function() {
34 if ( isset( $_GET['legacy-widget-preview'] ) ) {
35 wp_enqueue_style( 'learnpress-widgets-admin', LP_PLUGIN_URL . 'assets/css/widgets.css', array() );
36 }
37 }
38 );
39
40 add_action(
41 'elementor/editor/before_enqueue_scripts',
42 function() {
43 wp_enqueue_script( 'learnpress-widgets-eleentor-select2', LP_PLUGIN_URL . 'assets/src/js/vendor/select2.full.min.js', array( 'jquery' ), false );
44 wp_enqueue_script( 'learnpress-widgets-eleentor', LP_PLUGIN_URL . 'assets/js/dist/admin/pages/widgets.js', array( 'jquery' ), false );
45 }
46 );
47
48