Locky Blocky

plugin banner

Easily toggle the block template lock (contentOnly) in the WordPress block editor toolbar.

Author:Koji Kuno (profile at wordpress.org)
WordPress version required:6.8
WordPress version tested:6.8.1
Plugin version:1.0.4
Added to WordPress repository:03-07-2025
Last updated:06-07-2025
Rating, %:100
Rated by:1
Plugin URI:
Total downloads:387
plugin download
Click to start download

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