Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
noblogs-composer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Service Desk
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Noblogs
noblogs-composer
Merge requests
!174
Revert "Patch to manage blocks"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Revert "Patch to manage blocks"
blocks
into
master
Overview
0
Commits
4
Pipelines
1
Changes
2
Merged
agata
requested to merge
blocks
into
master
2 years ago
Overview
0
Commits
4
Pipelines
1
Changes
2
Expand
This reverts commit
e3e4b3ee
.
0
0
Merge request reports
Viewing commit
31580002
Prev
Next
Show latest version
2 files
+
1
−
27
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
31580002
Revert "Patch to manage blocks"
· 31580002
agata
authored
2 years ago
This reverts commit
e3e4b3ee
.
patches/core/ai-blocks.patch deleted
100644 → 0
+
0
−
25
Options
<?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' );
Loading