
內容簡介
**總結:**
這個外掛讓管理員可以從 WordPress 區塊編輯器工具欄輕鬆切換區塊模板鎖定(僅內容)。讓您對編輯體驗有更靈活的控制權。這功能僅對管理員開放,對於具有編輯人員或更低權限的使用者不會顯示選單。
**問題與答案:**
- 這個外掛主要針對誰使用?
- 管理員。
- 對於哪些使用者不會顯示菜單?
- 具有編輯人員或更低權限的使用者。
- 如果 WordPress 核心在未來實施了類似的功能,這個外掛將會怎麼處理?
- 這個外掛將會被廢棄並不再維護。
- 外掛的 Github 儲存庫位於哪裡?
- https://github.com/Olein-jp/locky-blocky
外掛標籤
開發者團隊
原文外掛簡介
A plugin that lets administrators easily toggle the block template lock (contentOnly) from the WordPress block editor toolbar. Take flexible control over your editing experience. (Available to administrators only. The menu is not displayed for users with editor or lower capabilities.)
How to use hook
locky_blocky_required_capability hook allows you to change the permissions to display the lock menu provided by this plugin.
add_filter( 'locky_blocky_required_capability', function( $default ) {
return 'edit_others_posts'; // Editor privileges and above
});
It can also be made available only to specific user IDs.
add_filter( 'locky_blocky_required_capability', function( $default ) {
if ( get_current_user_id() === 123 ) {
return 'read'; // Available for User ID 123 only
}
return 'do_not_allow'; // Otherwise, not allowed.
});
Important Notice
This plugin provides a feature to toggle the templateLock (contentOnly) directly from the block toolbar. If WordPress Core implements a similar feature in the future, this plugin will be deprecated and no longer maintained.
Thank you for your understanding.
Github Repository
https://github.com/Olein-jp/locky-blocky
