Skip to content

Commit

Permalink
Merge branch 'main' into fix/#52-webpack-config-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
khleomix committed Feb 3, 2025
2 parents 740b487 + 666af80 commit 141e295
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
2 changes: 1 addition & 1 deletion assets/js/block-filters/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
*/

// Import the block filter file.
import './unregister-core-embed';
import './unregister-core-blocks';
import './buttons';
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ document.addEventListener('DOMContentLoaded', function () {
// },
];

// Keep only the necessary embed variations.
const embedBlockVariations = wp.blocks.getBlockVariations('core/embed');
const keepEmbeds = [
'twitter',
'wordpress',
'spotify',
'soundcloud',
'flickr',
];

// Unregister unused blocks.
unusedBlocks.forEach((block) => {
wp.blocks.unregisterBlockType(block);
Expand All @@ -46,16 +36,6 @@ document.addEventListener('DOMContentLoaded', function () {
variation.blockVariationName
);
});

// Keep only necessary embed variations.
embedBlockVariations.forEach((variation) => {
if (!keepEmbeds.includes(variation.name)) {
wp.blocks.unregisterBlockVariation(
'core/embed',
variation.name
);
}
});
} else {
// eslint-disable-next-line no-console
console.error('wp.blocks object is not available.');
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webdevstudios/wds-bt",
"version": "1.0.0",
"description": "A block starter theme from WebDevStudios.",
"description": "A FSE/Gutenberg block starter theme from WebDevStudios.",
"type": "wordpress-theme",
"license": "GPL-2.0-or-later",
"authors": [
Expand Down Expand Up @@ -37,4 +37,4 @@
"phpcs": "./vendor/bin/phpcs --report=full,source",
"phpcs-fix": "./vendor/bin/phpcbf --report=summary,source"
}
}
}

0 comments on commit 141e295

Please sign in to comment.