@wordpress/block-library 7.3.1 → 7.3.4
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/build/audio/edit.js +1 -1
- package/build/audio/edit.js.map +1 -1
- package/build/comment-template/edit.js +3 -1
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/hooks.js +14 -4
- package/build/comment-template/hooks.js.map +1 -1
- package/build/comments-pagination/edit.js +18 -1
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-query-loop/edit.js +2 -2
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-title/edit.js +151 -0
- package/build/comments-title/edit.js.map +1 -0
- package/build/comments-title/index.js +101 -0
- package/build/comments-title/index.js.map +1 -0
- package/build/cover/transforms.js +33 -32
- package/build/cover/transforms.js.map +1 -1
- package/build/index.js +6 -4
- package/build/index.js.map +1 -1
- package/build/list/index.js +13 -2
- package/build/list/index.js.map +1 -1
- package/build/navigation/edit/index.js +17 -1
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +5 -7
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +7 -2
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation-link/edit.js +29 -30
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +14 -14
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/post-comments/edit.js +141 -35
- package/build/post-comments/edit.js.map +1 -1
- package/build/post-comments/index.js +2 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-form/edit.js +22 -1
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/index.js +1 -0
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-content/edit.js +1 -1
- package/build/post-content/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +19 -7
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/query-no-results/edit.js +1 -1
- package/build/query-no-results/edit.js.map +1 -1
- package/build/quote/index.js +13 -2
- package/build/quote/index.js.map +1 -1
- package/build-module/audio/edit.js +1 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/comment-template/edit.js +3 -1
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/hooks.js +14 -4
- package/build-module/comment-template/hooks.js.map +1 -1
- package/build-module/comments-pagination/edit.js +19 -2
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-query-loop/edit.js +2 -2
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +135 -0
- package/build-module/comments-title/edit.js.map +1 -0
- package/build-module/comments-title/index.js +88 -0
- package/build-module/comments-title/index.js.map +1 -0
- package/build-module/cover/transforms.js +33 -32
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/index.js +5 -4
- package/build-module/index.js.map +1 -1
- package/build-module/list/index.js +9 -3
- package/build-module/list/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +17 -1
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +5 -7
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +6 -2
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation-link/edit.js +29 -30
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +14 -14
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/post-comments/edit.js +143 -38
- package/build-module/post-comments/edit.js.map +1 -1
- package/build-module/post-comments/index.js +2 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-form/edit.js +21 -1
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/index.js +1 -0
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-content/edit.js +1 -1
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +19 -7
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/query-no-results/edit.js +1 -1
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/quote/index.js +9 -3
- package/build-module/quote/index.js.map +1 -1
- package/build-style/comment-content/style-rtl.css +81 -0
- package/build-style/comment-content/style.css +81 -0
- package/build-style/comments-title/editor-rtl.css +79 -0
- package/build-style/comments-title/editor.css +79 -0
- package/build-style/cover/style-rtl.css +1 -1
- package/build-style/cover/style.css +1 -1
- package/build-style/editor-rtl.css +12 -0
- package/build-style/editor.css +12 -0
- package/build-style/latest-posts/style-rtl.css +2 -0
- package/build-style/latest-posts/style.css +4 -0
- package/build-style/post-comments/editor-rtl.css +79 -0
- package/build-style/post-comments/editor.css +79 -0
- package/build-style/post-comments/style-rtl.css +1 -3
- package/build-style/post-comments/style.css +1 -3
- package/build-style/post-comments-form/editor-rtl.css +79 -0
- package/build-style/post-comments-form/editor.css +79 -0
- package/build-style/post-comments-form/style-rtl.css +9 -0
- package/build-style/post-comments-form/style.css +9 -0
- package/build-style/style-rtl.css +13 -4
- package/build-style/style.css +15 -4
- package/package.json +28 -28
- package/src/audio/edit.js +1 -1
- package/src/comment-author-name/index.php +7 -5
- package/src/comment-content/index.php +25 -3
- package/src/comment-content/style.scss +5 -0
- package/src/comment-edit-link/index.php +1 -4
- package/src/comment-reply-link/index.php +1 -4
- package/src/comment-template/edit.js +5 -2
- package/src/comment-template/hooks.js +15 -2
- package/src/comment-template/index.php +23 -2
- package/src/comments-pagination/edit.js +23 -0
- package/src/comments-query-loop/edit.js +2 -0
- package/src/comments-title/block.json +70 -0
- package/src/comments-title/edit.js +213 -0
- package/src/comments-title/editor.scss +4 -0
- package/src/comments-title/index.js +18 -0
- package/src/comments-title/index.php +75 -0
- package/src/cover/index.php +1 -1
- package/src/cover/style.scss +1 -1
- package/src/cover/transforms.js +51 -28
- package/src/editor.scss +3 -0
- package/src/index.js +8 -2
- package/src/latest-posts/style.scss +4 -0
- package/src/list/index.js +7 -3
- package/src/navigation/edit/index.js +24 -0
- package/src/navigation/edit/inner-blocks.js +5 -7
- package/src/navigation/edit/navigation-menu-selector.js +15 -9
- package/src/navigation-link/edit.js +40 -43
- package/src/navigation-submenu/edit.js +13 -17
- package/src/post-comments/block.json +2 -1
- package/src/post-comments/edit.js +204 -44
- package/src/post-comments/editor.scss +3 -0
- package/src/post-comments/style.scss +1 -5
- package/src/post-comments-form/block.json +1 -0
- package/src/post-comments-form/edit.js +39 -2
- package/src/post-comments-form/editor.scss +3 -0
- package/src/post-comments-form/index.php +16 -5
- package/src/post-comments-form/style.scss +11 -0
- package/src/post-content/edit.js +15 -1
- package/src/post-featured-image/edit.js +24 -12
- package/src/query-no-results/edit.js +1 -1
- package/src/quote/index.js +7 -3
package/src/post-content/edit.js
CHANGED
|
@@ -85,7 +85,21 @@ function Placeholder() {
|
|
|
85
85
|
const blockProps = useBlockProps();
|
|
86
86
|
return (
|
|
87
87
|
<div { ...blockProps }>
|
|
88
|
-
<p>
|
|
88
|
+
<p>
|
|
89
|
+
{ __(
|
|
90
|
+
'This is the Post Content block, it will display all the blocks in any single post or page.'
|
|
91
|
+
) }
|
|
92
|
+
</p>
|
|
93
|
+
<p>
|
|
94
|
+
{ __(
|
|
95
|
+
'That might be a simple arrangement like consecutive paragraphs in a blog post, or a more elaborate composition that includes image galleries, videos, tables, columns, and any other block types.'
|
|
96
|
+
) }
|
|
97
|
+
</p>
|
|
98
|
+
<p>
|
|
99
|
+
{ __(
|
|
100
|
+
'If there are any Custom Post Types registered at your site, the Post Content block can display the contents of those entries as well.'
|
|
101
|
+
) }
|
|
102
|
+
</p>
|
|
89
103
|
</div>
|
|
90
104
|
);
|
|
91
105
|
}
|
|
@@ -57,22 +57,30 @@ function PostFeaturedImageDisplay( {
|
|
|
57
57
|
clientId,
|
|
58
58
|
attributes,
|
|
59
59
|
setAttributes,
|
|
60
|
-
context: { postId, postType, queryId },
|
|
60
|
+
context: { postId, postType: postTypeSlug, queryId },
|
|
61
61
|
} ) {
|
|
62
62
|
const isDescendentOfQueryLoop = Number.isFinite( queryId );
|
|
63
63
|
const { isLink, height, width, scale, sizeSlug } = attributes;
|
|
64
64
|
const [ featuredImage, setFeaturedImage ] = useEntityProp(
|
|
65
65
|
'postType',
|
|
66
|
-
|
|
66
|
+
postTypeSlug,
|
|
67
67
|
'featured_media',
|
|
68
68
|
postId
|
|
69
69
|
);
|
|
70
70
|
|
|
71
|
-
const media = useSelect(
|
|
72
|
-
( select ) =>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
const { media, postType } = useSelect(
|
|
72
|
+
( select ) => {
|
|
73
|
+
const { getMedia, getPostType } = select( coreStore );
|
|
74
|
+
return {
|
|
75
|
+
media:
|
|
76
|
+
featuredImage &&
|
|
77
|
+
getMedia( featuredImage, {
|
|
78
|
+
context: 'view',
|
|
79
|
+
} ),
|
|
80
|
+
postType: postTypeSlug && getPostType( postTypeSlug ),
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
[ featuredImage, postTypeSlug ]
|
|
76
84
|
);
|
|
77
85
|
const mediaUrl = getMediaSourceUrlBySizeSlug( media, sizeSlug );
|
|
78
86
|
|
|
@@ -124,11 +132,15 @@ function PostFeaturedImageDisplay( {
|
|
|
124
132
|
<InspectorControls>
|
|
125
133
|
<PanelBody title={ __( 'Link settings' ) }>
|
|
126
134
|
<ToggleControl
|
|
127
|
-
label={
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
135
|
+
label={
|
|
136
|
+
postType?.labels.singular_name
|
|
137
|
+
? sprintf(
|
|
138
|
+
// translators: %s: Name of the post type e.g: "post".
|
|
139
|
+
__( 'Link to %s' ),
|
|
140
|
+
postType.labels.singular_name.toLowerCase()
|
|
141
|
+
)
|
|
142
|
+
: __( 'Link to post' )
|
|
143
|
+
}
|
|
132
144
|
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
133
145
|
checked={ isLink }
|
|
134
146
|
/>
|
package/src/quote/index.js
CHANGED
|
@@ -53,6 +53,10 @@ export const settingsV1 = {
|
|
|
53
53
|
deprecated,
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
let settings = settingsV1;
|
|
57
|
+
if ( process.env.IS_GUTENBERG_PLUGIN ) {
|
|
58
|
+
settings = window?.__experimentalEnableQuoteBlockV2
|
|
59
|
+
? settingsV2
|
|
60
|
+
: settingsV1;
|
|
61
|
+
}
|
|
62
|
+
export { settings };
|