PluginProbe
ECS – Ele Custom Skin for Elementor / 4.3.10
ECS – Ele Custom Skin for Elementor v4.3.10
4.3.11 4.3.10 4.3.9 4.3.8 4.3.7 4.3.6 4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.11 4.1.10 4.1.9 4.1.8 4.1.6 4.1.7 4.1.5 4.1.4 4.1.1 4.1.2 trunk 1.0.0 All 57 releases
ele-custom-skin / modules / json-poweredit / class-ecs-json-poweredit-module.php
class-ecs-json-poweredit-module.php
54 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Module: JSON PowerEdit
4 *
5 * Adds an "Edit JSON" button to Elementor repeater controls in the editor panel.
6 * Allows viewing, editing and replacing the repeater's data as raw JSON.
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 class ECS_JSON_PowerEdit_Module extends ECS_Module_Base {
14
15 // ── Identity ──────────────────────────────────────────────────────────────
16
17 public function get_id(): string {
18 return 'json_poweredit';
19 }
20
21 public function get_title(): string {
22 return __( 'JSON PowerEdit', 'ele-custom-skin' );
23 }
24
25 public function get_description(): string {
26 return __( 'Adds an "Edit JSON" button to every Elementor repeater control. View, edit and bulk-replace repeater data as raw JSON directly in the editor.', 'ele-custom-skin' );
27 }
28
29 // ── Boot ──────────────────────────────────────────────────────────────────
30
31 public function boot(): void {
32 // Nothing to hook server-side; all functionality is JS-only (editor).
33 }
34
35 // ── Assets ────────────────────────────────────────────────────────────────
36
37 public function enqueue_editor_assets(): void {
38 wp_enqueue_style(
39 'ecs-json-poweredit-editor',
40 ECS_URL . 'modules/json-poweredit/assets/css/ecs-json-poweredit-editor.css',
41 [],
42 ECS_VERSION
43 );
44
45 wp_enqueue_script(
46 'ecs-json-poweredit-editor',
47 ECS_URL . 'modules/json-poweredit/assets/js/ecs-json-poweredit-editor.js',
48 [ 'jquery', 'elementor-editor' ],
49 ECS_VERSION,
50 true
51 );
52 }
53 }
54