@wordpress/block-library 8.30.0 → 8.31.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 +2 -0
- package/build/block/edit.js +17 -8
- package/build/block/edit.js.map +1 -1
- package/build/code/save.js +3 -1
- package/build/code/save.js.map +1 -1
- package/build/cover/edit/index.js +2 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/details/edit.js +1 -0
- package/build/details/edit.js.map +1 -1
- package/build/file/edit.js +2 -0
- package/build/file/edit.js.map +1 -1
- package/build/heading/index.js +4 -3
- package/build/heading/index.js.map +1 -1
- package/build/media-text/edit.js +33 -9
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/index.js +5 -0
- package/build/media-text/index.js.map +1 -1
- package/build/media-text/media-container.js +30 -11
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/save.js +2 -2
- package/build/media-text/save.js.map +1 -1
- package/build/navigation/edit/index.js +23 -29
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +12 -20
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +24 -23
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +4 -4
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +15 -12
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js +12 -10
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -0
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/post-author/edit.js +1 -0
- package/build/post-author/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +4 -1
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +6 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +1 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/edit.js +2 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/quote/edit.js +2 -2
- package/build/quote/edit.js.map +1 -1
- package/build/read-more/edit.js +1 -0
- package/build/read-more/edit.js.map +1 -1
- package/build/search/edit.js +2 -0
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/social-link/edit.js +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/icons/medium.js +1 -1
- package/build/social-link/icons/medium.js.map +1 -1
- package/build/social-link/icons/reddit.js +1 -1
- package/build/social-link/icons/reddit.js.map +1 -1
- package/build/table/deprecated.js +285 -175
- package/build/table/deprecated.js.map +1 -1
- package/build/table/index.js +1 -1
- package/build/template-part/edit/index.js +1 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/video/edit.native.js +1 -1
- package/build/video/edit.native.js.map +1 -1
- package/build-module/block/edit.js +18 -9
- package/build-module/block/edit.js.map +1 -1
- package/build-module/code/save.js +3 -1
- package/build-module/code/save.js.map +1 -1
- package/build-module/cover/edit/index.js +2 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/details/edit.js +1 -0
- package/build-module/details/edit.js.map +1 -1
- package/build-module/file/edit.js +2 -0
- package/build-module/file/edit.js.map +1 -1
- package/build-module/heading/index.js +4 -3
- package/build-module/heading/index.js.map +1 -1
- package/build-module/media-text/edit.js +34 -10
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/index.js +5 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/media-text/media-container.js +31 -12
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/save.js +2 -2
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/navigation/edit/index.js +24 -30
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +15 -23
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +24 -23
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +4 -4
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +15 -12
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +13 -11
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -0
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/post-author/edit.js +1 -0
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +5 -2
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +6 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +2 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/quote/edit.js +2 -2
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/read-more/edit.js +1 -0
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/search/edit.js +2 -0
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/social-link/edit.js +1 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/icons/medium.js +1 -1
- package/build-module/social-link/icons/medium.js.map +1 -1
- package/build-module/social-link/icons/reddit.js +1 -1
- package/build-module/social-link/icons/reddit.js.map +1 -1
- package/build-module/table/deprecated.js +286 -176
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/index.js +1 -1
- package/build-module/template-part/edit/index.js +1 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/video/edit.native.js +1 -1
- package/build-module/video/edit.native.js.map +1 -1
- package/build-style/editor-rtl.css +10 -4
- package/build-style/editor.css +10 -4
- package/build-style/file/editor-rtl.css +3 -0
- package/build-style/file/editor.css +3 -0
- package/build-style/image/editor-rtl.css +0 -3
- package/build-style/image/editor.css +0 -3
- package/build-style/media-text/editor-rtl.css +7 -1
- package/build-style/media-text/editor.css +7 -1
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/style-rtl.css +2 -2
- package/build-style/style.css +2 -2
- package/package.json +34 -34
- package/src/archives/index.php +4 -0
- package/src/avatar/index.php +6 -0
- package/src/block/edit.js +38 -15
- package/src/block/index.php +4 -0
- package/src/block/test/edit.native.js +67 -0
- package/src/calendar/index.php +12 -0
- package/src/categories/index.php +6 -0
- package/src/code/save.js +7 -1
- package/src/comment-author-name/index.php +4 -0
- package/src/comment-content/index.php +4 -0
- package/src/comment-date/index.php +4 -0
- package/src/comment-edit-link/index.php +4 -0
- package/src/comment-reply-link/index.php +4 -0
- package/src/comment-template/index.php +4 -0
- package/src/comments/index.php +10 -0
- package/src/comments-pagination/index.php +4 -0
- package/src/comments-pagination-next/index.php +4 -0
- package/src/comments-pagination-numbers/index.php +4 -0
- package/src/comments-pagination-previous/index.php +4 -0
- package/src/comments-title/index.php +4 -0
- package/src/cover/edit/index.js +4 -1
- package/src/cover/index.php +4 -0
- package/src/details/edit.js +1 -0
- package/src/file/edit.js +2 -0
- package/src/file/editor.scss +3 -0
- package/src/file/index.php +4 -0
- package/src/gallery/index.php +6 -0
- package/src/heading/index.js +4 -3
- package/src/heading/index.php +4 -0
- package/src/home-link/index.php +10 -0
- package/src/image/editor.scss +0 -5
- package/src/image/index.php +12 -1
- package/src/latest-comments/index.php +4 -0
- package/src/latest-posts/index.php +8 -0
- package/src/loginout/index.php +4 -0
- package/src/media-text/block.json +5 -0
- package/src/media-text/edit.js +70 -19
- package/src/media-text/editor.scss +7 -1
- package/src/media-text/index.php +70 -0
- package/src/media-text/media-container.js +49 -9
- package/src/media-text/save.js +2 -2
- package/src/navigation/edit/index.js +67 -71
- package/src/navigation/edit/navigation-menu-delete-control.js +22 -49
- package/src/navigation/edit/navigation-menu-selector.js +39 -21
- package/src/navigation/edit/placeholder/index.js +4 -4
- package/src/navigation/edit/test/navigation-menu-selector.js +75 -53
- package/src/navigation/index.php +101 -26
- package/src/navigation/test/use-navigation-menu.js +21 -21
- package/src/navigation/use-navigation-menu.js +23 -9
- package/src/navigation-link/edit.js +12 -13
- package/src/navigation-link/index.php +14 -0
- package/src/navigation-submenu/edit.js +4 -0
- package/src/navigation-submenu/index.php +8 -0
- package/src/page-list/index.php +12 -0
- package/src/page-list-item/index.php +2 -0
- package/src/pattern/index.php +2 -0
- package/src/post-author/edit.js +1 -0
- package/src/post-author/index.php +4 -0
- package/src/post-author-biography/index.php +4 -0
- package/src/post-author-name/index.php +4 -0
- package/src/post-comments-form/index.php +6 -0
- package/src/post-content/index.php +4 -0
- package/src/post-date/index.php +4 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/index.php +4 -0
- package/src/post-featured-image/block.json +6 -0
- package/src/post-featured-image/edit.js +4 -0
- package/src/post-featured-image/index.php +15 -0
- package/src/post-navigation-link/edit.js +1 -0
- package/src/post-navigation-link/index.php +4 -0
- package/src/post-template/index.php +4 -0
- package/src/post-terms/edit.js +2 -0
- package/src/post-terms/index.php +6 -0
- package/src/post-title/index.php +2 -0
- package/src/query/index.php +2 -0
- package/src/query-no-results/index.php +4 -0
- package/src/query-pagination/index.php +4 -0
- package/src/query-pagination-next/index.php +4 -0
- package/src/query-pagination-numbers/index.php +4 -0
- package/src/query-pagination-previous/index.php +4 -0
- package/src/query-title/index.php +4 -0
- package/src/quote/edit.js +11 -5
- package/src/read-more/edit.js +1 -0
- package/src/read-more/index.php +4 -0
- package/src/rss/index.php +4 -0
- package/src/search/edit.js +2 -0
- package/src/search/edit.native.js +2 -2
- package/src/search/index.php +19 -1
- package/src/shortcode/index.php +4 -0
- package/src/site-logo/index.php +20 -0
- package/src/site-tagline/index.php +4 -0
- package/src/site-title/index.php +4 -0
- package/src/social-link/edit.js +1 -1
- package/src/social-link/icons/medium.js +1 -1
- package/src/social-link/icons/reddit.js +1 -1
- package/src/social-link/index.php +22 -9
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/table/block.json +1 -1
- package/src/table/deprecated.js +308 -175
- package/src/tag-cloud/index.php +4 -0
- package/src/template-part/edit/index.js +1 -1
- package/src/template-part/index.php +10 -0
- package/src/term-description/index.php +4 -0
- package/src/video/edit.native.js +2 -0
- package/tsconfig.json +1 -0
package/src/table/deprecated.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useBlockProps,
|
|
13
13
|
__experimentalGetBorderClassesAndStyles as getBorderClassesAndStyles,
|
|
14
14
|
__experimentalGetColorClassesAndStyles as getColorClassesAndStyles,
|
|
15
|
+
__experimentalGetElementClassName,
|
|
15
16
|
} from '@wordpress/block-editor';
|
|
16
17
|
|
|
17
18
|
// As the previous arbitrary colors won't match theme color palettes, the hex
|
|
@@ -24,8 +25,266 @@ const oldColors = {
|
|
|
24
25
|
'subtle-pale-pink': '#fcf0ef',
|
|
25
26
|
};
|
|
26
27
|
|
|
28
|
+
// Fixed width table cells on by default.
|
|
29
|
+
const v4Query = {
|
|
30
|
+
content: {
|
|
31
|
+
type: 'rich-text',
|
|
32
|
+
source: 'rich-text',
|
|
33
|
+
},
|
|
34
|
+
tag: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
default: 'td',
|
|
37
|
+
source: 'tag',
|
|
38
|
+
},
|
|
39
|
+
scope: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
source: 'attribute',
|
|
42
|
+
attribute: 'scope',
|
|
43
|
+
},
|
|
44
|
+
align: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
source: 'attribute',
|
|
47
|
+
attribute: 'data-align',
|
|
48
|
+
},
|
|
49
|
+
colspan: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
source: 'attribute',
|
|
52
|
+
attribute: 'colspan',
|
|
53
|
+
},
|
|
54
|
+
rowspan: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
source: 'attribute',
|
|
57
|
+
attribute: 'rowspan',
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const v4 = {
|
|
62
|
+
attributes: {
|
|
63
|
+
hasFixedLayout: {
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
caption: {
|
|
68
|
+
type: 'rich-text',
|
|
69
|
+
source: 'rich-text',
|
|
70
|
+
selector: 'figcaption',
|
|
71
|
+
},
|
|
72
|
+
head: {
|
|
73
|
+
type: 'array',
|
|
74
|
+
default: [],
|
|
75
|
+
source: 'query',
|
|
76
|
+
selector: 'thead tr',
|
|
77
|
+
query: {
|
|
78
|
+
cells: {
|
|
79
|
+
type: 'array',
|
|
80
|
+
default: [],
|
|
81
|
+
source: 'query',
|
|
82
|
+
selector: 'td,th',
|
|
83
|
+
query: v4Query,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
body: {
|
|
88
|
+
type: 'array',
|
|
89
|
+
default: [],
|
|
90
|
+
source: 'query',
|
|
91
|
+
selector: 'tbody tr',
|
|
92
|
+
query: {
|
|
93
|
+
cells: {
|
|
94
|
+
type: 'array',
|
|
95
|
+
default: [],
|
|
96
|
+
source: 'query',
|
|
97
|
+
selector: 'td,th',
|
|
98
|
+
query: v4Query,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
foot: {
|
|
103
|
+
type: 'array',
|
|
104
|
+
default: [],
|
|
105
|
+
source: 'query',
|
|
106
|
+
selector: 'tfoot tr',
|
|
107
|
+
query: {
|
|
108
|
+
cells: {
|
|
109
|
+
type: 'array',
|
|
110
|
+
default: [],
|
|
111
|
+
source: 'query',
|
|
112
|
+
selector: 'td,th',
|
|
113
|
+
query: v4Query,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
supports: {
|
|
119
|
+
anchor: true,
|
|
120
|
+
align: true,
|
|
121
|
+
color: {
|
|
122
|
+
__experimentalSkipSerialization: true,
|
|
123
|
+
gradients: true,
|
|
124
|
+
__experimentalDefaultControls: {
|
|
125
|
+
background: true,
|
|
126
|
+
text: true,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
spacing: {
|
|
130
|
+
margin: true,
|
|
131
|
+
padding: true,
|
|
132
|
+
__experimentalDefaultControls: {
|
|
133
|
+
margin: false,
|
|
134
|
+
padding: false,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
typography: {
|
|
138
|
+
fontSize: true,
|
|
139
|
+
lineHeight: true,
|
|
140
|
+
__experimentalFontFamily: true,
|
|
141
|
+
__experimentalFontStyle: true,
|
|
142
|
+
__experimentalFontWeight: true,
|
|
143
|
+
__experimentalLetterSpacing: true,
|
|
144
|
+
__experimentalTextTransform: true,
|
|
145
|
+
__experimentalTextDecoration: true,
|
|
146
|
+
__experimentalDefaultControls: {
|
|
147
|
+
fontSize: true,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
__experimentalBorder: {
|
|
151
|
+
__experimentalSkipSerialization: true,
|
|
152
|
+
color: true,
|
|
153
|
+
style: true,
|
|
154
|
+
width: true,
|
|
155
|
+
__experimentalDefaultControls: {
|
|
156
|
+
color: true,
|
|
157
|
+
style: true,
|
|
158
|
+
width: true,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
__experimentalSelector: '.wp-block-table > table',
|
|
162
|
+
interactivity: {
|
|
163
|
+
clientNavigation: true,
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
save( { attributes } ) {
|
|
167
|
+
const { hasFixedLayout, head, body, foot, caption } = attributes;
|
|
168
|
+
const isEmpty = ! head.length && ! body.length && ! foot.length;
|
|
169
|
+
|
|
170
|
+
if ( isEmpty ) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const colorProps = getColorClassesAndStyles( attributes );
|
|
175
|
+
const borderProps = getBorderClassesAndStyles( attributes );
|
|
176
|
+
|
|
177
|
+
const classes = classnames(
|
|
178
|
+
colorProps.className,
|
|
179
|
+
borderProps.className,
|
|
180
|
+
{
|
|
181
|
+
'has-fixed-layout': hasFixedLayout,
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
const hasCaption = ! RichText.isEmpty( caption );
|
|
186
|
+
|
|
187
|
+
const Section = ( { type, rows } ) => {
|
|
188
|
+
if ( ! rows.length ) {
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const Tag = `t${ type }`;
|
|
193
|
+
|
|
194
|
+
return (
|
|
195
|
+
<Tag>
|
|
196
|
+
{ rows.map( ( { cells }, rowIndex ) => (
|
|
197
|
+
<tr key={ rowIndex }>
|
|
198
|
+
{ cells.map(
|
|
199
|
+
(
|
|
200
|
+
{
|
|
201
|
+
content,
|
|
202
|
+
tag,
|
|
203
|
+
scope,
|
|
204
|
+
align,
|
|
205
|
+
colspan,
|
|
206
|
+
rowspan,
|
|
207
|
+
},
|
|
208
|
+
cellIndex
|
|
209
|
+
) => {
|
|
210
|
+
const cellClasses = classnames( {
|
|
211
|
+
[ `has-text-align-${ align }` ]: align,
|
|
212
|
+
} );
|
|
213
|
+
|
|
214
|
+
return (
|
|
215
|
+
<RichText.Content
|
|
216
|
+
className={
|
|
217
|
+
cellClasses
|
|
218
|
+
? cellClasses
|
|
219
|
+
: undefined
|
|
220
|
+
}
|
|
221
|
+
data-align={ align }
|
|
222
|
+
tagName={ tag }
|
|
223
|
+
value={ content }
|
|
224
|
+
key={ cellIndex }
|
|
225
|
+
scope={
|
|
226
|
+
tag === 'th' ? scope : undefined
|
|
227
|
+
}
|
|
228
|
+
colSpan={ colspan }
|
|
229
|
+
rowSpan={ rowspan }
|
|
230
|
+
/>
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
) }
|
|
234
|
+
</tr>
|
|
235
|
+
) ) }
|
|
236
|
+
</Tag>
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
return (
|
|
241
|
+
<figure { ...useBlockProps.save() }>
|
|
242
|
+
<table
|
|
243
|
+
className={ classes === '' ? undefined : classes }
|
|
244
|
+
style={ { ...colorProps.style, ...borderProps.style } }
|
|
245
|
+
>
|
|
246
|
+
<Section type="head" rows={ head } />
|
|
247
|
+
<Section type="body" rows={ body } />
|
|
248
|
+
<Section type="foot" rows={ foot } />
|
|
249
|
+
</table>
|
|
250
|
+
{ hasCaption && (
|
|
251
|
+
<RichText.Content
|
|
252
|
+
tagName="figcaption"
|
|
253
|
+
value={ caption }
|
|
254
|
+
className={ __experimentalGetElementClassName(
|
|
255
|
+
'caption'
|
|
256
|
+
) }
|
|
257
|
+
/>
|
|
258
|
+
) }
|
|
259
|
+
</figure>
|
|
260
|
+
);
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
|
|
27
264
|
// In #41140 support was added to global styles for caption elements which
|
|
28
265
|
// added a `wp-element-caption` classname to the embed figcaption element.
|
|
266
|
+
const v3Query = {
|
|
267
|
+
content: {
|
|
268
|
+
type: 'string',
|
|
269
|
+
source: 'html',
|
|
270
|
+
},
|
|
271
|
+
tag: {
|
|
272
|
+
type: 'string',
|
|
273
|
+
default: 'td',
|
|
274
|
+
source: 'tag',
|
|
275
|
+
},
|
|
276
|
+
scope: {
|
|
277
|
+
type: 'string',
|
|
278
|
+
source: 'attribute',
|
|
279
|
+
attribute: 'scope',
|
|
280
|
+
},
|
|
281
|
+
align: {
|
|
282
|
+
type: 'string',
|
|
283
|
+
source: 'attribute',
|
|
284
|
+
attribute: 'data-align',
|
|
285
|
+
},
|
|
286
|
+
};
|
|
287
|
+
|
|
29
288
|
const v3 = {
|
|
30
289
|
attributes: {
|
|
31
290
|
hasFixedLayout: {
|
|
@@ -49,27 +308,7 @@ const v3 = {
|
|
|
49
308
|
default: [],
|
|
50
309
|
source: 'query',
|
|
51
310
|
selector: 'td,th',
|
|
52
|
-
query:
|
|
53
|
-
content: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
source: 'html',
|
|
56
|
-
},
|
|
57
|
-
tag: {
|
|
58
|
-
type: 'string',
|
|
59
|
-
default: 'td',
|
|
60
|
-
source: 'tag',
|
|
61
|
-
},
|
|
62
|
-
scope: {
|
|
63
|
-
type: 'string',
|
|
64
|
-
source: 'attribute',
|
|
65
|
-
attribute: 'scope',
|
|
66
|
-
},
|
|
67
|
-
align: {
|
|
68
|
-
type: 'string',
|
|
69
|
-
source: 'attribute',
|
|
70
|
-
attribute: 'data-align',
|
|
71
|
-
},
|
|
72
|
-
},
|
|
311
|
+
query: v3Query,
|
|
73
312
|
},
|
|
74
313
|
},
|
|
75
314
|
},
|
|
@@ -84,27 +323,7 @@ const v3 = {
|
|
|
84
323
|
default: [],
|
|
85
324
|
source: 'query',
|
|
86
325
|
selector: 'td,th',
|
|
87
|
-
query:
|
|
88
|
-
content: {
|
|
89
|
-
type: 'string',
|
|
90
|
-
source: 'html',
|
|
91
|
-
},
|
|
92
|
-
tag: {
|
|
93
|
-
type: 'string',
|
|
94
|
-
default: 'td',
|
|
95
|
-
source: 'tag',
|
|
96
|
-
},
|
|
97
|
-
scope: {
|
|
98
|
-
type: 'string',
|
|
99
|
-
source: 'attribute',
|
|
100
|
-
attribute: 'scope',
|
|
101
|
-
},
|
|
102
|
-
align: {
|
|
103
|
-
type: 'string',
|
|
104
|
-
source: 'attribute',
|
|
105
|
-
attribute: 'data-align',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
326
|
+
query: v3Query,
|
|
108
327
|
},
|
|
109
328
|
},
|
|
110
329
|
},
|
|
@@ -119,27 +338,7 @@ const v3 = {
|
|
|
119
338
|
default: [],
|
|
120
339
|
source: 'query',
|
|
121
340
|
selector: 'td,th',
|
|
122
|
-
query:
|
|
123
|
-
content: {
|
|
124
|
-
type: 'string',
|
|
125
|
-
source: 'html',
|
|
126
|
-
},
|
|
127
|
-
tag: {
|
|
128
|
-
type: 'string',
|
|
129
|
-
default: 'td',
|
|
130
|
-
source: 'tag',
|
|
131
|
-
},
|
|
132
|
-
scope: {
|
|
133
|
-
type: 'string',
|
|
134
|
-
source: 'attribute',
|
|
135
|
-
attribute: 'scope',
|
|
136
|
-
},
|
|
137
|
-
align: {
|
|
138
|
-
type: 'string',
|
|
139
|
-
source: 'attribute',
|
|
140
|
-
attribute: 'data-align',
|
|
141
|
-
},
|
|
142
|
-
},
|
|
341
|
+
query: v3Query,
|
|
143
342
|
},
|
|
144
343
|
},
|
|
145
344
|
},
|
|
@@ -269,6 +468,28 @@ const v3 = {
|
|
|
269
468
|
};
|
|
270
469
|
|
|
271
470
|
// Deprecation migrating table block to use colors block support feature.
|
|
471
|
+
const v2Query = {
|
|
472
|
+
content: {
|
|
473
|
+
type: 'string',
|
|
474
|
+
source: 'html',
|
|
475
|
+
},
|
|
476
|
+
tag: {
|
|
477
|
+
type: 'string',
|
|
478
|
+
default: 'td',
|
|
479
|
+
source: 'tag',
|
|
480
|
+
},
|
|
481
|
+
scope: {
|
|
482
|
+
type: 'string',
|
|
483
|
+
source: 'attribute',
|
|
484
|
+
attribute: 'scope',
|
|
485
|
+
},
|
|
486
|
+
align: {
|
|
487
|
+
type: 'string',
|
|
488
|
+
source: 'attribute',
|
|
489
|
+
attribute: 'data-align',
|
|
490
|
+
},
|
|
491
|
+
};
|
|
492
|
+
|
|
272
493
|
const v2 = {
|
|
273
494
|
attributes: {
|
|
274
495
|
hasFixedLayout: {
|
|
@@ -295,27 +516,7 @@ const v2 = {
|
|
|
295
516
|
default: [],
|
|
296
517
|
source: 'query',
|
|
297
518
|
selector: 'td,th',
|
|
298
|
-
query:
|
|
299
|
-
content: {
|
|
300
|
-
type: 'string',
|
|
301
|
-
source: 'html',
|
|
302
|
-
},
|
|
303
|
-
tag: {
|
|
304
|
-
type: 'string',
|
|
305
|
-
default: 'td',
|
|
306
|
-
source: 'tag',
|
|
307
|
-
},
|
|
308
|
-
scope: {
|
|
309
|
-
type: 'string',
|
|
310
|
-
source: 'attribute',
|
|
311
|
-
attribute: 'scope',
|
|
312
|
-
},
|
|
313
|
-
align: {
|
|
314
|
-
type: 'string',
|
|
315
|
-
source: 'attribute',
|
|
316
|
-
attribute: 'data-align',
|
|
317
|
-
},
|
|
318
|
-
},
|
|
519
|
+
query: v2Query,
|
|
319
520
|
},
|
|
320
521
|
},
|
|
321
522
|
},
|
|
@@ -330,27 +531,7 @@ const v2 = {
|
|
|
330
531
|
default: [],
|
|
331
532
|
source: 'query',
|
|
332
533
|
selector: 'td,th',
|
|
333
|
-
query:
|
|
334
|
-
content: {
|
|
335
|
-
type: 'string',
|
|
336
|
-
source: 'html',
|
|
337
|
-
},
|
|
338
|
-
tag: {
|
|
339
|
-
type: 'string',
|
|
340
|
-
default: 'td',
|
|
341
|
-
source: 'tag',
|
|
342
|
-
},
|
|
343
|
-
scope: {
|
|
344
|
-
type: 'string',
|
|
345
|
-
source: 'attribute',
|
|
346
|
-
attribute: 'scope',
|
|
347
|
-
},
|
|
348
|
-
align: {
|
|
349
|
-
type: 'string',
|
|
350
|
-
source: 'attribute',
|
|
351
|
-
attribute: 'data-align',
|
|
352
|
-
},
|
|
353
|
-
},
|
|
534
|
+
query: v2Query,
|
|
354
535
|
},
|
|
355
536
|
},
|
|
356
537
|
},
|
|
@@ -365,27 +546,7 @@ const v2 = {
|
|
|
365
546
|
default: [],
|
|
366
547
|
source: 'query',
|
|
367
548
|
selector: 'td,th',
|
|
368
|
-
query:
|
|
369
|
-
content: {
|
|
370
|
-
type: 'string',
|
|
371
|
-
source: 'html',
|
|
372
|
-
},
|
|
373
|
-
tag: {
|
|
374
|
-
type: 'string',
|
|
375
|
-
default: 'td',
|
|
376
|
-
source: 'tag',
|
|
377
|
-
},
|
|
378
|
-
scope: {
|
|
379
|
-
type: 'string',
|
|
380
|
-
source: 'attribute',
|
|
381
|
-
attribute: 'scope',
|
|
382
|
-
},
|
|
383
|
-
align: {
|
|
384
|
-
type: 'string',
|
|
385
|
-
source: 'attribute',
|
|
386
|
-
attribute: 'data-align',
|
|
387
|
-
},
|
|
388
|
-
},
|
|
549
|
+
query: v2Query,
|
|
389
550
|
},
|
|
390
551
|
},
|
|
391
552
|
},
|
|
@@ -496,6 +657,23 @@ const v2 = {
|
|
|
496
657
|
},
|
|
497
658
|
};
|
|
498
659
|
|
|
660
|
+
const v1Query = {
|
|
661
|
+
content: {
|
|
662
|
+
type: 'string',
|
|
663
|
+
source: 'html',
|
|
664
|
+
},
|
|
665
|
+
tag: {
|
|
666
|
+
type: 'string',
|
|
667
|
+
default: 'td',
|
|
668
|
+
source: 'tag',
|
|
669
|
+
},
|
|
670
|
+
scope: {
|
|
671
|
+
type: 'string',
|
|
672
|
+
source: 'attribute',
|
|
673
|
+
attribute: 'scope',
|
|
674
|
+
},
|
|
675
|
+
};
|
|
676
|
+
|
|
499
677
|
const v1 = {
|
|
500
678
|
attributes: {
|
|
501
679
|
hasFixedLayout: {
|
|
@@ -516,22 +694,7 @@ const v1 = {
|
|
|
516
694
|
default: [],
|
|
517
695
|
source: 'query',
|
|
518
696
|
selector: 'td,th',
|
|
519
|
-
query:
|
|
520
|
-
content: {
|
|
521
|
-
type: 'string',
|
|
522
|
-
source: 'html',
|
|
523
|
-
},
|
|
524
|
-
tag: {
|
|
525
|
-
type: 'string',
|
|
526
|
-
default: 'td',
|
|
527
|
-
source: 'tag',
|
|
528
|
-
},
|
|
529
|
-
scope: {
|
|
530
|
-
type: 'string',
|
|
531
|
-
source: 'attribute',
|
|
532
|
-
attribute: 'scope',
|
|
533
|
-
},
|
|
534
|
-
},
|
|
697
|
+
query: v1Query,
|
|
535
698
|
},
|
|
536
699
|
},
|
|
537
700
|
},
|
|
@@ -546,22 +709,7 @@ const v1 = {
|
|
|
546
709
|
default: [],
|
|
547
710
|
source: 'query',
|
|
548
711
|
selector: 'td,th',
|
|
549
|
-
query:
|
|
550
|
-
content: {
|
|
551
|
-
type: 'string',
|
|
552
|
-
source: 'html',
|
|
553
|
-
},
|
|
554
|
-
tag: {
|
|
555
|
-
type: 'string',
|
|
556
|
-
default: 'td',
|
|
557
|
-
source: 'tag',
|
|
558
|
-
},
|
|
559
|
-
scope: {
|
|
560
|
-
type: 'string',
|
|
561
|
-
source: 'attribute',
|
|
562
|
-
attribute: 'scope',
|
|
563
|
-
},
|
|
564
|
-
},
|
|
712
|
+
query: v1Query,
|
|
565
713
|
},
|
|
566
714
|
},
|
|
567
715
|
},
|
|
@@ -576,22 +724,7 @@ const v1 = {
|
|
|
576
724
|
default: [],
|
|
577
725
|
source: 'query',
|
|
578
726
|
selector: 'td,th',
|
|
579
|
-
query:
|
|
580
|
-
content: {
|
|
581
|
-
type: 'string',
|
|
582
|
-
source: 'html',
|
|
583
|
-
},
|
|
584
|
-
tag: {
|
|
585
|
-
type: 'string',
|
|
586
|
-
default: 'td',
|
|
587
|
-
source: 'tag',
|
|
588
|
-
},
|
|
589
|
-
scope: {
|
|
590
|
-
type: 'string',
|
|
591
|
-
source: 'attribute',
|
|
592
|
-
attribute: 'scope',
|
|
593
|
-
},
|
|
594
|
-
},
|
|
727
|
+
query: v1Query,
|
|
595
728
|
},
|
|
596
729
|
},
|
|
597
730
|
},
|
|
@@ -665,4 +798,4 @@ const v1 = {
|
|
|
665
798
|
*
|
|
666
799
|
* See block-deprecation.md
|
|
667
800
|
*/
|
|
668
|
-
export default [ v3, v2, v1 ];
|
|
801
|
+
export default [ v4, v3, v2, v1 ];
|
package/src/tag-cloud/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/tag-cloud` block on server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.2.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string Returns the tag cloud for selected taxonomy.
|
|
@@ -42,6 +44,8 @@ function render_block_core_tag_cloud( $attributes ) {
|
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
46
|
* Registers the `core/tag-cloud` block on server.
|
|
47
|
+
*
|
|
48
|
+
* @since 5.2.0
|
|
45
49
|
*/
|
|
46
50
|
function register_block_core_tag_cloud() {
|
|
47
51
|
register_block_type_from_metadata(
|
|
@@ -205,7 +205,7 @@ export default function TemplatePartEdit( {
|
|
|
205
205
|
createSuccessNotice(
|
|
206
206
|
sprintf(
|
|
207
207
|
/* translators: %s: template part title. */
|
|
208
|
-
__( 'Template Part "%s"
|
|
208
|
+
__( 'Template Part "%s" replaced.' ),
|
|
209
209
|
templatePart.title?.rendered || templatePart.slug
|
|
210
210
|
),
|
|
211
211
|
{
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/template-part` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.9.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string The render.
|
|
@@ -174,6 +176,8 @@ function render_block_core_template_part( $attributes ) {
|
|
|
174
176
|
/**
|
|
175
177
|
* Returns an array of area variation objects for the template part block.
|
|
176
178
|
*
|
|
179
|
+
* @since 6.1.0
|
|
180
|
+
*
|
|
177
181
|
* @param array $instance_variations The variations for instances.
|
|
178
182
|
*
|
|
179
183
|
* @return array Array containing the block variation objects.
|
|
@@ -212,6 +216,8 @@ function build_template_part_block_area_variations( $instance_variations ) {
|
|
|
212
216
|
/**
|
|
213
217
|
* Returns an array of instance variation objects for the template part block
|
|
214
218
|
*
|
|
219
|
+
* @since 6.1.0
|
|
220
|
+
*
|
|
215
221
|
* @return array Array containing the block variation objects.
|
|
216
222
|
*/
|
|
217
223
|
function build_template_part_block_instance_variations() {
|
|
@@ -266,6 +272,8 @@ function build_template_part_block_instance_variations() {
|
|
|
266
272
|
/**
|
|
267
273
|
* Returns an array of all template part block variations.
|
|
268
274
|
*
|
|
275
|
+
* @since 5.9.0
|
|
276
|
+
*
|
|
269
277
|
* @return array Array containing the block variation objects.
|
|
270
278
|
*/
|
|
271
279
|
function build_template_part_block_variations() {
|
|
@@ -276,6 +284,8 @@ function build_template_part_block_variations() {
|
|
|
276
284
|
|
|
277
285
|
/**
|
|
278
286
|
* Registers the `core/template-part` block on the server.
|
|
287
|
+
*
|
|
288
|
+
* @since 5.9.0
|
|
279
289
|
*/
|
|
280
290
|
function register_block_core_template_part() {
|
|
281
291
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/term-description` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.9.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string Returns the description of the current taxonomy term, if available
|
|
@@ -37,6 +39,8 @@ function render_block_core_term_description( $attributes ) {
|
|
|
37
39
|
|
|
38
40
|
/**
|
|
39
41
|
* Registers the `core/term-description` block on the server.
|
|
42
|
+
*
|
|
43
|
+
* @since 5.9.0
|
|
40
44
|
*/
|
|
41
45
|
function register_block_core_term_description() {
|
|
42
46
|
register_block_type_from_metadata(
|
package/src/video/edit.native.js
CHANGED
|
@@ -290,8 +290,10 @@ class VideoEdit extends Component {
|
|
|
290
290
|
} ) => {
|
|
291
291
|
const showVideo =
|
|
292
292
|
isURL( src ) &&
|
|
293
|
+
getProtocol( attributes.src ) !== 'file:' &&
|
|
293
294
|
! isUploadInProgress &&
|
|
294
295
|
! isUploadFailed;
|
|
296
|
+
|
|
295
297
|
const icon = this.getIcon(
|
|
296
298
|
isUploadFailed
|
|
297
299
|
? ICON_TYPE.RETRY
|