eddev 2.0.0-beta.86 → 2.0.0-beta.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,9 +27,23 @@ export function configureEditorBlocks(config) {
|
|
|
27
27
|
}
|
|
28
28
|
const currentBlocks = wp.data.select("core/block-editor").getBlocks();
|
|
29
29
|
const templateBlocks = currentBlocks.filter((block) => block.attributes.isFromTemplate);
|
|
30
|
-
let blocks = currentBlocks.filter((block) => !block.attributes.isFromTemplate);
|
|
31
30
|
let header = config.headerTemplate ? syncBlocks(transformTemplateToBlocks(config.headerTemplate)) : [];
|
|
32
31
|
let footer = config.footerTemplate ? syncBlocks(transformTemplateToBlocks(config.footerTemplate)) : [];
|
|
32
|
+
let blocks = currentBlocks.filter((block) => !header.includes(block) && !footer.includes(block));
|
|
33
|
+
blocks.forEach((block) => {
|
|
34
|
+
delete block.attributes.lock;
|
|
35
|
+
delete block.isFromTemplate;
|
|
36
|
+
});
|
|
37
|
+
// const blocksToDelete = currentBlocks.filter((block: any) => {
|
|
38
|
+
// return !header.includes(block) && !footer.includes(block) && !blocks.includes(block)
|
|
39
|
+
// })
|
|
40
|
+
// blocksToDelete.forEach((block: any) => {
|
|
41
|
+
// delete block.attributes.lock
|
|
42
|
+
// delete block.isFromTemplate
|
|
43
|
+
// })
|
|
44
|
+
// blocks = [...blocks, ...blocksToDelete]
|
|
45
|
+
// console.log("blocks", blocks)
|
|
46
|
+
// console.log("blocksToDelete", blocksToDelete)
|
|
33
47
|
if (!blocks.length && config.defaultBlocks) {
|
|
34
48
|
blocks = transformTemplateToBlocks(config.defaultBlocks, false, false);
|
|
35
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-beta.
|
|
1
|
+
export declare const VERSION = "2.0.0-beta.87";
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.0.0-beta.
|
|
1
|
+
export const VERSION = "2.0.0-beta.87";
|