This commit is contained in:
proelements
2026-05-04 15:07:06 +03:00
parent 872bc6fb57
commit 741540b767
148 changed files with 11063 additions and 1016 deletions
@@ -0,0 +1,30 @@
<?php
namespace ElementorPro\Modules\AtomicWidgets;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Settings_Resolver {
public static function resolve( array $settings ): array {
$resolved = [];
foreach ( $settings as $key => $value ) {
$resolved[ $key ] = static::resolve_value( $value );
}
return $resolved;
}
private static function resolve_value( $value ) {
if ( ! is_array( $value ) ) {
return $value;
}
if ( ! empty( $value['$$type'] ) && array_key_exists( 'value', $value ) ) {
return static::resolve_value( $value['value'] );
}
return array_map( [ static::class, 'resolve_value' ], $value );
}
}