PluginProbe
Elementor Website Builder – more than just a page builder / 4.3.3
Elementor Website Builder – more than just a page builder v4.3.3
4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 All 457 releases
← All changes | modules/mcp/abilities/appliers/element-config-applier.php +6 -2 4.3.0-beta2 → 4.3.3 View file →
@@ -45,8 +45,9 @@
45 45 */
46 46 public function apply( array &$config_id_index, array $element_config, array $widget_configs, ?Document $document = null ): array {
47 47 $errors = [];
48 48 $warnings = [];
49 + $warning_codes = [];
49 50 $component_entries = [];
50 51
51 52 foreach ( $element_config as $config_id => $settings ) {
52 53 if ( ! isset( $config_id_index[ $config_id ] ) || ! is_array( $settings ) ) {
@@ -102,9 +103,9 @@
102 103 $node['settings'] = $this->merge_with_clears( $node['settings'] ?? [], $settings );
103 104 continue;
104 105 }
105 106
106 - $outcome = $this->resolve_settings_against_schema( $settings, $schema, $tag, $config_id, $errors, $warnings );
107 + $outcome = $this->resolve_settings_against_schema( $settings, $schema, $tag, $config_id, $errors, $warnings, $warning_codes );
107 108
108 109 $node['settings'] = array_merge( $node['settings'] ?? [], $outcome['resolved'] );
109 110
110 111 foreach ( $outcome['cleared'] as $cleared_key ) {
@@ -130,8 +131,9 @@
130 131
131 132 return [
132 133 'error' => $this->combine_errors( $errors, $component_error ),
133 134 'warnings' => $warnings,
135 + 'warning_codes' => array_values( array_unique( $warning_codes ) ),
134 136 ];
135 137 }
136 138
137 139 private function combine_errors( array $settings_errors, ?\WP_Error $component_error ): ?\WP_Error {
@@ -163,9 +165,10 @@
163 165 array $schema,
164 166 string $element_type,
165 167 string $config_id,
166 168 array &$errors,
167 - array &$warnings
169 + array &$warnings,
170 + array &$warning_codes = []
168 171 ): array {
169 172 $alias_map = Prop_Canonicalizer::build_alias_map( $schema );
170 173 $resolved = [];
171 174 $cleared = [];
@@ -179,8 +182,9 @@
179 182 $config_id,
180 183 $name,
181 184 $element_type
182 185 );
186 + $warning_codes[] = 'prop_not_supported';
183 187 continue;
184 188 }
185 189
186 190 if ( null === $value ) {