File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -27,25 +27,16 @@ export default function TemplatePartMenuItems() {
27
27
}
28
28
29
29
function TemplatePartConverterMenuItem ( { clientIds, onClose } ) {
30
- const { isContentOnly , blocks } = useSelect (
30
+ const { blocks } = useSelect (
31
31
( select ) => {
32
- const { getBlocksByClientId, getBlockEditingMode } =
33
- select ( blockEditorStore ) ;
32
+ const { getBlocksByClientId } = select ( blockEditorStore ) ;
34
33
return {
35
34
blocks : getBlocksByClientId ( clientIds ) ,
36
- isContentOnly :
37
- clientIds . length === 1 &&
38
- getBlockEditingMode ( clientIds [ 0 ] ) === 'contentOnly' ,
39
35
} ;
40
36
} ,
41
37
[ clientIds ]
42
38
) ;
43
39
44
- // Do not show the convert button if the block is in content-only mode.
45
- if ( isContentOnly ) {
46
- return null ;
47
- }
48
-
49
40
// Allow converting a single template part to standard blocks.
50
41
if ( blocks . length === 1 && blocks [ 0 ] ?. name === 'core/template-part' ) {
51
42
return (
You can’t perform that action at this time.
0 commit comments