@wordpress/block-library 6.0.17-next.33ec3857e2.0 → 6.0.20
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 +0 -4
- package/build/archives/index.js +0 -1
- package/build/archives/index.js.map +1 -1
- package/build/audio/index.js +0 -1
- package/build/audio/index.js.map +1 -1
- package/build/block/index.js +0 -1
- package/build/block/index.js.map +1 -1
- package/build/button/edit.native.js +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +1 -5
- package/build/button/index.js.map +1 -1
- package/build/buttons/index.js +0 -1
- package/build/buttons/index.js.map +1 -1
- package/build/buttons/transforms.js +0 -1
- package/build/buttons/transforms.js.map +1 -1
- package/build/calendar/index.js +0 -1
- package/build/calendar/index.js.map +1 -1
- package/build/categories/index.js +0 -1
- package/build/categories/index.js.map +1 -1
- package/build/code/index.js +1 -6
- package/build/code/index.js.map +1 -1
- package/build/column/index.js +0 -1
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +1 -3
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-avatar/edit.js +1 -2
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/comment-author-avatar/index.js +2 -7
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +0 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +0 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +0 -1
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +1 -2
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +0 -1
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +23 -98
- package/build/comment-template/edit.js.map +1 -1
- package/build/comment-template/index.js +2 -4
- package/build/comment-template/index.js.map +1 -1
- package/build/comments-query-loop/edit.js +2 -2
- package/build/comments-query-loop/edit.js.map +1 -1
- package/build/comments-query-loop/index.js +7 -4
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/comments-query-loop/toolbar.js +3 -3
- package/build/comments-query-loop/toolbar.js.map +1 -1
- package/build/cover/edit.js +1 -2
- package/build/cover/edit.js.map +1 -1
- package/build/cover/index.js +0 -1
- package/build/cover/index.js.map +1 -1
- package/build/embed/deprecated.js +0 -1
- package/build/embed/deprecated.js.map +1 -1
- package/build/embed/edit.native.js +20 -23
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-bottom-sheet.native.js +85 -0
- package/build/embed/embed-bottom-sheet.native.js.map +1 -0
- package/build/embed/embed-placeholder.native.js +2 -9
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/index.js +0 -1
- package/build/embed/index.js.map +1 -1
- package/build/embed/transforms.js +0 -1
- package/build/embed/transforms.js.map +1 -1
- package/build/embed/util.js +0 -1
- package/build/embed/util.js.map +1 -1
- package/build/file/index.js +0 -1
- package/build/file/index.js.map +1 -1
- package/build/freeform/index.js +0 -1
- package/build/freeform/index.js.map +1 -1
- package/build/gallery/deprecated.js +1 -5
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit.js +1 -12
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/index.js +0 -1
- package/build/gallery/index.js.map +1 -1
- package/build/group/edit.native.js +1 -1
- package/build/group/edit.native.js.map +1 -1
- package/build/group/index.js +4 -9
- package/build/group/index.js.map +1 -1
- package/build/heading/index.js +0 -1
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +0 -1
- package/build/heading/transforms.js.map +1 -1
- package/build/home-link/index.js +0 -1
- package/build/home-link/index.js.map +1 -1
- package/build/html/index.js +0 -1
- package/build/html/index.js.map +1 -1
- package/build/image/edit.js +5 -56
- 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 +4 -15
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +1 -5
- package/build/image/index.js.map +1 -1
- package/build/index.js +1 -5
- package/build/index.js.map +1 -1
- package/build/latest-comments/index.js +0 -1
- package/build/latest-comments/index.js.map +1 -1
- package/build/latest-posts/deprecated.js +0 -1
- package/build/latest-posts/deprecated.js.map +1 -1
- package/build/latest-posts/index.js +0 -1
- package/build/latest-posts/index.js.map +1 -1
- package/build/list/index.js +0 -1
- package/build/list/index.js.map +1 -1
- package/build/loginout/index.js +0 -1
- package/build/loginout/index.js.map +1 -1
- package/build/media-text/index.js +0 -1
- package/build/media-text/index.js.map +1 -1
- package/build/missing/index.js +0 -1
- package/build/missing/index.js.map +1 -1
- package/build/more/index.js +0 -1
- package/build/more/index.js.map +1 -1
- package/build/navigation/deprecated.js +1 -3
- package/build/navigation/deprecated.js.map +1 -1
- package/build/navigation/edit/index.js +106 -59
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +3 -2
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +15 -7
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +9 -7
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +3 -11
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation/edit/use-navigation-notice.js +54 -0
- package/build/navigation/edit/use-navigation-notice.js.map +1 -0
- package/build/navigation/index.js +2 -9
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +1 -4
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +9 -2
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation/view.js +12 -7
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-area/edit.js +1 -2
- package/build/navigation-area/edit.js.map +1 -1
- package/build/navigation-area/index.js +1 -2
- package/build/navigation-area/index.js.map +1 -1
- package/build/navigation-link/edit.js +0 -7
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/index.js +0 -1
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-submenu/edit.js +0 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/navigation-submenu/index.js +0 -1
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/nextpage/index.js +0 -1
- package/build/nextpage/index.js.map +1 -1
- package/build/page-list/index.js +1 -6
- package/build/page-list/index.js.map +1 -1
- package/build/paragraph/edit.js +2 -12
- package/build/paragraph/edit.js.map +1 -1
- package/build/paragraph/index.js +0 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +0 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/pattern/index.js +0 -1
- package/build/pattern/index.js.map +1 -1
- package/build/post-author/edit.js +1 -1
- package/build/post-author/edit.js.map +1 -1
- package/build/post-author/index.js +0 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-comment/index.js +0 -1
- package/build/post-comment/index.js.map +1 -1
- package/build/post-comments/index.js +0 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +0 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +0 -1
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +0 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +1 -1
- package/build/post-content/edit.js.map +1 -1
- package/build/post-content/index.js +0 -1
- package/build/post-content/index.js.map +1 -1
- package/build/post-date/edit.js +1 -1
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +0 -1
- package/build/post-date/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-excerpt/index.js +0 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +30 -50
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +4 -8
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +0 -1
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/index.js +0 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/index.js +0 -1
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/index.js +0 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +1 -1
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +0 -1
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/edit.native.js +1 -2
- package/build/preformatted/edit.native.js.map +1 -1
- package/build/preformatted/index.js +0 -1
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/index.js +1 -8
- package/build/pullquote/index.js.map +1 -1
- package/build/query/index.js +0 -1
- package/build/query/index.js.map +1 -1
- package/build/query-pagination/index.js +0 -1
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/index.js +0 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-numbers/index.js +0 -1
- package/build/query-pagination-numbers/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +0 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +0 -1
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +0 -1
- package/build/quote/index.js.map +1 -1
- package/build/rss/index.js +0 -1
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +3 -5
- package/build/search/edit.js.map +1 -1
- package/build/search/index.js +1 -8
- package/build/search/index.js.map +1 -1
- package/build/separator/index.js +0 -1
- package/build/separator/index.js.map +1 -1
- package/build/shortcode/index.js +0 -1
- package/build/shortcode/index.js.map +1 -1
- package/build/site-logo/edit.js +119 -18
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +5 -5
- package/build/site-tagline/index.js +1 -2
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +0 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/index.js +1 -2
- package/build/social-link/index.js.map +1 -1
- package/build/social-links/index.js +1 -2
- package/build/social-links/index.js.map +1 -1
- package/build/spacer/index.js +0 -1
- package/build/spacer/index.js.map +1 -1
- package/build/table/index.js +1 -7
- package/build/table/index.js.map +1 -1
- package/build/table-of-contents/index.js +0 -1
- package/build/table-of-contents/index.js.map +1 -1
- package/build/tag-cloud/index.js +0 -1
- package/build/tag-cloud/index.js.map +1 -1
- package/build/template-part/index.js +0 -1
- package/build/template-part/index.js.map +1 -1
- package/build/term-description/index.js +0 -1
- package/build/term-description/index.js.map +1 -1
- package/build/text-columns/index.js +0 -1
- package/build/text-columns/index.js.map +1 -1
- package/build/verse/index.js +0 -1
- package/build/verse/index.js.map +1 -1
- package/build/video/index.js +0 -1
- package/build/video/index.js.map +1 -1
- package/build-module/archives/index.js +0 -1
- package/build-module/archives/index.js.map +1 -1
- package/build-module/audio/index.js +0 -1
- package/build-module/audio/index.js.map +1 -1
- package/build-module/block/index.js +0 -1
- package/build-module/block/index.js.map +1 -1
- package/build-module/button/edit.native.js +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +1 -5
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/index.js +0 -1
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/buttons/transforms.js +0 -1
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/calendar/index.js +0 -1
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/categories/index.js +0 -1
- package/build-module/categories/index.js.map +1 -1
- package/build-module/code/index.js +1 -6
- package/build-module/code/index.js.map +1 -1
- package/build-module/column/index.js +0 -1
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +1 -3
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +2 -3
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +2 -7
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +0 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +0 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +0 -1
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +1 -2
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +0 -1
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +23 -97
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comment-template/index.js +2 -4
- package/build-module/comment-template/index.js.map +1 -1
- package/build-module/comments-query-loop/edit.js +2 -2
- package/build-module/comments-query-loop/edit.js.map +1 -1
- package/build-module/comments-query-loop/index.js +7 -4
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/comments-query-loop/toolbar.js +3 -3
- package/build-module/comments-query-loop/toolbar.js.map +1 -1
- package/build-module/cover/edit.js +1 -2
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/index.js +0 -1
- package/build-module/cover/index.js.map +1 -1
- package/build-module/embed/deprecated.js +0 -1
- package/build-module/embed/deprecated.js.map +1 -1
- package/build-module/embed/edit.native.js +21 -24
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-bottom-sheet.native.js +74 -0
- package/build-module/embed/embed-bottom-sheet.native.js.map +1 -0
- package/build-module/embed/embed-placeholder.native.js +2 -9
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/index.js +0 -1
- package/build-module/embed/index.js.map +1 -1
- package/build-module/embed/transforms.js +0 -1
- package/build-module/embed/transforms.js.map +1 -1
- package/build-module/embed/util.js +0 -1
- package/build-module/embed/util.js.map +1 -1
- package/build-module/file/index.js +0 -1
- package/build-module/file/index.js.map +1 -1
- package/build-module/freeform/index.js +0 -1
- package/build-module/freeform/index.js.map +1 -1
- package/build-module/gallery/deprecated.js +2 -6
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit.js +1 -11
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/index.js +0 -1
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/group/edit.native.js +1 -1
- package/build-module/group/edit.native.js.map +1 -1
- package/build-module/group/index.js +4 -9
- package/build-module/group/index.js.map +1 -1
- package/build-module/heading/index.js +0 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +0 -1
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/home-link/index.js +0 -1
- package/build-module/home-link/index.js.map +1 -1
- package/build-module/html/index.js +0 -1
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/edit.js +4 -52
- 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 +5 -16
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +1 -5
- package/build-module/image/index.js.map +1 -1
- package/build-module/index.js +1 -3
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/index.js +0 -1
- package/build-module/latest-comments/index.js.map +1 -1
- package/build-module/latest-posts/deprecated.js +0 -1
- package/build-module/latest-posts/deprecated.js.map +1 -1
- package/build-module/latest-posts/index.js +0 -1
- package/build-module/latest-posts/index.js.map +1 -1
- package/build-module/list/index.js +0 -1
- package/build-module/list/index.js.map +1 -1
- package/build-module/loginout/index.js +0 -1
- package/build-module/loginout/index.js.map +1 -1
- package/build-module/media-text/index.js +0 -1
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/missing/index.js +0 -1
- package/build-module/missing/index.js.map +1 -1
- package/build-module/more/index.js +0 -1
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/deprecated.js +1 -3
- package/build-module/navigation/deprecated.js.map +1 -1
- package/build-module/navigation/edit/index.js +104 -59
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +3 -2
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +15 -7
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +9 -7
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -13
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/use-navigation-notice.js +44 -0
- package/build-module/navigation/edit/use-navigation-notice.js.map +1 -0
- package/build-module/navigation/index.js +2 -9
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +1 -4
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +9 -2
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation/view.js +12 -7
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-area/edit.js +1 -2
- package/build-module/navigation-area/edit.js.map +1 -1
- package/build-module/navigation-area/index.js +1 -2
- package/build-module/navigation-area/index.js.map +1 -1
- package/build-module/navigation-link/edit.js +0 -7
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/index.js +0 -1
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +0 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/navigation-submenu/index.js +0 -1
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/nextpage/index.js +0 -1
- package/build-module/nextpage/index.js.map +1 -1
- package/build-module/page-list/index.js +1 -6
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/paragraph/edit.js +3 -13
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/paragraph/index.js +0 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +0 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/pattern/index.js +0 -1
- package/build-module/pattern/index.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-author/index.js +0 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-comment/index.js +0 -1
- package/build-module/post-comment/index.js.map +1 -1
- package/build-module/post-comments/index.js +0 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +0 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +0 -1
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +0 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +1 -1
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-content/index.js +0 -1
- package/build-module/post-content/index.js.map +1 -1
- package/build-module/post-date/edit.js +1 -1
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +0 -1
- package/build-module/post-date/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-excerpt/index.js +0 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +29 -52
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +5 -9
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +0 -1
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/index.js +0 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/index.js +0 -1
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/index.js +0 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +1 -1
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +0 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/edit.native.js +1 -2
- package/build-module/preformatted/edit.native.js.map +1 -1
- package/build-module/preformatted/index.js +0 -1
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/index.js +1 -8
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/index.js +0 -1
- package/build-module/query/index.js.map +1 -1
- package/build-module/query-pagination/index.js +0 -1
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/index.js +0 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-numbers/index.js +0 -1
- package/build-module/query-pagination-numbers/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +0 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +0 -1
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +0 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/rss/index.js +0 -1
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +3 -5
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/index.js +1 -8
- package/build-module/search/index.js.map +1 -1
- package/build-module/separator/index.js +0 -1
- package/build-module/separator/index.js.map +1 -1
- package/build-module/shortcode/index.js +0 -1
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/site-logo/edit.js +120 -19
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +5 -5
- package/build-module/site-tagline/index.js +1 -2
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +0 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/index.js +1 -2
- package/build-module/social-link/index.js.map +1 -1
- package/build-module/social-links/index.js +1 -2
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/spacer/index.js +0 -1
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/table/index.js +1 -7
- package/build-module/table/index.js.map +1 -1
- package/build-module/table-of-contents/index.js +0 -1
- package/build-module/table-of-contents/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +0 -1
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/template-part/index.js +0 -1
- package/build-module/template-part/index.js.map +1 -1
- package/build-module/term-description/index.js +0 -1
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/text-columns/index.js +0 -1
- package/build-module/text-columns/index.js.map +1 -1
- package/build-module/verse/index.js +0 -1
- package/build-module/verse/index.js.map +1 -1
- package/build-module/video/index.js +0 -1
- package/build-module/video/index.js.map +1 -1
- package/build-style/columns/style-rtl.css +3 -4
- package/build-style/columns/style.css +3 -4
- package/build-style/common-rtl.css +2 -21
- package/build-style/common.css +2 -21
- package/build-style/cover/style-rtl.css +0 -4
- package/build-style/cover/style.css +0 -4
- package/build-style/editor-rtl.css +46 -56
- package/build-style/editor.css +46 -59
- package/build-style/gallery/editor-rtl.css +12 -0
- package/build-style/gallery/editor.css +12 -0
- package/build-style/gallery/style-rtl.css +0 -3
- package/build-style/gallery/style.css +0 -3
- package/build-style/group/theme-rtl.css +1 -1
- package/build-style/group/theme.css +1 -1
- package/build-style/{comments-pagination → home-link}/style-rtl.css +21 -21
- package/build-style/{comments-pagination/editor.css → home-link/style.css} +22 -20
- package/build-style/navigation/editor-rtl.css +15 -6
- package/build-style/navigation/editor.css +15 -6
- package/build-style/navigation/style-rtl.css +45 -18
- package/build-style/navigation/style.css +45 -18
- package/build-style/page-list/style-rtl.css +4 -4
- package/build-style/page-list/style.css +4 -4
- package/build-style/post-comments/style-rtl.css +0 -1
- package/build-style/post-comments/style.css +0 -1
- package/build-style/post-featured-image/editor-rtl.css +7 -0
- package/build-style/post-featured-image/editor.css +7 -0
- package/build-style/post-featured-image/style-rtl.css +1 -1
- package/build-style/post-featured-image/style.css +1 -1
- package/build-style/post-template/style-rtl.css +2 -29
- package/build-style/post-template/style.css +2 -29
- package/build-style/post-title/style-rtl.css +0 -3
- package/build-style/post-title/style.css +0 -3
- package/build-style/pullquote/style-rtl.css +0 -1
- package/build-style/pullquote/style.css +0 -1
- package/build-style/query-pagination/editor-rtl.css +4 -0
- package/build-style/query-pagination/editor.css +4 -0
- package/build-style/query-pagination/style-rtl.css +2 -6
- package/build-style/query-pagination/style.css +2 -6
- package/build-style/site-logo/editor-rtl.css +1 -11
- package/build-style/site-logo/editor.css +1 -11
- package/build-style/site-logo/style-rtl.css +3 -1
- package/build-style/site-logo/style.css +3 -1
- package/build-style/style-rtl.css +107 -158
- package/build-style/style.css +107 -160
- package/build-style/table/style-rtl.css +0 -1
- package/build-style/table/style.css +0 -1
- package/build-style/theme-rtl.css +1 -1
- package/build-style/theme.css +1 -1
- package/package.json +30 -31
- package/src/archives/block.json +0 -1
- package/src/audio/block.json +0 -1
- package/src/block/block.json +0 -1
- package/src/button/block.json +1 -5
- package/src/button/edit.native.js +1 -1
- package/src/buttons/block.json +1 -2
- package/src/calendar/block.json +0 -1
- package/src/calendar/index.php +39 -35
- package/src/categories/block.json +0 -1
- package/src/code/block.json +1 -6
- package/src/column/block.json +0 -1
- package/src/columns/block.json +1 -3
- package/src/columns/style.scss +5 -8
- package/src/comment-author-avatar/block.json +2 -7
- package/src/comment-author-avatar/edit.js +2 -7
- package/src/comment-author-avatar/index.php +6 -25
- package/src/comment-author-name/block.json +0 -1
- package/src/comment-content/block.json +0 -1
- package/src/comment-date/block.json +0 -1
- package/src/comment-edit-link/block.json +0 -1
- package/src/comment-edit-link/index.js +1 -1
- package/src/comment-reply-link/block.json +0 -1
- package/src/comment-template/block.json +2 -4
- package/src/comment-template/edit.js +37 -111
- package/src/comment-template/index.php +19 -46
- package/src/comments-query-loop/block.json +7 -4
- package/src/comments-query-loop/edit.js +5 -2
- package/src/comments-query-loop/toolbar.js +3 -3
- package/src/common.scss +2 -21
- package/src/cover/block.json +0 -1
- package/src/cover/edit.js +0 -1
- package/src/cover/style.scss +0 -4
- package/src/editor.scss +7 -6
- package/src/embed/block.json +0 -1
- package/src/embed/edit.native.js +18 -23
- package/src/embed/embed-bottom-sheet.native.js +78 -0
- package/src/embed/embed-placeholder.native.js +0 -8
- package/src/embed/test/__snapshots__/index.native.js.snap +0 -10
- package/src/embed/test/index.native.js +88 -228
- package/src/file/block.json +0 -1
- package/src/freeform/block.json +0 -1
- package/src/gallery/block.json +0 -1
- package/src/gallery/deprecated.js +2 -5
- package/src/gallery/edit.js +0 -20
- package/src/gallery/editor.scss +14 -0
- package/src/gallery/index.php +1 -1
- package/src/gallery/style.scss +0 -4
- package/src/group/block.json +4 -9
- package/src/group/edit.native.js +1 -1
- package/src/group/theme.scss +5 -4
- package/src/heading/block.json +0 -1
- package/src/home-link/block.json +0 -1
- package/src/home-link/index.php +3 -3
- package/src/home-link/style.scss +51 -0
- package/src/html/block.json +0 -1
- package/src/image/block.json +1 -5
- package/src/image/edit.js +0 -44
- package/src/image/edit.native.js +1 -1
- package/src/image/image.js +3 -14
- package/src/index.js +0 -4
- package/src/latest-comments/block.json +0 -1
- package/src/latest-posts/block.json +0 -1
- package/src/list/block.json +0 -1
- package/src/loginout/block.json +0 -1
- package/src/media-text/block.json +0 -1
- package/src/missing/block.json +0 -1
- package/src/more/block.json +0 -1
- package/src/navigation/block.json +11 -11
- package/src/navigation/deprecated.js +0 -2
- package/src/navigation/edit/index.js +172 -89
- package/src/navigation/edit/navigation-menu-selector.js +19 -13
- package/src/navigation/edit/placeholder/index.js +40 -24
- package/src/navigation/edit/responsive-wrapper.js +10 -7
- package/src/navigation/edit/unsaved-inner-blocks.js +13 -25
- package/src/navigation/edit/use-navigation-notice.js +37 -0
- package/src/navigation/editor.scss +20 -8
- package/src/navigation/index.php +23 -12
- package/src/navigation/menu-items-to-blocks.js +1 -2
- package/src/navigation/style.scss +58 -19
- package/src/navigation/use-navigation-menu.js +20 -0
- package/src/navigation/view.js +13 -7
- package/src/navigation-area/block.json +7 -3
- package/src/navigation-area/edit.js +1 -2
- package/src/navigation-link/block.json +3 -2
- package/src/navigation-link/edit.js +0 -5
- package/src/navigation-link/index.php +3 -3
- package/src/navigation-submenu/block.json +3 -2
- package/src/navigation-submenu/index.php +5 -5
- package/src/nextpage/block.json +0 -1
- package/src/page-list/block.json +0 -4
- package/src/page-list/index.php +4 -4
- package/src/page-list/style.scss +4 -4
- package/src/paragraph/block.json +0 -1
- package/src/paragraph/edit.js +4 -12
- package/src/pattern/block.json +0 -1
- package/src/post-author/block.json +0 -1
- package/src/post-author/edit.js +1 -1
- package/src/post-comment/block.json +0 -1
- package/src/post-comments/block.json +0 -1
- package/src/post-comments/style.scss +0 -1
- package/src/post-comments-count/block.json +0 -1
- package/src/post-comments-form/block.json +1 -6
- package/src/post-comments-link/block.json +0 -1
- package/src/post-content/block.json +0 -1
- package/src/post-content/edit.js +1 -1
- package/src/post-content/index.php +11 -1
- package/src/post-date/block.json +0 -1
- package/src/post-date/edit.js +1 -1
- package/src/post-excerpt/block.json +0 -1
- package/src/post-excerpt/edit.js +1 -1
- package/src/post-excerpt/index.php +1 -1
- package/src/post-featured-image/block.json +0 -1
- package/src/post-featured-image/dimension-controls.js +50 -75
- package/src/post-featured-image/edit.js +6 -13
- package/src/post-featured-image/editor.scss +8 -0
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-navigation-link/block.json +0 -1
- package/src/post-template/block.json +0 -1
- package/src/post-template/style.scss +2 -13
- package/src/post-terms/block.json +0 -1
- package/src/post-title/block.json +0 -1
- package/src/post-title/edit.js +1 -1
- package/src/post-title/index.php +1 -1
- package/src/post-title/style.scss +2 -6
- package/src/preformatted/block.json +0 -1
- package/src/preformatted/edit.native.js +1 -3
- package/src/pullquote/block.json +1 -8
- package/src/pullquote/style.scss +0 -1
- package/src/query/block.json +0 -1
- package/src/query-pagination/block.json +0 -1
- package/src/query-pagination/editor.scss +4 -0
- package/src/query-pagination/style.scss +2 -12
- package/src/query-pagination-next/block.json +0 -1
- package/src/query-pagination-next/index.php +20 -42
- package/src/query-pagination-numbers/block.json +0 -1
- package/src/query-pagination-previous/block.json +0 -1
- package/src/query-pagination-previous/index.php +13 -45
- package/src/query-title/block.json +0 -1
- package/src/quote/block.json +0 -1
- package/src/rss/block.json +0 -1
- package/src/search/block.json +1 -8
- package/src/search/edit.js +1 -2
- package/src/search/index.php +19 -29
- package/src/separator/block.json +0 -1
- package/src/shortcode/block.json +0 -1
- package/src/site-logo/block.json +5 -5
- package/src/site-logo/edit.js +133 -14
- package/src/site-logo/editor.scss +1 -15
- package/src/site-logo/index.php +17 -4
- package/src/site-logo/style.scss +3 -1
- package/src/site-tagline/block.json +1 -2
- package/src/site-title/block.json +0 -1
- package/src/social-link/block.json +1 -2
- package/src/social-links/block.json +8 -3
- package/src/spacer/block.json +0 -1
- package/src/style.scss +2 -3
- package/src/table/block.json +1 -7
- package/src/table/style.scss +0 -1
- package/src/table-of-contents/block.json +0 -1
- package/src/tag-cloud/block.json +0 -1
- package/src/template-part/block.json +0 -1
- package/src/term-description/block.json +0 -1
- package/src/text-columns/block.json +0 -1
- package/src/verse/block.json +0 -1
- package/src/video/block.json +0 -1
- package/build/comment-template/util.js +0 -66
- package/build/comment-template/util.js.map +0 -1
- package/build/comments-pagination/comments-pagination-arrow-controls.js +0 -39
- package/build/comments-pagination/comments-pagination-arrow-controls.js.map +0 -1
- package/build/comments-pagination/edit.js +0 -80
- package/build/comments-pagination/edit.js.map +0 -1
- package/build/comments-pagination/index.js +0 -71
- package/build/comments-pagination/index.js.map +0 -1
- package/build/comments-pagination/save.js +0 -18
- package/build/comments-pagination/save.js.map +0 -1
- package/build/comments-pagination-numbers/edit.js +0 -47
- package/build/comments-pagination-numbers/edit.js.map +0 -1
- package/build/comments-pagination-numbers/index.js +0 -47
- package/build/comments-pagination-numbers/index.js.map +0 -1
- package/build/embed/embed-controls.native.js +0 -69
- package/build/embed/embed-controls.native.js.map +0 -1
- package/build/embed/embed-link-settings.native.js +0 -101
- package/build/embed/embed-link-settings.native.js.map +0 -1
- package/build/gallery/use-mobile-warning.js +0 -43
- package/build/gallery/use-mobile-warning.js.map +0 -1
- package/build-module/comment-template/util.js +0 -57
- package/build-module/comment-template/util.js.map +0 -1
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js +0 -30
- package/build-module/comments-pagination/comments-pagination-arrow-controls.js.map +0 -1
- package/build-module/comments-pagination/edit.js +0 -67
- package/build-module/comments-pagination/edit.js.map +0 -1
- package/build-module/comments-pagination/index.js +0 -57
- package/build-module/comments-pagination/index.js.map +0 -1
- package/build-module/comments-pagination/save.js +0 -10
- package/build-module/comments-pagination/save.js.map +0 -1
- package/build-module/comments-pagination-numbers/edit.js +0 -40
- package/build-module/comments-pagination-numbers/edit.js.map +0 -1
- package/build-module/comments-pagination-numbers/index.js +0 -34
- package/build-module/comments-pagination-numbers/index.js.map +0 -1
- package/build-module/embed/embed-controls.native.js +0 -54
- package/build-module/embed/embed-controls.native.js.map +0 -1
- package/build-module/embed/embed-link-settings.native.js +0 -90
- package/build-module/embed/embed-link-settings.native.js.map +0 -1
- package/build-module/gallery/use-mobile-warning.js +0 -32
- package/build-module/gallery/use-mobile-warning.js.map +0 -1
- package/build-style/comment-template/style-rtl.css +0 -91
- package/build-style/comment-template/style.css +0 -91
- package/build-style/comments-pagination/editor-rtl.css +0 -100
- package/build-style/comments-pagination/style.css +0 -106
- package/build-style/comments-pagination-numbers/editor-rtl.css +0 -85
- package/build-style/comments-pagination-numbers/editor.css +0 -86
- package/src/comment-template/style.scss +0 -17
- package/src/comment-template/test/index.js +0 -45
- package/src/comment-template/util.js +0 -56
- package/src/comments-pagination/block.json +0 -37
- package/src/comments-pagination/comments-pagination-arrow-controls.js +0 -44
- package/src/comments-pagination/edit.js +0 -78
- package/src/comments-pagination/editor.scss +0 -34
- package/src/comments-pagination/index.js +0 -20
- package/src/comments-pagination/index.php +0 -39
- package/src/comments-pagination/save.js +0 -8
- package/src/comments-pagination/style.scss +0 -38
- package/src/comments-pagination-numbers/block.json +0 -16
- package/src/comments-pagination-numbers/edit.js +0 -22
- package/src/comments-pagination-numbers/editor.scss +0 -12
- package/src/comments-pagination-numbers/index.js +0 -18
- package/src/comments-pagination-numbers/index.php +0 -69
- package/src/embed/embed-controls.native.js +0 -65
- package/src/embed/embed-link-settings.native.js +0 -100
- package/src/gallery/test/use-get-new-images.js +0 -93
- package/src/gallery/use-mobile-warning.js +0 -28
- package/src/navigation/README.md +0 -13
package/src/calendar/index.php
CHANGED
|
@@ -107,47 +107,51 @@ function block_core_calendar_update_has_published_posts() {
|
|
|
107
107
|
return $has_published_posts;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
110
|
+
/**
|
|
111
|
+
* Handler for updating the has published posts flag when a post is deleted.
|
|
112
|
+
*
|
|
113
|
+
* @param int $post_id Deleted post ID.
|
|
114
|
+
*/
|
|
115
|
+
function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
|
|
116
|
+
if ( is_multisite() ) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
$post = get_post( $post_id );
|
|
124
121
|
|
|
125
|
-
|
|
122
|
+
if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
|
|
123
|
+
return;
|
|
126
124
|
}
|
|
127
125
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
*
|
|
131
|
-
* @param string $new_status The status the post is changing to.
|
|
132
|
-
* @param string $old_status The status the post is changing from.
|
|
133
|
-
* @param WP_Post $post Post object.
|
|
134
|
-
*/
|
|
135
|
-
function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {
|
|
136
|
-
if ( $new_status === $old_status ) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
126
|
+
block_core_calendar_update_has_published_posts();
|
|
127
|
+
}
|
|
139
128
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
129
|
+
/**
|
|
130
|
+
* Handler for updating the has published posts flag when a post status changes.
|
|
131
|
+
*
|
|
132
|
+
* @param string $new_status The status the post is changing to.
|
|
133
|
+
* @param string $old_status The status the post is changing from.
|
|
134
|
+
* @param WP_Post $post Post object.
|
|
135
|
+
*/
|
|
136
|
+
function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {
|
|
137
|
+
if ( is_multisite() ) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
143
140
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
if ( $new_status === $old_status ) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
147
144
|
|
|
148
|
-
|
|
145
|
+
if ( 'post' !== get_post_type( $post ) ) {
|
|
146
|
+
return;
|
|
149
147
|
}
|
|
150
148
|
|
|
151
|
-
|
|
152
|
-
|
|
149
|
+
if ( 'publish' !== $new_status && 'publish' !== $old_status ) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
block_core_calendar_update_has_published_posts();
|
|
153
154
|
}
|
|
155
|
+
|
|
156
|
+
add_action( 'delete_post', 'block_core_calendar_update_has_published_post_on_delete' );
|
|
157
|
+
add_action( 'transition_post_status', 'block_core_calendar_update_has_published_post_on_transition_post_status', 10, 3 );
|
package/src/code/block.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
2
|
"apiVersion": 2,
|
|
4
3
|
"name": "core/code",
|
|
5
4
|
"title": "Code",
|
|
@@ -35,11 +34,7 @@
|
|
|
35
34
|
"radius": true,
|
|
36
35
|
"color": true,
|
|
37
36
|
"width": true,
|
|
38
|
-
"style": true
|
|
39
|
-
"__experimentalDefaultControls": {
|
|
40
|
-
"width": true,
|
|
41
|
-
"color": true
|
|
42
|
-
}
|
|
37
|
+
"style": true
|
|
43
38
|
},
|
|
44
39
|
"color": {
|
|
45
40
|
"text": true,
|
package/src/column/block.json
CHANGED
package/src/columns/block.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
2
|
"apiVersion": 2,
|
|
4
3
|
"name": "core/columns",
|
|
5
4
|
"title": "Columns",
|
|
@@ -24,11 +23,10 @@
|
|
|
24
23
|
"link": true
|
|
25
24
|
},
|
|
26
25
|
"spacing": {
|
|
27
|
-
"blockGap": true,
|
|
28
26
|
"margin": [ "top", "bottom" ],
|
|
29
27
|
"padding": true,
|
|
30
28
|
"__experimentalDefaultControls": {
|
|
31
|
-
"
|
|
29
|
+
"padding": true
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
},
|
package/src/columns/style.scss
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
flex-wrap: nowrap;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
&:where(.has-background) {
|
|
14
|
+
padding: $block-bg-padding--v $block-bg-padding--h;
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
/**
|
|
14
18
|
* All Columns Alignment
|
|
15
19
|
*/
|
|
@@ -81,8 +85,8 @@
|
|
|
81
85
|
> .wp-block-column {
|
|
82
86
|
// Available space should be divided equally amongst columns.
|
|
83
87
|
flex-basis: 0;
|
|
84
|
-
|
|
85
88
|
flex-grow: 1;
|
|
89
|
+
|
|
86
90
|
// Columns with an explicitly-assigned width should maintain their
|
|
87
91
|
// `flex-basis` width and not grow.
|
|
88
92
|
&[style*="flex-basis"] {
|
|
@@ -97,13 +101,6 @@
|
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
|
|
100
|
-
// Add low specificity default padding to columns blocks with backgrounds.
|
|
101
|
-
:where(.wp-block-columns.has-background) {
|
|
102
|
-
// Matches paragraph block padding.
|
|
103
|
-
padding: $block-bg-padding--v $block-bg-padding--h;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
104
|
.wp-block-column {
|
|
108
105
|
flex-grow: 1;
|
|
109
106
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
2
|
"apiVersion": 2,
|
|
4
3
|
"name": "core/comment-author-avatar",
|
|
5
4
|
"title": "Comment Author Avatar",
|
|
@@ -28,12 +27,8 @@
|
|
|
28
27
|
},
|
|
29
28
|
"color": {
|
|
30
29
|
"background": true,
|
|
31
|
-
"text": false
|
|
32
|
-
|
|
33
|
-
"spacing": {
|
|
34
|
-
"__experimentalSkipSerialization": true,
|
|
35
|
-
"margin": true,
|
|
36
|
-
"padding": true
|
|
30
|
+
"text": false,
|
|
31
|
+
"links": false
|
|
37
32
|
}
|
|
38
33
|
}
|
|
39
34
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
InspectorControls,
|
|
6
|
-
useBlockProps,
|
|
7
|
-
__experimentalGetSpacingClassesAndStyles as useSpacingProps,
|
|
8
|
-
} from '@wordpress/block-editor';
|
|
4
|
+
import { InspectorControls, useBlockProps } from '@wordpress/block-editor';
|
|
9
5
|
import { PanelBody, ResizableBox, RangeControl } from '@wordpress/components';
|
|
10
6
|
import { useEntityProp } from '@wordpress/core-data';
|
|
11
7
|
import { __, _x, isRTL } from '@wordpress/i18n';
|
|
@@ -35,7 +31,6 @@ export default function Edit( {
|
|
|
35
31
|
const minSize = sizes ? sizes[ 0 ] : 24;
|
|
36
32
|
const maxSize = sizes ? sizes[ sizes.length - 1 ] : 96;
|
|
37
33
|
const blockProps = useBlockProps();
|
|
38
|
-
const spacingProps = useSpacingProps( attributes );
|
|
39
34
|
const maxSizeBuffer = Math.floor( maxSize * 2.5 );
|
|
40
35
|
|
|
41
36
|
const inspectorControls = (
|
|
@@ -95,7 +90,7 @@ export default function Edit( {
|
|
|
95
90
|
return (
|
|
96
91
|
<>
|
|
97
92
|
{ inspectorControls }
|
|
98
|
-
<div
|
|
93
|
+
<div>{ displayAvatar }</div>
|
|
99
94
|
</>
|
|
100
95
|
);
|
|
101
96
|
}
|
|
@@ -25,31 +25,15 @@ function render_block_core_comment_author_avatar( $attributes, $content, $block
|
|
|
25
25
|
|
|
26
26
|
// This is the only way to retreive style and classes on different instances.
|
|
27
27
|
$wrapper_attributes = WP_Block_Supports::get_instance()->apply_block_supports();
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*/
|
|
33
|
-
$spacing_attributes = isset( $attributes['style']['spacing'] ) ? $attributes['style']['spacing'] : null;
|
|
34
|
-
if ( isset( $spacing_attributes ) && ! empty( $spacing_attributes ) ) {
|
|
35
|
-
$spacing_array = array();
|
|
36
|
-
foreach ( $spacing_attributes as $spacing_attribute_key => $spacing_attribute_value ) {
|
|
37
|
-
foreach ( $spacing_attribute_value as $position_key => $position_value ) {
|
|
38
|
-
$spacing_array[] = $spacing_attribute_key . '-' . $position_key . ': ' . $position_value;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
$spacing_string = implode( ';', $spacing_array );
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
$width = isset( $attributes['width'] ) ? $attributes['width'] : 96;
|
|
45
|
-
$height = isset( $attributes['height'] ) ? $attributes['height'] : 96;
|
|
46
|
-
$styles = isset( $wrapper_attributes['style'] ) ? $wrapper_attributes['style'] : '';
|
|
47
|
-
$classes = isset( $wrapper_attributes['class'] ) ? $wrapper_attributes['class'] : '';
|
|
28
|
+
$width = isset( $attributes['width'] ) ? $attributes['width'] : 96;
|
|
29
|
+
$height = isset( $attributes['height'] ) ? $attributes['height'] : 96;
|
|
30
|
+
$styles = isset( $wrapper_attributes['style'] ) ? $wrapper_attributes['style'] : '';
|
|
31
|
+
$classes = isset( $wrapper_attributes['class'] ) ? $wrapper_attributes['class'] : '';
|
|
48
32
|
|
|
49
33
|
/* translators: %s is the Comment Author name */
|
|
50
34
|
$alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
|
|
51
35
|
|
|
52
|
-
$
|
|
36
|
+
$avatar_string = get_avatar(
|
|
53
37
|
$comment,
|
|
54
38
|
null,
|
|
55
39
|
'',
|
|
@@ -61,10 +45,7 @@ function render_block_core_comment_author_avatar( $attributes, $content, $block
|
|
|
61
45
|
'class' => $classes,
|
|
62
46
|
)
|
|
63
47
|
);
|
|
64
|
-
|
|
65
|
-
return sprintf( '<div style="%1s">%2s</div>', esc_attr( $spacing_string ), $avatar_block );
|
|
66
|
-
}
|
|
67
|
-
return sprintf( '<div>%1s</div>', $avatar_block );
|
|
48
|
+
return $avatar_string;
|
|
68
49
|
}
|
|
69
50
|
|
|
70
51
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
2
|
"apiVersion": 2,
|
|
4
3
|
"name": "core/comment-template",
|
|
5
4
|
"title": "Comment Template",
|
|
@@ -7,11 +6,10 @@
|
|
|
7
6
|
"parent": [ "core/comments-query-loop" ],
|
|
8
7
|
"description": "Contains the block elements used to render a comment, like the title, date, author, avatar and more.",
|
|
9
8
|
"textdomain": "default",
|
|
10
|
-
"usesContext": [ "
|
|
9
|
+
"usesContext": [ "queryId", "queryPerPage", "postId" ],
|
|
11
10
|
"supports": {
|
|
12
11
|
"reusable": false,
|
|
13
12
|
"html": false,
|
|
14
13
|
"align": true
|
|
15
|
-
}
|
|
16
|
-
"style": "wp-block-comment-template"
|
|
14
|
+
}
|
|
17
15
|
}
|
|
@@ -14,11 +14,6 @@ import {
|
|
|
14
14
|
import { Spinner } from '@wordpress/components';
|
|
15
15
|
import { store as coreStore } from '@wordpress/core-data';
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
|
-
import { convertToTree } from './util';
|
|
21
|
-
|
|
22
17
|
const TEMPLATE = [
|
|
23
18
|
[ 'core/comment-author-avatar' ],
|
|
24
19
|
[ 'core/comment-author-name' ],
|
|
@@ -28,129 +23,43 @@ const TEMPLATE = [
|
|
|
28
23
|
[ 'core/comment-edit-link' ],
|
|
29
24
|
];
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* @param {Object} props Component props.
|
|
35
|
-
* @param {Array} [props.comment] - A comment object.
|
|
36
|
-
* @param {Array} [props.activeComment] - The block that is currently active.
|
|
37
|
-
* @param {Array} [props.setActiveComment] - The setter for activeComment.
|
|
38
|
-
* @param {Array} [props.firstBlock] - First comment in the array.
|
|
39
|
-
* @param {Array} [props.blocks] - Array of blocks returned from
|
|
40
|
-
* getBlocks() in parent .
|
|
41
|
-
* @return {WPElement} Inner blocks of the Comment Template
|
|
42
|
-
*/
|
|
43
|
-
function CommentTemplateInnerBlocks( {
|
|
44
|
-
comment,
|
|
45
|
-
activeComment,
|
|
46
|
-
setActiveComment,
|
|
47
|
-
firstBlock,
|
|
48
|
-
blocks,
|
|
49
|
-
} ) {
|
|
50
|
-
const { children, ...innerBlocksProps } = useInnerBlocksProps(
|
|
51
|
-
{},
|
|
52
|
-
{ template: TEMPLATE }
|
|
53
|
-
);
|
|
54
|
-
return (
|
|
55
|
-
<li { ...innerBlocksProps }>
|
|
56
|
-
{ comment === ( activeComment || firstBlock ) ? (
|
|
57
|
-
children
|
|
58
|
-
) : (
|
|
59
|
-
<BlockPreview
|
|
60
|
-
blocks={ blocks }
|
|
61
|
-
__experimentalLive
|
|
62
|
-
__experimentalOnClick={ () => setActiveComment( comment ) }
|
|
63
|
-
/>
|
|
64
|
-
) }
|
|
65
|
-
{ comment?.children?.length > 0 ? (
|
|
66
|
-
<CommentsList
|
|
67
|
-
comments={ comment.children }
|
|
68
|
-
activeComment={ activeComment }
|
|
69
|
-
setActiveComment={ setActiveComment }
|
|
70
|
-
blocks={ blocks }
|
|
71
|
-
/>
|
|
72
|
-
) : null }
|
|
73
|
-
</li>
|
|
74
|
-
);
|
|
26
|
+
function CommentTemplateInnerBlocks() {
|
|
27
|
+
const innerBlocksProps = useInnerBlocksProps( {}, { template: TEMPLATE } );
|
|
28
|
+
return <li { ...innerBlocksProps } />;
|
|
75
29
|
}
|
|
76
30
|
|
|
77
|
-
/**
|
|
78
|
-
* Component that renders a list of (nested) comments. It is called recursively.
|
|
79
|
-
*
|
|
80
|
-
* @param {Object} props Component props.
|
|
81
|
-
* @param {Array} [props.comments] - Array of comment objects.
|
|
82
|
-
* @param {Array} [props.blockProps] - Props from parent's `useBlockProps()`.
|
|
83
|
-
* @param {Array} [props.activeComment] - The block that is currently active.
|
|
84
|
-
* @param {Array} [props.setActiveComment] - The setter for activeComment.
|
|
85
|
-
* @param {Array} [props.blocks] - Array of blocks returned from
|
|
86
|
-
* getBlocks() in parent .
|
|
87
|
-
* @return {WPElement} List of comments.
|
|
88
|
-
*/
|
|
89
|
-
const CommentsList = ( {
|
|
90
|
-
comments,
|
|
91
|
-
blockProps,
|
|
92
|
-
activeComment,
|
|
93
|
-
setActiveComment,
|
|
94
|
-
blocks,
|
|
95
|
-
} ) => (
|
|
96
|
-
<ol { ...blockProps }>
|
|
97
|
-
{ comments &&
|
|
98
|
-
comments.map( ( comment ) => (
|
|
99
|
-
<BlockContextProvider
|
|
100
|
-
key={ comment.commentId }
|
|
101
|
-
value={ comment }
|
|
102
|
-
>
|
|
103
|
-
<CommentTemplateInnerBlocks
|
|
104
|
-
comment={ comment }
|
|
105
|
-
activeComment={ activeComment }
|
|
106
|
-
setActiveComment={ setActiveComment }
|
|
107
|
-
blocks={ blocks }
|
|
108
|
-
firstBlock={ comments[ 0 ] }
|
|
109
|
-
/>
|
|
110
|
-
</BlockContextProvider>
|
|
111
|
-
) ) }
|
|
112
|
-
</ol>
|
|
113
|
-
);
|
|
114
|
-
|
|
115
31
|
export default function CommentTemplateEdit( {
|
|
116
32
|
clientId,
|
|
117
|
-
context: { postId,
|
|
33
|
+
context: { postId, queryPerPage },
|
|
118
34
|
} ) {
|
|
119
35
|
const blockProps = useBlockProps();
|
|
120
36
|
|
|
121
|
-
const [
|
|
37
|
+
const [ activeBlockContext, setActiveBlockContext ] = useState();
|
|
122
38
|
|
|
123
|
-
const {
|
|
39
|
+
const { comments, blocks } = useSelect(
|
|
124
40
|
( select ) => {
|
|
125
41
|
const { getEntityRecords } = select( coreStore );
|
|
126
42
|
const { getBlocks } = select( blockEditorStore );
|
|
127
43
|
|
|
128
44
|
return {
|
|
129
|
-
|
|
45
|
+
comments: getEntityRecords( 'root', 'comment', {
|
|
130
46
|
post: postId,
|
|
131
47
|
status: 'approve',
|
|
48
|
+
per_page: queryPerPage,
|
|
132
49
|
order: 'asc',
|
|
133
|
-
context: 'embed',
|
|
134
50
|
} ),
|
|
135
51
|
blocks: getBlocks( clientId ),
|
|
136
52
|
};
|
|
137
53
|
},
|
|
138
|
-
[ postId, clientId ]
|
|
54
|
+
[ queryPerPage, postId, clientId ]
|
|
139
55
|
);
|
|
140
56
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
// We convert the flat list of comments to tree.
|
|
145
|
-
// Then, we show only a maximum of `perPage` number of comments.
|
|
146
|
-
// This is because passing `per_page` to `getEntityRecords()` does not
|
|
147
|
-
// take into account nested comments.
|
|
148
|
-
const comments = useMemo(
|
|
149
|
-
() => convertToTree( rawComments ).slice( 0, perPage ),
|
|
150
|
-
[ rawComments, perPage ]
|
|
57
|
+
const blockContexts = useMemo(
|
|
58
|
+
() => comments?.map( ( comment ) => ( { commentId: comment.id } ) ),
|
|
59
|
+
[ comments ]
|
|
151
60
|
);
|
|
152
61
|
|
|
153
|
-
if ( !
|
|
62
|
+
if ( ! comments ) {
|
|
154
63
|
return (
|
|
155
64
|
<p { ...blockProps }>
|
|
156
65
|
<Spinner />
|
|
@@ -163,12 +72,29 @@ export default function CommentTemplateEdit( {
|
|
|
163
72
|
}
|
|
164
73
|
|
|
165
74
|
return (
|
|
166
|
-
<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
75
|
+
<ul { ...blockProps }>
|
|
76
|
+
{ blockContexts &&
|
|
77
|
+
blockContexts.map( ( blockContext ) => (
|
|
78
|
+
<BlockContextProvider
|
|
79
|
+
key={ blockContext.commentId }
|
|
80
|
+
value={ blockContext }
|
|
81
|
+
>
|
|
82
|
+
{ blockContext ===
|
|
83
|
+
( activeBlockContext || blockContexts[ 0 ] ) ? (
|
|
84
|
+
<CommentTemplateInnerBlocks />
|
|
85
|
+
) : (
|
|
86
|
+
<li>
|
|
87
|
+
<BlockPreview
|
|
88
|
+
blocks={ blocks }
|
|
89
|
+
__experimentalLive
|
|
90
|
+
__experimentalOnClick={ () =>
|
|
91
|
+
setActiveBlockContext( blockContext )
|
|
92
|
+
}
|
|
93
|
+
/>
|
|
94
|
+
</li>
|
|
95
|
+
) }
|
|
96
|
+
</BlockContextProvider>
|
|
97
|
+
) ) }
|
|
98
|
+
</ul>
|
|
173
99
|
);
|
|
174
100
|
}
|
|
@@ -5,43 +5,6 @@
|
|
|
5
5
|
* @package WordPress
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Function that recursively renders a list of nested comments.
|
|
10
|
-
*
|
|
11
|
-
* @param WP_Comment[] $comments The array of comments.
|
|
12
|
-
* @param WP_Block $block Block instance.
|
|
13
|
-
* @return string
|
|
14
|
-
*/
|
|
15
|
-
function block_core_comment_template_render_comments( $comments, $block ) {
|
|
16
|
-
$content = '';
|
|
17
|
-
foreach ( $comments as $comment ) {
|
|
18
|
-
|
|
19
|
-
$block_content = ( new WP_Block(
|
|
20
|
-
$block->parsed_block,
|
|
21
|
-
array(
|
|
22
|
-
'commentId' => $comment->comment_ID,
|
|
23
|
-
)
|
|
24
|
-
) )->render( array( 'dynamic' => false ) );
|
|
25
|
-
|
|
26
|
-
$children = $comment->get_children();
|
|
27
|
-
|
|
28
|
-
// If the comment has children, recurse to create the HTML for the nested
|
|
29
|
-
// comments.
|
|
30
|
-
if ( ! empty( $children ) ) {
|
|
31
|
-
$inner_content = block_core_comment_template_render_comments(
|
|
32
|
-
$children,
|
|
33
|
-
$block
|
|
34
|
-
);
|
|
35
|
-
$block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
$content .= '<li>' . $block_content . '</li>';
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return $content;
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
8
|
/**
|
|
46
9
|
* Renders the `core/comment-template` block on the server.
|
|
47
10
|
*
|
|
@@ -53,27 +16,37 @@ function block_core_comment_template_render_comments( $comments, $block ) {
|
|
|
53
16
|
* defined by the block's inner blocks.
|
|
54
17
|
*/
|
|
55
18
|
function render_block_core_comment_template( $attributes, $content, $block ) {
|
|
19
|
+
|
|
20
|
+
$post_id = $block->context['postId'];
|
|
21
|
+
|
|
56
22
|
// Bail out early if the post ID is not set for some reason.
|
|
57
|
-
if (
|
|
23
|
+
if ( ! isset( $post_id ) ) {
|
|
58
24
|
return '';
|
|
59
25
|
}
|
|
60
26
|
|
|
61
|
-
$
|
|
62
|
-
build_comment_query_vars_from_block( $block )
|
|
63
|
-
);
|
|
27
|
+
$number = $block->context['queryPerPage'];
|
|
64
28
|
|
|
65
29
|
// Get an array of comments for the current post.
|
|
66
|
-
$comments = $
|
|
30
|
+
$comments = get_approved_comments( $post_id, array( 'number' => $number ) );
|
|
31
|
+
|
|
67
32
|
if ( count( $comments ) === 0 ) {
|
|
68
33
|
return '';
|
|
69
34
|
}
|
|
70
35
|
|
|
71
|
-
$
|
|
36
|
+
$content = '';
|
|
37
|
+
foreach ( $comments as $comment ) {
|
|
38
|
+
$block_content = ( new WP_Block(
|
|
39
|
+
$block->parsed_block,
|
|
40
|
+
array(
|
|
41
|
+
'commentId' => $comment->comment_ID,
|
|
42
|
+
)
|
|
43
|
+
) )->render( array( 'dynamic' => false ) );
|
|
44
|
+
$content .= '<li>' . $block_content . '</li>';
|
|
45
|
+
}
|
|
72
46
|
|
|
73
47
|
return sprintf(
|
|
74
|
-
'<
|
|
75
|
-
$
|
|
76
|
-
block_core_comment_template_render_comments( $comments, $block )
|
|
48
|
+
'<ul>%1$s</ul>',
|
|
49
|
+
$content
|
|
77
50
|
);
|
|
78
51
|
}
|
|
79
52
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
2
|
"apiVersion": 2,
|
|
4
3
|
"name": "core/comments-query-loop",
|
|
5
4
|
"title": "Comments Query Loop",
|
|
@@ -7,9 +6,12 @@
|
|
|
7
6
|
"description": "An advanced block that allows displaying post comments based on different query parameters and visual configurations.",
|
|
8
7
|
"textdomain": "default",
|
|
9
8
|
"attributes": {
|
|
10
|
-
"
|
|
9
|
+
"queryId": {
|
|
10
|
+
"type": "number"
|
|
11
|
+
},
|
|
12
|
+
"queryPerPage": {
|
|
11
13
|
"type": "number",
|
|
12
|
-
"default":
|
|
14
|
+
"default": 4
|
|
13
15
|
},
|
|
14
16
|
"tagName": {
|
|
15
17
|
"type": "string",
|
|
@@ -17,7 +19,8 @@
|
|
|
17
19
|
}
|
|
18
20
|
},
|
|
19
21
|
"providesContext": {
|
|
20
|
-
"
|
|
22
|
+
"queryId": "queryId",
|
|
23
|
+
"queryPerPage": "queryPerPage"
|
|
21
24
|
},
|
|
22
25
|
"supports": {
|
|
23
26
|
"align": [ "wide", "full" ],
|
|
@@ -18,7 +18,7 @@ import QueryToolbar from './toolbar';
|
|
|
18
18
|
const TEMPLATE = [ [ 'core/comment-template' ] ];
|
|
19
19
|
|
|
20
20
|
export default function CommentsQueryLoopEdit( { attributes, setAttributes } ) {
|
|
21
|
-
const {
|
|
21
|
+
const { queryPerPage, tagName: TagName } = attributes;
|
|
22
22
|
|
|
23
23
|
const blockProps = useBlockProps();
|
|
24
24
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
@@ -28,7 +28,10 @@ export default function CommentsQueryLoopEdit( { attributes, setAttributes } ) {
|
|
|
28
28
|
return (
|
|
29
29
|
<>
|
|
30
30
|
<BlockControls>
|
|
31
|
-
<QueryToolbar
|
|
31
|
+
<QueryToolbar
|
|
32
|
+
queryPerPage={ queryPerPage }
|
|
33
|
+
setQuery={ setAttributes }
|
|
34
|
+
/>
|
|
32
35
|
</BlockControls>
|
|
33
36
|
<InspectorControls __experimentalGroup="advanced">
|
|
34
37
|
<SelectControl
|