From 315800028c882409dc3244cbd4d00b6fadcd84cf Mon Sep 17 00:00:00 2001 From: agata <agata@insiberia.net> Date: Fri, 2 Sep 2022 17:27:42 +0200 Subject: [PATCH] Revert "Patch to manage blocks" This reverts commit e3e4b3eed3f45248d008726b069c9ef75121dfd7. --- composer.patches.json | 3 +-- patches/core/ai-blocks.patch | 25 ------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 patches/core/ai-blocks.patch diff --git a/composer.patches.json b/composer.patches.json index 3aaa22d8..a30bc67e 100644 --- a/composer.patches.json +++ b/composer.patches.json @@ -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" diff --git a/patches/core/ai-blocks.patch b/patches/core/ai-blocks.patch deleted file mode 100644 index 8ebe7083..00000000 --- a/patches/core/ai-blocks.patch +++ /dev/null @@ -1,25 +0,0 @@ -<?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' ); - -- GitLab