@wordpress/block-library 7.12.0 → 7.13.1-next.957ca95e4c.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 +7 -1
- package/build/archives/index.js +5 -1
- package/build/archives/index.js.map +1 -1
- package/build/audio/index.js +4 -0
- package/build/audio/index.js.map +1 -1
- package/build/button/deprecated.js +14 -5
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js +1 -1
- package/build/categories/edit.js +3 -1
- package/build/categories/edit.js.map +1 -1
- package/build/categories/index.js +14 -1
- package/build/categories/index.js.map +1 -1
- package/build/code/index.js +4 -2
- package/build/code/index.js.map +1 -1
- package/build/column/index.js +13 -0
- package/build/column/index.js.map +1 -1
- package/build/columns/deprecated.js +16 -5
- package/build/columns/deprecated.js.map +1 -1
- package/build/columns/edit.js +6 -2
- package/build/columns/edit.js.map +1 -1
- package/build/columns/edit.native.js +6 -2
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/index.js +13 -0
- package/build/columns/index.js.map +1 -1
- package/build/columns/transforms.js +10 -1
- package/build/columns/transforms.js.map +1 -1
- package/build/comment-author-name/index.js +5 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +5 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +1 -0
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +5 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +5 -1
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/index.js +14 -1
- package/build/comment-template/index.js.map +1 -1
- package/build/comments/index.js +13 -0
- package/build/comments/index.js.map +1 -1
- package/build/comments-pagination/index.js +13 -0
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +4 -2
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-numbers/edit.js +5 -1
- package/build/comments-pagination-numbers/edit.js.map +1 -1
- package/build/comments-pagination-numbers/index.js +14 -1
- package/build/comments-pagination-numbers/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +4 -2
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/comments-title/deprecated.js +4 -2
- package/build/comments-title/deprecated.js.map +1 -1
- package/build/comments-title/index.js +4 -2
- package/build/comments-title/index.js.map +1 -1
- package/build/cover/deprecated.js +20 -5
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/block-controls.js +9 -2
- package/build/cover/edit/block-controls.js.map +1 -1
- package/build/cover/index.js +13 -0
- package/build/cover/index.js.map +1 -1
- package/build/cover/shared.js +1 -1
- package/build/cover/shared.js.map +1 -1
- package/build/embed/icons.js +1 -1
- package/build/embed/icons.js.map +1 -1
- package/build/gallery/deprecated.js +6 -1
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +15 -2
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gap-styles.js +5 -4
- package/build/gallery/gap-styles.js.map +1 -1
- package/build/gallery/index.js +5 -0
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/transforms.js +20 -7
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/utils.js +7 -6
- package/build/gallery/utils.js.map +1 -1
- package/build/group/deprecated.js +108 -12
- package/build/group/deprecated.js.map +1 -1
- package/build/group/edit.js +23 -1
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +10 -2
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +8 -8
- package/build/group/variations.js.map +1 -1
- package/build/heading/deprecated.js +5 -3
- package/build/heading/deprecated.js.map +1 -1
- package/build/heading/index.js +3 -1
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +3 -1
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/edit.js +8 -4
- package/build/home-link/edit.js.map +1 -1
- package/build/home-link/index.js +14 -1
- package/build/home-link/index.js.map +1 -1
- package/build/image/edit.js +16 -2
- package/build/image/edit.js.map +1 -1
- package/build/image/index.js +13 -7
- package/build/image/index.js.map +1 -1
- package/build/image/use-client-width.js +3 -1
- package/build/image/use-client-width.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/index.native.js +9 -18
- package/build/index.native.js.map +1 -1
- package/build/latest-posts/deprecated.js +14 -1
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/index.js +14 -1
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/deprecated.js +84 -1
- package/build/list/deprecated.js.map +1 -1
- package/build/list/edit.js +153 -134
- package/build/list/edit.js.map +1 -1
- package/build/list/index.js +33 -34
- package/build/list/index.js.map +1 -1
- package/build/list/save.js +1 -5
- package/build/list/save.js.map +1 -1
- package/build/list/{v2/tag-name.js → tag-name.js} +0 -0
- package/build/list/tag-name.js.map +1 -0
- package/build/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
- package/build/list/tag-name.native.js.map +1 -0
- package/build/list/transforms.js +61 -95
- package/build/list/transforms.js.map +1 -1
- package/build/list/{v2/migrate.js → utils.js} +3 -2
- package/build/list/utils.js.map +1 -0
- package/build/list-item/edit.js +3 -1
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/edit.native.js +21 -3
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/hooks/index.js +8 -0
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/hooks/use-copy.js +44 -0
- package/build/list-item/hooks/use-copy.js.map +1 -0
- package/build/list-item/hooks/use-merge.js +0 -1
- package/build/list-item/hooks/use-merge.js.map +1 -1
- package/build/list-item/hooks/use-outdent-list-item.js +0 -1
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-space.js +10 -1
- package/build/list-item/hooks/use-space.js.map +1 -1
- package/build/list-item/index.js +0 -1
- package/build/list-item/index.js.map +1 -1
- package/build/list-item/list-style-type.native.js +4 -1
- package/build/list-item/list-style-type.native.js.map +1 -1
- package/build/list-item/utils.js +4 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/media-text/deprecated.js +5 -1
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/index.js +17 -0
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/deprecated.js +6 -1
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +125 -41
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +6 -4
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +6 -16
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
- package/build/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build/navigation/index.js +1 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +1 -7
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +8 -7
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js +6 -8
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -6
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +7 -3
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/deprecated.js +18 -10
- package/build/paragraph/deprecated.js.map +1 -1
- package/build/paragraph/edit.js +1 -0
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +7 -0
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +7 -0
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author/index.js +4 -2
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/index.js +1 -0
- package/build/post-author-biography/index.js.map +1 -1
- package/build/post-author-name/index.js +5 -1
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comments-count/edit.js +11 -1
- package/build/post-comments-count/edit.js.map +1 -1
- package/build/post-comments-count/index.js +4 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-link/index.js +4 -2
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-date/edit.js +9 -2
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +9 -0
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/index.js +4 -2
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/edit.js +27 -12
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +12 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +3 -2
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/edit.js +8 -4
- package/build/post-template/edit.js.map +1 -1
- package/build/post-template/index.js +14 -1
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/edit.js +0 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +5 -3
- package/build/post-terms/index.js.map +1 -1
- package/build/post-terms/use-post-terms.js +4 -24
- package/build/post-terms/use-post-terms.js.map +1 -1
- package/build/post-title/index.js +2 -1
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/index.js +4 -2
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/deprecated.js +135 -25
- package/build/pullquote/deprecated.js.map +1 -1
- package/build/pullquote/edit.js +1 -1
- package/build/pullquote/edit.js.map +1 -1
- package/build/pullquote/edit.native.js +0 -1
- package/build/pullquote/edit.native.js.map +1 -1
- package/build/pullquote/index.js +13 -6
- package/build/pullquote/index.js.map +1 -1
- package/build/pullquote/save.js +2 -2
- package/build/pullquote/save.js.map +1 -1
- package/build/pullquote/transforms.js +14 -33
- package/build/pullquote/transforms.js.map +1 -1
- package/build/query/deprecated.js +10 -9
- package/build/query/deprecated.js.map +1 -1
- package/build/query/edit/index.js +19 -8
- package/build/query/edit/index.js.map +1 -1
- package/build/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build/query/edit/query-placeholder.js +6 -1
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/query/utils.js +35 -9
- package/build/query/utils.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/query-no-results/index.js +13 -0
- package/build/query-no-results/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +4 -2
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-title/edit.js +10 -1
- package/build/query-title/edit.js.map +1 -1
- package/build/query-title/index.js +8 -2
- package/build/query-title/index.js.map +1 -1
- package/build/quote/deprecated.js +13 -6
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/index.js +4 -2
- package/build/quote/index.js.map +1 -1
- package/build/quote/transforms.js +22 -37
- package/build/quote/transforms.js.map +1 -1
- package/build/separator/deprecated.js +3 -4
- package/build/separator/deprecated.js.map +1 -1
- package/build/separator/index.js +1 -0
- package/build/separator/index.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/social-links/edit.js +43 -9
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +9 -0
- package/build/social-links/index.js.map +1 -1
- package/build/spacer/index.js +7 -1
- package/build/spacer/index.js.map +1 -1
- package/build/table/index.js +4 -0
- package/build/table/index.js.map +1 -1
- package/build/table/state.js +9 -3
- package/build/table/state.js.map +1 -1
- package/build/table-of-contents/index.js +24 -1
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/index.js +5 -1
- 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/term-description/index.js +10 -0
- package/build/term-description/index.js.map +1 -1
- package/build/text-columns/edit.js +3 -1
- package/build/text-columns/edit.js.map +1 -1
- package/build/text-columns/save.js +3 -1
- package/build/text-columns/save.js.map +1 -1
- package/build/verse/index.js +2 -0
- package/build/verse/index.js.map +1 -1
- package/build/video/index.js +4 -0
- package/build/video/index.js.map +1 -1
- package/build-module/archives/index.js +5 -1
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/index.js +4 -0
- package/build-module/audio/index.js.map +1 -1
- package/build-module/button/deprecated.js +14 -4
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js +1 -1
- package/build-module/categories/edit.js +4 -2
- package/build-module/categories/edit.js.map +1 -1
- package/build-module/categories/index.js +14 -1
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/index.js +4 -2
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/index.js +13 -0
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/deprecated.js +16 -4
- package/build-module/columns/deprecated.js.map +1 -1
- package/build-module/columns/edit.js +7 -3
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +7 -3
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/index.js +13 -0
- package/build-module/columns/index.js.map +1 -1
- package/build-module/columns/transforms.js +10 -1
- package/build-module/columns/transforms.js.map +1 -1
- package/build-module/comment-author-name/index.js +5 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +5 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +1 -0
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +5 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +5 -1
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/index.js +14 -1
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments/index.js +13 -0
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments-pagination/index.js +13 -0
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +4 -2
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-numbers/edit.js +5 -1
- package/build-module/comments-pagination-numbers/edit.js.map +1 -1
- package/build-module/comments-pagination-numbers/index.js +14 -1
- package/build-module/comments-pagination-numbers/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +4 -2
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/comments-title/deprecated.js +4 -2
- package/build-module/comments-title/deprecated.js.map +1 -1
- package/build-module/comments-title/index.js +4 -2
- package/build-module/comments-title/index.js.map +1 -1
- package/build-module/cover/deprecated.js +20 -4
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +10 -3
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/cover/index.js +13 -0
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/shared.js +1 -1
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/embed/icons.js +1 -1
- package/build-module/embed/icons.js.map +1 -1
- package/build-module/gallery/deprecated.js +7 -2
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +15 -2
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gap-styles.js +6 -5
- package/build-module/gallery/gap-styles.js.map +1 -1
- package/build-module/gallery/index.js +5 -0
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/transforms.js +20 -7
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/utils.js +7 -6
- package/build-module/gallery/utils.js.map +1 -1
- package/build-module/group/deprecated.js +109 -12
- package/build-module/group/deprecated.js.map +1 -1
- package/build-module/group/edit.js +25 -2
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +10 -2
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +8 -8
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/deprecated.js +5 -2
- package/build-module/heading/deprecated.js.map +1 -1
- package/build-module/heading/index.js +3 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +3 -1
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/edit.js +10 -6
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/home-link/index.js +14 -1
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/image/edit.js +18 -4
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/index.js +13 -7
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/use-client-width.js +3 -1
- package/build-module/image/use-client-width.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +9 -17
- package/build-module/index.native.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +14 -1
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/index.js +14 -1
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/deprecated.js +83 -1
- package/build-module/list/deprecated.js.map +1 -1
- package/build-module/list/edit.js +151 -134
- package/build-module/list/edit.js.map +1 -1
- package/build-module/list/index.js +33 -29
- package/build-module/list/index.js.map +1 -1
- package/build-module/list/save.js +2 -6
- package/build-module/list/save.js.map +1 -1
- package/build-module/list/{v2/tag-name.js → tag-name.js} +0 -0
- package/build-module/list/tag-name.js.map +1 -0
- package/build-module/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
- package/build-module/list/tag-name.native.js.map +1 -0
- package/build-module/list/transforms.js +62 -97
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/{v2/migrate.js → utils.js} +3 -2
- package/build-module/list/utils.js.map +1 -0
- package/build-module/list-item/edit.js +4 -2
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js +19 -3
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/hooks/index.js +1 -0
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/hooks/use-copy.js +34 -0
- package/build-module/list-item/hooks/use-copy.js.map +1 -0
- package/build-module/list-item/hooks/use-merge.js +0 -1
- package/build-module/list-item/hooks/use-merge.js.map +1 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js +0 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-space.js +10 -1
- package/build-module/list-item/hooks/use-space.js.map +1 -1
- package/build-module/list-item/index.js +0 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/list-item/list-style-type.native.js +3 -1
- package/build-module/list-item/list-style-type.native.js.map +1 -1
- package/build-module/list-item/utils.js +4 -1
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/media-text/deprecated.js +6 -2
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/index.js +17 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/deprecated.js +7 -2
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +125 -43
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +6 -4
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +7 -16
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js +4 -7
- package/build-module/navigation/edit/use-convert-classic-menu-to-block-menu.js.map +1 -1
- package/build-module/navigation/index.js +1 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +1 -6
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +8 -7
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +7 -9
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +5 -7
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +7 -2
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/deprecated.js +18 -9
- package/build-module/paragraph/deprecated.js.map +1 -1
- package/build-module/paragraph/edit.js +1 -0
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +7 -0
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +7 -0
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author/index.js +4 -2
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/index.js +1 -0
- package/build-module/post-author-biography/index.js.map +1 -1
- package/build-module/post-author-name/index.js +5 -1
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comments-count/edit.js +10 -1
- package/build-module/post-comments-count/edit.js.map +1 -1
- package/build-module/post-comments-count/index.js +4 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +4 -2
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-date/edit.js +9 -2
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +9 -0
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/index.js +4 -2
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/edit.js +28 -13
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +12 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +3 -2
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/edit.js +8 -4
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-template/index.js +14 -1
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/edit.js +0 -1
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +5 -3
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-terms/use-post-terms.js +5 -25
- package/build-module/post-terms/use-post-terms.js.map +1 -1
- package/build-module/post-title/index.js +2 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/index.js +4 -2
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/deprecated.js +134 -25
- package/build-module/pullquote/deprecated.js.map +1 -1
- package/build-module/pullquote/edit.js +1 -1
- package/build-module/pullquote/edit.js.map +1 -1
- package/build-module/pullquote/edit.native.js +0 -1
- package/build-module/pullquote/edit.native.js.map +1 -1
- package/build-module/pullquote/index.js +13 -6
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/pullquote/save.js +2 -2
- package/build-module/pullquote/save.js.map +1 -1
- package/build-module/pullquote/transforms.js +15 -34
- package/build-module/pullquote/transforms.js.map +1 -1
- package/build-module/query/deprecated.js +10 -8
- package/build-module/query/deprecated.js.map +1 -1
- package/build-module/query/edit/index.js +23 -12
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js +1 -0
- package/build-module/query/edit/inspector-controls/taxonomy-controls.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +6 -1
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/query/utils.js +32 -7
- package/build-module/query/utils.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/query-no-results/index.js +13 -0
- package/build-module/query-no-results/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +4 -2
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-title/edit.js +10 -1
- package/build-module/query-title/edit.js.map +1 -1
- package/build-module/query-title/index.js +8 -2
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/deprecated.js +13 -5
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/index.js +4 -2
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/transforms.js +23 -38
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/separator/deprecated.js +3 -3
- package/build-module/separator/deprecated.js.map +1 -1
- package/build-module/separator/index.js +1 -0
- package/build-module/separator/index.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/social-links/edit.js +45 -12
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +9 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/spacer/index.js +7 -1
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/table/index.js +4 -0
- package/build-module/table/index.js.map +1 -1
- package/build-module/table/state.js +10 -4
- package/build-module/table/state.js.map +1 -1
- package/build-module/table-of-contents/index.js +24 -1
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +5 -1
- 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/term-description/index.js +10 -0
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/text-columns/edit.js +4 -2
- package/build-module/text-columns/edit.js.map +1 -1
- package/build-module/text-columns/save.js +4 -2
- package/build-module/text-columns/save.js.map +1 -1
- package/build-module/verse/index.js +2 -0
- package/build-module/verse/index.js.map +1 -1
- package/build-module/video/index.js +4 -0
- package/build-module/video/index.js.map +1 -1
- package/build-style/audio/style-rtl.css +3 -0
- package/build-style/audio/style.css +3 -0
- package/build-style/button/style-rtl.css +7 -10
- package/build-style/button/style.css +7 -10
- package/build-style/code/editor-rtl.css +79 -0
- package/build-style/code/editor.css +79 -0
- package/build-style/cover/editor-rtl.css +0 -3
- package/build-style/cover/editor.css +0 -3
- package/build-style/editor-rtl.css +94 -146
- package/build-style/editor.css +94 -146
- package/build-style/group/editor-rtl.css +9 -10
- package/build-style/group/editor.css +9 -10
- package/build-style/image/editor-rtl.css +21 -2
- package/build-style/image/editor.css +21 -2
- package/build-style/media-text/style-rtl.css +1 -0
- package/build-style/media-text/style.css +1 -0
- package/build-style/navigation/editor-rtl.css +11 -23
- package/build-style/navigation/editor.css +11 -23
- package/build-style/navigation/style-rtl.css +10 -3
- package/build-style/navigation/style.css +10 -3
- package/build-style/paragraph/editor-rtl.css +1 -1
- package/build-style/paragraph/editor.css +1 -1
- package/build-style/post-date/style-rtl.css +79 -0
- package/build-style/post-date/style.css +79 -0
- package/build-style/post-featured-image/editor-rtl.css +45 -43
- package/build-style/post-featured-image/editor.css +45 -43
- package/build-style/post-featured-image/style-rtl.css +1 -0
- package/build-style/post-featured-image/style.css +1 -0
- package/build-style/post-title/style-rtl.css +1 -0
- package/build-style/post-title/style.css +1 -0
- package/build-style/pullquote/editor-rtl.css +0 -12
- package/build-style/pullquote/editor.css +0 -12
- package/build-style/pullquote/style-rtl.css +1 -8
- package/build-style/pullquote/style.css +1 -8
- package/build-style/query-title/style-rtl.css +79 -0
- package/build-style/query-title/style.css +79 -0
- package/build-style/site-logo/editor-rtl.css +3 -52
- package/build-style/site-logo/editor.css +3 -52
- 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 +37 -23
- package/build-style/style.css +37 -23
- package/build-style/video/style-rtl.css +3 -0
- package/build-style/video/style.css +3 -0
- package/package.json +30 -29
- package/src/archives/block.json +5 -1
- package/src/audio/block.json +4 -0
- package/src/audio/style.scss +2 -0
- package/src/button/block.json +1 -1
- package/src/button/deprecated.js +21 -22
- package/src/button/style.scss +7 -14
- package/src/calendar/index.php +2 -2
- package/src/categories/block.json +14 -1
- package/src/categories/edit.js +2 -2
- package/src/code/block.json +4 -2
- package/src/code/editor.scss +3 -0
- package/src/column/block.json +13 -0
- package/src/columns/block.json +13 -0
- package/src/columns/deprecated.js +10 -4
- package/src/columns/edit.js +7 -3
- package/src/columns/edit.native.js +7 -3
- package/src/columns/transforms.js +17 -3
- package/src/comment-author-name/block.json +5 -1
- package/src/comment-content/block.json +5 -1
- package/src/comment-date/block.json +1 -0
- package/src/comment-edit-link/block.json +5 -1
- package/src/comment-reply-link/block.json +5 -1
- package/src/comment-template/block.json +14 -1
- package/src/comments/block.json +13 -0
- package/src/comments/index.php +6 -5
- package/src/comments-pagination/block.json +13 -0
- package/src/comments-pagination-next/block.json +4 -2
- package/src/comments-pagination-numbers/block.json +14 -1
- package/src/comments-pagination-numbers/edit.js +12 -3
- package/src/comments-pagination-previous/block.json +4 -2
- package/src/comments-title/block.json +4 -2
- package/src/cover/block.json +13 -0
- package/src/cover/deprecated.js +11 -4
- package/src/cover/edit/block-controls.js +15 -3
- package/src/cover/editor.scss +0 -4
- package/src/cover/shared.js +2 -1
- package/src/editor.scss +1 -0
- package/src/embed/icons.js +1 -1
- package/src/gallery/block.json +5 -0
- package/src/gallery/deprecated.js +4 -2
- package/src/gallery/edit.js +22 -2
- package/src/gallery/gap-styles.js +10 -6
- package/src/gallery/index.php +23 -2
- package/src/gallery/transforms.js +18 -5
- package/src/gallery/utils.js +11 -7
- package/src/group/block.json +10 -2
- package/src/group/deprecated.js +89 -2
- package/src/group/edit.js +15 -2
- package/src/group/editor.scss +4 -6
- package/src/group/variations.js +4 -3
- package/src/heading/block.json +3 -1
- package/src/heading/deprecated.js +4 -2
- package/src/home-link/block.json +14 -1
- package/src/home-link/edit.js +19 -20
- package/src/image/block.json +13 -7
- package/src/image/edit.js +22 -4
- package/src/image/editor.scss +39 -3
- package/src/image/index.php +1 -1
- package/src/image/use-client-width.js +1 -1
- package/src/index.js +1 -4
- package/src/index.native.js +17 -23
- package/src/latest-posts/block.json +14 -1
- package/src/list/block.json +4 -0
- package/src/list/deprecated.js +71 -1
- package/src/list/edit.js +146 -133
- package/src/list/index.js +25 -24
- package/src/list/save.js +3 -4
- package/src/list/{v2/tag-name.js → tag-name.js} +0 -0
- package/src/list/{v2/tag-name.native.js → tag-name.native.js} +0 -0
- package/src/list/test/__snapshots__/edit.native.js.snap +14 -2
- package/src/list/test/edit.native.js +0 -154
- package/src/list/transforms.js +57 -111
- package/src/list/{v2/migrate.js → utils.js} +2 -2
- package/src/list-item/block.json +0 -1
- package/src/list-item/edit.js +2 -1
- package/src/list-item/edit.native.js +32 -2
- package/src/list-item/hooks/index.js +1 -0
- package/src/list-item/hooks/use-copy.js +38 -0
- package/src/list-item/hooks/use-space.js +10 -2
- package/src/list-item/list-style-type.native.js +8 -1
- package/src/list-item/style.native.scss +12 -0
- package/src/media-text/block.json +17 -0
- package/src/media-text/deprecated.js +3 -2
- package/src/media-text/style.scss +2 -0
- package/src/navigation/block.json +1 -0
- package/src/navigation/deprecated.js +4 -2
- package/src/navigation/edit/index.js +173 -85
- package/src/navigation/edit/responsive-wrapper.js +8 -3
- package/src/navigation/edit/unsaved-inner-blocks.js +17 -25
- package/src/navigation/edit/use-convert-classic-menu-to-block-menu.js +31 -37
- package/src/navigation/editor.scss +5 -25
- package/src/navigation/index.php +24 -24
- package/src/navigation/menu-items-to-blocks.js +3 -6
- package/src/navigation/style.scss +14 -4
- package/src/navigation/test/use-navigation-menu.js +18 -1
- package/src/navigation/use-navigation-menu.js +11 -8
- package/src/navigation-link/edit.js +9 -13
- package/src/navigation-submenu/edit.js +9 -13
- package/src/page-list/edit.js +6 -2
- package/src/paragraph/block.json +7 -0
- package/src/paragraph/deprecated.js +33 -35
- package/src/paragraph/edit.js +1 -0
- package/src/paragraph/editor.scss +5 -3
- package/src/post-author/block.json +4 -2
- package/src/post-author-biography/block.json +1 -0
- package/src/post-author-name/block.json +5 -1
- package/src/post-comments-count/block.json +4 -1
- package/src/post-comments-count/edit.js +10 -2
- package/src/post-comments-link/block.json +4 -2
- package/src/post-date/block.json +9 -0
- package/src/post-date/edit.js +12 -2
- package/src/post-date/index.php +10 -2
- package/src/post-date/style.scss +4 -0
- package/src/post-excerpt/block.json +4 -2
- package/src/post-featured-image/block.json +12 -0
- package/src/post-featured-image/edit.js +43 -13
- package/src/post-featured-image/editor.scss +44 -53
- package/src/post-featured-image/index.php +61 -4
- package/src/post-featured-image/style.scss +1 -0
- package/src/post-navigation-link/block.json +3 -2
- package/src/post-template/block.json +15 -1
- package/src/post-template/edit.js +6 -1
- package/src/post-template/index.php +7 -4
- package/src/post-terms/block.json +5 -3
- package/src/post-terms/edit.js +0 -1
- package/src/post-terms/use-post-terms.js +10 -15
- package/src/post-title/block.json +2 -1
- package/src/post-title/style.scss +2 -0
- package/src/preformatted/block.json +4 -2
- package/src/pullquote/block.json +11 -4
- package/src/pullquote/deprecated.js +490 -412
- package/src/pullquote/edit.js +1 -1
- package/src/pullquote/edit.native.js +0 -1
- package/src/pullquote/editor.scss +0 -16
- package/src/pullquote/index.js +1 -3
- package/src/pullquote/save.js +1 -1
- package/src/pullquote/style.scss +0 -11
- package/src/pullquote/transforms.js +17 -33
- package/src/query/deprecated.js +4 -9
- package/src/query/edit/index.js +28 -15
- package/src/query/edit/inspector-controls/taxonomy-controls.js +1 -1
- package/src/query/edit/query-placeholder.js +17 -2
- package/src/query/utils.js +29 -7
- package/src/query-no-results/block.json +13 -0
- package/src/query-no-results/edit.js +1 -1
- package/src/query-pagination-numbers/block.json +4 -2
- package/src/query-title/block.json +8 -2
- package/src/query-title/edit.js +19 -2
- package/src/query-title/index.php +11 -1
- package/src/query-title/style.scss +4 -0
- package/src/quote/block.json +4 -2
- package/src/quote/deprecated.js +6 -5
- package/src/quote/transforms.js +4 -18
- package/src/search/index.php +1 -1
- package/src/separator/block.json +1 -0
- package/src/separator/deprecated.js +2 -3
- package/src/site-logo/editor.scss +8 -66
- package/src/social-link/icons/reddit.js +1 -1
- package/src/social-link/index.php +1 -1
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/block.json +9 -0
- package/src/social-links/edit.js +47 -19
- package/src/spacer/block.json +7 -1
- package/src/style.scss +2 -0
- package/src/table/block.json +4 -0
- package/src/table/state.js +21 -19
- package/src/table-of-contents/block.json +24 -1
- package/src/tag-cloud/block.json +5 -1
- package/src/template-part/index.js +3 -2
- package/src/term-description/block.json +10 -0
- package/src/text-columns/edit.js +2 -2
- package/src/text-columns/save.js +2 -2
- package/src/verse/block.json +2 -0
- package/src/video/block.json +4 -0
- package/src/video/style.scss +2 -0
- package/build/list/v2/deprecated.js +0 -117
- package/build/list/v2/deprecated.js.map +0 -1
- package/build/list/v2/edit.js +0 -200
- package/build/list/v2/edit.js.map +0 -1
- package/build/list/v2/index.js +0 -36
- package/build/list/v2/index.js.map +0 -1
- package/build/list/v2/migrate.js.map +0 -1
- package/build/list/v2/save.js +0 -34
- package/build/list/v2/save.js.map +0 -1
- package/build/list/v2/tag-name.js.map +0 -1
- package/build/list/v2/tag-name.native.js.map +0 -1
- package/build/list/v2/transforms.js +0 -137
- package/build/list/v2/transforms.js.map +0 -1
- package/build-module/list/v2/deprecated.js +0 -104
- package/build-module/list/v2/deprecated.js.map +0 -1
- package/build-module/list/v2/edit.js +0 -179
- package/build-module/list/v2/edit.js.map +0 -1
- package/build-module/list/v2/index.js +0 -21
- package/build-module/list/v2/index.js.map +0 -1
- package/build-module/list/v2/migrate.js.map +0 -1
- package/build-module/list/v2/save.js +0 -23
- package/build-module/list/v2/save.js.map +0 -1
- package/build-module/list/v2/tag-name.js.map +0 -1
- package/build-module/list/v2/tag-name.native.js.map +0 -1
- package/build-module/list/v2/transforms.js +0 -127
- package/build-module/list/v2/transforms.js.map +0 -1
- package/src/list/test/migrate.js +0 -158
- package/src/list/v2/deprecated.js +0 -89
- package/src/list/v2/edit.js +0 -192
- package/src/list/v2/index.js +0 -22
- package/src/list/v2/save.js +0 -18
- package/src/list/v2/transforms.js +0 -120
|
@@ -35,10 +35,12 @@
|
|
|
35
35
|
"typography": {
|
|
36
36
|
"fontSize": true,
|
|
37
37
|
"lineHeight": true,
|
|
38
|
-
"
|
|
38
|
+
"__experimentalFontFamily": true,
|
|
39
39
|
"__experimentalFontWeight": true,
|
|
40
|
-
"
|
|
40
|
+
"__experimentalFontStyle": true,
|
|
41
41
|
"__experimentalTextTransform": true,
|
|
42
|
+
"__experimentalTextDecoration": true,
|
|
43
|
+
"__experimentalLetterSpacing": true,
|
|
42
44
|
"__experimentalDefaultControls": {
|
|
43
45
|
"fontSize": true
|
|
44
46
|
}
|
|
@@ -43,7 +43,11 @@
|
|
|
43
43
|
"__experimentalFontWeight": true,
|
|
44
44
|
"__experimentalFontStyle": true,
|
|
45
45
|
"__experimentalTextTransform": true,
|
|
46
|
-
"
|
|
46
|
+
"__experimentalTextDecoration": true,
|
|
47
|
+
"__experimentalLetterSpacing": true,
|
|
48
|
+
"__experimentalDefaultControls": {
|
|
49
|
+
"fontSize": true
|
|
50
|
+
}
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -25,8 +25,11 @@
|
|
|
25
25
|
"typography": {
|
|
26
26
|
"fontSize": true,
|
|
27
27
|
"lineHeight": true,
|
|
28
|
-
"
|
|
28
|
+
"__experimentalFontFamily": true,
|
|
29
29
|
"__experimentalFontWeight": true,
|
|
30
|
+
"__experimentalFontStyle": true,
|
|
31
|
+
"__experimentalTextTransform": true,
|
|
32
|
+
"__experimentalTextDecoration": true,
|
|
30
33
|
"__experimentalLetterSpacing": true,
|
|
31
34
|
"__experimentalDefaultControls": {
|
|
32
35
|
"fontSize": true
|
|
@@ -49,6 +49,14 @@ export default function PostCommentsCountEdit( {
|
|
|
49
49
|
} );
|
|
50
50
|
}, [ postId ] );
|
|
51
51
|
|
|
52
|
+
const hasPostAndComments = postId && commentsCount !== undefined;
|
|
53
|
+
const blockStyles = {
|
|
54
|
+
...blockProps.style,
|
|
55
|
+
textDecoration: hasPostAndComments
|
|
56
|
+
? blockProps.style?.textDecoration
|
|
57
|
+
: undefined,
|
|
58
|
+
};
|
|
59
|
+
|
|
52
60
|
return (
|
|
53
61
|
<>
|
|
54
62
|
<BlockControls group="block">
|
|
@@ -59,8 +67,8 @@ export default function PostCommentsCountEdit( {
|
|
|
59
67
|
} }
|
|
60
68
|
/>
|
|
61
69
|
</BlockControls>
|
|
62
|
-
<div { ...blockProps }>
|
|
63
|
-
{
|
|
70
|
+
<div { ...blockProps } style={ blockStyles }>
|
|
71
|
+
{ hasPostAndComments ? (
|
|
64
72
|
commentsCount
|
|
65
73
|
) : (
|
|
66
74
|
<Warning>
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
"typography": {
|
|
27
27
|
"fontSize": true,
|
|
28
28
|
"lineHeight": true,
|
|
29
|
-
"
|
|
29
|
+
"__experimentalFontFamily": true,
|
|
30
30
|
"__experimentalFontWeight": true,
|
|
31
|
-
"
|
|
31
|
+
"__experimentalFontStyle": true,
|
|
32
32
|
"__experimentalTextTransform": true,
|
|
33
|
+
"__experimentalTextDecoration": true,
|
|
34
|
+
"__experimentalLetterSpacing": true,
|
|
33
35
|
"__experimentalDefaultControls": {
|
|
34
36
|
"fontSize": true
|
|
35
37
|
}
|
package/src/post-date/block.json
CHANGED
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
"isLink": {
|
|
17
17
|
"type": "boolean",
|
|
18
18
|
"default": false
|
|
19
|
+
},
|
|
20
|
+
"displayType": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "date"
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
"usesContext": [ "postId", "postType", "queryId" ],
|
|
@@ -30,6 +34,10 @@
|
|
|
30
34
|
"link": true
|
|
31
35
|
}
|
|
32
36
|
},
|
|
37
|
+
"spacing": {
|
|
38
|
+
"margin": true,
|
|
39
|
+
"padding": true
|
|
40
|
+
},
|
|
33
41
|
"typography": {
|
|
34
42
|
"fontSize": true,
|
|
35
43
|
"lineHeight": true,
|
|
@@ -37,6 +45,7 @@
|
|
|
37
45
|
"__experimentalFontWeight": true,
|
|
38
46
|
"__experimentalFontStyle": true,
|
|
39
47
|
"__experimentalTextTransform": true,
|
|
48
|
+
"__experimentalTextDecoration": true,
|
|
40
49
|
"__experimentalLetterSpacing": true,
|
|
41
50
|
"__experimentalDefaultControls": {
|
|
42
51
|
"fontSize": true
|
package/src/post-date/edit.js
CHANGED
|
@@ -33,7 +33,7 @@ import { DOWN } from '@wordpress/keycodes';
|
|
|
33
33
|
import { useSelect } from '@wordpress/data';
|
|
34
34
|
|
|
35
35
|
export default function PostDateEdit( {
|
|
36
|
-
attributes: { textAlign, format, isLink },
|
|
36
|
+
attributes: { textAlign, format, isLink, displayType },
|
|
37
37
|
context: { postId, postType: postTypeSlug, queryId },
|
|
38
38
|
setAttributes,
|
|
39
39
|
} ) {
|
|
@@ -58,9 +58,10 @@ export default function PostDateEdit( {
|
|
|
58
58
|
const [ date, setDate ] = useEntityProp(
|
|
59
59
|
'postType',
|
|
60
60
|
postTypeSlug,
|
|
61
|
-
|
|
61
|
+
displayType,
|
|
62
62
|
postId
|
|
63
63
|
);
|
|
64
|
+
|
|
64
65
|
const postType = useSelect(
|
|
65
66
|
( select ) =>
|
|
66
67
|
postTypeSlug
|
|
@@ -155,6 +156,15 @@ export default function PostDateEdit( {
|
|
|
155
156
|
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
156
157
|
checked={ isLink }
|
|
157
158
|
/>
|
|
159
|
+
<ToggleControl
|
|
160
|
+
label={ __( 'Display last modified date' ) }
|
|
161
|
+
onChange={ ( value ) =>
|
|
162
|
+
setAttributes( {
|
|
163
|
+
displayType: value ? 'modified' : 'date',
|
|
164
|
+
} )
|
|
165
|
+
}
|
|
166
|
+
checked={ displayType === 'modified' }
|
|
167
|
+
/>
|
|
158
168
|
</PanelBody>
|
|
159
169
|
</InspectorControls>
|
|
160
170
|
|
package/src/post-date/index.php
CHANGED
|
@@ -21,7 +21,15 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
21
21
|
$post_ID = $block->context['postId'];
|
|
22
22
|
$align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
|
|
23
23
|
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
if ( isset( $attributes['displayType'] ) && 'modified' === $attributes['displayType'] ) {
|
|
26
|
+
$formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
|
|
27
|
+
$unformatted_date = esc_attr( get_the_modified_date( 'c', $post_ID ) );
|
|
28
|
+
} else {
|
|
29
|
+
$formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
|
|
30
|
+
$unformatted_date = esc_attr( get_the_date( 'c', $post_ID ) );
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
|
|
26
34
|
$formatted_date = sprintf( '<a href="%1s">%2s</a>', get_the_permalink( $post_ID ), $formatted_date );
|
|
27
35
|
}
|
|
@@ -29,7 +37,7 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
29
37
|
return sprintf(
|
|
30
38
|
'<div %1$s><time datetime="%2$s">%3$s</time></div>',
|
|
31
39
|
$wrapper_attributes,
|
|
32
|
-
|
|
40
|
+
$unformatted_date,
|
|
33
41
|
$formatted_date
|
|
34
42
|
);
|
|
35
43
|
}
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"typography": {
|
|
38
38
|
"fontSize": true,
|
|
39
39
|
"lineHeight": true,
|
|
40
|
-
"
|
|
40
|
+
"__experimentalFontFamily": true,
|
|
41
41
|
"__experimentalFontWeight": true,
|
|
42
|
-
"
|
|
42
|
+
"__experimentalFontStyle": true,
|
|
43
43
|
"__experimentalTextTransform": true,
|
|
44
|
+
"__experimentalTextDecoration": true,
|
|
45
|
+
"__experimentalLetterSpacing": true,
|
|
44
46
|
"__experimentalDefaultControls": {
|
|
45
47
|
"fontSize": true
|
|
46
48
|
}
|
|
@@ -42,6 +42,18 @@
|
|
|
42
42
|
"text": false,
|
|
43
43
|
"background": false
|
|
44
44
|
},
|
|
45
|
+
"__experimentalBorder": {
|
|
46
|
+
"color": true,
|
|
47
|
+
"radius": true,
|
|
48
|
+
"width": true,
|
|
49
|
+
"__experimentalSelector": "img, .block-editor-media-placeholder",
|
|
50
|
+
"__experimentalSkipSerialization": true,
|
|
51
|
+
"__experimentalDefaultControls": {
|
|
52
|
+
"color": true,
|
|
53
|
+
"radius": true,
|
|
54
|
+
"width": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
45
57
|
"html": false,
|
|
46
58
|
"spacing": {
|
|
47
59
|
"margin": true,
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* WordPress dependencies
|
|
3
8
|
*/
|
|
@@ -18,6 +23,7 @@ import {
|
|
|
18
23
|
MediaReplaceFlow,
|
|
19
24
|
useBlockProps,
|
|
20
25
|
store as blockEditorStore,
|
|
26
|
+
__experimentalUseBorderProps as useBorderProps,
|
|
21
27
|
} from '@wordpress/block-editor';
|
|
22
28
|
import { __, sprintf } from '@wordpress/i18n';
|
|
23
29
|
import { upload } from '@wordpress/icons';
|
|
@@ -30,17 +36,6 @@ import DimensionControls from './dimension-controls';
|
|
|
30
36
|
|
|
31
37
|
const ALLOWED_MEDIA_TYPES = [ 'image' ];
|
|
32
38
|
|
|
33
|
-
const placeholder = ( content ) => {
|
|
34
|
-
return (
|
|
35
|
-
<Placeholder
|
|
36
|
-
className="block-editor-media-placeholder"
|
|
37
|
-
withIllustration={ true }
|
|
38
|
-
>
|
|
39
|
-
{ content }
|
|
40
|
-
</Placeholder>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
39
|
function getMediaSourceUrlBySizeSlug( media, slug ) {
|
|
45
40
|
return (
|
|
46
41
|
media?.media_details?.sizes?.[ slug ]?.source_url || media?.source_url
|
|
@@ -95,6 +90,22 @@ function PostFeaturedImageDisplay( {
|
|
|
95
90
|
const blockProps = useBlockProps( {
|
|
96
91
|
style: { width, height },
|
|
97
92
|
} );
|
|
93
|
+
const borderProps = useBorderProps( attributes );
|
|
94
|
+
|
|
95
|
+
const placeholder = ( content ) => {
|
|
96
|
+
return (
|
|
97
|
+
<Placeholder
|
|
98
|
+
className={ classnames(
|
|
99
|
+
'block-editor-media-placeholder',
|
|
100
|
+
borderProps.className
|
|
101
|
+
) }
|
|
102
|
+
withIllustration={ true }
|
|
103
|
+
style={ borderProps.style }
|
|
104
|
+
>
|
|
105
|
+
{ content }
|
|
106
|
+
</Placeholder>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
98
109
|
|
|
99
110
|
const onSelectImage = ( value ) => {
|
|
100
111
|
if ( value?.id ) {
|
|
@@ -165,6 +176,11 @@ function PostFeaturedImageDisplay( {
|
|
|
165
176
|
}
|
|
166
177
|
|
|
167
178
|
const label = __( 'Add a featured image' );
|
|
179
|
+
const imageStyles = {
|
|
180
|
+
...borderProps.style,
|
|
181
|
+
height,
|
|
182
|
+
objectFit: height && scale,
|
|
183
|
+
};
|
|
168
184
|
|
|
169
185
|
if ( ! featuredImage ) {
|
|
170
186
|
image = (
|
|
@@ -196,6 +212,7 @@ function PostFeaturedImageDisplay( {
|
|
|
196
212
|
placeholder()
|
|
197
213
|
) : (
|
|
198
214
|
<img
|
|
215
|
+
className={ borderProps.className }
|
|
199
216
|
src={ mediaUrl }
|
|
200
217
|
alt={
|
|
201
218
|
media.alt_text
|
|
@@ -206,7 +223,7 @@ function PostFeaturedImageDisplay( {
|
|
|
206
223
|
)
|
|
207
224
|
: __( 'Featured image' )
|
|
208
225
|
}
|
|
209
|
-
style={
|
|
226
|
+
style={ imageStyles }
|
|
210
227
|
/>
|
|
211
228
|
);
|
|
212
229
|
}
|
|
@@ -237,8 +254,21 @@ function PostFeaturedImageDisplay( {
|
|
|
237
254
|
|
|
238
255
|
export default function PostFeaturedImageEdit( props ) {
|
|
239
256
|
const blockProps = useBlockProps();
|
|
257
|
+
const borderProps = useBorderProps( props.attributes );
|
|
258
|
+
|
|
240
259
|
if ( ! props.context?.postId ) {
|
|
241
|
-
return
|
|
260
|
+
return (
|
|
261
|
+
<div { ...blockProps }>
|
|
262
|
+
<Placeholder
|
|
263
|
+
className={ classnames(
|
|
264
|
+
'block-editor-media-placeholder',
|
|
265
|
+
borderProps.className
|
|
266
|
+
) }
|
|
267
|
+
withIllustration={ true }
|
|
268
|
+
style={ borderProps.style }
|
|
269
|
+
/>
|
|
270
|
+
</div>
|
|
271
|
+
);
|
|
242
272
|
}
|
|
243
273
|
return <PostFeaturedImageDisplay { ...props } />;
|
|
244
274
|
}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
//
|
|
2
|
-
// @todo: this
|
|
3
|
-
// to create a new component for placeholders meant to inherit some theme styles.
|
|
1
|
+
// Provide special styling for the placeholder.
|
|
2
|
+
// @todo: this particular minimal style of placeholder could be componentized further.
|
|
4
3
|
.wp-block-post-featured-image.wp-block-post-featured-image {
|
|
5
|
-
// Inherit border radius from style variations.
|
|
6
|
-
.components-placeholder,
|
|
7
|
-
.components-resizable-box__container {
|
|
8
|
-
border-radius: inherit;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
4
|
// Style the placeholder.
|
|
12
5
|
.wp-block-post-featured-image__placeholder,
|
|
13
6
|
.components-placeholder {
|
|
14
7
|
justify-content: center;
|
|
15
8
|
align-items: center;
|
|
16
|
-
box-shadow: none;
|
|
17
9
|
padding: 0;
|
|
18
10
|
|
|
19
11
|
// Hide the upload button, as it's also available in the media library.
|
|
@@ -21,32 +13,8 @@
|
|
|
21
13
|
display: none;
|
|
22
14
|
}
|
|
23
15
|
|
|
24
|
-
// Position the spinner.
|
|
25
|
-
.components-placeholder__preview {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: $grid-unit-05;
|
|
28
|
-
right: $grid-unit-05;
|
|
29
|
-
bottom: $grid-unit-05;
|
|
30
|
-
left: $grid-unit-05;
|
|
31
|
-
background: rgba($white, 0.8);
|
|
32
|
-
display: flex;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: center;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Draw the dashed outline.
|
|
38
|
-
// By setting the dashed border to currentColor, we ensure it's visible
|
|
39
|
-
// against any background color.
|
|
40
|
-
color: currentColor;
|
|
41
|
-
background: transparent;
|
|
42
|
-
|
|
43
16
|
// Style the upload button.
|
|
44
|
-
.components-placeholder__fieldset {
|
|
45
|
-
width: auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
17
|
.components-button.components-button {
|
|
49
|
-
color: inherit;
|
|
50
18
|
padding: 0;
|
|
51
19
|
display: flex;
|
|
52
20
|
justify-content: center;
|
|
@@ -55,20 +23,53 @@
|
|
|
55
23
|
height: $grid-unit-60;
|
|
56
24
|
border-radius: 50%;
|
|
57
25
|
position: relative;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
background: transparent;
|
|
62
|
-
transition: all 0.1s linear;
|
|
63
|
-
@include reduce-motion("transition");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.components-button.components-button > svg {
|
|
26
|
+
background: var(--wp-admin-theme-color);
|
|
27
|
+
border-color: var(--wp-admin-theme-color);
|
|
28
|
+
border-style: solid;
|
|
67
29
|
color: $white;
|
|
30
|
+
|
|
31
|
+
> svg {
|
|
32
|
+
color: inherit;
|
|
33
|
+
}
|
|
68
34
|
}
|
|
69
35
|
|
|
70
36
|
// Show default placeholder height when not resized.
|
|
71
37
|
min-height: 200px;
|
|
38
|
+
|
|
39
|
+
// The following override the default placeholder styles that remove
|
|
40
|
+
// its border so that a user selection for border color or width displays
|
|
41
|
+
// a visual border.
|
|
42
|
+
&:where(.has-border-color) {
|
|
43
|
+
border-style: solid;
|
|
44
|
+
}
|
|
45
|
+
&:where([style*="border-top-color"]) {
|
|
46
|
+
border-top-style: solid;
|
|
47
|
+
}
|
|
48
|
+
&:where([style*="border-right-color"]) {
|
|
49
|
+
border-right-style: solid;
|
|
50
|
+
}
|
|
51
|
+
&:where([style*="border-bottom-color"]) {
|
|
52
|
+
border-bottom-style: solid;
|
|
53
|
+
}
|
|
54
|
+
&:where([style*="border-left-color"]) {
|
|
55
|
+
border-left-style: solid;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:where([style*="border-width"]) {
|
|
59
|
+
border-style: solid;
|
|
60
|
+
}
|
|
61
|
+
&:where([style*="border-top-width"]) {
|
|
62
|
+
border-top-style: solid;
|
|
63
|
+
}
|
|
64
|
+
&:where([style*="border-right-width"]) {
|
|
65
|
+
border-right-style: solid;
|
|
66
|
+
}
|
|
67
|
+
&:where([style*="border-bottom-width"]) {
|
|
68
|
+
border-bottom-style: solid;
|
|
69
|
+
}
|
|
70
|
+
&:where([style*="border-left-width"]) {
|
|
71
|
+
border-left-style: solid;
|
|
72
|
+
}
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
// Provide a minimum size for the placeholder when resized.
|
|
@@ -80,16 +81,6 @@
|
|
|
80
81
|
height: 100%;
|
|
81
82
|
width: 100%;
|
|
82
83
|
}
|
|
83
|
-
|
|
84
|
-
// Show upload button on block selection.
|
|
85
|
-
&.is-selected .components-button.components-button {
|
|
86
|
-
background: var(--wp-admin-theme-color);
|
|
87
|
-
border-color: var(--wp-admin-theme-color);
|
|
88
|
-
border-style: solid;
|
|
89
|
-
color: $white;
|
|
90
|
-
opacity: 1;
|
|
91
|
-
visibility: visible;
|
|
92
|
-
}
|
|
93
84
|
}
|
|
94
85
|
|
|
95
86
|
div[data-type="core/post-featured-image"] {
|
|
@@ -19,10 +19,15 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
19
19
|
}
|
|
20
20
|
$post_ID = $block->context['postId'];
|
|
21
21
|
|
|
22
|
-
$is_link
|
|
23
|
-
$size_slug
|
|
24
|
-
$post_title
|
|
25
|
-
$attr
|
|
22
|
+
$is_link = isset( $attributes['isLink'] ) && $attributes['isLink'];
|
|
23
|
+
$size_slug = isset( $attributes['sizeSlug'] ) ? $attributes['sizeSlug'] : 'post-thumbnail';
|
|
24
|
+
$post_title = trim( strip_tags( get_the_title( $post_ID ) ) );
|
|
25
|
+
$attr = get_block_core_post_featured_image_border_attributes( $attributes );
|
|
26
|
+
|
|
27
|
+
if ( $is_link ) {
|
|
28
|
+
$attr['alt'] = $post_title;
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
$featured_image = get_the_post_thumbnail( $post_ID, $size_slug, $attr );
|
|
27
32
|
if ( ! $featured_image ) {
|
|
28
33
|
return '';
|
|
@@ -55,6 +60,58 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
55
60
|
return "<figure $wrapper_attributes>$featured_image</figure>";
|
|
56
61
|
}
|
|
57
62
|
|
|
63
|
+
/**
|
|
64
|
+
* Generates class names and styles to apply the border support styles for
|
|
65
|
+
* the Post Featured Image block.
|
|
66
|
+
*
|
|
67
|
+
* @param array $attributes The block attributes.
|
|
68
|
+
* @return array The border-related classnames and styles for the block.
|
|
69
|
+
*/
|
|
70
|
+
function get_block_core_post_featured_image_border_attributes( $attributes ) {
|
|
71
|
+
$border_styles = array();
|
|
72
|
+
$sides = array( 'top', 'right', 'bottom', 'left' );
|
|
73
|
+
|
|
74
|
+
// Border radius.
|
|
75
|
+
if ( isset( $attributes['style']['border']['radius'] ) ) {
|
|
76
|
+
$border_styles['radius'] = $attributes['style']['border']['radius'];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Border style.
|
|
80
|
+
if ( isset( $attributes['style']['border']['style'] ) ) {
|
|
81
|
+
$border_styles['style'] = $attributes['style']['border']['style'];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Border width.
|
|
85
|
+
if ( isset( $attributes['style']['border']['width'] ) ) {
|
|
86
|
+
$border_styles['width'] = $attributes['style']['border']['width'];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Border color.
|
|
90
|
+
$preset_color = array_key_exists( 'borderColor', $attributes ) ? "var:preset|color|{$attributes['borderColor']}" : null;
|
|
91
|
+
$custom_color = _wp_array_get( $attributes, array( 'style', 'border', 'color' ), null );
|
|
92
|
+
$border_styles['color'] = $preset_color ? $preset_color : $custom_color;
|
|
93
|
+
|
|
94
|
+
// Individual border styles e.g. top, left etc.
|
|
95
|
+
foreach ( $sides as $side ) {
|
|
96
|
+
$border = _wp_array_get( $attributes, array( 'style', 'border', $side ), null );
|
|
97
|
+
$border_styles[ $side ] = array(
|
|
98
|
+
'color' => isset( $border['color'] ) ? $border['color'] : null,
|
|
99
|
+
'style' => isset( $border['style'] ) ? $border['style'] : null,
|
|
100
|
+
'width' => isset( $border['width'] ) ? $border['width'] : null,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
$styles = gutenberg_style_engine_get_styles( array( 'border' => $border_styles ) );
|
|
105
|
+
$attributes = array();
|
|
106
|
+
if ( ! empty( $styles['classnames'] ) ) {
|
|
107
|
+
$attributes['class'] = $styles['classnames'];
|
|
108
|
+
}
|
|
109
|
+
if ( ! empty( $styles['css'] ) ) {
|
|
110
|
+
$attributes['style'] = $styles['css'];
|
|
111
|
+
}
|
|
112
|
+
return $attributes;
|
|
113
|
+
}
|
|
114
|
+
|
|
58
115
|
/**
|
|
59
116
|
* Registers the `core/post-featured-image` block on the server.
|
|
60
117
|
*/
|
|
@@ -36,10 +36,11 @@
|
|
|
36
36
|
"fontSize": true,
|
|
37
37
|
"lineHeight": true,
|
|
38
38
|
"__experimentalFontFamily": true,
|
|
39
|
-
"__experimentalFontStyle": true,
|
|
40
39
|
"__experimentalFontWeight": true,
|
|
41
|
-
"
|
|
40
|
+
"__experimentalFontStyle": true,
|
|
42
41
|
"__experimentalTextTransform": true,
|
|
42
|
+
"__experimentalTextDecoration": true,
|
|
43
|
+
"__experimentalLetterSpacing": true,
|
|
43
44
|
"__experimentalDefaultControls": {
|
|
44
45
|
"fontSize": true
|
|
45
46
|
}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"query",
|
|
13
13
|
"queryContext",
|
|
14
14
|
"displayLayout",
|
|
15
|
-
"templateSlug"
|
|
15
|
+
"templateSlug",
|
|
16
|
+
"previewPostType"
|
|
16
17
|
],
|
|
17
18
|
"supports": {
|
|
18
19
|
"reusable": false,
|
|
@@ -20,6 +21,19 @@
|
|
|
20
21
|
"align": true,
|
|
21
22
|
"__experimentalLayout": {
|
|
22
23
|
"allowEditing": false
|
|
24
|
+
},
|
|
25
|
+
"typography": {
|
|
26
|
+
"fontSize": true,
|
|
27
|
+
"lineHeight": true,
|
|
28
|
+
"__experimentalFontFamily": true,
|
|
29
|
+
"__experimentalFontWeight": true,
|
|
30
|
+
"__experimentalFontStyle": true,
|
|
31
|
+
"__experimentalTextTransform": true,
|
|
32
|
+
"__experimentalTextDecoration": true,
|
|
33
|
+
"__experimentalLetterSpacing": true,
|
|
34
|
+
"__experimentalDefaultControls": {
|
|
35
|
+
"fontSize": true
|
|
36
|
+
}
|
|
23
37
|
}
|
|
24
38
|
},
|
|
25
39
|
"style": "wp-block-post-template",
|
|
@@ -89,6 +89,7 @@ export default function PostTemplateEdit( {
|
|
|
89
89
|
queryContext = [ { page: 1 } ],
|
|
90
90
|
templateSlug,
|
|
91
91
|
displayLayout: { type: layoutType = 'flex', columns = 1 } = {},
|
|
92
|
+
previewPostType,
|
|
92
93
|
},
|
|
93
94
|
} ) {
|
|
94
95
|
const [ { page } ] = queryContext;
|
|
@@ -156,8 +157,11 @@ export default function PostTemplateEdit( {
|
|
|
156
157
|
postType = query.postType;
|
|
157
158
|
}
|
|
158
159
|
}
|
|
160
|
+
// When we preview Query Loop blocks we should prefer the current
|
|
161
|
+
// block's postType, which is passed through block context.
|
|
162
|
+
const usedPostType = previewPostType || postType;
|
|
159
163
|
return {
|
|
160
|
-
posts: getEntityRecords( 'postType',
|
|
164
|
+
posts: getEntityRecords( 'postType', usedPostType, query ),
|
|
161
165
|
blocks: getBlocks( clientId ),
|
|
162
166
|
};
|
|
163
167
|
},
|
|
@@ -177,6 +181,7 @@ export default function PostTemplateEdit( {
|
|
|
177
181
|
templateSlug,
|
|
178
182
|
taxQuery,
|
|
179
183
|
parents,
|
|
184
|
+
previewPostType,
|
|
180
185
|
]
|
|
181
186
|
);
|
|
182
187
|
const blockContexts = useMemo(
|
|
@@ -48,7 +48,7 @@ function render_block_core_post_template( $attributes, $content, $block ) {
|
|
|
48
48
|
$use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] );
|
|
49
49
|
if ( $use_global_query ) {
|
|
50
50
|
global $wp_query;
|
|
51
|
-
$query = $wp_query;
|
|
51
|
+
$query = clone $wp_query;
|
|
52
52
|
} else {
|
|
53
53
|
$query_args = build_query_vars_from_query_block( $block, $page );
|
|
54
54
|
$query = new WP_Query( $query_args );
|
|
@@ -99,9 +99,12 @@ function render_block_core_post_template( $attributes, $content, $block ) {
|
|
|
99
99
|
$content .= '<li class="' . esc_attr( $post_classes ) . '">' . $block_content . '</li>';
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
/*
|
|
103
|
+
* Use this function to restore the context of the template tags
|
|
104
|
+
* from a secondary query loop back to the main query loop.
|
|
105
|
+
* Since we use two custom loops, it's safest to always restore.
|
|
106
|
+
*/
|
|
107
|
+
wp_reset_postdata();
|
|
105
108
|
|
|
106
109
|
return sprintf(
|
|
107
110
|
'<ul %1$s>%2$s</ul>',
|
|
@@ -39,12 +39,14 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"typography": {
|
|
42
|
-
"lineHeight": true,
|
|
43
42
|
"fontSize": true,
|
|
44
|
-
"
|
|
43
|
+
"lineHeight": true,
|
|
44
|
+
"__experimentalFontFamily": true,
|
|
45
45
|
"__experimentalFontWeight": true,
|
|
46
|
-
"
|
|
46
|
+
"__experimentalFontStyle": true,
|
|
47
47
|
"__experimentalTextTransform": true,
|
|
48
|
+
"__experimentalTextDecoration": true,
|
|
49
|
+
"__experimentalLetterSpacing": true,
|
|
48
50
|
"__experimentalDefaultControls": {
|
|
49
51
|
"fontSize": true
|
|
50
52
|
}
|