feat: manifest checks, Divi compatibility from manifests, reference fingerprints
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
function et_theme_builder_load_template_setting_options( $setting_ids ) {
|
||||
$flat_parent_settings = et_theme_builder_get_flat_template_settings_options();
|
||||
$groups = array();
|
||||
|
||||
foreach ( $setting_ids as $setting_id ) {
|
||||
$parent_id = explode( ET_THEME_BUILDER_SETTING_SEPARATOR, $setting_id );
|
||||
$entity_id = implode( '', array_slice( $parent_id, -1 ) );
|
||||
$parent_id = array_slice( $parent_id, 0, -1 );
|
||||
$parent_id = implode( ET_THEME_BUILDER_SETTING_SEPARATOR, $parent_id ) . ET_THEME_BUILDER_SETTING_SEPARATOR;
|
||||
|
||||
if ( ! isset( $flat_parent_settings[ $parent_id ] ) ) {
|
||||
// Top-level, invalid or unknown setting.
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( ! isset( $groups[ $parent_id ] ) ) {
|
||||
$groups[ $parent_id ] = array(
|
||||
'parent' => $flat_parent_settings[ $parent_id ],
|
||||
'settings' => array(),
|
||||
);
|
||||
}
|
||||
|
||||
$groups[ $parent_id ]['settings'][ $setting_id ] = $entity_id;
|
||||
}
|
||||
|
||||
$settings = array();
|
||||
|
||||
foreach ( $groups as $parent_id => $group ) {
|
||||
$settings = array_merge(
|
||||
$settings,
|
||||
et_theme_builder_get_template_setting_child_options( $group['parent'], $group['settings'] )
|
||||
);
|
||||
}
|
||||
|
||||
return $settings;
|
||||
}
|
||||
Reference in New Issue
Block a user