<?php namespace EducationLMS; if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly class Education_LMS_Elementors { /** * Plugin constructor. */ public function __construct() { $this->add_actions(); } private function add_actions() { add_action( 'elementor/init', array( $this, 'add_elementor_category' ) ); add_action( 'elementor/widgets/widgets_registered', [ $this, 'on_widgets_registered' ] ); } public function add_elementor_category() { $elementor = \Elementor\Plugin::$instance; // Add element category in panel $elementor->elements_manager->add_category( 'edu-elements', [ 'title' => __( 'Theme Elements', 'education-lms' ), 'icon' => 'font', ], 1 ); } public function on_widgets_registered() { $this->includes(); $this->register_widget(); } private function includes() { // Theme Elements require_once __DIR__ . '/elementors/featured-slider.php'; require_once __DIR__ . '/elementors/courses.php'; require_once __DIR__ . '/elementors/recent-news.php'; } private function register_widget() { \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \EducationLMS\Widgets\Education_LMS_Featured_Slider() ); \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \EducationLMS\Widgets\Education_LMS_Courses() ); \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \EducationLMS\Widgets\Education_LMS_Recent_News() ); } } new Education_LMS_Elementors();
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
elementors | Folder | 0755 |
|
|
typography-wp | Folder | 0755 |
|
|
course-widget.php | File | 7.03 KB | 0644 |
|
custom-header.php | File | 1.96 KB | 0644 |
|
customizer-controls.php | File | 2.59 KB | 0644 |
|
customizer.php | File | 30.49 KB | 0644 |
|
dashboard.php | File | 4.21 KB | 0644 |
|
elementors.php | File | 1.52 KB | 0644 |
|
metabox.php | File | 4.04 KB | 0644 |
|
template-functions.php | File | 24.82 KB | 0644 |
|
template-tags.php | File | 12.13 KB | 0644 |
|
tgm.php | File | 124.14 KB | 0644 |
|
widgets.php | File | 6.15 KB | 0644 |
|