@wordpress/block-library 7.15.1-next.4d3b314fd5.0 → 7.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1
- package/build/archives/edit.js +1 -0
- package/build/archives/edit.js.map +1 -1
- package/build/code/utils.js +3 -3
- package/build/code/utils.js.map +1 -1
- package/build/comment-template/edit.js +40 -32
- package/build/comment-template/edit.js.map +1 -1
- package/build/comments/edit/placeholder.js +1 -4
- package/build/comments/edit/placeholder.js.map +1 -1
- package/build/comments/index.js +5 -1
- package/build/comments/index.js.map +1 -1
- package/build/comments-title/edit.js +18 -1
- package/build/comments-title/edit.js.map +1 -1
- package/build/cover/edit/index.js +2 -2
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/use-cover-is-dark.js +8 -7
- package/build/cover/edit/use-cover-is-dark.js.map +1 -1
- package/build/embed/variations.js +1 -1
- package/build/embed/variations.js.map +1 -1
- package/build/gallery/transforms.js +3 -3
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/v1/edit.js +1 -1
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/group/edit.js +1 -1
- package/build/group/edit.js.map +1 -1
- package/build/image/image.js +34 -10
- package/build/image/image.js.map +1 -1
- package/build/image/transforms.js +1 -7
- package/build/image/transforms.js.map +1 -1
- package/build/list/transforms.js +9 -1
- package/build/list/transforms.js.map +1 -1
- package/build/list-item/edit.js +3 -2
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/edit.native.js +3 -2
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +19 -22
- package/build/list-item/hooks/use-merge.js.map +1 -1
- package/build/list-item/hooks/use-outdent-list-item.js +19 -3
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/index.js +14 -1
- package/build/list-item/index.js.map +1 -1
- package/build/list-item/utils.js +14 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/navigation/edit/index.js +46 -33
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +3 -5
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +25 -8
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/edit/use-create-navigation-menu.js +1 -1
- package/build/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build/navigation/index.js +4 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation-link/edit.js +1 -1
- package/build/navigation-link/edit.js.map +1 -1
- package/build/page-list/index.js +1 -5
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/deprecated.js +49 -10
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js +22 -14
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/save.js +3 -1
- package/build/paragraph/save.js.map +1 -1
- package/build/pattern/edit.js +11 -4
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +20 -2
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author/index.js +8 -0
- package/build/post-author/index.js.map +1 -1
- package/build/post-comments-form/form.js +1 -2
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-featured-image/index.js +1 -1
- package/build/post-featured-image/overlay.js +2 -2
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-terms/index.js +4 -0
- package/build/post-terms/index.js.map +1 -1
- package/build/query/edit/inspector-controls/author-control.js +2 -1
- package/build/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +3 -3
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/inspector-controls/parent-control.js +2 -1
- package/build/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +79 -103
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/utils.js +1 -1
- package/build/query/utils.js.map +1 -1
- package/build/quote/index.js +0 -1
- package/build/quote/index.js.map +1 -1
- package/build/search/edit.js +2 -1
- package/build/search/edit.js.map +1 -1
- package/build/site-logo/edit.js +6 -9
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-title/index.js +2 -1
- package/build/site-title/index.js.map +1 -1
- package/build/table/state.js +1 -1
- package/build/table/state.js.map +1 -1
- package/build/table-of-contents/edit.js +1 -4
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/tag-cloud/edit.js +1 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/tag-cloud/index.js +8 -0
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/index.js +2 -2
- package/build/template-part/index.js.map +1 -1
- package/build/video/edit.js +13 -1
- package/build/video/edit.js.map +1 -1
- package/build-module/archives/edit.js +1 -0
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/code/utils.js +3 -3
- package/build-module/code/utils.js.map +1 -1
- package/build-module/comment-template/edit.js +38 -30
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comments/edit/placeholder.js +1 -3
- package/build-module/comments/edit/placeholder.js.map +1 -1
- package/build-module/comments/index.js +5 -1
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments-title/edit.js +18 -2
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/cover/edit/index.js +2 -2
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/use-cover-is-dark.js +7 -7
- package/build-module/cover/edit/use-cover-is-dark.js.map +1 -1
- package/build-module/embed/variations.js +1 -1
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/gallery/transforms.js +4 -4
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/v1/edit.js +2 -2
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/group/edit.js +1 -1
- package/build-module/group/edit.js.map +1 -1
- package/build-module/image/image.js +35 -11
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/transforms.js +1 -6
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/list/transforms.js +9 -1
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list-item/edit.js +3 -2
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +3 -2
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +19 -21
- package/build-module/list-item/hooks/use-merge.js.map +1 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js +19 -3
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/index.js +14 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/list-item/utils.js +14 -1
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/navigation/edit/index.js +46 -33
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +3 -5
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +25 -8
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/edit/use-create-navigation-menu.js +1 -1
- package/build-module/navigation/edit/use-create-navigation-menu.js.map +1 -1
- package/build-module/navigation/index.js +4 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation-link/edit.js +1 -1
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/page-list/index.js +1 -5
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/deprecated.js +49 -11
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/paragraph/edit.js +22 -13
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/save.js +2 -1
- package/build-module/paragraph/save.js.map +1 -1
- package/build-module/pattern/edit.js +10 -3
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +21 -2
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-author/index.js +8 -0
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-comments-form/form.js +2 -3
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-featured-image/index.js +1 -1
- package/build-module/post-featured-image/overlay.js +2 -2
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-terms/index.js +4 -0
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/author-control.js +2 -1
- package/build-module/query/edit/inspector-controls/author-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +5 -5
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/parent-control.js +2 -1
- package/build-module/query/edit/inspector-controls/parent-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +81 -101
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/utils.js +1 -1
- package/build-module/query/utils.js.map +1 -1
- package/build-module/quote/index.js +0 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/search/edit.js +3 -2
- package/build-module/search/edit.js.map +1 -1
- package/build-module/site-logo/edit.js +6 -9
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-title/index.js +2 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/table/state.js +2 -2
- package/build-module/table/state.js.map +1 -1
- package/build-module/table-of-contents/edit.js +1 -3
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/tag-cloud/edit.js +1 -1
- package/build-module/tag-cloud/edit.js.map +1 -1
- package/build-module/tag-cloud/index.js +8 -0
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/index.js +2 -2
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/video/edit.js +15 -3
- package/build-module/video/edit.js.map +1 -1
- package/build-style/archives/style-rtl.css +4 -0
- package/build-style/archives/style.css +4 -0
- package/build-style/code/style-rtl.css +3 -0
- package/build-style/code/style.css +3 -0
- package/build-style/comments/editor-rtl.css +1 -0
- package/build-style/comments/editor.css +1 -0
- package/build-style/comments/style-rtl.css +1 -0
- package/build-style/comments/style.css +1 -0
- package/build-style/cover/editor-rtl.css +4 -0
- package/build-style/cover/editor.css +4 -0
- package/build-style/editor-rtl.css +78 -46
- package/build-style/editor.css +78 -46
- package/build-style/group/editor-rtl.css +1 -0
- package/build-style/group/editor.css +1 -0
- package/build-style/image/editor-rtl.css +1 -1
- package/build-style/image/editor.css +1 -1
- package/build-style/navigation/editor-rtl.css +5 -0
- package/build-style/navigation/editor.css +5 -0
- package/build-style/navigation/style-rtl.css +3 -0
- package/build-style/navigation/style.css +3 -0
- package/build-style/paragraph/editor-rtl.css +0 -16
- package/build-style/paragraph/editor.css +0 -16
- package/build-style/paragraph/style-rtl.css +5 -0
- package/build-style/paragraph/style.css +5 -0
- package/build-style/post-featured-image/editor-rtl.css +39 -29
- package/build-style/post-featured-image/editor.css +39 -29
- package/build-style/post-terms/style-rtl.css +4 -1
- package/build-style/post-terms/style.css +4 -1
- package/build-style/site-logo/editor-rtl.css +1 -0
- package/build-style/site-logo/editor.css +1 -0
- package/build-style/site-title/editor-rtl.css +4 -0
- package/build-style/site-title/editor.css +4 -0
- package/build-style/site-title/style-rtl.css +79 -0
- package/build-style/site-title/style.css +79 -0
- package/build-style/style-rtl.css +27 -1
- package/build-style/style.css +27 -1
- package/build-style/tag-cloud/style-rtl.css +3 -0
- package/build-style/tag-cloud/style.css +3 -0
- package/build-style/video/editor-rtl.css +22 -0
- package/build-style/video/editor.css +22 -0
- package/package.json +28 -28
- package/src/archives/edit.js +1 -0
- package/src/archives/style.scss +5 -0
- package/src/avatar/index.php +1 -1
- package/src/categories/index.php +1 -1
- package/src/code/style.scss +12 -7
- package/src/code/test/__snapshots__/edit.native.js.snap +13 -0
- package/src/code/test/edit.native.js +46 -32
- package/src/code/utils.js +3 -3
- package/src/comment-author-name/index.php +1 -1
- package/src/comment-reply-link/index.php +1 -1
- package/src/comment-template/edit.js +47 -34
- package/src/comment-template/index.php +2 -3
- package/src/comments/block.json +5 -1
- package/src/comments/edit/placeholder.js +1 -7
- package/src/comments/style.scss +2 -0
- package/src/comments-title/edit.js +24 -1
- package/src/cover/edit/index.js +2 -7
- package/src/cover/edit/use-cover-is-dark.js +11 -11
- package/src/cover/editor.scss +7 -0
- package/src/cover/index.php +1 -1
- package/src/embed/variations.js +1 -1
- package/src/gallery/transforms.js +8 -5
- package/src/gallery/v1/edit.js +2 -2
- package/src/group/edit.js +1 -1
- package/src/group/editor.scss +1 -0
- package/src/image/editor.scss +4 -1
- package/src/image/image.js +59 -29
- package/src/image/transforms.js +1 -7
- package/src/latest-posts/index.php +1 -1
- package/src/list/test/edit.native.js +102 -3
- package/src/list/transforms.js +11 -0
- package/src/list-item/block.json +14 -1
- package/src/list-item/edit.js +2 -1
- package/src/list-item/edit.native.js +2 -1
- package/src/list-item/hooks/use-merge.js +4 -23
- package/src/list-item/hooks/use-outdent-list-item.js +6 -2
- package/src/navigation/block.json +4 -1
- package/src/navigation/edit/index.js +60 -32
- package/src/navigation/edit/inner-blocks.js +2 -5
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +32 -5
- package/src/navigation/edit/use-create-navigation-menu.js +2 -5
- package/src/navigation/editor.scss +7 -0
- package/src/navigation/index.php +103 -6
- package/src/navigation/style.scss +8 -0
- package/src/navigation-link/edit.js +1 -1
- package/src/navigation-link/index.php +8 -1
- package/src/navigation-submenu/index.php +8 -1
- package/src/page-list/block.json +1 -5
- package/src/page-list/index.php +10 -8
- package/src/paragraph/deprecated.js +36 -0
- package/src/paragraph/edit.js +24 -22
- package/src/paragraph/editor.scss +0 -20
- package/src/paragraph/save.js +5 -1
- package/src/paragraph/style.scss +5 -0
- package/src/pattern/edit.js +10 -3
- package/src/post-author/block.json +8 -0
- package/src/post-author/edit.js +29 -3
- package/src/post-author/index.php +7 -1
- package/src/post-comments-form/form.js +2 -3
- package/src/post-featured-image/block.json +1 -1
- package/src/post-featured-image/editor.scss +79 -72
- package/src/post-featured-image/index.php +18 -24
- package/src/post-featured-image/overlay.js +17 -14
- package/src/post-terms/block.json +4 -0
- package/src/post-terms/style.scss +7 -2
- package/src/query/edit/inspector-controls/author-control.js +1 -0
- package/src/query/edit/inspector-controls/index.js +5 -7
- package/src/query/edit/inspector-controls/parent-control.js +1 -0
- package/src/query/edit/inspector-controls/taxonomy-controls.js +82 -86
- package/src/query/utils.js +1 -1
- package/src/quote/block.json +0 -1
- package/src/rss/index.php +3 -3
- package/src/search/edit.js +6 -1
- package/src/search/index.php +21 -13
- package/src/site-logo/edit.js +10 -8
- package/src/site-logo/editor.scss +1 -0
- package/src/site-title/block.json +2 -1
- package/src/site-title/editor.scss +6 -0
- package/src/site-title/style.scss +5 -0
- package/src/style.scss +1 -0
- package/src/table/state.js +2 -2
- package/src/table-of-contents/edit.js +1 -3
- package/src/tag-cloud/block.json +8 -0
- package/src/tag-cloud/edit.js +1 -1
- package/src/tag-cloud/style.scss +3 -0
- package/src/template-part/index.js +2 -2
- package/src/template-part/index.php +4 -0
- package/src/video/edit.js +19 -0
- package/src/video/editor.scss +37 -0
- package/build/navigation-submenu/view.js +0 -56
- package/build/navigation-submenu/view.js.map +0 -1
- package/build/paragraph/drop-zone.js +0 -99
- package/build/paragraph/drop-zone.js.map +0 -1
- package/build-module/navigation-submenu/view.js +0 -54
- package/build-module/navigation-submenu/view.js.map +0 -1
- package/build-module/paragraph/drop-zone.js +0 -88
- package/build-module/paragraph/drop-zone.js.map +0 -1
- package/src/navigation-submenu/view.js +0 -67
- package/src/paragraph/drop-zone.js +0 -105
package/src/paragraph/edit.js
CHANGED
|
@@ -6,7 +6,6 @@ import classnames from 'classnames';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { useState } from '@wordpress/element';
|
|
10
9
|
import { __, _x, isRTL } from '@wordpress/i18n';
|
|
11
10
|
import {
|
|
12
11
|
ToolbarButton,
|
|
@@ -21,7 +20,6 @@ import {
|
|
|
21
20
|
useBlockProps,
|
|
22
21
|
useSetting,
|
|
23
22
|
} from '@wordpress/block-editor';
|
|
24
|
-
import { useMergeRefs } from '@wordpress/compose';
|
|
25
23
|
import { createBlock } from '@wordpress/blocks';
|
|
26
24
|
import { formatLtr } from '@wordpress/icons';
|
|
27
25
|
|
|
@@ -29,7 +27,6 @@ import { formatLtr } from '@wordpress/icons';
|
|
|
29
27
|
* Internal dependencies
|
|
30
28
|
*/
|
|
31
29
|
import { useOnEnter } from './use-enter';
|
|
32
|
-
import DropZone from './drop-zone';
|
|
33
30
|
|
|
34
31
|
const name = 'core/paragraph';
|
|
35
32
|
|
|
@@ -48,6 +45,10 @@ function ParagraphRTLControl( { direction, setDirection } ) {
|
|
|
48
45
|
);
|
|
49
46
|
}
|
|
50
47
|
|
|
48
|
+
function hasDropCapDisabled( align ) {
|
|
49
|
+
return align === ( isRTL() ? 'left' : 'right' ) || align === 'center';
|
|
50
|
+
}
|
|
51
|
+
|
|
51
52
|
function ParagraphBlock( {
|
|
52
53
|
attributes,
|
|
53
54
|
mergeBlocks,
|
|
@@ -58,26 +59,36 @@ function ParagraphBlock( {
|
|
|
58
59
|
} ) {
|
|
59
60
|
const { align, content, direction, dropCap, placeholder } = attributes;
|
|
60
61
|
const isDropCapFeatureEnabled = useSetting( 'typography.dropCap' );
|
|
61
|
-
const [ paragraphElement, setParagraphElement ] = useState( null );
|
|
62
62
|
const blockProps = useBlockProps( {
|
|
63
|
-
ref:
|
|
64
|
-
useOnEnter( { clientId, content } ),
|
|
65
|
-
setParagraphElement,
|
|
66
|
-
] ),
|
|
63
|
+
ref: useOnEnter( { clientId, content } ),
|
|
67
64
|
className: classnames( {
|
|
68
|
-
'has-drop-cap': dropCap,
|
|
65
|
+
'has-drop-cap': hasDropCapDisabled( align ) ? false : dropCap,
|
|
69
66
|
[ `has-text-align-${ align }` ]: align,
|
|
70
67
|
} ),
|
|
71
68
|
style: { direction },
|
|
72
69
|
} );
|
|
73
70
|
|
|
71
|
+
let helpText;
|
|
72
|
+
if ( hasDropCapDisabled( align ) ) {
|
|
73
|
+
helpText = __( 'Not available for aligned text.' );
|
|
74
|
+
} else if ( dropCap ) {
|
|
75
|
+
helpText = __( 'Showing large initial letter.' );
|
|
76
|
+
} else {
|
|
77
|
+
helpText = __( 'Toggle to show a large initial letter.' );
|
|
78
|
+
}
|
|
79
|
+
|
|
74
80
|
return (
|
|
75
81
|
<>
|
|
76
82
|
<BlockControls group="block">
|
|
77
83
|
<AlignmentControl
|
|
78
84
|
value={ align }
|
|
79
85
|
onChange={ ( newAlign ) =>
|
|
80
|
-
setAttributes( {
|
|
86
|
+
setAttributes( {
|
|
87
|
+
align: newAlign,
|
|
88
|
+
dropCap: hasDropCapDisabled( newAlign )
|
|
89
|
+
? false
|
|
90
|
+
: dropCap,
|
|
91
|
+
} )
|
|
81
92
|
}
|
|
82
93
|
/>
|
|
83
94
|
<ParagraphRTLControl
|
|
@@ -104,23 +115,14 @@ function ParagraphBlock( {
|
|
|
104
115
|
onChange={ () =>
|
|
105
116
|
setAttributes( { dropCap: ! dropCap } )
|
|
106
117
|
}
|
|
107
|
-
help={
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
: __(
|
|
111
|
-
'Toggle to show a large initial letter.'
|
|
112
|
-
)
|
|
118
|
+
help={ helpText }
|
|
119
|
+
disabled={
|
|
120
|
+
hasDropCapDisabled( align ) ? true : false
|
|
113
121
|
}
|
|
114
122
|
/>
|
|
115
123
|
</ToolsPanelItem>
|
|
116
124
|
</InspectorControls>
|
|
117
125
|
) }
|
|
118
|
-
{ ! content && (
|
|
119
|
-
<DropZone
|
|
120
|
-
clientId={ clientId }
|
|
121
|
-
paragraphElement={ paragraphElement }
|
|
122
|
-
/>
|
|
123
|
-
) }
|
|
124
126
|
<RichText
|
|
125
127
|
identifier="content"
|
|
126
128
|
tagName="p"
|
|
@@ -17,23 +17,3 @@
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
.components-popover.wp-block-paragraph__drop-zone {
|
|
22
|
-
.components-popover__content {
|
|
23
|
-
border: none;
|
|
24
|
-
outline: none;
|
|
25
|
-
box-shadow: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.wp-block-paragraph__drop-zone-backdrop {
|
|
29
|
-
position: absolute;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.wp-block-paragraph__drop-zone-foreground {
|
|
33
|
-
position: absolute;
|
|
34
|
-
inset: 0;
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
background-color: var(--wp-admin-theme-color);
|
|
37
|
-
border-radius: 2px;
|
|
38
|
-
}
|
|
39
|
-
}
|
package/src/paragraph/save.js
CHANGED
|
@@ -7,11 +7,15 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
10
|
+
import { isRTL } from '@wordpress/i18n';
|
|
10
11
|
|
|
11
12
|
export default function save( { attributes } ) {
|
|
12
13
|
const { align, content, dropCap, direction } = attributes;
|
|
13
14
|
const className = classnames( {
|
|
14
|
-
'has-drop-cap':
|
|
15
|
+
'has-drop-cap':
|
|
16
|
+
align === ( isRTL() ? 'left' : 'right' ) || align === 'center'
|
|
17
|
+
? false
|
|
18
|
+
: dropCap,
|
|
15
19
|
[ `has-text-align-${ align }` ]: align,
|
|
16
20
|
} );
|
|
17
21
|
|
package/src/paragraph/style.scss
CHANGED
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
font-style: normal;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
body.rtl .has-drop-cap:not(:focus)::first-letter {
|
|
32
|
+
float: initial;
|
|
33
|
+
margin-left: 0.1em;
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
// Prevent the dropcap from breaking out of the box when a background is applied.
|
|
32
37
|
p.has-drop-cap.has-background {
|
|
33
38
|
overflow: hidden;
|
package/src/pattern/edit.js
CHANGED
|
@@ -26,10 +26,17 @@ const PatternEdit = ( { attributes, clientId } ) => {
|
|
|
26
26
|
// It will continue to pull from the pattern file unless changes are made to its respective template part.
|
|
27
27
|
useEffect( () => {
|
|
28
28
|
if ( selectedPattern?.blocks ) {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// We batch updates to block list settings to avoid triggering cascading renders
|
|
30
|
+
// for each container block included in a tree and optimize initial render.
|
|
31
|
+
// Since the above uses microtasks, we need to use a microtask here as well,
|
|
32
|
+
// because nested pattern blocks cannot be inserted if the parent block supports
|
|
33
|
+
// inner blocks but doesn't have blockSettings in the state.
|
|
34
|
+
window.queueMicrotask( () => {
|
|
35
|
+
__unstableMarkNextChangeAsNotPersistent();
|
|
36
|
+
replaceBlocks( clientId, selectedPattern.blocks );
|
|
37
|
+
} );
|
|
31
38
|
}
|
|
32
|
-
}, [ selectedPattern?.blocks ] );
|
|
39
|
+
}, [ clientId, selectedPattern?.blocks ] );
|
|
33
40
|
|
|
34
41
|
const props = useBlockProps();
|
|
35
42
|
|
package/src/post-author/edit.js
CHANGED
|
@@ -46,9 +46,10 @@ function PostAuthorEdit( {
|
|
|
46
46
|
|
|
47
47
|
const { editEntityRecord } = useDispatch( coreStore );
|
|
48
48
|
|
|
49
|
-
const { textAlign, showAvatar, showBio, byline } =
|
|
50
|
-
|
|
49
|
+
const { textAlign, showAvatar, showBio, byline, isLink, linkTarget } =
|
|
50
|
+
attributes;
|
|
51
51
|
const avatarSizes = [];
|
|
52
|
+
const authorName = authorDetails?.name || __( 'Post Author' );
|
|
52
53
|
if ( authorDetails ) {
|
|
53
54
|
Object.keys( authorDetails.avatar_urls ).forEach( ( size ) => {
|
|
54
55
|
avatarSizes.push( {
|
|
@@ -118,6 +119,22 @@ function PostAuthorEdit( {
|
|
|
118
119
|
setAttributes( { showBio: ! showBio } )
|
|
119
120
|
}
|
|
120
121
|
/>
|
|
122
|
+
<ToggleControl
|
|
123
|
+
label={ __( 'Link author name to author page' ) }
|
|
124
|
+
checked={ isLink }
|
|
125
|
+
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
126
|
+
/>
|
|
127
|
+
{ isLink && (
|
|
128
|
+
<ToggleControl
|
|
129
|
+
label={ __( 'Open in new tab' ) }
|
|
130
|
+
onChange={ ( value ) =>
|
|
131
|
+
setAttributes( {
|
|
132
|
+
linkTarget: value ? '_blank' : '_self',
|
|
133
|
+
} )
|
|
134
|
+
}
|
|
135
|
+
checked={ linkTarget === '_blank' }
|
|
136
|
+
/>
|
|
137
|
+
) }
|
|
121
138
|
</PanelBody>
|
|
122
139
|
</InspectorControls>
|
|
123
140
|
|
|
@@ -158,7 +175,16 @@ function PostAuthorEdit( {
|
|
|
158
175
|
/>
|
|
159
176
|
) }
|
|
160
177
|
<p className="wp-block-post-author__name">
|
|
161
|
-
{
|
|
178
|
+
{ isLink ? (
|
|
179
|
+
<a
|
|
180
|
+
href="#post-author-pseudo-link"
|
|
181
|
+
onClick={ ( event ) => event.preventDefault() }
|
|
182
|
+
>
|
|
183
|
+
{ authorName }
|
|
184
|
+
</a>
|
|
185
|
+
) : (
|
|
186
|
+
authorName
|
|
187
|
+
) }
|
|
162
188
|
</p>
|
|
163
189
|
{ showBio && (
|
|
164
190
|
<p
|
|
@@ -29,6 +29,12 @@ function render_block_core_post_author( $attributes, $content, $block ) {
|
|
|
29
29
|
$attributes['avatarSize']
|
|
30
30
|
) : null;
|
|
31
31
|
|
|
32
|
+
$link = get_author_posts_url( $author_id );
|
|
33
|
+
$author_name = get_the_author_meta( 'display_name', $author_id );
|
|
34
|
+
if ( ! empty( $attributes['isLink'] && ! empty( $attributes['linkTarget'] ) ) ) {
|
|
35
|
+
$author_name = sprintf( '<a href="%1s" target="%2s">%2s</a>', esc_url( $link ), esc_attr( $attributes['linkTarget'] ), $author_name );
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
$byline = ! empty( $attributes['byline'] ) ? $attributes['byline'] : false;
|
|
33
39
|
$classes = array_merge(
|
|
34
40
|
isset( $attributes['itemsJustification'] ) ? array( 'items-justified-' . $attributes['itemsJustification'] ) : array(),
|
|
@@ -41,7 +47,7 @@ function render_block_core_post_author( $attributes, $content, $block ) {
|
|
|
41
47
|
( ! empty( $attributes['showAvatar'] ) ? '<div class="wp-block-post-author__avatar">' . $avatar . '</div>' : '' ) .
|
|
42
48
|
'<div class="wp-block-post-author__content">' .
|
|
43
49
|
( ! empty( $byline ) ? '<p class="wp-block-post-author__byline">' . wp_kses_post( $byline ) . '</p>' : '' ) .
|
|
44
|
-
'<p class="wp-block-post-author__name">' .
|
|
50
|
+
'<p class="wp-block-post-author__name">' . $author_name . '</p>' .
|
|
45
51
|
( ! empty( $attributes['showBio'] ) ? '<p class="wp-block-post-author__bio">' . get_the_author_meta( 'user_description', $author_id ) . '</p>' : '' ) .
|
|
46
52
|
'</div>' .
|
|
47
53
|
'</div>';
|
|
@@ -13,18 +13,17 @@ import {
|
|
|
13
13
|
__experimentalGetElementClassName,
|
|
14
14
|
} from '@wordpress/block-editor';
|
|
15
15
|
import { Button } from '@wordpress/components';
|
|
16
|
-
import {
|
|
16
|
+
import { useInstanceId } from '@wordpress/compose';
|
|
17
17
|
import { useEntityProp, store as coreStore } from '@wordpress/core-data';
|
|
18
18
|
import { useSelect } from '@wordpress/data';
|
|
19
19
|
|
|
20
20
|
const CommentsFormPlaceholder = () => {
|
|
21
|
-
const disabledFormRef = useDisabled();
|
|
22
21
|
const instanceId = useInstanceId( CommentsFormPlaceholder );
|
|
23
22
|
|
|
24
23
|
return (
|
|
25
24
|
<div className="comment-respond">
|
|
26
25
|
<h3 className="comment-reply-title">{ __( 'Leave a Reply' ) }</h3>
|
|
27
|
-
<form noValidate className="comment-form"
|
|
26
|
+
<form noValidate className="comment-form" inert="true">
|
|
28
27
|
<p>
|
|
29
28
|
<label htmlFor={ `comment-${ instanceId }` }>
|
|
30
29
|
{ __( 'Comment' ) }
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"color": true,
|
|
63
63
|
"radius": true,
|
|
64
64
|
"width": true,
|
|
65
|
-
"__experimentalSelector": "img, .block-editor-media-placeholder",
|
|
65
|
+
"__experimentalSelector": "img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",
|
|
66
66
|
"__experimentalSkipSerialization": true,
|
|
67
67
|
"__experimentalDefaultControls": {
|
|
68
68
|
"color": true,
|
|
@@ -6,87 +6,94 @@
|
|
|
6
6
|
backdrop-filter: none; // Removes background blur so the overlay's actual color is visible.
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
padding: 0;
|
|
9
|
+
// Style the placeholder.
|
|
10
|
+
.wp-block-post-featured-image__placeholder,
|
|
11
|
+
.components-placeholder {
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding: 0;
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
// Hide the upload button, as it's also available in the media library.
|
|
17
|
+
.components-form-file-upload {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
// Style the upload button.
|
|
22
|
+
.components-button {
|
|
23
|
+
padding: 0;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
width: $grid-unit-60;
|
|
28
|
+
height: $grid-unit-60;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
position: relative;
|
|
31
|
+
background: var(--wp-admin-theme-color);
|
|
32
|
+
border-color: var(--wp-admin-theme-color);
|
|
33
|
+
border-style: solid;
|
|
34
|
+
color: $white;
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
36
|
+
> svg {
|
|
37
|
+
color: inherit;
|
|
40
38
|
}
|
|
39
|
+
}
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
// The following override the default placeholder styles that remove
|
|
46
|
-
// its border so that a user selection for border color or width displays
|
|
47
|
-
// a visual border.
|
|
48
|
-
&:where(.has-border-color) {
|
|
49
|
-
border-style: solid;
|
|
50
|
-
}
|
|
51
|
-
&:where([style*="border-top-color"]) {
|
|
52
|
-
border-top-style: solid;
|
|
53
|
-
}
|
|
54
|
-
&:where([style*="border-right-color"]) {
|
|
55
|
-
border-right-style: solid;
|
|
56
|
-
}
|
|
57
|
-
&:where([style*="border-bottom-color"]) {
|
|
58
|
-
border-bottom-style: solid;
|
|
59
|
-
}
|
|
60
|
-
&:where([style*="border-left-color"]) {
|
|
61
|
-
border-left-style: solid;
|
|
62
|
-
}
|
|
41
|
+
// Show default placeholder height when not resized.
|
|
42
|
+
min-height: 200px;
|
|
43
|
+
}
|
|
63
44
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
45
|
+
// The following override the default placeholder styles that remove
|
|
46
|
+
// its border so that a user selection for border color or width displays
|
|
47
|
+
// a visual border. They also override the `img { border: none; }` applied
|
|
48
|
+
// by core.
|
|
49
|
+
.wp-block-post-featured-image__placeholder,
|
|
50
|
+
.components-placeholder,
|
|
51
|
+
img {
|
|
52
|
+
// The following is required to overcome WP Core applying styles that clear
|
|
53
|
+
// img borders with a higher specificity than those added by the border
|
|
54
|
+
// block support to provide a default border-style of solid when a border
|
|
55
|
+
// color or width has been set.
|
|
56
|
+
&:where(.has-border-color) {
|
|
57
|
+
border-style: solid;
|
|
58
|
+
}
|
|
59
|
+
&:where([style*="border-top-color"]) {
|
|
60
|
+
border-top-style: solid;
|
|
61
|
+
}
|
|
62
|
+
&:where([style*="border-right-color"]) {
|
|
63
|
+
border-right-style: solid;
|
|
64
|
+
}
|
|
65
|
+
&:where([style*="border-bottom-color"]) {
|
|
66
|
+
border-bottom-style: solid;
|
|
67
|
+
}
|
|
68
|
+
&:where([style*="border-left-color"]) {
|
|
69
|
+
border-left-style: solid;
|
|
79
70
|
}
|
|
80
71
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
72
|
+
&:where([style*="border-width"]) {
|
|
73
|
+
border-style: solid;
|
|
74
|
+
}
|
|
75
|
+
&:where([style*="border-top-width"]) {
|
|
76
|
+
border-top-style: solid;
|
|
77
|
+
}
|
|
78
|
+
&:where([style*="border-right-width"]) {
|
|
79
|
+
border-right-style: solid;
|
|
89
80
|
}
|
|
81
|
+
&:where([style*="border-bottom-width"]) {
|
|
82
|
+
border-bottom-style: solid;
|
|
83
|
+
}
|
|
84
|
+
&:where([style*="border-left-width"]) {
|
|
85
|
+
border-left-style: solid;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Provide a minimum size for the placeholder when resized.
|
|
90
|
+
// Note, this should be as small as we can afford it, and exists only
|
|
91
|
+
// to ensure there's room for the upload button.
|
|
92
|
+
&[style*="height"] .components-placeholder {
|
|
93
|
+
min-height: $grid-unit-60;
|
|
94
|
+
min-width: $grid-unit-60;
|
|
95
|
+
height: 100%;
|
|
96
|
+
width: 100%;
|
|
90
97
|
}
|
|
91
98
|
}
|
|
92
99
|
|
|
@@ -76,16 +76,25 @@ function get_block_core_post_featured_image_overlay_element_markup( $attributes
|
|
|
76
76
|
$has_custom_gradient = isset( $attributes['customGradient'] ) && $attributes['customGradient'];
|
|
77
77
|
$has_solid_overlay = isset( $attributes['overlayColor'] ) && $attributes['overlayColor'];
|
|
78
78
|
$has_custom_overlay = isset( $attributes['customOverlayColor'] ) && $attributes['customOverlayColor'];
|
|
79
|
-
$class_names = array(
|
|
80
|
-
|
|
81
|
-
);
|
|
82
|
-
$styles_properties = array();
|
|
79
|
+
$class_names = array( 'wp-block-post-featured-image__overlay' );
|
|
80
|
+
$styles = array();
|
|
83
81
|
|
|
84
82
|
if ( ! $has_dim_background ) {
|
|
85
83
|
return '';
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
//
|
|
86
|
+
// Apply border classes and styles.
|
|
87
|
+
$border_attributes = get_block_core_post_featured_image_border_attributes( $attributes );
|
|
88
|
+
|
|
89
|
+
if ( ! empty( $border_attributes['class'] ) ) {
|
|
90
|
+
$class_names[] = $border_attributes['class'];
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if ( ! empty( $border_attributes['style'] ) ) {
|
|
94
|
+
$styles[] = $border_attributes['style'];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Apply overlay and gradient classes.
|
|
89
98
|
if ( $has_dim_background ) {
|
|
90
99
|
$class_names[] = 'has-background-dim';
|
|
91
100
|
$class_names[] = "has-background-dim-{$attributes['dimRatio']}";
|
|
@@ -103,35 +112,20 @@ function get_block_core_post_featured_image_overlay_element_markup( $attributes
|
|
|
103
112
|
$class_names[] = "has-{$attributes['gradient']}-gradient-background";
|
|
104
113
|
}
|
|
105
114
|
|
|
106
|
-
//
|
|
107
|
-
if ( ! empty( $attributes['style']['border']['radius'] ) ) {
|
|
108
|
-
$styles_properties['border-radius'] = $attributes['style']['border']['radius'];
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if ( ! empty( $attributes['style']['border']['width'] ) ) {
|
|
112
|
-
$styles_properties['border-width'] = $attributes['style']['border']['width'];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
+
// Apply background styles.
|
|
115
116
|
if ( $has_custom_gradient ) {
|
|
116
|
-
$
|
|
117
|
+
$styles[] = sprintf( 'background-image: %s;', $attributes['customGradient'] );
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
if ( $has_custom_overlay ) {
|
|
120
|
-
$
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
$styles = '';
|
|
124
|
-
|
|
125
|
-
foreach ( $styles_properties as $style_attribute => $style_attribute_value ) {
|
|
126
|
-
$styles .= "{$style_attribute}: $style_attribute_value; ";
|
|
121
|
+
$styles[] = sprintf( 'background-color: %s;', $attributes['customOverlayColor'] );
|
|
127
122
|
}
|
|
128
123
|
|
|
129
124
|
return sprintf(
|
|
130
125
|
'<span class="%s" style="%s" aria-hidden="true"></span>',
|
|
131
126
|
esc_attr( implode( ' ', $class_names ) ),
|
|
132
|
-
esc_attr(
|
|
127
|
+
esc_attr( safecss_filter_attr( implode( ' ', $styles ) ) )
|
|
133
128
|
);
|
|
134
|
-
|
|
135
129
|
}
|
|
136
130
|
|
|
137
131
|
/**
|
|
@@ -47,20 +47,23 @@ const Overlay = ( {
|
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
49
|
<>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
{ !! dimRatio && (
|
|
51
|
+
<span
|
|
52
|
+
aria-hidden="true"
|
|
53
|
+
className={ classnames(
|
|
54
|
+
'wp-block-post-featured-image__overlay',
|
|
55
|
+
dimRatioToClass( dimRatio ),
|
|
56
|
+
{
|
|
57
|
+
[ overlayColor.class ]: overlayColor.class,
|
|
58
|
+
'has-background-dim': dimRatio !== undefined,
|
|
59
|
+
'has-background-gradient': gradientValue,
|
|
60
|
+
[ gradientClass ]: gradientClass,
|
|
61
|
+
},
|
|
62
|
+
borderProps.className
|
|
63
|
+
) }
|
|
64
|
+
style={ overlayStyles }
|
|
65
|
+
/>
|
|
66
|
+
) }
|
|
64
67
|
<InspectorControls __experimentalGroup="color">
|
|
65
68
|
<ColorGradientSettingsDropdown
|
|
66
69
|
__experimentalHasMultipleOrigins
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
.wp-block-post-
|
|
2
|
-
|
|
1
|
+
.wp-block-post-terms {
|
|
2
|
+
// This block has customizable padding, border-box makes that more predictable.
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
|
|
5
|
+
.wp-block-post-terms__separator {
|
|
6
|
+
white-space: pre-wrap;
|
|
7
|
+
}
|
|
3
8
|
}
|
|
@@ -22,13 +22,14 @@ import { useEffect, useState, useCallback } from '@wordpress/element';
|
|
|
22
22
|
import OrderControl from './order-control';
|
|
23
23
|
import AuthorControl from './author-control';
|
|
24
24
|
import ParentControl from './parent-control';
|
|
25
|
-
import { TaxonomyControls
|
|
25
|
+
import { TaxonomyControls } from './taxonomy-controls';
|
|
26
26
|
import StickyControl from './sticky-control';
|
|
27
27
|
import {
|
|
28
28
|
usePostTypes,
|
|
29
29
|
useIsPostTypeHierarchical,
|
|
30
30
|
useAllowedControls,
|
|
31
31
|
isControlAllowed,
|
|
32
|
+
useTaxonomies,
|
|
32
33
|
} from '../../utils';
|
|
33
34
|
|
|
34
35
|
export default function QueryInspectorControls( {
|
|
@@ -50,7 +51,7 @@ export default function QueryInspectorControls( {
|
|
|
50
51
|
const allowedControls = useAllowedControls( attributes );
|
|
51
52
|
const [ showSticky, setShowSticky ] = useState( postType === 'post' );
|
|
52
53
|
const { postTypesTaxonomiesMap, postTypesSelectOptions } = usePostTypes();
|
|
53
|
-
const
|
|
54
|
+
const taxonomies = useTaxonomies( postType );
|
|
54
55
|
const isPostTypeHierarchical = useIsPostTypeHierarchical( postType );
|
|
55
56
|
useEffect( () => {
|
|
56
57
|
setShowSticky( postType === 'post' );
|
|
@@ -192,7 +193,7 @@ export default function QueryInspectorControls( {
|
|
|
192
193
|
setQuerySearch( '' );
|
|
193
194
|
} }
|
|
194
195
|
>
|
|
195
|
-
{ !!
|
|
196
|
+
{ !! taxonomies?.length &&
|
|
196
197
|
isControlAllowed( allowedControls, 'taxQuery' ) && (
|
|
197
198
|
<ToolsPanelItem
|
|
198
199
|
label={ __( 'Taxonomies' ) }
|
|
@@ -237,10 +238,7 @@ export default function QueryInspectorControls( {
|
|
|
237
238
|
</ToolsPanelItem>
|
|
238
239
|
) }
|
|
239
240
|
{ isPostTypeHierarchical &&
|
|
240
|
-
|
|
241
|
-
allowedControls,
|
|
242
|
-
'parents'
|
|
243
|
-
) && (
|
|
241
|
+
isControlAllowed( allowedControls, 'parents' ) && (
|
|
244
242
|
<ToolsPanelItem
|
|
245
243
|
hasValue={ () => !! parents?.length }
|
|
246
244
|
label={ __( 'Parents' ) }
|