ElementGenerator
9 months ago
Ajax.php
10 months ago
Backend.php
1 year ago
Editor.php
1 year ago
Frontend.php
1 year ago
Helper.php
9 months ago
Hooks.php
9 months ago
Iframe.php
1 year ago
Pages.php
9 months ago
VisibilityCondition.php
8 months ago
Editor.php
42 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Preview script for html markup generator |
| 4 | * |
| 5 | * @package tutor-droip-elements |
| 6 | */ |
| 7 | |
| 8 | namespace TutorLMSDroip; |
| 9 | |
| 10 | if (! defined('ABSPATH')) { |
| 11 | exit; // Exit if accessed directly. |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Class Editor |
| 16 | * This class is used to define all editor functions. |
| 17 | */ |
| 18 | class Editor |
| 19 | { |
| 20 | |
| 21 | /** |
| 22 | * Class constructor |
| 23 | * |
| 24 | * @since 1.0.0 |
| 25 | */ |
| 26 | public function __construct() |
| 27 | { |
| 28 | add_action('wp_enqueue_scripts', [$this, 'load_assets'], 100); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Load assets |
| 33 | * |
| 34 | * @since 1.0.0 |
| 35 | */ |
| 36 | public function load_assets() |
| 37 | { |
| 38 | wp_enqueue_script(TDE_APP_PREFIX . '-tutor-droip-elements', TDE_PLUGIN_ROOT_BASE . 'build/js/editor.min.js', ['wp-i18n', 'droip-editor'], TDE_APP_VERSION, true); |
| 39 | wp_enqueue_style(TDE_APP_PREFIX . '-tutor-droip-elements', TDE_PLUGIN_ROOT_BASE . 'build/css/editor.min.css', null, TDE_APP_VERSION); |
| 40 | } |
| 41 | } |
| 42 |