@wordpress/block-library 7.3.1 → 7.3.2
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 +3 -1
- package/build/comment-template/hooks.js.map +1 -1
- package/build/cover/transforms.js +33 -32
- package/build/cover/transforms.js.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/list/index.js +13 -2
- package/build/list/index.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/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 +3 -1
- package/build-module/comment-template/hooks.js.map +1 -1
- package/build-module/cover/transforms.js +33 -32
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/index.js +2 -2
- 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/post-featured-image/edit.js +19 -7
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/quote/index.js +9 -3
- package/build-module/quote/index.js.map +1 -1
- package/package.json +28 -28
- package/src/audio/edit.js +1 -1
- package/src/comment-template/edit.js +5 -2
- package/src/comment-template/hooks.js +2 -1
- package/src/comment-template/index.php +14 -2
- package/src/cover/transforms.js +51 -28
- package/src/index.js +4 -1
- package/src/list/index.js +7 -3
- package/src/post-comments-form/index.php +12 -4
- package/src/post-featured-image/edit.js +24 -12
- package/src/quote/index.js +7 -3
|
@@ -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 };
|