PluginProbe
Elementor Website Builder – more than just a page builder / 3.35.3
Elementor Website Builder – more than just a page builder v3.35.3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / app / modules / import-export-customization / data / controller.php

controller.php in Elementor Website Builder – more than just a page builder 3.35.3, at app/modules/import-export-customization/data/controller.php

37 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 namespace Elementor\App\Modules\ImportExportCustomization\Data;
4
5 use Elementor\App\Modules\ImportExportCustomization\Data\Routes\Export;
6 use Elementor\App\Modules\ImportExportCustomization\Data\Routes\Upload;
7 use Elementor\App\Modules\ImportExportCustomization\Data\Routes\Import;
8 use Elementor\App\Modules\ImportExportCustomization\Data\Routes\Import_Runner;
9 use Elementor\App\Modules\ImportExportCustomization\Data\Routes\Process_Media;
10 use Elementor\App\Modules\ImportExportCustomization\Data\Routes\Revert;
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit; // Exit if accessed directly.
14 }
15
16 class Controller {
17 const API_NAMESPACE = 'elementor/v1';
18 const API_BASE = 'import-export-customization';
19
20 public static function register_hooks() {
21 add_action( 'rest_api_init', fn() => self::register_routes() );
22 }
23
24 public static function get_base_url() {
25 return get_rest_url() . self::API_NAMESPACE . '/' . self::API_BASE;
26 }
27
28 private static function register_routes() {
29 ( new Export() )->register_route( self::API_NAMESPACE, self::API_BASE );
30 ( new Upload() )->register_route( self::API_NAMESPACE, self::API_BASE );
31 ( new Import() )->register_route( self::API_NAMESPACE, self::API_BASE );
32 ( new Import_Runner() )->register_route( self::API_NAMESPACE, self::API_BASE );
33 ( new Process_Media() )->register_route( self::API_NAMESPACE, self::API_BASE );
34 ( new Revert() )->register_route( self::API_NAMESPACE, self::API_BASE );
35 }
36 }
37