Skip to content

Commit

Permalink
Remove ability to crop image if content only mode (WordPress#64838)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj authored and bph committed Aug 31, 2024
1 parent 06129f5 commit ef65173
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ export default function Image( {
}, [ isSingleSelected ] );

const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
const allowCrop = isSingleSelected && canEditImage && ! isEditingImage;
const allowCrop =
isSingleSelected &&
canEditImage &&
! isEditingImage &&
! isContentOnlyMode;

function switchToCover() {
replaceBlocks(
Expand Down

0 comments on commit ef65173

Please sign in to comment.