[WordPress] 外掛分享: Block Manager

首頁外掛目錄 › Block Manager
WordPress 外掛 Block Manager 的封面圖片
4,000+
安裝啟用
★★★★
4.9/5 分(13 則評價)
63 天前
最後更新
問題解決
WordPress 5.0+ PHP 7.0+ v3.2.0 上架:2020-01-06

內容簡介

Gutenberg Block Manager 是一個直觀的工具,供 WordPress 網站管理員全域管理每個區塊的啟用/禁用狀態。禁用的區塊將從文章編輯頁面的區塊插入器中刪除。

功能

全域啟用/禁用區塊 – 不同於 Gutenberg 編輯器中的區塊管理功能,此工具將全域啟用/禁用區塊,並適用於網站上的所有使用者。
區塊搜尋與篩選 – 在側邊欄中使用區塊搜尋功能快速定位各區塊。
篩選勾子 – 使用 gbm_disabled_blocks 篩選勾子從 functions.php 控制區塊。
類別切換器 – 支援更改 Gutenberg 區塊的類別功能。

篩選器
gbm_disabled_blocks

使用 gbm_disabled_blocks 篩選器透過後端代碼控制區塊,可輕鬆控制區塊在多個 WordPress 環境中的狀態。

add_filter('gbm_disabled_blocks', function(){
return ['core/buttons', 'core/columns', 'core/freeform', 'core/table'];
});

外掛標籤

開發者團隊

⬇ 下載最新版 (v3.2.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Block Manager」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Block Manager gives you complete control over the WordPress Block Editor by allowing you to:
✅ Disable Blocks – Remove unwanted blocks from the Block Inserter and Editor
✅ Disable Patterns – Hide block patterns you don’t need with a single click
✅ Change Block Categories – Reorganize blocks by updating their categories for better workflow
Simplify your WordPress editing experience by removing clutter and organizing blocks exactly how you need them. Perfect for client sites, custom workflows, and maintaining a clean, focused Block Editor.
Key Features
Disable Blocks
– Globally remove any block from the Block Inserter and Block Editor.
– Disable block variations individually while keeping the core block.
– Control Embed blocks (Twitter, Facebook, YouTube, etc.) to remove unwanted options.
– Toggle entire block categories on/off with one click.
Disable Block Patterns
– Remove unwanted block patterns with a simple toggle.
– Hide core WordPress patterns that don’t fit your site.
– Clean up the pattern library for a focused editing experience.
Change Block Categories
– Update the category of any block to better organize your Block Inserter.
– Create a custom workflow that matches your editing process.
– Improve findability by grouping related blocks together.
Additional Features
– Code Hooks: Use filters to control blocks and patterns via functions.php.
– Search and Filter: Quickly locate blocks and patterns with built-in search.
– Export Options: Generate code snippets for syncing across environments.
– Status Reports: View active and disabled blocks at a glance.
Hooks & Filters
Use Block Manager hooks to controls blocks via code and sync options across multiple WordPress environments.
gbm_disabled_blocks
Use the gbm_disabled_blocks hook to remove blocks via backend code.
// functions.php
add_filter( 'gbm_disabled_blocks', function() {
return [
'core/buttons',
'core/columns',
'core/freeform',
'core/table'
];
});

gbm_disabled_patterns
Use the gbm_disabled_patterns hook to remove block patterns via backend code.
// functions.php
add_filter( 'gbm_disabled_patterns', function() {
return ['gbm/core-patterns', 'core/query-standard-posts', 'core/query-medium-posts'];
});

gbm_block_categories
Use the gbm_block_categories hook to update block categories via backend code.
// 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
Update the minimum user role allowed to access the Block Manager plugin.
// functions.php
add_filter(
'block_manager_user_role',
'edit_theme_options' // Default: activate_plugins
);

延伸相關外掛

文章
Filter
Mastodon