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
Iframe.php
1 year ago
Pages.php
1 year ago
Backend.php
48 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Preview script for html markup generator |
| 4 | * |
| 5 | * @package tutor-droip-elements |
| 6 | */ |
| 7 | |
| 8 | namespace TutorLMSDroip; |
| 9 | |
| 10 | use TutorLMSDroip\ElementGenerator\ElementGenerator; |
| 11 | |
| 12 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | exit; // Exit if accessed directly. |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Class Backend |
| 18 | * |
| 19 | * @package TutorLMSDroip |
| 20 | */ |
| 21 | class Backend { |
| 22 | |
| 23 | /** |
| 24 | * Backend constructor. |
| 25 | */ |
| 26 | public function __construct() { |
| 27 | $this->run(); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Run the backend |
| 32 | */ |
| 33 | public function run() { |
| 34 | //phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 35 | $action = sanitize_text_field( isset( $_GET['action'] ) ? $_GET['action'] : null ); |
| 36 | if ( 'droip' === $action ) { |
| 37 | $load_for = sanitize_text_field( isset( $_GET['load_for'] ) ? wp_unslash( $_GET['load_for'] ) : null ); |
| 38 | if ( 'droip-iframe' === $load_for ) { |
| 39 | new Iframe(); |
| 40 | } else { |
| 41 | new Editor(); |
| 42 | } |
| 43 | } |
| 44 | new ElementGenerator(); |
| 45 | new Pages(); |
| 46 | } |
| 47 | } |
| 48 |