ElementGenerator
1 year ago
Ajax.php
1 year ago
Backend.php
1 year ago
Editor.php
1 year ago
Frontend.php
1 year ago
Helper.php
1 year ago
Hooks.php
1 year ago
Iframe.php
1 year ago
Pages.php
1 year ago
VisibilityCondition.php
1 year ago
Editor.php
40 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 | /** |
| 16 | * Class Editor |
| 17 | * This class is used to define all editor functions. |
| 18 | */ |
| 19 | class Editor { |
| 20 | |
| 21 | /** |
| 22 | * Class constructor |
| 23 | * |
| 24 | * @since 1.0.0 |
| 25 | */ |
| 26 | public function __construct() { |
| 27 | add_action( 'wp_enqueue_scripts', array( $this, 'load_assets' ), 100 ); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Load assets |
| 32 | * |
| 33 | * @since 1.0.0 |
| 34 | */ |
| 35 | public function load_assets() { |
| 36 | wp_enqueue_script( TDE_APP_PREFIX . '-tutor-droip-elements', TDE_PLUGIN_ROOT_BASE . 'build/js/editor.min.js', array( 'wp-i18n', 'droip-editor' ), '1.0.0', true ); |
| 37 | wp_enqueue_style( TDE_APP_PREFIX . '-tutor-droip-elements', TDE_PLUGIN_ROOT_BASE . 'build/css/editor.min.css', null, '1.0.0' ); |
| 38 | } |
| 39 | } |
| 40 |