From f7cdc5ea6715798d121043907128d8ef77410333 Mon Sep 17 00:00:00 2001
From: agata <agata@insiberia.net>
Date: Thu, 1 Sep 2022 18:59:20 +0200
Subject: [PATCH] Revert "add ai-blocks.php"

This reverts commit 8e24c77de1737d44791724e5ad3b6f7a264de2b5.
---
 ai-blocks.php | 40 ----------------------------------------
 1 file changed, 40 deletions(-)
 delete mode 100644 ai-blocks.php

diff --git a/ai-blocks.php b/ai-blocks.php
deleted file mode 100644
index 05ed58f..0000000
--- a/ai-blocks.php
+++ /dev/null
@@ -1,40 +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
-**/
-
-
-add_action( 'setup_theme', 'ai_blocks_setup_theme_action' );
-
-/**
- * Function for `setup_theme` action-hook.
- * 
- * @return void
- */
-function ai_blocks_setup_theme_action(){
-
-/*
- * Blacklist specific Gutenberg blocks
- *
- * @author Misha Rudrastyh
- * @link https://rudrastyh.com/gutenberg/remove-default-blocks.html#blacklist-blocks
- */
-add_filter( 'allowed_block_types_all', 'blacklist_blocks' );
- 
-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 );
-	
-}
-}
-- 
GitLab