Skip to content

Commit

Permalink
Avoid showing lock icons when a parent block has blockEditingMode set…
Browse files Browse the repository at this point in the history
… to contentOnly (WordPress#61922)

Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
  • Loading branch information
4 people authored and carstingaxion committed Jun 4, 2024
1 parent 4f00c5b commit 8df4ebf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1759,16 +1759,13 @@ export function canMoveBlock( state, clientId, rootClientId = null ) {
if ( attributes === null ) {
return true;
}
if ( getBlockEditingMode( state, rootClientId ) !== 'default' ) {
return false;
}
if ( attributes.lock?.move !== undefined ) {
return ! attributes.lock.move;
}
if ( getTemplateLock( state, rootClientId ) === 'all' ) {
return false;
}
return true;
return getBlockEditingMode( state, rootClientId ) !== 'disabled';
}

/**
Expand Down

0 comments on commit 8df4ebf

Please sign in to comment.