|
Server IP : 168.119.101.163 / Your IP : 216.73.217.54 Web Server : Apache/2 System : Linux web02.webzuiver.nl 4.18.0-553.126.2.lve.el8.x86_64 #1 SMP Thu May 28 14:12:30 UTC 2026 x86_64 User : equine ( 1027) PHP Version : 8.1.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF Directory (0755) : /home/equine/public_html/wp-content/plugins/elementor/core/editor/data/globals/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
namespace Elementor\Core\Editor\Data\Globals;
use Elementor\Data\V2\Base\Controller as Controller_Base;
use Elementor\Data\V2\Base\Endpoint;
use Elementor\Plugin;
class Controller extends Controller_Base {
public function get_name() {
return 'globals';
}
public function register_endpoints() {
$this->register_endpoint( new Endpoints\Colors( $this ) );
$this->register_endpoint( new Endpoints\Typography( $this ) );
}
public function get_collection_params() {
// Does not have 'get_items' args (OPTIONS).
// Maybe TODO: try `$this->get_index_endpoint()->get_collection_params()`.
return [];
}
public function get_permission_callback( $request ) {
$method_type = $request->get_method();
if ( \WP_REST_Server::READABLE === $method_type ) {
// Allow internal get global values. (e.g render global.css for a visitor)
if ( Plugin::$instance->data_manager_v2->is_internal() ) {
return true;
}
return current_user_can( 'edit_posts' );
}
if ( \WP_REST_Server::CREATABLE === $method_type || \WP_REST_Server::DELETABLE === $method_type ) {
return current_user_can( 'manage_options' );
}
return false;
}
protected function register_index_endpoint() {
$this->register_endpoint( new Endpoint\Index\AllChildren( $this ) );
}
}