| Server IP : 177.55.116.72 / Your IP : 216.73.217.104 Web Server : Apache System : Linux UBAPCWEB27 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 User : web_hotelpraiadoc ( 3326) PHP Version : 8.2.20 Disable Function : proc_open, passthru, escapeshellcmd, exec, shell_exec, system, ini_alter, dl, popen, php_check_syntax, show_source, highlight_file, symlink, link, openlog, apache_child_terminate MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/hotelpraiadoconde.com.br/public/wp-content/plugins/pro-elements/modules/variables/ |
Upload File : |
<?php
namespace ElementorPro\Modules\Variables;
use Elementor\Modules\Variables\Classes\Variable_Types_Registry;
use ElementorPro\Modules\Variables\Classes\Style_Schema;
use ElementorPro\Modules\Variables\PropTypes\Size_Variable_Prop_Type;
use Elementor\Modules\Variables\Transformers\Global_Variable_Transformer;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
class Hooks {
const PACKAGES = [
'editor-variables-extended',
];
public function register() {
$this->register_styles_transformers()
->register_packages()
->filter_for_style_schema()
->register_size_variable_types();
return $this;
}
private function register_size_variable_types() {
add_action( 'elementor/variables/register', function ( Variable_Types_Registry $registry ) {
$registry->register( Size_Variable_Prop_Type::get_key(), new Size_Variable_Prop_Type() );
} );
return $this;
}
private function register_styles_transformers() {
add_action( 'elementor/atomic-widgets/styles/transformers/register', function ( $registry ) {
$registry->register( Size_Variable_Prop_Type::get_key(), new Global_Variable_Transformer() );
} );
return $this;
}
private function register_packages() {
add_filter( 'elementor-pro/editor/v2/packages', function ( $packages ) {
return array_merge( $packages, self::PACKAGES );
} );
return $this;
}
private function filter_for_style_schema() {
add_filter( 'elementor/atomic-widgets/styles/schema', function ( array $schema ) {
return ( new Style_Schema() )->augment( $schema );
} );
return $this;
}
}