@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/quote/deprecated.js
CHANGED
|
@@ -7,7 +7,7 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { createBlock, parseWithAttributeSchema } from '@wordpress/blocks';
|
|
10
|
-
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
10
|
+
import { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';
|
|
11
11
|
|
|
12
12
|
export const migrateToQuoteV2 = ( attributes ) => {
|
|
13
13
|
const { value, ...restAttributes } = attributes;
|
|
@@ -34,6 +34,102 @@ export const migrateToQuoteV2 = ( attributes ) => {
|
|
|
34
34
|
];
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
const TEXT_ALIGN_OPTIONS = [ 'left', 'right', 'center' ];
|
|
38
|
+
|
|
39
|
+
// Migrate existing text alignment settings to the renamed attribute.
|
|
40
|
+
const migrateTextAlign = ( attributes, innerBlocks ) => {
|
|
41
|
+
const { align, ...rest } = attributes;
|
|
42
|
+
// Check if there are valid alignments stored in the old attribute
|
|
43
|
+
// and assign them to the new attribute name.
|
|
44
|
+
const migratedAttributes = TEXT_ALIGN_OPTIONS.includes( align )
|
|
45
|
+
? { ...rest, textAlign: align }
|
|
46
|
+
: attributes;
|
|
47
|
+
|
|
48
|
+
return [ migratedAttributes, innerBlocks ];
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// Migrate the v2 blocks with style === `2`;
|
|
52
|
+
const migrateLargeStyle = ( attributes, innerBlocks ) => {
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
...attributes,
|
|
56
|
+
className: attributes.className
|
|
57
|
+
? attributes.className + ' is-style-large'
|
|
58
|
+
: 'is-style-large',
|
|
59
|
+
},
|
|
60
|
+
innerBlocks,
|
|
61
|
+
];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// Version before the 'align' attribute was replaced with 'textAlign'.
|
|
65
|
+
const v4 = {
|
|
66
|
+
attributes: {
|
|
67
|
+
value: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
source: 'html',
|
|
70
|
+
selector: 'blockquote',
|
|
71
|
+
multiline: 'p',
|
|
72
|
+
default: '',
|
|
73
|
+
__experimentalRole: 'content',
|
|
74
|
+
},
|
|
75
|
+
citation: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
source: 'html',
|
|
78
|
+
selector: 'cite',
|
|
79
|
+
default: '',
|
|
80
|
+
__experimentalRole: 'content',
|
|
81
|
+
},
|
|
82
|
+
align: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
supports: {
|
|
87
|
+
anchor: true,
|
|
88
|
+
html: false,
|
|
89
|
+
__experimentalOnEnter: true,
|
|
90
|
+
__experimentalOnMerge: true,
|
|
91
|
+
typography: {
|
|
92
|
+
fontSize: true,
|
|
93
|
+
lineHeight: true,
|
|
94
|
+
__experimentalFontFamily: true,
|
|
95
|
+
__experimentalFontWeight: true,
|
|
96
|
+
__experimentalFontStyle: true,
|
|
97
|
+
__experimentalTextTransform: true,
|
|
98
|
+
__experimentalTextDecoration: true,
|
|
99
|
+
__experimentalLetterSpacing: true,
|
|
100
|
+
__experimentalDefaultControls: {
|
|
101
|
+
fontSize: true,
|
|
102
|
+
fontAppearance: true,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
color: {
|
|
106
|
+
gradients: true,
|
|
107
|
+
heading: true,
|
|
108
|
+
link: true,
|
|
109
|
+
__experimentalDefaultControls: {
|
|
110
|
+
background: true,
|
|
111
|
+
text: true,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
isEligible: ( { align } ) => TEXT_ALIGN_OPTIONS.includes( align ),
|
|
116
|
+
save( { attributes } ) {
|
|
117
|
+
const { align, citation } = attributes;
|
|
118
|
+
const className = classnames( {
|
|
119
|
+
[ `has-text-align-${ align }` ]: align,
|
|
120
|
+
} );
|
|
121
|
+
return (
|
|
122
|
+
<blockquote { ...useBlockProps.save( { className } ) }>
|
|
123
|
+
<InnerBlocks.Content />
|
|
124
|
+
{ ! RichText.isEmpty( citation ) && (
|
|
125
|
+
<RichText.Content tagName="cite" value={ citation } />
|
|
126
|
+
) }
|
|
127
|
+
</blockquote>
|
|
128
|
+
);
|
|
129
|
+
},
|
|
130
|
+
migrate: migrateTextAlign,
|
|
131
|
+
};
|
|
132
|
+
|
|
37
133
|
const v3 = {
|
|
38
134
|
attributes: {
|
|
39
135
|
value: {
|
|
@@ -87,7 +183,9 @@ const v3 = {
|
|
|
87
183
|
</blockquote>
|
|
88
184
|
);
|
|
89
185
|
},
|
|
90
|
-
migrate
|
|
186
|
+
migrate( attributes ) {
|
|
187
|
+
return migrateTextAlign( ...migrateToQuoteV2( attributes ) );
|
|
188
|
+
},
|
|
91
189
|
};
|
|
92
190
|
|
|
93
191
|
const v2 = {
|
|
@@ -109,7 +207,9 @@ const v2 = {
|
|
|
109
207
|
type: 'string',
|
|
110
208
|
},
|
|
111
209
|
},
|
|
112
|
-
migrate
|
|
210
|
+
migrate( attributes ) {
|
|
211
|
+
return migrateTextAlign( ...migrateToQuoteV2( attributes ) );
|
|
212
|
+
},
|
|
113
213
|
save( { attributes } ) {
|
|
114
214
|
const { align, value, citation } = attributes;
|
|
115
215
|
|
|
@@ -151,15 +251,12 @@ const v1 = {
|
|
|
151
251
|
migrate( attributes ) {
|
|
152
252
|
if ( attributes.style === 2 ) {
|
|
153
253
|
const { style, ...restAttributes } = attributes;
|
|
154
|
-
return
|
|
155
|
-
...restAttributes
|
|
156
|
-
|
|
157
|
-
? attributes.className + ' is-style-large'
|
|
158
|
-
: 'is-style-large',
|
|
159
|
-
} );
|
|
254
|
+
return migrateTextAlign(
|
|
255
|
+
...migrateLargeStyle( ...migrateToQuoteV2( restAttributes ) )
|
|
256
|
+
);
|
|
160
257
|
}
|
|
161
258
|
|
|
162
|
-
return migrateToQuoteV2( attributes );
|
|
259
|
+
return migrateTextAlign( ...migrateToQuoteV2( attributes ) );
|
|
163
260
|
},
|
|
164
261
|
|
|
165
262
|
save( { attributes } ) {
|
|
@@ -206,12 +303,10 @@ const v0 = {
|
|
|
206
303
|
migrate( attributes ) {
|
|
207
304
|
if ( ! isNaN( parseInt( attributes.style ) ) ) {
|
|
208
305
|
const { style, ...restAttributes } = attributes;
|
|
209
|
-
return migrateToQuoteV2(
|
|
210
|
-
...restAttributes,
|
|
211
|
-
} );
|
|
306
|
+
return migrateTextAlign( ...migrateToQuoteV2( restAttributes ) );
|
|
212
307
|
}
|
|
213
308
|
|
|
214
|
-
return migrateToQuoteV2( attributes );
|
|
309
|
+
return migrateTextAlign( ...migrateToQuoteV2( attributes ) );
|
|
215
310
|
},
|
|
216
311
|
|
|
217
312
|
save( { attributes } ) {
|
|
@@ -239,4 +334,4 @@ const v0 = {
|
|
|
239
334
|
*
|
|
240
335
|
* See block-deprecation.md
|
|
241
336
|
*/
|
|
242
|
-
export default [ v3, v2, v1, v0 ];
|
|
337
|
+
export default [ v4, v3, v2, v1, v0 ];
|
package/src/quote/edit.js
CHANGED
|
@@ -74,19 +74,25 @@ export default function QuoteEdit( {
|
|
|
74
74
|
className,
|
|
75
75
|
style,
|
|
76
76
|
} ) {
|
|
77
|
-
const {
|
|
77
|
+
const { textAlign, citation } = attributes;
|
|
78
78
|
|
|
79
79
|
useMigrateOnLoad( attributes, clientId );
|
|
80
80
|
|
|
81
|
-
const hasSelection = useSelect(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
const hasSelection = useSelect(
|
|
82
|
+
( select ) => {
|
|
83
|
+
const { isBlockSelected, hasSelectedInnerBlock } =
|
|
84
|
+
select( blockEditorStore );
|
|
85
|
+
return (
|
|
86
|
+
hasSelectedInnerBlock( clientId, true ) ||
|
|
87
|
+
isBlockSelected( clientId )
|
|
88
|
+
);
|
|
89
|
+
},
|
|
90
|
+
[ clientId ]
|
|
91
|
+
);
|
|
86
92
|
|
|
87
93
|
const blockProps = useBlockProps( {
|
|
88
94
|
className: classNames( className, {
|
|
89
|
-
[ `has-text-align-${
|
|
95
|
+
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
90
96
|
} ),
|
|
91
97
|
...( ! isWebPlatform && { style } ),
|
|
92
98
|
} );
|
|
@@ -100,9 +106,9 @@ export default function QuoteEdit( {
|
|
|
100
106
|
<>
|
|
101
107
|
<BlockControls group="block">
|
|
102
108
|
<AlignmentControl
|
|
103
|
-
value={
|
|
109
|
+
value={ textAlign }
|
|
104
110
|
onChange={ ( nextAlign ) => {
|
|
105
|
-
setAttributes( {
|
|
111
|
+
setAttributes( { textAlign: nextAlign } );
|
|
106
112
|
} }
|
|
107
113
|
/>
|
|
108
114
|
</BlockControls>
|
|
@@ -132,7 +138,7 @@ export default function QuoteEdit( {
|
|
|
132
138
|
createBlock( getDefaultBlockName() )
|
|
133
139
|
)
|
|
134
140
|
}
|
|
135
|
-
{ ...( ! isWebPlatform ? { textAlign
|
|
141
|
+
{ ...( ! isWebPlatform ? { textAlign } : {} ) }
|
|
136
142
|
/>
|
|
137
143
|
) }
|
|
138
144
|
</BlockQuotation>
|
package/src/quote/save.js
CHANGED
|
@@ -9,10 +9,10 @@ import classNames from 'classnames';
|
|
|
9
9
|
import { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';
|
|
10
10
|
|
|
11
11
|
export default function save( { attributes } ) {
|
|
12
|
-
const {
|
|
12
|
+
const { textAlign, citation } = attributes;
|
|
13
13
|
|
|
14
14
|
const className = classNames( {
|
|
15
|
-
[ `has-text-align-${
|
|
15
|
+
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
16
16
|
} );
|
|
17
17
|
|
|
18
18
|
return (
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
exports[`Quote block transforms to Columns block 1`] = `
|
|
4
4
|
"<!-- wp:columns -->
|
|
5
5
|
<div class="wp-block-columns"><!-- wp:column {"width":"100%"} -->
|
|
6
|
-
<div class="wp-block-column" style="flex-basis:100%"><!-- wp:quote {"
|
|
6
|
+
<div class="wp-block-column" style="flex-basis:100%"><!-- wp:quote {"textAlign":"left","className":"is-style-large"} -->
|
|
7
7
|
<blockquote class="wp-block-quote has-text-align-left is-style-large"><!-- wp:paragraph -->
|
|
8
8
|
<p>"This will make running your own blog a viable alternative again."</p>
|
|
9
9
|
<!-- /wp:paragraph --><cite>— <a href="https://twitter.com/azumbrunnen_/status/1019347243084800005">Adrian Zumbrunnen</a></cite></blockquote>
|
|
@@ -14,7 +14,7 @@ exports[`Quote block transforms to Columns block 1`] = `
|
|
|
14
14
|
|
|
15
15
|
exports[`Quote block transforms to Group block 1`] = `
|
|
16
16
|
"<!-- wp:group {"layout":{"type":"constrained"}} -->
|
|
17
|
-
<div class="wp-block-group"><!-- wp:quote {"
|
|
17
|
+
<div class="wp-block-group"><!-- wp:quote {"textAlign":"left","className":"is-style-large"} -->
|
|
18
18
|
<blockquote class="wp-block-quote has-text-align-left is-style-large"><!-- wp:paragraph -->
|
|
19
19
|
<p>"This will make running your own blog a viable alternative again."</p>
|
|
20
20
|
<!-- /wp:paragraph --><cite>— <a href="https://twitter.com/azumbrunnen_/status/1019347243084800005">Adrian Zumbrunnen</a></cite></blockquote>
|
package/src/read-more/edit.js
CHANGED
|
@@ -33,6 +33,7 @@ export default function ReadMore( {
|
|
|
33
33
|
</PanelBody>
|
|
34
34
|
</InspectorControls>
|
|
35
35
|
<RichText
|
|
36
|
+
identifier="content"
|
|
36
37
|
tagName="a"
|
|
37
38
|
aria-label={ __( '“Read more” link text' ) }
|
|
38
39
|
placeholder={ __( 'Read more' ) }
|
|
@@ -43,7 +44,7 @@ export default function ReadMore( {
|
|
|
43
44
|
__unstableOnSplitAtEnd={ () =>
|
|
44
45
|
insertBlocksAfter( createBlock( getDefaultBlockName() ) )
|
|
45
46
|
}
|
|
46
|
-
withoutInteractiveFormatting
|
|
47
|
+
withoutInteractiveFormatting
|
|
47
48
|
{ ...blockProps }
|
|
48
49
|
/>
|
|
49
50
|
</>
|
package/src/read-more/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/read-more` 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_read_more( $attributes, $content, $block ) {
|
|
|
47
49
|
|
|
48
50
|
/**
|
|
49
51
|
* Registers the `core/read-more` block on the server.
|
|
52
|
+
*
|
|
53
|
+
* @since 6.0.0
|
|
50
54
|
*/
|
|
51
55
|
function register_block_core_read_more() {
|
|
52
56
|
register_block_type_from_metadata(
|
package/src/rss/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/rss` block on server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.2.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string Returns the block content with received rss items.
|
|
@@ -107,6 +109,8 @@ function render_block_core_rss( $attributes ) {
|
|
|
107
109
|
|
|
108
110
|
/**
|
|
109
111
|
* Registers the `core/rss` block on server.
|
|
112
|
+
*
|
|
113
|
+
* @since 5.2.0
|
|
110
114
|
*/
|
|
111
115
|
function register_block_core_rss() {
|
|
112
116
|
register_block_type_from_metadata(
|
package/src/search/edit.js
CHANGED
|
@@ -347,6 +347,7 @@ export default function SearchEdit( {
|
|
|
347
347
|
|
|
348
348
|
{ ! buttonUseIcon && (
|
|
349
349
|
<RichText
|
|
350
|
+
identifier="buttonText"
|
|
350
351
|
className={ buttonClasses }
|
|
351
352
|
style={ buttonStyles }
|
|
352
353
|
aria-label={ __( 'Button text' ) }
|
|
@@ -400,7 +401,7 @@ export default function SearchEdit( {
|
|
|
400
401
|
</BlockControls>
|
|
401
402
|
|
|
402
403
|
<InspectorControls>
|
|
403
|
-
<PanelBody title={ __( '
|
|
404
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
404
405
|
<BaseControl
|
|
405
406
|
label={ __( 'Width' ) }
|
|
406
407
|
id={ unitControlInputId }
|
|
@@ -546,6 +547,7 @@ export default function SearchEdit( {
|
|
|
546
547
|
|
|
547
548
|
{ showLabel && (
|
|
548
549
|
<RichText
|
|
550
|
+
identifier="label"
|
|
549
551
|
className={ labelClassnames }
|
|
550
552
|
aria-label={ __( 'Label text' ) }
|
|
551
553
|
placeholder={ __( 'Add label…' ) }
|
|
@@ -192,7 +192,7 @@ export default function SearchEdit( {
|
|
|
192
192
|
} );
|
|
193
193
|
} }
|
|
194
194
|
options={ BUTTON_OPTIONS }
|
|
195
|
-
hideCancelButton
|
|
195
|
+
hideCancelButton
|
|
196
196
|
/>
|
|
197
197
|
{ buttonPosition !== 'no-button' && (
|
|
198
198
|
<ToggleControl
|
|
@@ -294,7 +294,7 @@ export default function SearchEdit( {
|
|
|
294
294
|
return (
|
|
295
295
|
<View
|
|
296
296
|
style={ styles.searchInputContainer }
|
|
297
|
-
accessible
|
|
297
|
+
accessible
|
|
298
298
|
accessibilityRole="none"
|
|
299
299
|
accessibilityHint={
|
|
300
300
|
isScreenReaderEnabled
|
|
@@ -383,7 +383,7 @@ export default function SearchEdit( {
|
|
|
383
383
|
|
|
384
384
|
{ ! buttonUseIcon && (
|
|
385
385
|
<View
|
|
386
|
-
accessible
|
|
386
|
+
accessible
|
|
387
387
|
accessibilityRole="none"
|
|
388
388
|
accessibilityHint={
|
|
389
389
|
isScreenReaderEnabled
|
|
@@ -395,7 +395,7 @@ export default function SearchEdit( {
|
|
|
395
395
|
>
|
|
396
396
|
<RichText
|
|
397
397
|
className="wp-block-search__button"
|
|
398
|
-
identifier="
|
|
398
|
+
identifier="buttonText"
|
|
399
399
|
tagName="p"
|
|
400
400
|
style={ richTextButtonStyle }
|
|
401
401
|
placeholder={ buttonPlaceholderText }
|
|
@@ -438,7 +438,7 @@ export default function SearchEdit( {
|
|
|
438
438
|
|
|
439
439
|
{ showLabel && (
|
|
440
440
|
<View
|
|
441
|
-
accessible
|
|
441
|
+
accessible
|
|
442
442
|
accessibilityRole="none"
|
|
443
443
|
accessibilityHint={
|
|
444
444
|
isScreenReaderEnabled
|
|
@@ -449,7 +449,7 @@ export default function SearchEdit( {
|
|
|
449
449
|
>
|
|
450
450
|
<RichText
|
|
451
451
|
className="wp-block-search__label"
|
|
452
|
-
identifier="
|
|
452
|
+
identifier="label"
|
|
453
453
|
tagName="p"
|
|
454
454
|
style={ styles.richTextLabel }
|
|
455
455
|
placeholder={ __( 'Add label…' ) }
|
package/src/search/index.php
CHANGED
|
@@ -179,7 +179,7 @@ function render_block_core_search( $attributes ) {
|
|
|
179
179
|
if ( $is_expandable_searchfield ) {
|
|
180
180
|
$aria_label_expanded = __( 'Submit Search' );
|
|
181
181
|
$aria_label_collapsed = __( 'Expand search field' );
|
|
182
|
-
$form_context =
|
|
182
|
+
$form_context = wp_interactivity_data_wp_context(
|
|
183
183
|
array(
|
|
184
184
|
'isSearchInputVisible' => $open_by_default,
|
|
185
185
|
'inputId' => $input_id,
|
|
@@ -207,6 +207,8 @@ function render_block_core_search( $attributes ) {
|
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
209
|
* Registers the `core/search` block on the server.
|
|
210
|
+
*
|
|
211
|
+
* @since 5.2.0
|
|
210
212
|
*/
|
|
211
213
|
function register_block_core_search() {
|
|
212
214
|
register_block_type_from_metadata(
|
|
@@ -221,6 +223,8 @@ add_action( 'init', 'register_block_core_search' );
|
|
|
221
223
|
/**
|
|
222
224
|
* Builds the correct top level classnames for the 'core/search' block.
|
|
223
225
|
*
|
|
226
|
+
* @since 5.6.0
|
|
227
|
+
*
|
|
224
228
|
* @param array $attributes The block attributes.
|
|
225
229
|
*
|
|
226
230
|
* @return string The classnames used in the block.
|
|
@@ -265,6 +269,8 @@ function classnames_for_block_core_search( $attributes ) {
|
|
|
265
269
|
* or not, the generated rule is injected into the appropriate collection of
|
|
266
270
|
* styles for later application in the block's markup.
|
|
267
271
|
*
|
|
272
|
+
* @since 6.1.0
|
|
273
|
+
*
|
|
268
274
|
* @param array $attributes The block attributes.
|
|
269
275
|
* @param string $property Border property to generate rule for e.g. width or color.
|
|
270
276
|
* @param string $side Optional side border. The dictates the value retrieved and final CSS property.
|
|
@@ -310,6 +316,8 @@ function apply_block_core_search_border_style( $attributes, $property, $side, &$
|
|
|
310
316
|
* injects rules into the provided wrapper, button and input style arrays for
|
|
311
317
|
* uniform "flat" borders or those with individual sides configured.
|
|
312
318
|
*
|
|
319
|
+
* @since 6.1.0
|
|
320
|
+
*
|
|
313
321
|
* @param array $attributes The block attributes.
|
|
314
322
|
* @param string $property Border property to generate rule for e.g. width or color.
|
|
315
323
|
* @param array $wrapper_styles Current collection of wrapper styles.
|
|
@@ -331,6 +339,8 @@ function apply_block_core_search_border_styles( $attributes, $property, &$wrappe
|
|
|
331
339
|
* inner input or button and a second for the inner wrapper should the block
|
|
332
340
|
* be positioning the button "inside".
|
|
333
341
|
*
|
|
342
|
+
* @since 5.8.0
|
|
343
|
+
*
|
|
334
344
|
* @param array $attributes The block attributes.
|
|
335
345
|
*
|
|
336
346
|
* @return array Style HTML attribute.
|
|
@@ -457,7 +467,9 @@ function styles_for_block_core_search( $attributes ) {
|
|
|
457
467
|
}
|
|
458
468
|
|
|
459
469
|
/**
|
|
460
|
-
* Returns typography classnames depending on whether there are named font sizes/families
|
|
470
|
+
* Returns typography classnames depending on whether there are named font sizes/families.
|
|
471
|
+
*
|
|
472
|
+
* @since 6.1.0
|
|
461
473
|
*
|
|
462
474
|
* @param array $attributes The block attributes.
|
|
463
475
|
*
|
|
@@ -483,6 +495,8 @@ function get_typography_classes_for_block_core_search( $attributes ) {
|
|
|
483
495
|
* Returns typography styles to be included in an HTML style tag.
|
|
484
496
|
* This excludes text-decoration, which is applied only to the label and button elements of the search block.
|
|
485
497
|
*
|
|
498
|
+
* @since 6.1.0
|
|
499
|
+
*
|
|
486
500
|
* @param array $attributes The block attributes.
|
|
487
501
|
*
|
|
488
502
|
* @return string A string of typography CSS declarations.
|
|
@@ -533,6 +547,8 @@ function get_typography_styles_for_block_core_search( $attributes ) {
|
|
|
533
547
|
/**
|
|
534
548
|
* Returns border color classnames depending on whether there are named or custom border colors.
|
|
535
549
|
*
|
|
550
|
+
* @since 5.9.0
|
|
551
|
+
*
|
|
536
552
|
* @param array $attributes The block attributes.
|
|
537
553
|
*
|
|
538
554
|
* @return string The border color classnames to be applied to the block elements.
|
|
@@ -556,6 +572,8 @@ function get_border_color_classes_for_block_core_search( $attributes ) {
|
|
|
556
572
|
/**
|
|
557
573
|
* Returns color classnames depending on whether there are named or custom text and background colors.
|
|
558
574
|
*
|
|
575
|
+
* @since 5.9.0
|
|
576
|
+
*
|
|
559
577
|
* @param array $attributes The block attributes.
|
|
560
578
|
*
|
|
561
579
|
* @return string The color classnames to be applied to the block elements.
|
package/src/search/style.scss
CHANGED
package/src/shortcode/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Performs wpautop() on the shortcode block content.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.0.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
* @param string $content The block content.
|
|
13
15
|
*
|
|
@@ -19,6 +21,8 @@ function render_block_core_shortcode( $attributes, $content ) {
|
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Registers the `core/shortcode` block on server.
|
|
24
|
+
*
|
|
25
|
+
* @since 5.0.0
|
|
22
26
|
*/
|
|
23
27
|
function register_block_core_shortcode() {
|
|
24
28
|
register_block_type_from_metadata(
|
package/src/site-logo/edit.js
CHANGED
|
@@ -268,6 +268,14 @@ const SiteLogo = ( {
|
|
|
268
268
|
</ResizableBox>
|
|
269
269
|
);
|
|
270
270
|
|
|
271
|
+
// Support the previous location for the Site Icon settings. To be removed
|
|
272
|
+
// when the required WP core version for Gutenberg is >= 6.5.0.
|
|
273
|
+
const shouldUseNewUrl = ! window?.__experimentalUseCustomizerSiteLogoUrl;
|
|
274
|
+
|
|
275
|
+
const siteIconSettingsUrl = shouldUseNewUrl
|
|
276
|
+
? siteUrl + '/wp-admin/options-general.php'
|
|
277
|
+
: siteUrl + '/wp-admin/customize.php?autofocus[section]=title_tagline';
|
|
278
|
+
|
|
271
279
|
const syncSiteIconHelpText = createInterpolateElement(
|
|
272
280
|
__(
|
|
273
281
|
'Site Icons are what you see in browser tabs, bookmark bars, and within the WordPress mobile apps. To use a custom icon that is different from your site logo, use the <a>Site Icon settings</a>.'
|
|
@@ -276,10 +284,7 @@ const SiteLogo = ( {
|
|
|
276
284
|
a: (
|
|
277
285
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
278
286
|
<a
|
|
279
|
-
href={
|
|
280
|
-
siteUrl +
|
|
281
|
-
'/wp-admin/customize.php?autofocus[section]=title_tagline'
|
|
282
|
-
}
|
|
287
|
+
href={ siteIconSettingsUrl }
|
|
283
288
|
target="_blank"
|
|
284
289
|
rel="noopener noreferrer"
|
|
285
290
|
/>
|
|
@@ -331,7 +336,7 @@ const SiteLogo = ( {
|
|
|
331
336
|
<>
|
|
332
337
|
<ToggleControl
|
|
333
338
|
__nextHasNoMarginBottom
|
|
334
|
-
label={ __( 'Use as
|
|
339
|
+
label={ __( 'Use as Site Icon' ) }
|
|
335
340
|
onChange={ ( value ) => {
|
|
336
341
|
setAttributes( { shouldSyncIcon: value } );
|
|
337
342
|
setIcon( value ? logoId : undefined );
|
|
@@ -569,7 +574,7 @@ export default function LogoEdit( {
|
|
|
569
574
|
<Placeholder
|
|
570
575
|
className={ placeholderClassName }
|
|
571
576
|
preview={ logoImage }
|
|
572
|
-
withIllustration
|
|
577
|
+
withIllustration
|
|
573
578
|
style={ {
|
|
574
579
|
width,
|
|
575
580
|
} }
|
package/src/site-logo/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/site-logo` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string The render.
|
|
@@ -60,6 +62,8 @@ function render_block_core_site_logo( $attributes ) {
|
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
64
|
* Register a core site setting for a site logo
|
|
65
|
+
*
|
|
66
|
+
* @since 5.8.0
|
|
63
67
|
*/
|
|
64
68
|
function register_block_core_site_logo_setting() {
|
|
65
69
|
register_setting(
|
|
@@ -79,6 +83,8 @@ add_action( 'rest_api_init', 'register_block_core_site_logo_setting', 10 );
|
|
|
79
83
|
|
|
80
84
|
/**
|
|
81
85
|
* Register a core site setting for a site icon
|
|
86
|
+
*
|
|
87
|
+
* @since 5.9.0
|
|
82
88
|
*/
|
|
83
89
|
function register_block_core_site_icon_setting() {
|
|
84
90
|
register_setting(
|
|
@@ -96,6 +102,8 @@ add_action( 'rest_api_init', 'register_block_core_site_icon_setting', 10 );
|
|
|
96
102
|
|
|
97
103
|
/**
|
|
98
104
|
* Registers the `core/site-logo` block on the server.
|
|
105
|
+
*
|
|
106
|
+
* @since 5.8.0
|
|
99
107
|
*/
|
|
100
108
|
function register_block_core_site_logo() {
|
|
101
109
|
register_block_type_from_metadata(
|
|
@@ -111,6 +119,8 @@ add_action( 'init', 'register_block_core_site_logo' );
|
|
|
111
119
|
/**
|
|
112
120
|
* Overrides the custom logo with a site logo, if the option is set.
|
|
113
121
|
*
|
|
122
|
+
* @since 5.8.0
|
|
123
|
+
*
|
|
114
124
|
* @param string $custom_logo The custom logo set by a theme.
|
|
115
125
|
*
|
|
116
126
|
* @return string The site logo if set.
|
|
@@ -125,6 +135,8 @@ add_filter( 'theme_mod_custom_logo', '_override_custom_logo_theme_mod' );
|
|
|
125
135
|
/**
|
|
126
136
|
* Updates the site_logo option when the custom_logo theme-mod gets updated.
|
|
127
137
|
*
|
|
138
|
+
* @since 5.8.0
|
|
139
|
+
*
|
|
128
140
|
* @param mixed $value Attachment ID of the custom logo or an empty value.
|
|
129
141
|
* @return mixed
|
|
130
142
|
*/
|
|
@@ -143,6 +155,8 @@ add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' );
|
|
|
143
155
|
/**
|
|
144
156
|
* Deletes the site_logo when the custom_logo theme mod is removed.
|
|
145
157
|
*
|
|
158
|
+
* @since 5.8.0
|
|
159
|
+
*
|
|
146
160
|
* @param array $old_value Previous theme mod settings.
|
|
147
161
|
* @param array $value Updated theme mod settings.
|
|
148
162
|
*/
|
|
@@ -161,6 +175,8 @@ function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
|
|
|
161
175
|
|
|
162
176
|
/**
|
|
163
177
|
* Deletes the site logo when all theme mods are being removed.
|
|
178
|
+
*
|
|
179
|
+
* @since 5.8.0
|
|
164
180
|
*/
|
|
165
181
|
function _delete_site_logo_on_remove_theme_mods() {
|
|
166
182
|
global $_ignore_site_logo_changes;
|
|
@@ -179,6 +195,8 @@ function _delete_site_logo_on_remove_theme_mods() {
|
|
|
179
195
|
* Hooks `_delete_site_logo_on_remove_theme_mods` in `delete_option_theme_mods_$theme`.
|
|
180
196
|
*
|
|
181
197
|
* Runs on `setup_theme` to account for dynamically-switched themes in the Customizer.
|
|
198
|
+
*
|
|
199
|
+
* @since 5.8.0
|
|
182
200
|
*/
|
|
183
201
|
function _delete_site_logo_on_remove_custom_logo_on_setup_theme() {
|
|
184
202
|
$theme = get_option( 'stylesheet' );
|
|
@@ -189,6 +207,8 @@ add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_the
|
|
|
189
207
|
|
|
190
208
|
/**
|
|
191
209
|
* Removes the custom_logo theme-mod when the site_logo option gets deleted.
|
|
210
|
+
*
|
|
211
|
+
* @since 5.9.0
|
|
192
212
|
*/
|
|
193
213
|
function _delete_custom_logo_on_remove_site_logo() {
|
|
194
214
|
global $_ignore_site_logo_changes;
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/site-tagline` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string The render.
|
|
@@ -29,6 +31,8 @@ function render_block_core_site_tagline( $attributes ) {
|
|
|
29
31
|
|
|
30
32
|
/**
|
|
31
33
|
* Registers the `core/site-tagline` block on the server.
|
|
34
|
+
*
|
|
35
|
+
* @since 5.8.0
|
|
32
36
|
*/
|
|
33
37
|
function register_block_core_site_tagline() {
|
|
34
38
|
register_block_type_from_metadata(
|
package/src/site-title/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/site-title` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string The render.
|
|
@@ -53,6 +55,8 @@ function render_block_core_site_title( $attributes ) {
|
|
|
53
55
|
|
|
54
56
|
/**
|
|
55
57
|
* Registers the `core/site-title` block on the server.
|
|
58
|
+
*
|
|
59
|
+
* @since 5.8.0
|
|
56
60
|
*/
|
|
57
61
|
function register_block_core_site_title() {
|
|
58
62
|
register_block_type_from_metadata(
|