説明
Block Manager は、サイト管理者が不要なブロックをグローバルに削除し、個々のブロックに割り当てられたカテゴリーを更新して、管理者の編集エクスペリエンスを整理するための直感的なツールです。
特長
- ブロックを無効にする: WordPress ブロックエディターのブロックマネージャー機能とは異なり、このプラグインはサイト上のすべてのユーザーのブロックをグローバルに無効 (削除) します。
- ブロックカテゴリー: Category Switcher は、各 WordPress ブロックに割り当てられたカテゴリーを更新する機能を提供します。
- 検索とフィルタ: サイドバーのブロック検索機能を使用して、ブロックをすばやく見つけます。
- フック: さまざまなフックとフィルターを使用して、
functions.php
からブロックを更新します。 - 埋め込みブロック: 無駄なオプションの大部分を削除して、実際にサイトに含める埋め込みブロックを選択します。
フックとフィルター
Block Manager フックを使用して、コード経由でブロックを制御し、複数の WordPress 環境間でオプションを同期します。
gbm_disabled_blocks
gbm_disabled_blocks
フィルターを使用して、バックエンドコード経由でブロックを制御します。
// functions.php
add_filter('gbm_disabled_blocks', function(){
return [
'core/buttons',
'core/columns',
'core/freeform',
'core/table'
];
});
gbm_block_categories
gbm_block_categories
フィルターを使用して、バックエンドコード経由でブロックカテゴリーを更新します。
// functions.php
add_filter( 'gbm_block_categories', function() {
return [
[ 'block' => 'core/html', 'cat' => 'design' ],
[ 'block' => 'core/cover', 'cat' => 'design' ],
[ 'block' => 'core/details', 'cat' => 'design' ]
];
});
block_manager_user_role
Block Manager プラグインへのアクセスが許可される最小ユーザー権限を更新します。
// functions.php
add_filter(
'block_manager_user_role',
'edit_theme_options' // Default: activate_plugins
);
スクリーンショット
インストール
Block Manager のインストール方法です。
WordPress 管理画面を使用
- 管理画面の「プラグイン」から「新規追加」を選択
- 「Block Manager」を検索
- 「今すぐインストール」をクリック
- プラグインダッシュボードでプラグインを有効化
WordPress ダッシュボードでアップロードする
- 管理画面の「プラグイン」から「新規追加」を選択
- 「アップロード」エリアに移動
- コンピュータから
block-manager.zip
を選択 - 「今すぐインストール」をクリック
- プラグインダッシュボードからプラグインを有効化
FTP を使用
block-manager.zip
をダウンロードblock-manager
ディレクトリをコンピュータに展開しますblock-manager
ディレクトリを/wp-content/plugins/
ディレクトリにアップロードします- プラグインダッシュボードからプラグインを有効化
次にプラグインを使用するため wp-admin -> 設定 -> Block Manager
へ移動します。
評価
2023年10月3日
Extremely useful plugin and one of the first I added to all of my installs. Thank you, Darren!
2023年5月26日
1 reply
I have finished the Korean translation.I just want to say thank you for developing such a good plugin.And I hope it will be translated into more languages so that many WordPress users can use it conveniently.
Gutenberg Block Manager 한국어 번역을 모두 마쳤습니다.좋은 플러그인을 개발해 주어서 고맙다는 인사를 전하고 싶습니다.그리고 보다 많은 언어로 번역되어 많은 워드프레스 사용자들이 편리하게 사용할 수 있기를 바랍니다.
2022年11月19日
2 replies
I wanted to like this plug for the nice UI design. When I open the block manager screen, the two grey tabs where block listings are suppose to display are empty. It looks like some kind of glitch.
Update: I added a couple more review stars for author's response. Hopefully the issue gets fixed soon.
2022年9月15日
1 reply
Having the ability to disable some of the more obscure, unnecessary blocks is essential and this plugin features on every site I work on.
Thanks!
2022年1月17日
1 reply
It makes the job done! Thanks
2021年8月15日
3 replies
I love this plugin! I already had my own code to whitelist certain blocks in the editor, but I couldn't figure how to remove certain core-embed blocks. But with this plugin, I'm able to remove those blocks as well! I abandoned my custom code and just used this instead.
It would be nice to see it have a feature to restrict blocks to certain roles. PublishPress Blocks has this, but it's very clunky and also adds its own blocks. I prefer a simple Block Manager like this one
//updated my review again because it now works
貢献者と開発者
変更履歴
2.1.1 – November 1, 2023
- HOTFIX: Fix for undefined React key warning when
WP_DEBUG
is enabled.
2.1.0 – November 1, 2023
- NEW: Adding notification system for feedback after an action is performed.
- UPDATE: Added display indicators for variation blocks.
- FIX: Fixed potential upgrade issue with disabled blocks throwing admin error due to object vs array data.
- FIX: Fixed issue with missing loading animation.
- FIX: Fixed issue with block variations not counting towards block count.
2.0.0 – October 20, 2023
- NEW – New admin interface and interactions for the Block and Block Categories pages.
- NEW: Added block category export and hook
gbm_block_categories
to allow for changing block categories at the theme level. - UPDATE: Updated build scripts and dependencies to use wp-scripts.
- UPDATE: Block Manager is now supported on Widget screen.
- FIX: Fixed issue with some missing block definitions.
- FIX: Fixed issues with block icons not rendering for some blocks.
- FIX: Fixed issue with various blocks crashing the Block Manager edit screen.
- FIX: Other various bug fixes and overall improvements.
1.2.5 – May 23, 2023
- FIX – Fixed potential issue with JS errors on Site Editor screens.
- UPDATE – WP version bump and testing.
1.2.4 – November 30, 2022
- HOTFIX – Fixed issue with plugin not working on
edit
screens.
1.2.3 – November 19, 2022
- FIX: Added fix for blank screen when users have JetPack plugin enabled.
- FIX: Fixed issue with missing semi-colon in Block Manager export functionality.
- FIX: Added fix for only loading the block removal script on
New
andEdit
screens.
1.2.2 – August 17, 2021
- NEW – Added new Reset option that will clear all disabled blocks.
- FIX – Added fix for possible issue with icon width on blocks admin page.
- UPDATE – Updated tab navigation inside the plugin to make it more clear which section was being edited.
1.2.1 – February 28, 2021
- UPDATE – Added Category Switcher support for all block including core Gutenberg blocks.
1.2 – February 27, 2021
- NEW – Added new Category Switcher.
- The Category Switcher provides functionality for changing the category core Gutenberg blocks.
- Changing a block category will update the location of the block in the Gutenberg Block Inserter while editing posts.
- FIX – Fixed issue with missing semi-colon in export code.
- UPDATE – Various admin UI/UX updates.
1.1 – January 19, 2021
- NEW – Added new
gbm_disabled_blocks
filter to allow for disabling blocks via functions.php - NEW – Added
Export
option to dynamically build a pre-populatedgbm_disabled_blocks
filter. - NEW – Added Grid/List view toggle.
1.0.1 – January 2, 2021
- NEW – Added support for Embed blocks (Twitter, Facebook, Spotify etc). These blocks were changed in WP 5.6 and the handler had to be updated to manage the active/inactive states.
- FIX – Fixed REST API warning for missing
permissions_callback
.
1.0 – January 6, 2020
- Initial release