PluginProbe
Elementor Website Builder – more than just a page builder / 3.6.1
Elementor Website Builder – more than just a page builder v3.6.1
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 / modules / web-cli / module.php

module.php in Elementor Website Builder – more than just a page builder 3.6.1, at modules/web-cli/module.php

46 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Modules\WebCli;
3
4 use Elementor\Core\Base\App;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit; // Exit if accessed directly
8 }
9
10 class Module extends App {
11
12 public function get_name() {
13 return 'web-cli';
14 }
15
16 public function __construct() {
17 add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_scripts' ] );
18 add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ] );
19 add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ] );
20 add_action( 'elementor/frontend/after_register_scripts', [ $this, 'register_scripts' ] );
21 }
22
23 public function register_scripts() {
24 wp_register_script(
25 'elementor-web-cli',
26 $this->get_js_assets_url( 'web-cli' ),
27 [],
28 ELEMENTOR_VERSION,
29 true
30 );
31
32 $this->print_config( 'elementor-web-cli' );
33 }
34
35 protected function get_init_settings() {
36 return [
37 'isDebug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
38 'urls' => [
39 'rest' => get_rest_url(),
40 'assets' => ELEMENTOR_ASSETS_URL,
41 ],
42 'nonce' => wp_create_nonce( 'wp_rest' ),
43 ];
44 }
45 }
46