@wordpress/block-library 7.3.0 → 7.4.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/archives/edit.js +1 -1
- package/build/archives/edit.js.map +1 -1
- package/build/audio/edit.js +2 -2
- package/build/audio/edit.js.map +1 -1
- package/build/audio/edit.native.js +1 -1
- package/build/audio/edit.native.js.map +1 -1
- package/build/categories/edit.js +8 -3
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +4 -0
- package/build/categories/index.js.map +1 -1
- package/build/column/index.js +10 -0
- package/build/column/index.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 +1 -1
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-title/edit.js +149 -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/embed/edit.js +12 -18
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js +1 -7
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/util.js +29 -4
- package/build/embed/util.js.map +1 -1
- package/build/file/inspector.js +2 -4
- package/build/file/inspector.js.map +1 -1
- package/build/gallery/edit.js +1 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/v1/edit.js +1 -1
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/html/edit.js +2 -2
- package/build/html/edit.js.map +1 -1
- package/build/image/edit.js +4 -6
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +1 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +1 -1
- package/build/image/image.js.map +1 -1
- package/build/index.js +5 -3
- package/build/index.js.map +1 -1
- package/build/index.native.js +14 -3
- package/build/index.native.js.map +1 -1
- package/build/latest-comments/edit.js +1 -1
- package/build/latest-comments/edit.js.map +1 -1
- package/build/list/index.js +13 -2
- package/build/list/index.js.map +1 -1
- package/build/loginout/edit.js +1 -1
- package/build/loginout/edit.js.map +1 -1
- package/build/media-text/edit.js +1 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/edit.native.js +1 -1
- package/build/media-text/edit.native.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/navigation-menu-selector.js +7 -2
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +5 -4
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/index.js +1 -1
- package/build/navigation/view-modal.js +37 -0
- package/build/navigation/view-modal.js.map +1 -0
- package/build/navigation/view.js +1 -34
- package/build/navigation/view.js.map +1 -1
- package/build/paragraph/edit.native.js +6 -2
- package/build/paragraph/edit.native.js.map +1 -1
- package/build/post-author/edit.js +1 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-comments/index.js +4 -3
- package/build/post-comments/index.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -1
- package/build/post-excerpt/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/edit/index.js +84 -22
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/query-placeholder.js +7 -14
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/edit/query-toolbar.js +6 -1
- package/build/query/edit/query-toolbar.js.map +1 -1
- package/build/quote/index.js +19 -2
- package/build/quote/index.js.map +1 -1
- package/build/quote/v2/edit.js +11 -3
- package/build/quote/v2/edit.js.map +1 -1
- package/build/rss/edit.js +1 -1
- package/build/rss/edit.js.map +1 -1
- package/build/search/edit.js +11 -9
- package/build/search/edit.js.map +1 -1
- package/build/spacer/constants.js +9 -0
- package/build/spacer/constants.js.map +1 -0
- package/build/spacer/controls.js +3 -3
- package/build/spacer/controls.js.map +1 -1
- package/build/spacer/controls.native.js +2 -2
- package/build/spacer/controls.native.js.map +1 -1
- package/build/spacer/edit.js +5 -6
- package/build/spacer/edit.js.map +1 -1
- package/build/table/edit.js +8 -2
- package/build/table/edit.js.map +1 -1
- package/build/tag-cloud/edit.js +1 -1
- package/build/tag-cloud/edit.js.map +1 -1
- package/build/video/edit.js +1 -1
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +1 -1
- package/build/video/edit.native.js.map +1 -1
- package/build-module/archives/edit.js +1 -1
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/audio/edit.js +2 -2
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/edit.native.js +1 -1
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/categories/edit.js +8 -3
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +4 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/column/index.js +10 -0
- package/build-module/column/index.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 +1 -1
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +133 -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/embed/edit.js +13 -19
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +2 -8
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/util.js +25 -3
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/inspector.js +2 -4
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/gallery/edit.js +1 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/v1/edit.js +1 -1
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/html/edit.js +2 -2
- package/build-module/html/edit.js.map +1 -1
- package/build-module/image/edit.js +4 -6
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +1 -1
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +1 -1
- package/build-module/image/image.js.map +1 -1
- package/build-module/index.js +4 -3
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +14 -3
- package/build-module/index.native.js.map +1 -1
- package/build-module/latest-comments/edit.js +1 -1
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/list/index.js +9 -3
- package/build-module/list/index.js.map +1 -1
- package/build-module/loginout/edit.js +1 -1
- package/build-module/loginout/edit.js.map +1 -1
- package/build-module/media-text/edit.js +1 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/edit.native.js +1 -1
- package/build-module/media-text/edit.native.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/navigation-menu-selector.js +6 -2
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +5 -4
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/index.js +1 -1
- package/build-module/navigation/view-modal.js +32 -0
- package/build-module/navigation/view-modal.js.map +1 -0
- package/build-module/navigation/view.js +1 -30
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/paragraph/edit.native.js +6 -2
- package/build-module/paragraph/edit.native.js.map +1 -1
- package/build-module/post-author/edit.js +1 -1
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-comments/index.js +4 -3
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -1
- package/build-module/post-excerpt/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/edit/index.js +87 -26
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +8 -15
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/edit/query-toolbar.js +6 -1
- package/build-module/query/edit/query-toolbar.js.map +1 -1
- package/build-module/quote/index.js +10 -4
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/v2/edit.js +10 -3
- package/build-module/quote/v2/edit.js.map +1 -1
- package/build-module/rss/edit.js +1 -1
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/search/edit.js +11 -9
- package/build-module/search/edit.js.map +1 -1
- package/build-module/spacer/constants.js +2 -0
- package/build-module/spacer/constants.js.map +1 -0
- package/build-module/spacer/controls.js +2 -2
- package/build-module/spacer/controls.js.map +1 -1
- package/build-module/spacer/controls.native.js +1 -1
- package/build-module/spacer/controls.native.js.map +1 -1
- package/build-module/spacer/edit.js +1 -1
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/table/edit.js +9 -3
- package/build-module/table/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/video/edit.js +1 -1
- package/build-module/video/edit.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/comments-title/editor-rtl.css +79 -0
- package/build-style/comments-title/editor.css +79 -0
- package/build-style/common-rtl.css +32 -0
- package/build-style/common.css +32 -0
- package/build-style/editor-rtl.css +51 -0
- package/build-style/editor.css +51 -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/query/editor-rtl.css +39 -0
- package/build-style/query/editor.css +39 -0
- package/build-style/style-rtl.css +79 -0
- package/build-style/style.css +79 -0
- package/build-style/table/editor-rtl.css +8 -0
- package/build-style/table/editor.css +8 -0
- package/build-style/table/style-rtl.css +38 -0
- package/build-style/table/style.css +38 -0
- package/package.json +28 -28
- package/src/archives/edit.js +1 -1
- package/src/audio/edit.js +2 -2
- package/src/audio/edit.native.js +1 -1
- package/src/categories/block.json +4 -0
- package/src/categories/edit.js +8 -2
- package/src/categories/index.php +1 -0
- package/src/column/block.json +10 -0
- 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 +1 -0
- package/src/comments-title/block.json +70 -0
- package/src/comments-title/edit.js +197 -0
- package/src/comments-title/editor.scss +4 -0
- package/src/comments-title/index.js +18 -0
- package/src/comments-title/index.php +68 -0
- package/src/common.scss +24 -1
- package/src/cover/transforms.js +51 -28
- package/src/editor.scss +1 -0
- package/src/embed/edit.js +19 -24
- package/src/embed/edit.native.js +9 -14
- package/src/embed/util.js +34 -2
- package/src/file/inspector.js +1 -3
- package/src/gallery/edit.js +1 -1
- package/src/gallery/v1/edit.js +1 -1
- package/src/html/edit.js +2 -2
- package/src/image/edit.js +2 -4
- package/src/image/edit.native.js +1 -1
- package/src/image/image.js +1 -1
- package/src/index.js +7 -1
- package/src/index.native.js +12 -2
- package/src/latest-comments/edit.js +1 -1
- package/src/list/index.js +7 -3
- package/src/loginout/edit.js +1 -1
- package/src/media-text/edit.js +1 -2
- package/src/media-text/edit.native.js +1 -1
- package/src/navigation/block.json +1 -1
- package/src/navigation/edit/index.js +24 -0
- package/src/navigation/edit/navigation-menu-selector.js +15 -9
- package/src/navigation/edit/unsaved-inner-blocks.js +5 -4
- package/src/navigation/index.php +5 -0
- package/src/navigation/view-modal.js +36 -0
- package/src/navigation/view.js +0 -35
- package/src/paragraph/edit.native.js +13 -1
- package/src/post-author/edit.js +1 -1
- package/src/post-comments/block.json +4 -3
- package/src/post-comments-form/index.php +12 -4
- package/src/post-comments-form/style.scss +11 -0
- package/src/post-excerpt/edit.js +1 -1
- package/src/post-featured-image/edit.js +24 -12
- package/src/query/edit/index.js +125 -26
- package/src/query/edit/query-placeholder.js +3 -13
- package/src/query/edit/query-toolbar.js +6 -0
- package/src/query/editor.scss +38 -0
- package/src/quote/index.js +8 -4
- package/src/quote/v2/edit.js +3 -0
- package/src/rss/edit.js +1 -1
- package/src/search/edit.js +13 -7
- package/src/search/index.php +84 -33
- package/src/spacer/constants.js +1 -0
- package/src/spacer/controls.js +2 -2
- package/src/spacer/controls.native.js +1 -1
- package/src/spacer/edit.js +1 -2
- package/src/table/edit.js +11 -2
- package/src/table/editor.scss +13 -0
- package/src/table/style.scss +52 -0
- package/src/tag-cloud/edit.js +1 -1
- package/src/video/edit.js +1 -1
- package/src/video/edit.native.js +1 -1
|
@@ -143,6 +143,44 @@
|
|
|
143
143
|
.wp-block-table .has-border-color td {
|
|
144
144
|
border-color: inherit;
|
|
145
145
|
}
|
|
146
|
+
.wp-block-table table[style*=border-top-color] > *,
|
|
147
|
+
.wp-block-table table[style*=border-top-color] tr:first-child {
|
|
148
|
+
border-top-color: inherit;
|
|
149
|
+
}
|
|
150
|
+
.wp-block-table table[style*=border-top-color] > * th,
|
|
151
|
+
.wp-block-table table[style*=border-top-color] > * td,
|
|
152
|
+
.wp-block-table table[style*=border-top-color] tr:first-child th,
|
|
153
|
+
.wp-block-table table[style*=border-top-color] tr:first-child td {
|
|
154
|
+
border-top-color: inherit;
|
|
155
|
+
}
|
|
156
|
+
.wp-block-table table[style*=border-top-color] tr:not(:first-child) {
|
|
157
|
+
border-top-color: currentColor;
|
|
158
|
+
}
|
|
159
|
+
.wp-block-table table[style*=border-right-color] > *,
|
|
160
|
+
.wp-block-table table[style*=border-right-color] tr,
|
|
161
|
+
.wp-block-table table[style*=border-right-color] th,
|
|
162
|
+
.wp-block-table table[style*=border-right-color] td:last-child {
|
|
163
|
+
border-left-color: inherit;
|
|
164
|
+
}
|
|
165
|
+
.wp-block-table table[style*=border-bottom-color] > *,
|
|
166
|
+
.wp-block-table table[style*=border-bottom-color] tr:last-child {
|
|
167
|
+
border-bottom-color: inherit;
|
|
168
|
+
}
|
|
169
|
+
.wp-block-table table[style*=border-bottom-color] > * th,
|
|
170
|
+
.wp-block-table table[style*=border-bottom-color] > * td,
|
|
171
|
+
.wp-block-table table[style*=border-bottom-color] tr:last-child th,
|
|
172
|
+
.wp-block-table table[style*=border-bottom-color] tr:last-child td {
|
|
173
|
+
border-bottom-color: inherit;
|
|
174
|
+
}
|
|
175
|
+
.wp-block-table table[style*=border-bottom-color] tr:not(:last-child) {
|
|
176
|
+
border-bottom-color: currentColor;
|
|
177
|
+
}
|
|
178
|
+
.wp-block-table table[style*=border-left-color] > *,
|
|
179
|
+
.wp-block-table table[style*=border-left-color] tr,
|
|
180
|
+
.wp-block-table table[style*=border-left-color] th,
|
|
181
|
+
.wp-block-table table[style*=border-left-color] td:first-child {
|
|
182
|
+
border-right-color: inherit;
|
|
183
|
+
}
|
|
146
184
|
.wp-block-table table[style*=border-style] > *,
|
|
147
185
|
.wp-block-table table[style*=border-style] tr,
|
|
148
186
|
.wp-block-table table[style*=border-style] th,
|
|
@@ -143,6 +143,44 @@
|
|
|
143
143
|
.wp-block-table .has-border-color td {
|
|
144
144
|
border-color: inherit;
|
|
145
145
|
}
|
|
146
|
+
.wp-block-table table[style*=border-top-color] > *,
|
|
147
|
+
.wp-block-table table[style*=border-top-color] tr:first-child {
|
|
148
|
+
border-top-color: inherit;
|
|
149
|
+
}
|
|
150
|
+
.wp-block-table table[style*=border-top-color] > * th,
|
|
151
|
+
.wp-block-table table[style*=border-top-color] > * td,
|
|
152
|
+
.wp-block-table table[style*=border-top-color] tr:first-child th,
|
|
153
|
+
.wp-block-table table[style*=border-top-color] tr:first-child td {
|
|
154
|
+
border-top-color: inherit;
|
|
155
|
+
}
|
|
156
|
+
.wp-block-table table[style*=border-top-color] tr:not(:first-child) {
|
|
157
|
+
border-top-color: currentColor;
|
|
158
|
+
}
|
|
159
|
+
.wp-block-table table[style*=border-right-color] > *,
|
|
160
|
+
.wp-block-table table[style*=border-right-color] tr,
|
|
161
|
+
.wp-block-table table[style*=border-right-color] th,
|
|
162
|
+
.wp-block-table table[style*=border-right-color] td:last-child {
|
|
163
|
+
border-right-color: inherit;
|
|
164
|
+
}
|
|
165
|
+
.wp-block-table table[style*=border-bottom-color] > *,
|
|
166
|
+
.wp-block-table table[style*=border-bottom-color] tr:last-child {
|
|
167
|
+
border-bottom-color: inherit;
|
|
168
|
+
}
|
|
169
|
+
.wp-block-table table[style*=border-bottom-color] > * th,
|
|
170
|
+
.wp-block-table table[style*=border-bottom-color] > * td,
|
|
171
|
+
.wp-block-table table[style*=border-bottom-color] tr:last-child th,
|
|
172
|
+
.wp-block-table table[style*=border-bottom-color] tr:last-child td {
|
|
173
|
+
border-bottom-color: inherit;
|
|
174
|
+
}
|
|
175
|
+
.wp-block-table table[style*=border-bottom-color] tr:not(:last-child) {
|
|
176
|
+
border-bottom-color: currentColor;
|
|
177
|
+
}
|
|
178
|
+
.wp-block-table table[style*=border-left-color] > *,
|
|
179
|
+
.wp-block-table table[style*=border-left-color] tr,
|
|
180
|
+
.wp-block-table table[style*=border-left-color] th,
|
|
181
|
+
.wp-block-table table[style*=border-left-color] td:first-child {
|
|
182
|
+
border-left-color: inherit;
|
|
183
|
+
}
|
|
146
184
|
.wp-block-table table[style*=border-style] > *,
|
|
147
185
|
.wp-block-table table[style*=border-style] tr,
|
|
148
186
|
.wp-block-table table[style*=border-style] th,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -33,32 +33,32 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/runtime": "^7.16.0",
|
|
36
|
-
"@wordpress/a11y": "^3.
|
|
37
|
-
"@wordpress/api-fetch": "^6.
|
|
38
|
-
"@wordpress/autop": "^3.
|
|
39
|
-
"@wordpress/blob": "^3.
|
|
40
|
-
"@wordpress/block-editor": "^8.
|
|
41
|
-
"@wordpress/blocks": "^11.
|
|
42
|
-
"@wordpress/components": "^19.
|
|
43
|
-
"@wordpress/compose": "^5.
|
|
44
|
-
"@wordpress/core-data": "^4.
|
|
45
|
-
"@wordpress/data": "^6.
|
|
46
|
-
"@wordpress/date": "^4.
|
|
47
|
-
"@wordpress/deprecated": "^3.
|
|
48
|
-
"@wordpress/dom": "^3.
|
|
49
|
-
"@wordpress/element": "^4.
|
|
50
|
-
"@wordpress/hooks": "^3.
|
|
51
|
-
"@wordpress/html-entities": "^3.
|
|
52
|
-
"@wordpress/i18n": "^4.
|
|
53
|
-
"@wordpress/icons": "^8.
|
|
54
|
-
"@wordpress/keycodes": "^3.
|
|
55
|
-
"@wordpress/notices": "^3.
|
|
56
|
-
"@wordpress/primitives": "^3.
|
|
57
|
-
"@wordpress/reusable-blocks": "^3.
|
|
58
|
-
"@wordpress/rich-text": "^5.
|
|
59
|
-
"@wordpress/server-side-render": "^3.
|
|
60
|
-
"@wordpress/url": "^3.
|
|
61
|
-
"@wordpress/viewport": "^4.
|
|
36
|
+
"@wordpress/a11y": "^3.7.0",
|
|
37
|
+
"@wordpress/api-fetch": "^6.4.0",
|
|
38
|
+
"@wordpress/autop": "^3.7.0",
|
|
39
|
+
"@wordpress/blob": "^3.7.0",
|
|
40
|
+
"@wordpress/block-editor": "^8.6.0",
|
|
41
|
+
"@wordpress/blocks": "^11.6.0",
|
|
42
|
+
"@wordpress/components": "^19.9.0",
|
|
43
|
+
"@wordpress/compose": "^5.5.0",
|
|
44
|
+
"@wordpress/core-data": "^4.5.0",
|
|
45
|
+
"@wordpress/data": "^6.7.0",
|
|
46
|
+
"@wordpress/date": "^4.7.0",
|
|
47
|
+
"@wordpress/deprecated": "^3.7.0",
|
|
48
|
+
"@wordpress/dom": "^3.7.0",
|
|
49
|
+
"@wordpress/element": "^4.5.0",
|
|
50
|
+
"@wordpress/hooks": "^3.7.0",
|
|
51
|
+
"@wordpress/html-entities": "^3.7.0",
|
|
52
|
+
"@wordpress/i18n": "^4.7.0",
|
|
53
|
+
"@wordpress/icons": "^8.3.0",
|
|
54
|
+
"@wordpress/keycodes": "^3.7.0",
|
|
55
|
+
"@wordpress/notices": "^3.7.0",
|
|
56
|
+
"@wordpress/primitives": "^3.5.0",
|
|
57
|
+
"@wordpress/reusable-blocks": "^3.5.0",
|
|
58
|
+
"@wordpress/rich-text": "^5.5.0",
|
|
59
|
+
"@wordpress/server-side-render": "^3.5.0",
|
|
60
|
+
"@wordpress/url": "^3.8.0",
|
|
61
|
+
"@wordpress/viewport": "^4.5.0",
|
|
62
62
|
"classnames": "^2.3.1",
|
|
63
63
|
"colord": "^2.7.0",
|
|
64
64
|
"fast-average-color": "4.3.0",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "1ba52312b56db563df2d8d4fba5b00613fb46d8c"
|
|
78
78
|
}
|
package/src/archives/edit.js
CHANGED
|
@@ -17,7 +17,7 @@ export default function ArchivesEdit( { attributes, setAttributes } ) {
|
|
|
17
17
|
return (
|
|
18
18
|
<>
|
|
19
19
|
<InspectorControls>
|
|
20
|
-
<PanelBody title={ __( '
|
|
20
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
21
21
|
<ToggleControl
|
|
22
22
|
label={ __( 'Display as dropdown' ) }
|
|
23
23
|
checked={ displayAsDropdown }
|
package/src/audio/edit.js
CHANGED
|
@@ -159,7 +159,7 @@ function AudioEdit( {
|
|
|
159
159
|
/>
|
|
160
160
|
</BlockControls>
|
|
161
161
|
<InspectorControls>
|
|
162
|
-
<PanelBody title={ __( '
|
|
162
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
163
163
|
<ToggleControl
|
|
164
164
|
label={ __( 'Autoplay' ) }
|
|
165
165
|
onChange={ toggleAttribute( 'autoplay' ) }
|
|
@@ -186,7 +186,7 @@ function AudioEdit( {
|
|
|
186
186
|
{ value: 'metadata', label: __( 'Metadata' ) },
|
|
187
187
|
{
|
|
188
188
|
value: 'none',
|
|
189
|
-
label: _x( 'None', '
|
|
189
|
+
label: _x( 'None', 'Preload value' ),
|
|
190
190
|
},
|
|
191
191
|
] }
|
|
192
192
|
/>
|
package/src/audio/edit.native.js
CHANGED
package/src/categories/edit.js
CHANGED
|
@@ -25,11 +25,12 @@ export default function CategoriesEdit( {
|
|
|
25
25
|
showHierarchy,
|
|
26
26
|
showPostCounts,
|
|
27
27
|
showOnlyTopLevel,
|
|
28
|
+
showEmpty,
|
|
28
29
|
},
|
|
29
30
|
setAttributes,
|
|
30
31
|
} ) {
|
|
31
32
|
const selectId = useInstanceId( CategoriesEdit, 'blocks-category-select' );
|
|
32
|
-
const query = { per_page: -1, hide_empty:
|
|
33
|
+
const query = { per_page: -1, hide_empty: ! showEmpty, context: 'view' };
|
|
33
34
|
if ( showOnlyTopLevel ) {
|
|
34
35
|
query.parent = 0;
|
|
35
36
|
}
|
|
@@ -128,7 +129,7 @@ export default function CategoriesEdit( {
|
|
|
128
129
|
return (
|
|
129
130
|
<div { ...useBlockProps() }>
|
|
130
131
|
<InspectorControls>
|
|
131
|
-
<PanelBody title={ __( '
|
|
132
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
132
133
|
<ToggleControl
|
|
133
134
|
label={ __( 'Display as dropdown' ) }
|
|
134
135
|
checked={ displayAsDropdown }
|
|
@@ -144,6 +145,11 @@ export default function CategoriesEdit( {
|
|
|
144
145
|
checked={ showOnlyTopLevel }
|
|
145
146
|
onChange={ toggleAttribute( 'showOnlyTopLevel' ) }
|
|
146
147
|
/>
|
|
148
|
+
<ToggleControl
|
|
149
|
+
label={ __( 'Show empty categories' ) }
|
|
150
|
+
checked={ showEmpty }
|
|
151
|
+
onChange={ toggleAttribute( 'showEmpty' ) }
|
|
152
|
+
/>
|
|
147
153
|
{ ! showOnlyTopLevel && (
|
|
148
154
|
<ToggleControl
|
|
149
155
|
label={ __( 'Show hierarchy' ) }
|
package/src/categories/index.php
CHANGED
|
@@ -22,6 +22,7 @@ function render_block_core_categories( $attributes ) {
|
|
|
22
22
|
'orderby' => 'name',
|
|
23
23
|
'show_count' => ! empty( $attributes['showPostCounts'] ),
|
|
24
24
|
'title_li' => '',
|
|
25
|
+
'hide_empty' => empty( $attributes['showEmpty'] ),
|
|
25
26
|
);
|
|
26
27
|
if ( ! empty( $attributes['showOnlyTopLevel'] ) && $attributes['showOnlyTopLevel'] ) {
|
|
27
28
|
$args['parent'] = 0;
|
package/src/column/block.json
CHANGED
|
@@ -41,6 +41,16 @@
|
|
|
41
41
|
"padding": true
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
+
"__experimentalBorder": {
|
|
45
|
+
"color": true,
|
|
46
|
+
"style": true,
|
|
47
|
+
"width": true,
|
|
48
|
+
"__experimentalDefaultControls": {
|
|
49
|
+
"color": true,
|
|
50
|
+
"style": true,
|
|
51
|
+
"width": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
44
54
|
"__experimentalLayout": true
|
|
45
55
|
}
|
|
46
56
|
}
|
|
@@ -252,7 +252,6 @@ export default function CommentTemplateEdit( {
|
|
|
252
252
|
( select ) => {
|
|
253
253
|
const { getEntityRecords } = select( coreStore );
|
|
254
254
|
const { getBlocks } = select( blockEditorStore );
|
|
255
|
-
|
|
256
255
|
return {
|
|
257
256
|
// Request only top-level comments. Replies are embedded.
|
|
258
257
|
topLevelComments: commentQuery
|
|
@@ -289,7 +288,11 @@ export default function CommentTemplateEdit( {
|
|
|
289
288
|
}
|
|
290
289
|
|
|
291
290
|
if ( ! commentTree.length ) {
|
|
292
|
-
return
|
|
291
|
+
return (
|
|
292
|
+
<p { ...blockProps } data-testid="noresults">
|
|
293
|
+
{ __( 'No results found.' ) }
|
|
294
|
+
</p>
|
|
295
|
+
);
|
|
293
296
|
}
|
|
294
297
|
|
|
295
298
|
return (
|
|
@@ -7,6 +7,9 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
|
7
7
|
import { addQueryArgs } from '@wordpress/url';
|
|
8
8
|
import apiFetch from '@wordpress/api-fetch';
|
|
9
9
|
|
|
10
|
+
// This is limited by WP REST API
|
|
11
|
+
const MAX_COMMENTS_PER_PAGE = 100;
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* Return an object with the query args needed to fetch the default page of
|
|
12
15
|
* comments.
|
|
@@ -29,7 +32,8 @@ export const useCommentQueryArgs = ( { postId } ) => {
|
|
|
29
32
|
|
|
30
33
|
// Get the Discussion settings that may be needed to query the comments.
|
|
31
34
|
const {
|
|
32
|
-
|
|
35
|
+
pageComments,
|
|
36
|
+
commentsPerPage,
|
|
33
37
|
defaultCommentsPage: defaultPage,
|
|
34
38
|
} = useSelect( ( select ) => {
|
|
35
39
|
const { getSettings } = select( blockEditorStore );
|
|
@@ -37,6 +41,14 @@ export const useCommentQueryArgs = ( { postId } ) => {
|
|
|
37
41
|
return __experimentalDiscussionSettings;
|
|
38
42
|
} );
|
|
39
43
|
|
|
44
|
+
// WP REST API doesn't allow fetching more than max items limit set per single page of data.
|
|
45
|
+
// As for the editor performance is more important than completeness of data and fetching only the
|
|
46
|
+
// max allowed for single page should be enough for the purpose of design and laying out the page.
|
|
47
|
+
// Fetching over the limit would return an error here but would work with backend query.
|
|
48
|
+
const perPage = pageComments
|
|
49
|
+
? Math.min( commentsPerPage, MAX_COMMENTS_PER_PAGE )
|
|
50
|
+
: MAX_COMMENTS_PER_PAGE;
|
|
51
|
+
|
|
40
52
|
// Get the number of the default page.
|
|
41
53
|
const page = useDefaultPageIndex( {
|
|
42
54
|
defaultPage,
|
|
@@ -96,9 +108,10 @@ const useDefaultPageIndex = ( { defaultPage, postId, perPage, queryArgs } ) => {
|
|
|
96
108
|
method: 'HEAD',
|
|
97
109
|
parse: false,
|
|
98
110
|
} ).then( ( res ) => {
|
|
111
|
+
const pages = parseInt( res.headers.get( 'X-WP-TotalPages' ) );
|
|
99
112
|
setDefaultPages( {
|
|
100
113
|
...defaultPages,
|
|
101
|
-
[ key ]:
|
|
114
|
+
[ key ]: pages <= 1 ? 1 : pages, // If there are 0 pages, it means that there are no comments, but there is no 0th page.
|
|
102
115
|
} );
|
|
103
116
|
} );
|
|
104
117
|
}, [ defaultPage, postId, perPage, setDefaultPages ] );
|
|
@@ -8,11 +8,19 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Function that recursively renders a list of nested comments.
|
|
10
10
|
*
|
|
11
|
-
* @
|
|
11
|
+
* @global int $comment_depth
|
|
12
|
+
*
|
|
13
|
+
* @param WP_Comment[] $comments The array of comments.
|
|
12
14
|
* @param WP_Block $block Block instance.
|
|
13
15
|
* @return string
|
|
14
16
|
*/
|
|
15
17
|
function block_core_comment_template_render_comments( $comments, $block ) {
|
|
18
|
+
global $comment_depth;
|
|
19
|
+
|
|
20
|
+
if ( empty( $comment_depth ) ) {
|
|
21
|
+
$comment_depth = 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
$content = '';
|
|
17
25
|
foreach ( $comments as $comment ) {
|
|
18
26
|
|
|
@@ -25,17 +33,30 @@ function block_core_comment_template_render_comments( $comments, $block ) {
|
|
|
25
33
|
|
|
26
34
|
$children = $comment->get_children();
|
|
27
35
|
|
|
36
|
+
/*
|
|
37
|
+
* We need to create the CSS classes BEFORE recursing into the children.
|
|
38
|
+
* This is because comment_class() uses globals like `$comment_alt`
|
|
39
|
+
* and `$comment_thread_alt` which are order-sensitive.
|
|
40
|
+
*
|
|
41
|
+
* The `false` parameter at the end means that we do NOT want the function
|
|
42
|
+
* to `echo` the output but to return a string.
|
|
43
|
+
* See https://developer.wordpress.org/reference/functions/comment_class/#parameters.
|
|
44
|
+
*/
|
|
45
|
+
$comment_classes = comment_class( '', $comment->comment_ID, $comment->comment_post_ID, false );
|
|
46
|
+
|
|
28
47
|
// If the comment has children, recurse to create the HTML for the nested
|
|
29
48
|
// comments.
|
|
30
49
|
if ( ! empty( $children ) ) {
|
|
50
|
+
$comment_depth += 1;
|
|
31
51
|
$inner_content = block_core_comment_template_render_comments(
|
|
32
52
|
$children,
|
|
33
53
|
$block
|
|
34
54
|
);
|
|
35
55
|
$block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
|
|
56
|
+
$comment_depth -= 1;
|
|
36
57
|
}
|
|
37
58
|
|
|
38
|
-
$content .= '<li>'
|
|
59
|
+
$content .= sprintf( '<li id="comment-%1$s" %2$s>%3$s</li>', $comment->comment_ID, $comment_classes, $block_content );
|
|
39
60
|
}
|
|
40
61
|
|
|
41
62
|
return $content;
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
useBlockProps,
|
|
8
8
|
useInnerBlocksProps,
|
|
9
9
|
store as blockEditorStore,
|
|
10
|
+
Warning,
|
|
10
11
|
} from '@wordpress/block-editor';
|
|
11
12
|
import { useSelect } from '@wordpress/data';
|
|
12
13
|
import { getBlockSupport } from '@wordpress/blocks';
|
|
@@ -53,6 +54,7 @@ export default function QueryPaginationEdit( {
|
|
|
53
54
|
].includes( innerBlock.name );
|
|
54
55
|
} );
|
|
55
56
|
}, [] );
|
|
57
|
+
|
|
56
58
|
const blockProps = useBlockProps();
|
|
57
59
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
58
60
|
template: TEMPLATE,
|
|
@@ -63,6 +65,27 @@ export default function QueryPaginationEdit( {
|
|
|
63
65
|
],
|
|
64
66
|
__experimentalLayout: usedLayout,
|
|
65
67
|
} );
|
|
68
|
+
|
|
69
|
+
// Get the Discussion settings
|
|
70
|
+
const pageComments = useSelect( ( select ) => {
|
|
71
|
+
const { getSettings } = select( blockEditorStore );
|
|
72
|
+
const { __experimentalDiscussionSettings } = getSettings();
|
|
73
|
+
return __experimentalDiscussionSettings?.pageComments;
|
|
74
|
+
}, [] );
|
|
75
|
+
|
|
76
|
+
// If paging comments is not enabled in the Discussion Settings then hide the pagination
|
|
77
|
+
// controls. We don't want to remove them from the template so that when the user enables
|
|
78
|
+
// paging comments, the controls will be visible.
|
|
79
|
+
if ( ! pageComments ) {
|
|
80
|
+
return (
|
|
81
|
+
<Warning>
|
|
82
|
+
{ __(
|
|
83
|
+
'Comments Pagination block: paging comments is disabled in the Discussion Settings'
|
|
84
|
+
) }
|
|
85
|
+
</Warning>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
66
89
|
return (
|
|
67
90
|
<>
|
|
68
91
|
{ hasNextPreviousBlocks && (
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
|
+
"apiVersion": 2,
|
|
4
|
+
"name": "core/comments-title",
|
|
5
|
+
"title": "Comments Title",
|
|
6
|
+
"category": "theme",
|
|
7
|
+
"ancestor": [ "core/comments-query-loop" ],
|
|
8
|
+
"description": "Displays a title with the number of comments",
|
|
9
|
+
"textdomain": "default",
|
|
10
|
+
"usesContext": [ "postId", "postType" ],
|
|
11
|
+
"attributes": {
|
|
12
|
+
"textAlign": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"singleCommentLabel": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"multipleCommentsLabel": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"showPostTitle": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"default": true
|
|
24
|
+
},
|
|
25
|
+
"showCommentsCount": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": true
|
|
28
|
+
},
|
|
29
|
+
"level": {
|
|
30
|
+
"type": "number",
|
|
31
|
+
"default": 2
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"supports": {
|
|
35
|
+
"anchor": false,
|
|
36
|
+
"align": true,
|
|
37
|
+
"html": false,
|
|
38
|
+
"__experimentalBorder": {
|
|
39
|
+
"radius": true,
|
|
40
|
+
"color": true,
|
|
41
|
+
"width": true,
|
|
42
|
+
"style": true
|
|
43
|
+
},
|
|
44
|
+
"color": {
|
|
45
|
+
"gradients": true,
|
|
46
|
+
"__experimentalDefaultControls": {
|
|
47
|
+
"background": true,
|
|
48
|
+
"text": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"spacing": {
|
|
52
|
+
"margin": true,
|
|
53
|
+
"padding": true
|
|
54
|
+
},
|
|
55
|
+
"typography": {
|
|
56
|
+
"fontSize": true,
|
|
57
|
+
"lineHeight": true,
|
|
58
|
+
"__experimentalFontStyle": true,
|
|
59
|
+
"__experimentalFontWeight": true,
|
|
60
|
+
"__experimentalFontFamily": true,
|
|
61
|
+
"__experimentalTextTransform": true,
|
|
62
|
+
"__experimentalDefaultControls": {
|
|
63
|
+
"fontSize": true,
|
|
64
|
+
"__experimentalFontFamily": true,
|
|
65
|
+
"__experimentalFontStyle": true,
|
|
66
|
+
"__experimentalFontWeight": true
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|