| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /inetpub/wwwroot/prosvasi/wp-content/plugins/elementor/modules/mcp/abilities/ |
Upload File : |
<?php
namespace Elementor\Modules\Mcp\Abilities;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Ability_Definition {
public string $label;
public string $description;
public string $category;
public array $output_schema;
public array $meta;
/** @var callable */
public $permission_callback;
public array $input_schema;
public function __construct(
string $label,
string $description,
string $category,
array $output_schema,
array $meta,
callable $permission_callback,
array $input_schema = []
) {
$this->label = $label;
$this->description = $description;
$this->category = $category;
$this->output_schema = $output_schema;
$this->meta = $meta;
$this->permission_callback = $permission_callback;
$this->input_schema = $input_schema;
}
public function to_array(): array {
$definition = [
'label' => $this->label,
'description' => $this->description,
'category' => $this->category,
'output_schema' => $this->output_schema,
'meta' => $this->meta,
'permission_callback' => $this->permission_callback,
];
if ( ! empty( $this->input_schema ) ) {
$definition['input_schema'] = $this->input_schema;
}
return $definition;
}
}