PluginProbe
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! / 3.1.9
Templately – Elementor & Gutenberg Template Library: 6500+ Free & Pro Ready Templates And Cloud! v3.1.9
3.8.0 3.7.5 3.7.4 3.7.3 3.7.2 1-final 3.7.1 3.7.0 3.6.8 3.6.7 3.6.6 3.6.5 3.6.4 3.6.3 3.6.2 3.6.1 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 All 112 releases
← All changes | includes/Core/Importer/Utils/GutenbergHelper.php +4 -11 3.1.10 → 3.1.9 View file →
@@ -135,19 +135,12 @@
135 135 $changed = false;
136 136 foreach ( $blocks as &$block ) {
137 137 $this->sse_log('query', 'Finalizing archive settings, just a moment...', 1, 'eventLog');
138 138
139 - if (isset($block['attrs']['id'])) {
140 - $blockId = $block['attrs']['id'];
141 - $archiveSettings = $this->imported_data['archive_settings'];
142 -
143 - $archiveIds = $archiveSettings[$blockId] ?? false;
144 -
145 - if ($archiveIds) {
146 - $block['attrs']['id'] = $archiveIds['page_id'];
147 - $block['attrs']['url'] = get_the_permalink($archiveIds['page_id']);
148 - $changed = true;
149 - }
139 + if ( isset( $block['attrs']['id'] ) && $block['attrs']['id'] === $this->imported_data['archive_settings']['archive_id'] ) {
140 + $changed = true;
141 + $block['attrs']['id'] = $this->imported_data['archive_settings']['page_id'];
142 + $block['attrs']['url'] = get_the_permalink( $this->imported_data['archive_settings']['page_id'] );
150 143 }
151 144 }
152 145 if ( $changed ) {
153 146 wp_update_post( [