@wordpress/block-library 8.29.0 → 8.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/audio/edit.js +7 -17
- package/build/audio/edit.js.map +1 -1
- package/build/audio/edit.native.js.map +1 -1
- package/build/avatar/edit.js.map +1 -1
- package/build/block/deprecated.js +71 -11
- package/build/block/deprecated.js.map +1 -1
- package/build/block/edit.js +65 -31
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +2 -2
- package/build/button/edit.js.map +1 -1
- package/build/buttons/edit.native.js.map +1 -1
- package/build/buttons/transforms.js +16 -2
- package/build/buttons/transforms.js.map +1 -1
- package/build/code/save.js +3 -1
- package/build/code/save.js.map +1 -1
- package/build/code/transforms.js +17 -6
- package/build/code/transforms.js.map +1 -1
- package/build/columns/edit.js +3 -2
- package/build/columns/edit.js.map +1 -1
- package/build/comment-author-avatar/edit.js +1 -1
- package/build/comment-author-avatar/edit.js.map +1 -1
- package/build/cover/edit/block-controls.js +14 -3
- package/build/cover/edit/block-controls.js.map +1 -1
- package/build/cover/edit/index.js +2 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/cover/edit/resizable-cover-popover.js +0 -6
- package/build/cover/edit/resizable-cover-popover.js.map +1 -1
- package/build/cover/edit.native.js.map +1 -1
- package/build/details/edit.js +1 -0
- package/build/details/edit.js.map +1 -1
- package/build/file/deprecated.js.map +1 -1
- package/build/file/edit.js +8 -13
- package/build/file/edit.js.map +1 -1
- package/build/file/edit.native.js.map +1 -1
- package/build/file/save.js.map +1 -1
- package/build/form-input/edit.js +1 -1
- package/build/form-input/edit.js.map +1 -1
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/v1/edit.js.map +1 -1
- package/build/gallery/v1/gallery.native.js.map +1 -1
- package/build/heading/index.js +4 -3
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +17 -4
- package/build/heading/transforms.js.map +1 -1
- package/build/image/edit.js +8 -4
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +22 -8
- package/build/image/image.js.map +1 -1
- package/build/latest-posts/edit.native.js.map +1 -1
- package/build/list/ordered-list-settings.js +1 -1
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/list-item/edit.js +1 -3
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/edit.native.js.map +1 -1
- package/build/list-item/hooks/index.js +0 -7
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/hooks/use-indent-list-item.js +1 -0
- package/build/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-outdent-list-item.js +1 -0
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/hooks/use-space.js +16 -7
- package/build/list-item/hooks/use-space.js.map +1 -1
- package/build/list-item/index.js +4 -1
- package/build/list-item/index.js.map +1 -1
- package/build/media-text/edit.js +33 -9
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/index.js +5 -0
- package/build/media-text/index.js.map +1 -1
- package/build/media-text/media-container.js +30 -11
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/media-container.native.js +1 -1
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/media-text/save.js +2 -2
- package/build/media-text/save.js.map +1 -1
- package/build/navigation/edit/index.js +23 -29
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +12 -20
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +24 -23
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +4 -4
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +15 -12
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation-link/edit.js +12 -10
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/navigation-submenu/edit.js +4 -0
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/paragraph/edit.native.js.map +1 -1
- package/build/pattern/edit.js +11 -0
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +1 -0
- package/build/post-author/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +12 -12
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +6 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +1 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/edit.js +2 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-title/edit.js +2 -2
- package/build/post-title/edit.js.map +1 -1
- package/build/query/edit/pattern-selection-modal.js.map +1 -1
- package/build/query/utils.js +7 -5
- package/build/query/utils.js.map +1 -1
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/quote/deprecated.js +111 -12
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +7 -7
- package/build/quote/edit.js.map +1 -1
- package/build/quote/index.js +1 -1
- package/build/quote/index.js.map +1 -1
- package/build/quote/save.js +2 -2
- package/build/quote/save.js.map +1 -1
- package/build/read-more/edit.js +1 -0
- package/build/read-more/edit.js.map +1 -1
- package/build/search/edit.js +3 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/site-logo/edit.js +7 -2
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-title/{edit/index.js → edit.js} +1 -1
- package/build/site-title/edit.js.map +1 -0
- package/build/social-link/edit.js +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/icons/medium.js +1 -1
- package/build/social-link/icons/medium.js.map +1 -1
- package/build/social-link/icons/reddit.js +1 -1
- package/build/social-link/icons/reddit.js.map +1 -1
- package/build/social-links/edit.native.js.map +1 -1
- package/build/spacer/edit.js.map +1 -1
- package/build/table/deprecated.js +285 -175
- package/build/table/deprecated.js.map +1 -1
- package/build/table/index.js +1 -1
- package/build/table-of-contents/edit.js.map +1 -1
- package/build/template-part/edit/index.js +53 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +2 -8
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/map-template-part-to-block-pattern.js +30 -0
- package/build/template-part/edit/utils/map-template-part-to-block-pattern.js.map +1 -0
- package/build/utils/caption.js +15 -5
- package/build/utils/caption.js.map +1 -1
- package/build/utils/get-transformed-metadata.js +57 -0
- package/build/utils/get-transformed-metadata.js.map +1 -0
- package/build/utils/hooks.js +55 -4
- package/build/utils/hooks.js.map +1 -1
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +7 -16
- package/build/video/edit.js.map +1 -1
- package/build/video/edit.native.js +3 -8
- package/build/video/edit.native.js.map +1 -1
- package/build-module/audio/edit.js +10 -20
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/avatar/edit.js.map +1 -1
- package/build-module/block/deprecated.js +71 -11
- package/build-module/block/deprecated.js.map +1 -1
- package/build-module/block/edit.js +66 -32
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +3 -3
- package/build-module/button/edit.js.map +1 -1
- package/build-module/buttons/edit.native.js.map +1 -1
- package/build-module/buttons/transforms.js +16 -2
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/code/save.js +3 -1
- package/build-module/code/save.js.map +1 -1
- package/build-module/code/transforms.js +17 -6
- package/build-module/code/transforms.js.map +1 -1
- package/build-module/columns/edit.js +3 -2
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/comment-author-avatar/edit.js +1 -1
- package/build-module/comment-author-avatar/edit.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +15 -4
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/cover/edit/index.js +2 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/cover/edit/resizable-cover-popover.js +1 -7
- package/build-module/cover/edit/resizable-cover-popover.js.map +1 -1
- package/build-module/cover/edit.native.js.map +1 -1
- package/build-module/details/edit.js +1 -0
- package/build-module/details/edit.js.map +1 -1
- package/build-module/file/deprecated.js.map +1 -1
- package/build-module/file/edit.js +9 -14
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/edit.native.js.map +1 -1
- package/build-module/file/save.js.map +1 -1
- package/build-module/form-input/edit.js +1 -1
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/v1/edit.js.map +1 -1
- package/build-module/gallery/v1/gallery.native.js.map +1 -1
- package/build-module/heading/index.js +4 -3
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +17 -4
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/image/edit.js +9 -5
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +23 -9
- package/build-module/image/image.js.map +1 -1
- package/build-module/latest-posts/edit.native.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +1 -1
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/list-item/edit.js +2 -4
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/edit.native.js.map +1 -1
- package/build-module/list-item/hooks/index.js +0 -1
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/hooks/use-indent-list-item.js +1 -0
- package/build-module/list-item/hooks/use-indent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-outdent-list-item.js +1 -0
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/hooks/use-space.js +17 -8
- package/build-module/list-item/hooks/use-space.js.map +1 -1
- package/build-module/list-item/index.js +4 -1
- package/build-module/list-item/index.js.map +1 -1
- package/build-module/media-text/edit.js +34 -10
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/index.js +5 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/media-text/media-container.js +31 -12
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/media-container.native.js +1 -1
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/media-text/save.js +2 -2
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/navigation/edit/index.js +24 -30
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +15 -23
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +24 -23
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +4 -4
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +15 -12
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation-link/edit.js +13 -11
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +4 -0
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/paragraph/edit.native.js.map +1 -1
- package/build-module/pattern/edit.js +11 -0
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +1 -0
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +13 -13
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +6 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +2 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-title/edit.js +2 -2
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
- package/build-module/query/utils.js +7 -5
- package/build-module/query/utils.js.map +1 -1
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/quote/deprecated.js +112 -13
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +7 -7
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/index.js +1 -1
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/save.js +2 -2
- package/build-module/quote/save.js.map +1 -1
- package/build-module/read-more/edit.js +1 -0
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/search/edit.js +3 -1
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/site-logo/edit.js +7 -2
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-title/{edit/index.js → edit.js} +1 -1
- package/build-module/site-title/edit.js.map +1 -0
- package/build-module/social-link/edit.js +1 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/icons/medium.js +1 -1
- package/build-module/social-link/icons/medium.js.map +1 -1
- package/build-module/social-link/icons/reddit.js +1 -1
- package/build-module/social-link/icons/reddit.js.map +1 -1
- package/build-module/social-links/edit.native.js.map +1 -1
- package/build-module/spacer/edit.js.map +1 -1
- package/build-module/table/deprecated.js +286 -176
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/index.js +1 -1
- package/build-module/table-of-contents/edit.js.map +1 -1
- package/build-module/template-part/edit/index.js +57 -5
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +2 -8
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/map-template-part-to-block-pattern.js +24 -0
- package/build-module/template-part/edit/utils/map-template-part-to-block-pattern.js.map +1 -0
- package/build-module/utils/caption.js +13 -3
- package/build-module/utils/caption.js.map +1 -1
- package/build-module/utils/get-transformed-metadata.js +51 -0
- package/build-module/utils/get-transformed-metadata.js.map +1 -0
- package/build-module/utils/hooks.js +54 -3
- package/build-module/utils/hooks.js.map +1 -1
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +10 -19
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/edit.native.js +3 -8
- package/build-module/video/edit.native.js.map +1 -1
- package/build-style/common-rtl.css +1 -0
- package/build-style/common.css +1 -0
- package/build-style/cover/style-rtl.css +2 -1
- package/build-style/cover/style.css +2 -1
- package/build-style/editor-rtl.css +11 -2
- package/build-style/editor.css +11 -2
- package/build-style/file/editor-rtl.css +3 -0
- package/build-style/file/editor.css +3 -0
- package/build-style/group/editor-rtl.css +1 -1
- package/build-style/group/editor.css +1 -1
- package/build-style/media-text/editor-rtl.css +7 -1
- package/build-style/media-text/editor.css +7 -1
- package/build-style/search/style-rtl.css +2 -0
- package/build-style/search/style.css +2 -0
- 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 +6 -3
- package/build-style/style.css +6 -3
- package/package.json +34 -34
- package/src/archives/index.php +4 -0
- package/src/audio/edit.js +9 -19
- package/src/audio/edit.native.js +3 -3
- package/src/avatar/edit.js +1 -1
- package/src/avatar/index.php +6 -0
- package/src/block/deprecated.js +76 -11
- package/src/block/edit.js +100 -32
- package/src/block/index.php +27 -12
- package/src/block/test/edit.native.js +67 -0
- package/src/button/edit.js +4 -3
- package/src/buttons/edit.native.js +1 -1
- package/src/buttons/transforms.js +14 -4
- package/src/calendar/index.php +17 -0
- package/src/categories/index.php +6 -0
- package/src/code/save.js +7 -1
- package/src/code/transforms.js +20 -5
- package/src/columns/edit.js +3 -2
- package/src/comment-author-avatar/edit.js +1 -1
- package/src/comment-author-name/index.php +4 -0
- package/src/comment-content/index.php +4 -0
- package/src/comment-date/index.php +4 -0
- package/src/comment-edit-link/index.php +4 -0
- package/src/comment-reply-link/index.php +4 -0
- package/src/comment-template/index.php +4 -0
- package/src/comments/index.php +12 -0
- package/src/comments-pagination/index.php +4 -0
- package/src/comments-pagination-next/index.php +4 -0
- package/src/comments-pagination-numbers/index.php +4 -0
- package/src/comments-pagination-previous/index.php +4 -0
- package/src/comments-title/index.php +4 -0
- package/src/cover/edit/block-controls.js +16 -2
- package/src/cover/edit/index.js +6 -3
- package/src/cover/edit/inspector-controls.js +1 -1
- package/src/cover/edit/resizable-cover-popover.js +1 -6
- package/src/cover/edit.native.js +1 -1
- package/src/cover/index.php +4 -0
- package/src/cover/style.scss +3 -2
- package/src/details/edit.js +1 -0
- package/src/file/deprecated.js +3 -3
- package/src/file/edit.js +10 -15
- package/src/file/edit.native.js +4 -4
- package/src/file/editor.scss +3 -0
- package/src/file/index.php +4 -0
- package/src/file/save.js +1 -1
- package/src/footnotes/index.php +1 -1
- package/src/form-input/edit.js +1 -1
- package/src/gallery/edit.js +3 -3
- package/src/gallery/gallery.native.js +1 -1
- package/src/gallery/index.php +6 -0
- package/src/gallery/test/index.native.js +1 -1
- package/src/gallery/v1/edit.js +2 -2
- package/src/gallery/v1/gallery.native.js +1 -1
- package/src/group/editor.scss +1 -1
- package/src/heading/index.js +4 -3
- package/src/heading/index.php +4 -0
- package/src/heading/transforms.js +27 -8
- package/src/home-link/index.php +10 -0
- package/src/image/edit.js +13 -5
- package/src/image/edit.native.js +1 -1
- package/src/image/editor.scss +1 -0
- package/src/image/image.js +34 -22
- package/src/image/index.php +12 -1
- package/src/latest-comments/index.php +4 -0
- package/src/latest-posts/edit.native.js +1 -1
- package/src/latest-posts/index.php +8 -0
- package/src/list/ordered-list-settings.js +1 -1
- package/src/list-item/edit.js +1 -2
- package/src/list-item/edit.native.js +1 -1
- package/src/list-item/hooks/index.js +0 -1
- package/src/list-item/hooks/use-indent-list-item.js +2 -0
- package/src/list-item/hooks/use-outdent-list-item.js +2 -0
- package/src/list-item/hooks/use-space.js +16 -9
- package/src/list-item/index.js +3 -0
- package/src/loginout/index.php +4 -0
- package/src/media-text/block.json +5 -0
- package/src/media-text/edit.js +70 -19
- package/src/media-text/editor.scss +7 -1
- package/src/media-text/index.php +70 -0
- package/src/media-text/media-container.js +49 -9
- package/src/media-text/media-container.native.js +5 -3
- package/src/media-text/save.js +2 -2
- package/src/media-text/test/edit.native.js +58 -0
- package/src/missing/test/edit-integration.native.js +2 -1
- package/src/navigation/edit/index.js +68 -72
- package/src/navigation/edit/navigation-menu-delete-control.js +22 -49
- package/src/navigation/edit/navigation-menu-selector.js +39 -21
- package/src/navigation/edit/placeholder/index.js +4 -4
- package/src/navigation/edit/test/navigation-menu-selector.js +77 -55
- package/src/navigation/index.php +118 -34
- package/src/navigation/test/use-navigation-menu.js +21 -21
- package/src/navigation/use-navigation-menu.js +23 -9
- package/src/navigation-link/edit.js +12 -13
- package/src/navigation-link/index.php +14 -0
- package/src/navigation-link/link-ui.js +2 -2
- package/src/navigation-submenu/edit.js +4 -0
- package/src/navigation-submenu/index.php +8 -0
- package/src/page-list/index.php +12 -0
- package/src/page-list-item/index.php +2 -0
- package/src/paragraph/edit.native.js +1 -1
- package/src/paragraph/test/edit.native.js +36 -0
- package/src/pattern/edit.js +14 -0
- package/src/pattern/index.php +2 -0
- package/src/post-author/edit.js +1 -0
- package/src/post-author/index.php +4 -0
- package/src/post-author-biography/index.php +4 -0
- package/src/post-author-name/index.php +4 -0
- package/src/post-comments-form/index.php +6 -0
- package/src/post-content/index.php +4 -0
- package/src/post-date/index.php +4 -0
- package/src/post-excerpt/edit.js +2 -1
- package/src/post-excerpt/index.php +4 -0
- package/src/post-featured-image/block.json +6 -0
- package/src/post-featured-image/dimension-controls.js +4 -4
- package/src/post-featured-image/edit.js +14 -12
- package/src/post-featured-image/index.php +15 -0
- package/src/post-navigation-link/edit.js +2 -1
- package/src/post-navigation-link/index.php +4 -0
- package/src/post-template/index.php +6 -0
- package/src/post-terms/edit.js +2 -0
- package/src/post-terms/index.php +6 -0
- package/src/post-title/edit.js +49 -43
- package/src/post-title/index.php +2 -0
- package/src/query/edit/pattern-selection-modal.js +1 -1
- package/src/query/index.php +2 -0
- package/src/query/utils.js +6 -4
- package/src/query-no-results/index.php +4 -0
- package/src/query-pagination/index.php +4 -0
- package/src/query-pagination-next/edit.js +1 -1
- package/src/query-pagination-next/index.php +4 -0
- package/src/query-pagination-numbers/index.php +4 -0
- package/src/query-pagination-previous/edit.js +1 -1
- package/src/query-pagination-previous/index.php +4 -0
- package/src/query-title/index.php +4 -0
- package/src/quote/block.json +1 -1
- package/src/quote/deprecated.js +110 -15
- package/src/quote/edit.js +16 -10
- package/src/quote/save.js +2 -2
- package/src/quote/test/__snapshots__/transforms.native.js.snap +2 -2
- package/src/read-more/edit.js +2 -1
- package/src/read-more/index.php +4 -0
- package/src/rss/index.php +4 -0
- package/src/search/edit.js +3 -1
- package/src/search/edit.native.js +6 -6
- package/src/search/index.php +20 -2
- package/src/search/style.scss +2 -0
- package/src/shortcode/index.php +4 -0
- package/src/site-logo/edit.js +11 -6
- package/src/site-logo/index.php +20 -0
- package/src/site-tagline/index.php +4 -0
- package/src/site-title/index.php +4 -0
- package/src/social-link/edit.js +2 -2
- package/src/social-link/icons/medium.js +1 -1
- package/src/social-link/icons/reddit.js +1 -1
- package/src/social-link/index.php +22 -9
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/edit.native.js +1 -1
- package/src/spacer/edit.js +1 -1
- package/src/table/block.json +1 -1
- package/src/table/deprecated.js +308 -175
- package/src/table-of-contents/edit.js +1 -1
- package/src/tag-cloud/index.php +4 -0
- package/src/template-part/edit/index.js +91 -4
- package/src/template-part/edit/selection-modal.js +4 -8
- package/src/template-part/edit/utils/map-template-part-to-block-pattern.js +23 -0
- package/src/template-part/index.php +10 -0
- package/src/term-description/index.php +4 -0
- package/src/utils/caption.js +10 -1
- package/src/utils/get-transformed-metadata.js +65 -0
- package/src/utils/hooks.js +53 -3
- package/src/video/edit-common-settings.js +1 -1
- package/src/video/edit.js +10 -18
- package/src/video/edit.native.js +7 -8
- package/src/video/test/edit.native.js +0 -14
- package/tsconfig.json +1 -0
- package/build/list-item/hooks/use-copy.js +0 -39
- package/build/list-item/hooks/use-copy.js.map +0 -1
- package/build/site-title/edit/index.js.map +0 -1
- package/build-module/list-item/hooks/use-copy.js +0 -32
- package/build-module/list-item/hooks/use-copy.js.map +0 -1
- package/build-module/site-title/edit/index.js.map +0 -1
- package/src/list-item/hooks/use-copy.js +0 -38
- /package/src/site-title/{edit/index.js → edit.js} +0 -0
package/src/post-excerpt/edit.js
CHANGED
|
@@ -127,6 +127,7 @@ export default function PostExcerptEditor( {
|
|
|
127
127
|
}
|
|
128
128
|
const readMoreLink = (
|
|
129
129
|
<RichText
|
|
130
|
+
identifier="moreText"
|
|
130
131
|
className="wp-block-post-excerpt__more-link"
|
|
131
132
|
tagName="a"
|
|
132
133
|
aria-label={ __( '“Read more” link text' ) }
|
|
@@ -135,7 +136,7 @@ export default function PostExcerptEditor( {
|
|
|
135
136
|
onChange={ ( newMoreText ) =>
|
|
136
137
|
setAttributes( { moreText: newMoreText } )
|
|
137
138
|
}
|
|
138
|
-
withoutInteractiveFormatting
|
|
139
|
+
withoutInteractiveFormatting
|
|
139
140
|
/>
|
|
140
141
|
);
|
|
141
142
|
const excerptClassName = classnames( 'wp-block-post-excerpt__excerpt', {
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-excerpt` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -66,6 +68,8 @@ function render_block_core_post_excerpt( $attributes, $content, $block ) {
|
|
|
66
68
|
|
|
67
69
|
/**
|
|
68
70
|
* Registers the `core/post-excerpt` block on the server.
|
|
71
|
+
*
|
|
72
|
+
* @since 5.8.0
|
|
69
73
|
*/
|
|
70
74
|
function register_block_core_post_excerpt() {
|
|
71
75
|
register_block_type_from_metadata(
|
|
@@ -77,6 +77,9 @@
|
|
|
77
77
|
"width": true
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
+
"shadow": {
|
|
81
|
+
"__experimentalSkipSerialization": true
|
|
82
|
+
},
|
|
80
83
|
"html": false,
|
|
81
84
|
"spacing": {
|
|
82
85
|
"margin": true,
|
|
@@ -86,6 +89,9 @@
|
|
|
86
89
|
"clientNavigation": true
|
|
87
90
|
}
|
|
88
91
|
},
|
|
92
|
+
"selectors": {
|
|
93
|
+
"shadow": ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder"
|
|
94
|
+
},
|
|
89
95
|
"editorStyle": "wp-block-post-featured-image-editor",
|
|
90
96
|
"style": "wp-block-post-featured-image"
|
|
91
97
|
}
|
|
@@ -83,7 +83,7 @@ const DimensionControls = ( {
|
|
|
83
83
|
resetAllFilter={ () => ( {
|
|
84
84
|
aspectRatio: undefined,
|
|
85
85
|
} ) }
|
|
86
|
-
isShownByDefault
|
|
86
|
+
isShownByDefault
|
|
87
87
|
panelId={ clientId }
|
|
88
88
|
>
|
|
89
89
|
<SelectControl
|
|
@@ -138,7 +138,7 @@ const DimensionControls = ( {
|
|
|
138
138
|
resetAllFilter={ () => ( {
|
|
139
139
|
height: undefined,
|
|
140
140
|
} ) }
|
|
141
|
-
isShownByDefault
|
|
141
|
+
isShownByDefault
|
|
142
142
|
panelId={ clientId }
|
|
143
143
|
>
|
|
144
144
|
<UnitControl
|
|
@@ -160,7 +160,7 @@ const DimensionControls = ( {
|
|
|
160
160
|
resetAllFilter={ () => ( {
|
|
161
161
|
width: undefined,
|
|
162
162
|
} ) }
|
|
163
|
-
isShownByDefault
|
|
163
|
+
isShownByDefault
|
|
164
164
|
panelId={ clientId }
|
|
165
165
|
>
|
|
166
166
|
<UnitControl
|
|
@@ -186,7 +186,7 @@ const DimensionControls = ( {
|
|
|
186
186
|
resetAllFilter={ () => ( {
|
|
187
187
|
scale: DEFAULT_SCALE,
|
|
188
188
|
} ) }
|
|
189
|
-
isShownByDefault
|
|
189
|
+
isShownByDefault
|
|
190
190
|
panelId={ clientId }
|
|
191
191
|
>
|
|
192
192
|
<ToggleGroupControl
|
|
@@ -24,6 +24,8 @@ import {
|
|
|
24
24
|
useBlockProps,
|
|
25
25
|
store as blockEditorStore,
|
|
26
26
|
__experimentalUseBorderProps as useBorderProps,
|
|
27
|
+
__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,
|
|
28
|
+
useBlockEditingMode,
|
|
27
29
|
} from '@wordpress/block-editor';
|
|
28
30
|
import { useMemo } from '@wordpress/element';
|
|
29
31
|
import { __, sprintf } from '@wordpress/i18n';
|
|
@@ -143,6 +145,8 @@ export default function PostFeaturedImageEdit( {
|
|
|
143
145
|
style: { width, height, aspectRatio },
|
|
144
146
|
} );
|
|
145
147
|
const borderProps = useBorderProps( attributes );
|
|
148
|
+
const shadowProps = getShadowClassesAndStyles( attributes );
|
|
149
|
+
const blockEditingMode = useBlockEditingMode();
|
|
146
150
|
|
|
147
151
|
const placeholder = ( content ) => {
|
|
148
152
|
return (
|
|
@@ -151,11 +155,12 @@ export default function PostFeaturedImageEdit( {
|
|
|
151
155
|
'block-editor-media-placeholder',
|
|
152
156
|
borderProps.className
|
|
153
157
|
) }
|
|
154
|
-
withIllustration
|
|
158
|
+
withIllustration
|
|
155
159
|
style={ {
|
|
156
160
|
height: !! aspectRatio && '100%',
|
|
157
161
|
width: !! aspectRatio && '100%',
|
|
158
162
|
...borderProps.style,
|
|
163
|
+
...shadowProps.style,
|
|
159
164
|
} }
|
|
160
165
|
>
|
|
161
166
|
{ content }
|
|
@@ -174,8 +179,13 @@ export default function PostFeaturedImageEdit( {
|
|
|
174
179
|
createErrorNotice( message, { type: 'snackbar' } );
|
|
175
180
|
};
|
|
176
181
|
|
|
177
|
-
const controls = (
|
|
182
|
+
const controls = blockEditingMode === 'default' && (
|
|
178
183
|
<>
|
|
184
|
+
<Overlay
|
|
185
|
+
attributes={ attributes }
|
|
186
|
+
setAttributes={ setAttributes }
|
|
187
|
+
clientId={ clientId }
|
|
188
|
+
/>
|
|
179
189
|
<DimensionControls
|
|
180
190
|
clientId={ clientId }
|
|
181
191
|
attributes={ attributes }
|
|
@@ -224,6 +234,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
224
234
|
</InspectorControls>
|
|
225
235
|
</>
|
|
226
236
|
);
|
|
237
|
+
|
|
227
238
|
let image;
|
|
228
239
|
|
|
229
240
|
/**
|
|
@@ -251,11 +262,6 @@ export default function PostFeaturedImageEdit( {
|
|
|
251
262
|
) : (
|
|
252
263
|
placeholder()
|
|
253
264
|
) }
|
|
254
|
-
<Overlay
|
|
255
|
-
attributes={ attributes }
|
|
256
|
-
setAttributes={ setAttributes }
|
|
257
|
-
clientId={ clientId }
|
|
258
|
-
/>
|
|
259
265
|
</div>
|
|
260
266
|
</>
|
|
261
267
|
);
|
|
@@ -264,6 +270,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
264
270
|
const label = __( 'Add a featured image' );
|
|
265
271
|
const imageStyles = {
|
|
266
272
|
...borderProps.style,
|
|
273
|
+
...shadowProps.style,
|
|
267
274
|
height: aspectRatio ? '100%' : height,
|
|
268
275
|
width: !! aspectRatio && '100%',
|
|
269
276
|
objectFit: !! ( height || aspectRatio ) && scale,
|
|
@@ -360,11 +367,6 @@ export default function PostFeaturedImageEdit( {
|
|
|
360
367
|
) : (
|
|
361
368
|
image
|
|
362
369
|
) }
|
|
363
|
-
<Overlay
|
|
364
|
-
attributes={ attributes }
|
|
365
|
-
setAttributes={ setAttributes }
|
|
366
|
-
clientId={ clientId }
|
|
367
|
-
/>
|
|
368
370
|
</figure>
|
|
369
371
|
</>
|
|
370
372
|
);
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-featured-image` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -48,6 +50,13 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
48
50
|
if ( ! empty( $attributes['scale'] ) ) {
|
|
49
51
|
$extra_styles .= "object-fit:{$attributes['scale']};";
|
|
50
52
|
}
|
|
53
|
+
if ( ! empty( $attributes['style']['shadow'] ) ) {
|
|
54
|
+
$shadow_styles = wp_style_engine_get_styles( array( 'shadow' => $attributes['style']['shadow'] ) );
|
|
55
|
+
|
|
56
|
+
if ( ! empty( $shadow_styles['css'] ) ) {
|
|
57
|
+
$extra_styles .= $shadow_styles['css'];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
51
60
|
|
|
52
61
|
if ( ! empty( $extra_styles ) ) {
|
|
53
62
|
$attr['style'] = empty( $attr['style'] ) ? $extra_styles : $attr['style'] . $extra_styles;
|
|
@@ -125,6 +134,8 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
125
134
|
/**
|
|
126
135
|
* Generate markup for the HTML element that will be used for the overlay.
|
|
127
136
|
*
|
|
137
|
+
* @since 6.1.0
|
|
138
|
+
*
|
|
128
139
|
* @param array $attributes Block attributes.
|
|
129
140
|
*
|
|
130
141
|
* @return string HTML markup in string format.
|
|
@@ -191,6 +202,8 @@ function get_block_core_post_featured_image_overlay_element_markup( $attributes
|
|
|
191
202
|
* Generates class names and styles to apply the border support styles for
|
|
192
203
|
* the Post Featured Image block.
|
|
193
204
|
*
|
|
205
|
+
* @since 6.1.0
|
|
206
|
+
*
|
|
194
207
|
* @param array $attributes The block attributes.
|
|
195
208
|
* @return array The border-related classnames and styles for the block.
|
|
196
209
|
*/
|
|
@@ -241,6 +254,8 @@ function get_block_core_post_featured_image_border_attributes( $attributes ) {
|
|
|
241
254
|
|
|
242
255
|
/**
|
|
243
256
|
* Registers the `core/post-featured-image` block on the server.
|
|
257
|
+
*
|
|
258
|
+
* @since 5.8.0
|
|
244
259
|
*/
|
|
245
260
|
function register_block_core_post_featured_image() {
|
|
246
261
|
register_block_type_from_metadata(
|
|
@@ -188,6 +188,7 @@ export default function PostNavigationLinkEdit( {
|
|
|
188
188
|
) }
|
|
189
189
|
<RichText
|
|
190
190
|
tagName="a"
|
|
191
|
+
identifier="label"
|
|
191
192
|
aria-label={ ariaLabel }
|
|
192
193
|
placeholder={ placeholder }
|
|
193
194
|
value={ label }
|
|
@@ -207,7 +208,7 @@ export default function PostNavigationLinkEdit( {
|
|
|
207
208
|
{ isNext && displayArrow && (
|
|
208
209
|
<span
|
|
209
210
|
className={ `wp-block-post-navigation-link__arrow-next is-arrow-${ arrow }` }
|
|
210
|
-
aria-hidden
|
|
211
|
+
aria-hidden
|
|
211
212
|
>
|
|
212
213
|
{ displayArrow }
|
|
213
214
|
</span>
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-navigation-link` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.9.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
*
|
|
@@ -123,6 +125,8 @@ function render_block_core_post_navigation_link( $attributes, $content ) {
|
|
|
123
125
|
|
|
124
126
|
/**
|
|
125
127
|
* Registers the `core/post-navigation-link` block on the server.
|
|
128
|
+
*
|
|
129
|
+
* @since 5.9.0
|
|
126
130
|
*/
|
|
127
131
|
function register_block_core_post_navigation_link() {
|
|
128
132
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Determines whether a block list contains a block that uses the featured image.
|
|
10
10
|
*
|
|
11
|
+
* @since 6.0.0
|
|
12
|
+
*
|
|
11
13
|
* @param WP_Block_List $inner_blocks Inner block instance.
|
|
12
14
|
*
|
|
13
15
|
* @return bool Whether the block list contains a block that uses the featured image.
|
|
@@ -36,6 +38,8 @@ function block_core_post_template_uses_featured_image( $inner_blocks ) {
|
|
|
36
38
|
*
|
|
37
39
|
* @since 6.3.0 Changed render_block_context priority to `1`.
|
|
38
40
|
*
|
|
41
|
+
* @global WP_Query $wp_query WordPress Query object.
|
|
42
|
+
*
|
|
39
43
|
* @param array $attributes Block attributes.
|
|
40
44
|
* @param string $content Block default content.
|
|
41
45
|
* @param WP_Block $block Block instance.
|
|
@@ -143,6 +147,8 @@ function render_block_core_post_template( $attributes, $content, $block ) {
|
|
|
143
147
|
|
|
144
148
|
/**
|
|
145
149
|
* Registers the `core/post-template` block on the server.
|
|
150
|
+
*
|
|
151
|
+
* @since 5.8.0
|
|
146
152
|
*/
|
|
147
153
|
function register_block_core_post_template() {
|
|
148
154
|
register_block_type_from_metadata(
|
package/src/post-terms/edit.js
CHANGED
|
@@ -95,6 +95,7 @@ export default function PostTermsEdit( {
|
|
|
95
95
|
{ isLoading && hasPost && <Spinner /> }
|
|
96
96
|
{ ! isLoading && ( isSelected || prefix ) && (
|
|
97
97
|
<RichText
|
|
98
|
+
identifier="prefix"
|
|
98
99
|
allowedFormats={ ALLOWED_FORMATS }
|
|
99
100
|
className="wp-block-post-terms__prefix"
|
|
100
101
|
aria-label={ __( 'Prefix' ) }
|
|
@@ -138,6 +139,7 @@ export default function PostTermsEdit( {
|
|
|
138
139
|
__( 'Term items not found.' ) ) }
|
|
139
140
|
{ ! isLoading && ( isSelected || suffix ) && (
|
|
140
141
|
<RichText
|
|
142
|
+
identifier="suffix"
|
|
141
143
|
allowedFormats={ ALLOWED_FORMATS }
|
|
142
144
|
className="wp-block-post-terms__suffix"
|
|
143
145
|
aria-label={ __( 'Suffix' ) }
|
package/src/post-terms/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-terms` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -61,6 +63,8 @@ function render_block_core_post_terms( $attributes, $content, $block ) {
|
|
|
61
63
|
/**
|
|
62
64
|
* Returns the available variations for the `core/post-terms` block.
|
|
63
65
|
*
|
|
66
|
+
* @since 6.5.0
|
|
67
|
+
*
|
|
64
68
|
* @return array The available variations for the block.
|
|
65
69
|
*/
|
|
66
70
|
function block_core_post_terms_build_variations() {
|
|
@@ -110,6 +114,8 @@ function block_core_post_terms_build_variations() {
|
|
|
110
114
|
|
|
111
115
|
/**
|
|
112
116
|
* Registers the `core/post-terms` block on the server.
|
|
117
|
+
*
|
|
118
|
+
* @since 5.8.0
|
|
113
119
|
*/
|
|
114
120
|
function register_block_core_post_terms() {
|
|
115
121
|
register_block_type_from_metadata(
|
package/src/post-title/edit.js
CHANGED
|
@@ -115,53 +115,59 @@ export default function PostTitleEdit( {
|
|
|
115
115
|
return (
|
|
116
116
|
<>
|
|
117
117
|
{ blockEditingMode === 'default' && (
|
|
118
|
-
|
|
119
|
-
<
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<ToggleControl
|
|
136
|
-
__nextHasNoMarginBottom
|
|
137
|
-
label={ __( 'Make title a link' ) }
|
|
138
|
-
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
139
|
-
checked={ isLink }
|
|
140
|
-
/>
|
|
141
|
-
{ isLink && (
|
|
142
|
-
<>
|
|
118
|
+
<>
|
|
119
|
+
<BlockControls group="block">
|
|
120
|
+
<HeadingLevelDropdown
|
|
121
|
+
value={ level }
|
|
122
|
+
onChange={ ( newLevel ) =>
|
|
123
|
+
setAttributes( { level: newLevel } )
|
|
124
|
+
}
|
|
125
|
+
/>
|
|
126
|
+
<AlignmentControl
|
|
127
|
+
value={ textAlign }
|
|
128
|
+
onChange={ ( nextAlign ) => {
|
|
129
|
+
setAttributes( { textAlign: nextAlign } );
|
|
130
|
+
} }
|
|
131
|
+
/>
|
|
132
|
+
</BlockControls>
|
|
133
|
+
<InspectorControls>
|
|
134
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
143
135
|
<ToggleControl
|
|
144
136
|
__nextHasNoMarginBottom
|
|
145
|
-
label={ __( '
|
|
146
|
-
onChange={ (
|
|
147
|
-
setAttributes( {
|
|
148
|
-
linkTarget: value ? '_blank' : '_self',
|
|
149
|
-
} )
|
|
137
|
+
label={ __( 'Make title a link' ) }
|
|
138
|
+
onChange={ () =>
|
|
139
|
+
setAttributes( { isLink: ! isLink } )
|
|
150
140
|
}
|
|
151
|
-
checked={
|
|
141
|
+
checked={ isLink }
|
|
152
142
|
/>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
143
|
+
{ isLink && (
|
|
144
|
+
<>
|
|
145
|
+
<ToggleControl
|
|
146
|
+
__nextHasNoMarginBottom
|
|
147
|
+
label={ __( 'Open in new tab' ) }
|
|
148
|
+
onChange={ ( value ) =>
|
|
149
|
+
setAttributes( {
|
|
150
|
+
linkTarget: value
|
|
151
|
+
? '_blank'
|
|
152
|
+
: '_self',
|
|
153
|
+
} )
|
|
154
|
+
}
|
|
155
|
+
checked={ linkTarget === '_blank' }
|
|
156
|
+
/>
|
|
157
|
+
<TextControl
|
|
158
|
+
__nextHasNoMarginBottom
|
|
159
|
+
label={ __( 'Link rel' ) }
|
|
160
|
+
value={ rel }
|
|
161
|
+
onChange={ ( newRel ) =>
|
|
162
|
+
setAttributes( { rel: newRel } )
|
|
163
|
+
}
|
|
164
|
+
/>
|
|
165
|
+
</>
|
|
166
|
+
) }
|
|
167
|
+
</PanelBody>
|
|
168
|
+
</InspectorControls>
|
|
169
|
+
</>
|
|
170
|
+
) }
|
|
165
171
|
{ titleElement }
|
|
166
172
|
</>
|
|
167
173
|
);
|
package/src/post-title/index.php
CHANGED
|
@@ -62,7 +62,7 @@ export default function PatternSelectionModal( {
|
|
|
62
62
|
overlayClassName="block-library-query-pattern__selection-modal"
|
|
63
63
|
title={ __( 'Choose a pattern' ) }
|
|
64
64
|
onRequestClose={ () => setIsPatternSelectionModalOpen( false ) }
|
|
65
|
-
isFullScreen
|
|
65
|
+
isFullScreen
|
|
66
66
|
>
|
|
67
67
|
<div className="block-library-query-pattern__selection-content">
|
|
68
68
|
<div className="block-library-query-pattern__selection-search">
|
package/src/query/index.php
CHANGED
package/src/query/utils.js
CHANGED
|
@@ -131,16 +131,18 @@ export const useTaxonomies = ( postType ) => {
|
|
|
131
131
|
const taxonomies = useSelect(
|
|
132
132
|
( select ) => {
|
|
133
133
|
const { getTaxonomies } = select( coreStore );
|
|
134
|
-
|
|
134
|
+
return getTaxonomies( {
|
|
135
135
|
type: postType,
|
|
136
136
|
per_page: -1,
|
|
137
|
-
context: 'view',
|
|
138
137
|
} );
|
|
139
|
-
return filteredTaxonomies;
|
|
140
138
|
},
|
|
141
139
|
[ postType ]
|
|
142
140
|
);
|
|
143
|
-
return
|
|
141
|
+
return useMemo( () => {
|
|
142
|
+
return taxonomies?.filter(
|
|
143
|
+
( { visibility } ) => !! visibility?.publicly_queryable
|
|
144
|
+
);
|
|
145
|
+
}, [ taxonomies ] );
|
|
144
146
|
};
|
|
145
147
|
|
|
146
148
|
/**
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-no-results` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 6.0.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -47,6 +49,8 @@ function render_block_core_query_no_results( $attributes, $content, $block ) {
|
|
|
47
49
|
|
|
48
50
|
/**
|
|
49
51
|
* Registers the `core/query-no-results` block on the server.
|
|
52
|
+
*
|
|
53
|
+
* @since 6.0.0
|
|
50
54
|
*/
|
|
51
55
|
function register_block_core_query_no_results() {
|
|
52
56
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.9.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
*
|
|
@@ -35,6 +37,8 @@ function render_block_core_query_pagination( $attributes, $content ) {
|
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* Registers the `core/query-pagination` block on the server.
|
|
40
|
+
*
|
|
41
|
+
* @since 5.8.0
|
|
38
42
|
*/
|
|
39
43
|
function register_block_core_query_pagination() {
|
|
40
44
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination-next` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -84,6 +86,8 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
|
|
|
84
86
|
|
|
85
87
|
/**
|
|
86
88
|
* Registers the `core/query-pagination-next` block on the server.
|
|
89
|
+
*
|
|
90
|
+
* @since 5.8.0
|
|
87
91
|
*/
|
|
88
92
|
function register_block_core_query_pagination_next() {
|
|
89
93
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination-numbers` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -115,6 +117,8 @@ function render_block_core_query_pagination_numbers( $attributes, $content, $blo
|
|
|
115
117
|
|
|
116
118
|
/**
|
|
117
119
|
* Registers the `core/query-pagination-numbers` block on the server.
|
|
120
|
+
*
|
|
121
|
+
* @since 5.8.0
|
|
118
122
|
*/
|
|
119
123
|
function register_block_core_query_pagination_numbers() {
|
|
120
124
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination-previous` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -72,6 +74,8 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
|
|
|
72
74
|
|
|
73
75
|
/**
|
|
74
76
|
* Registers the `core/query-pagination-previous` block on the server.
|
|
77
|
+
*
|
|
78
|
+
* @since 5.8.0
|
|
75
79
|
*/
|
|
76
80
|
function register_block_core_query_pagination_previous() {
|
|
77
81
|
register_block_type_from_metadata(
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* For now it only supports Archive title,
|
|
11
11
|
* using queried object information
|
|
12
12
|
*
|
|
13
|
+
* @since 5.8.0
|
|
14
|
+
*
|
|
13
15
|
* @param array $attributes Block attributes.
|
|
14
16
|
*
|
|
15
17
|
* @return string Returns the query title based on the queried object.
|
|
@@ -60,6 +62,8 @@ function render_block_core_query_title( $attributes ) {
|
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
64
|
* Registers the `core/query-title` block on the server.
|
|
65
|
+
*
|
|
66
|
+
* @since 5.8.0
|
|
63
67
|
*/
|
|
64
68
|
function register_block_core_query_title() {
|
|
65
69
|
register_block_type_from_metadata(
|