# elementor/4.1.0-dev1/modules/web-cli/module.php

Elementor Website Builder – more than just a page builder, version 4.1.0-dev1. 49 lines.

- Page: https://pluginprobe.com/plugins/elementor/4.1.0-dev1/code/modules/web-cli/module.php
- Raw: https://pluginprobe.com/plugins/elementor/4.1.0-dev1/raw/modules/web-cli/module.php
- Modified: 2025-03-17T13:28:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/elementor/4.1.0-dev1/code/modules/web-cli/module.php#L10-L20`.

```php
<?php
namespace Elementor\Modules\WebCli;

use Elementor\Core\Base\App;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

class Module extends App {

	public function get_name() {
		return 'web-cli';
	}

	public function __construct() {
		add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_scripts' ] );
		add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ] );
		add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ] );
		add_action( 'elementor/frontend/after_register_scripts', [ $this, 'register_scripts' ] );
	}

	public function register_scripts() {
		wp_register_script(
			'elementor-web-cli',
			$this->get_js_assets_url( 'web-cli' ),
			[
				'jquery',
			],
			ELEMENTOR_VERSION,
			true
		);

		$this->print_config( 'elementor-web-cli' );
	}

	protected function get_init_settings() {
		return [
			'isDebug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
			'urls' => [
				'rest' => get_rest_url(),
				'assets' => ELEMENTOR_ASSETS_URL,
			],
			'nonce' => wp_create_nonce( 'wp_rest' ),
			'version' => ELEMENTOR_VERSION,
		];
	}
}

```
