Skip to content
Snippets Groups Projects
Commit 31580002 authored by agata's avatar agata
Browse files

Revert "Patch to manage blocks"

This reverts commit e3e4b3ee.
parent e3e4b3ee
No related branches found
No related tags found
1 merge request!174Revert "Patch to manage blocks"
......@@ -4,8 +4,7 @@
"Anonymize requests to api.wordpress.org for updates": "patches/core/anonymize-update.php.patch",
"Do not perform pingbacks and trackbacks when we update via cron": "patches/core/0103-Remove-pingback-trackback.patch",
"Load JS library locally instead than from Googleapis": "patches/core/0155-Removing-reference-to-googleapis-from-wp-includes-up.patch",
"Remove Google Fonts API calls": "patches/core/0165-remove-google-fonts.patch",
"Manage Blocks":"patches/core/ai-blocks.patch"
"Remove Google Fonts API calls": "patches/core/0165-remove-google-fonts.patch"
},
"wpackagist-plugin/disable-wordpress-updates": {
"Run update checks during cron": "patches/plugins/disable-wordpress-updates.patch"
......
<?php
/*
* Plugin Name: A/I - Add a denylist of gutenberg blocks
* Plugin URI:
* Description: Remove some block from editor
* Version: 0.0.1
* Author: Autistici/Inventati
* Author URI: https://autistici.org
**/
function blacklist_blocks( $allowed_blocks ) {
// get all the registered blocks
$blocks = WP_Block_Type_Registry::get_instance()->get_all_registered();
// then disable some of them
unset( $blocks[ 'core/embed' ] );
// return the new list of allowed blocks
return array_keys( $blocks );
}
add_filter( 'allowed_block_types_all', 'blacklist_blocks' );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment