REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.13 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/elementor/modules/mcp/abilities/get-globals-ability.php
Text
Base64
<?php namespace Elementor\Modules\Mcp\Abilities; use Elementor\Modules\GlobalClasses\Global_Classes_Repository; use Elementor\Modules\Variables\Services\Batch_Operations\Batch_Processor; use Elementor\Modules\Variables\Services\Variables_Service; use Elementor\Modules\Variables\Storage\Variables_Repository; use Elementor\Plugin; if ( ! defined( 'ABSPATH' ) ) { exit; } class Get_Globals_Ability extends Abstract_Ability { protected function get_ability_id(): string { return 'elementor/get-globals'; } protected function get_definition(): Ability_Definition { return new Ability_Definition( __( 'Get Elementor Globals', 'elementor' ), __( 'Returns site-wide Elementor design data: global classes (shared CSS classes from the kit) and variables (design tokens such as colors and fonts tied to the active kit). Use when you need kit-level styling context, not a single page tree.', 'elementor' ), 'elementor', [ 'type' => 'object', 'properties' => [ 'global_classes' => [ 'type' => 'object', 'description' => 'Global class definitions and order from the active kit.', ], 'variables' => [ 'type' => 'object', 'description' => 'Variables list, total count, and watermark from the active kit.', ], ], ], [ 'annotations' => [ 'readonly' => true, 'idempotent' => true, 'destructive' => false, ], ], function () { return current_user_can( 'edit_posts' ); } // No input_schema — this ability takes no input. ); } public function execute( $input = [] ) { $kit = Plugin::$instance->kits_manager->get_active_kit(); $classes_payload = Global_Classes_Repository::make( $kit )->all()->get(); $variables_service = new Variables_Service( new Variables_Repository( $kit ), new Batch_Processor() ); $variables_payload = $variables_service->load(); return [ 'global_classes' => $classes_payload, 'variables' => [ 'variables' => $variables_payload['data'] ?? [], 'total' => isset( $variables_payload['data'] ) ? count( $variables_payload['data'] ) : 0, 'watermark' => $variables_payload['watermark'] ?? null, ], ]; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ability-definition.php
1.17 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
abstract-ability.php
518 B
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
create-page-ability.php
3.47 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get-globals-ability.php
2.13 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
get-structure-ability.php
2.97 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
list-pages-ability.php
2.45 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
update-settings-ability.php
2.80 KB
lrw-r--r--
2026-05-20 16:19:28
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).