Skip to content

Commit 750c8e4

Browse files
authored
Editor: Remove the 'content-only' check from 'TemplatePartConverterMenuItem' (#67961)
Co-authored-by: Mamaduka <[email protected]>
1 parent 673f80d commit 750c8e4

File tree

1 file changed

+2
-11
lines changed
  • packages/editor/src/components/template-part-menu-items

1 file changed

+2
-11
lines changed

packages/editor/src/components/template-part-menu-items/index.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,16 @@ export default function TemplatePartMenuItems() {
2727
}
2828

2929
function TemplatePartConverterMenuItem( { clientIds, onClose } ) {
30-
const { isContentOnly, blocks } = useSelect(
30+
const { blocks } = useSelect(
3131
( select ) => {
32-
const { getBlocksByClientId, getBlockEditingMode } =
33-
select( blockEditorStore );
32+
const { getBlocksByClientId } = select( blockEditorStore );
3433
return {
3534
blocks: getBlocksByClientId( clientIds ),
36-
isContentOnly:
37-
clientIds.length === 1 &&
38-
getBlockEditingMode( clientIds[ 0 ] ) === 'contentOnly',
3935
};
4036
},
4137
[ clientIds ]
4238
);
4339

44-
// Do not show the convert button if the block is in content-only mode.
45-
if ( isContentOnly ) {
46-
return null;
47-
}
48-
4940
// Allow converting a single template part to standard blocks.
5041
if ( blocks.length === 1 && blocks[ 0 ]?.name === 'core/template-part' ) {
5142
return (

0 commit comments

Comments
 (0)