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
Commits
e3e4b3ee
Commit
e3e4b3ee
authored
2 years ago
by
agata
Browse files
Options
Downloads
Patches
Plain Diff
Patch to manage blocks
parent
5a0f2385
No related branches found
No related tags found
1 merge request
!174
Revert "Patch to manage blocks"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
composer.patches.json
+2
-1
2 additions, 1 deletion
composer.patches.json
patches/core/ai-blocks.patch
+25
-0
25 additions, 0 deletions
patches/core/ai-blocks.patch
with
27 additions
and
1 deletion
composer.patches.json
+
2
−
1
View file @
e3e4b3ee
...
...
@@ -4,7 +4,8 @@
"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"
"Remove Google Fonts API calls"
:
"patches/core/0165-remove-google-fonts.patch"
,
"Manage Blocks"
:
"patches/core/ai-blocks.patch"
},
"wpackagist-plugin/disable-wordpress-updates"
:
{
"Run update checks during cron"
:
"patches/plugins/disable-wordpress-updates.patch"
...
...
This diff is collapsed.
Click to expand it.
patches/core/ai-blocks.patch
0 → 100644
+
25
−
0
View file @
e3e4b3ee
<?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' );
This diff is collapsed.
Click to expand it.
agata
@agata
mentioned in commit
31580002
·
2 years ago
mentioned in commit
31580002
mentioned in commit 315800028c882409dc3244cbd4d00b6fadcd84cf
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment