@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/gallery/index.php
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* we add a custom `data-id` attribute before rendering the gallery
|
|
14
14
|
* so that the Image Block can pick it up in its render_callback.
|
|
15
15
|
*
|
|
16
|
+
* @since 5.9.0
|
|
17
|
+
*
|
|
16
18
|
* @param array $parsed_block The block being rendered.
|
|
17
19
|
* @return array The migrated block object.
|
|
18
20
|
*/
|
|
@@ -35,6 +37,8 @@ add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility'
|
|
|
35
37
|
/**
|
|
36
38
|
* Renders the `core/gallery` block on the server.
|
|
37
39
|
*
|
|
40
|
+
* @since 6.0.0
|
|
41
|
+
*
|
|
38
42
|
* @param array $attributes Attributes of the block being rendered.
|
|
39
43
|
* @param string $content Content of the block being rendered.
|
|
40
44
|
* @return string The content of the block being rendered.
|
|
@@ -164,6 +168,8 @@ function block_core_gallery_render( $attributes, $content ) {
|
|
|
164
168
|
}
|
|
165
169
|
/**
|
|
166
170
|
* Registers the `core/gallery` block on server.
|
|
171
|
+
*
|
|
172
|
+
* @since 5.9.0
|
|
167
173
|
*/
|
|
168
174
|
function register_block_core_gallery() {
|
|
169
175
|
register_block_type_from_metadata(
|
package/src/gallery/v1/edit.js
CHANGED
|
@@ -411,7 +411,7 @@ function GalleryEdit( props ) {
|
|
|
411
411
|
value={ linkTo }
|
|
412
412
|
onChange={ setLinkTo }
|
|
413
413
|
options={ linkOptions }
|
|
414
|
-
hideCancelButton
|
|
414
|
+
hideCancelButton
|
|
415
415
|
/>
|
|
416
416
|
{ shouldShowSizeOptions && (
|
|
417
417
|
<SelectControl
|
|
@@ -420,7 +420,7 @@ function GalleryEdit( props ) {
|
|
|
420
420
|
value={ sizeSlug }
|
|
421
421
|
options={ imageSizeOptions }
|
|
422
422
|
onChange={ updateImagesSize }
|
|
423
|
-
hideCancelButton
|
|
423
|
+
hideCancelButton
|
|
424
424
|
/>
|
|
425
425
|
) }
|
|
426
426
|
</PanelBody>
|
|
@@ -140,7 +140,7 @@ export const Gallery = ( props ) => {
|
|
|
140
140
|
<BlockCaption
|
|
141
141
|
clientId={ clientId }
|
|
142
142
|
isSelected={ isCaptionSelected }
|
|
143
|
-
accessible
|
|
143
|
+
accessible
|
|
144
144
|
accessibilityLabelCreator={ ( caption ) =>
|
|
145
145
|
RichText.isEmpty( caption )
|
|
146
146
|
? /* translators: accessibility text. Empty gallery caption. */
|
package/src/group/editor.scss
CHANGED
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
margin: 0;
|
|
66
66
|
}
|
|
67
67
|
.components-placeholder__instructions {
|
|
68
|
-
text-align: center;
|
|
69
68
|
margin-bottom: 18px;
|
|
70
69
|
}
|
|
71
70
|
.wp-block-group-placeholder__variations svg {
|
|
@@ -92,6 +91,7 @@
|
|
|
92
91
|
.components-placeholder {
|
|
93
92
|
min-height: auto;
|
|
94
93
|
padding: $grid-unit-30;
|
|
94
|
+
align-items: center;
|
|
95
95
|
}
|
|
96
96
|
.is-small,
|
|
97
97
|
.is-medium {
|
package/src/heading/index.js
CHANGED
|
@@ -30,15 +30,16 @@ export const settings = {
|
|
|
30
30
|
const { content, level } = attributes;
|
|
31
31
|
|
|
32
32
|
const customName = attributes?.metadata?.name;
|
|
33
|
+
const hasContent = content?.trim().length > 0;
|
|
33
34
|
|
|
34
35
|
// In the list view, use the block's content as the label.
|
|
35
36
|
// If the content is empty, fall back to the default label.
|
|
36
|
-
if ( context === 'list-view' && ( customName ||
|
|
37
|
-
return
|
|
37
|
+
if ( context === 'list-view' && ( customName || hasContent ) ) {
|
|
38
|
+
return customName || content;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
if ( context === 'accessibility' ) {
|
|
41
|
-
return !
|
|
42
|
+
return ! hasContent
|
|
42
43
|
? sprintf(
|
|
43
44
|
/* translators: accessibility text. %s: heading level. */
|
|
44
45
|
__( 'Level %s. Empty.' ),
|
package/src/heading/index.php
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
* Would be transformed to:
|
|
15
15
|
* <h2 class="align-left wp-block-heading">Hello World</h2>
|
|
16
16
|
*
|
|
17
|
+
* @since 6.2.0
|
|
18
|
+
*
|
|
17
19
|
* @param array $attributes Attributes of the block being rendered.
|
|
18
20
|
* @param string $content Content of the block being rendered.
|
|
19
21
|
*
|
|
@@ -39,6 +41,8 @@ function block_core_heading_render( $attributes, $content ) {
|
|
|
39
41
|
|
|
40
42
|
/**
|
|
41
43
|
* Registers the `core/heading` block on server.
|
|
44
|
+
*
|
|
45
|
+
* @since 6.2.0
|
|
42
46
|
*/
|
|
43
47
|
function register_block_core_heading() {
|
|
44
48
|
register_block_type_from_metadata(
|
|
@@ -7,6 +7,7 @@ import { createBlock, getBlockAttributes } from '@wordpress/blocks';
|
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { getLevelFromHeadingNodeName } from './shared';
|
|
10
|
+
import { getTransformedMetadata } from '../utils/get-transformed-metadata';
|
|
10
11
|
|
|
11
12
|
const transforms = {
|
|
12
13
|
from: [
|
|
@@ -15,12 +16,20 @@ const transforms = {
|
|
|
15
16
|
isMultiBlock: true,
|
|
16
17
|
blocks: [ 'core/paragraph' ],
|
|
17
18
|
transform: ( attributes ) =>
|
|
18
|
-
attributes.map(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
attributes.map(
|
|
20
|
+
( { content, anchor, align: textAlign, metadata } ) =>
|
|
21
|
+
createBlock( 'core/heading', {
|
|
22
|
+
content,
|
|
23
|
+
anchor,
|
|
24
|
+
textAlign,
|
|
25
|
+
metadata: getTransformedMetadata(
|
|
26
|
+
metadata,
|
|
27
|
+
'core/heading',
|
|
28
|
+
( { content: contentBinding } ) => ( {
|
|
29
|
+
content: contentBinding,
|
|
30
|
+
} )
|
|
31
|
+
),
|
|
32
|
+
} )
|
|
24
33
|
),
|
|
25
34
|
},
|
|
26
35
|
{
|
|
@@ -82,8 +91,18 @@ const transforms = {
|
|
|
82
91
|
isMultiBlock: true,
|
|
83
92
|
blocks: [ 'core/paragraph' ],
|
|
84
93
|
transform: ( attributes ) =>
|
|
85
|
-
attributes.map( ( { content, textAlign: align } ) =>
|
|
86
|
-
createBlock( 'core/paragraph', {
|
|
94
|
+
attributes.map( ( { content, textAlign: align, metadata } ) =>
|
|
95
|
+
createBlock( 'core/paragraph', {
|
|
96
|
+
content,
|
|
97
|
+
align,
|
|
98
|
+
metadata: getTransformedMetadata(
|
|
99
|
+
metadata,
|
|
100
|
+
'core/paragraph',
|
|
101
|
+
( { content: contentBinding } ) => ( {
|
|
102
|
+
content: contentBinding,
|
|
103
|
+
} )
|
|
104
|
+
),
|
|
105
|
+
} )
|
|
87
106
|
),
|
|
88
107
|
},
|
|
89
108
|
],
|
package/src/home-link/index.php
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* Build an array with CSS classes and inline styles defining the colors
|
|
10
10
|
* which will be applied to the home link markup in the front-end.
|
|
11
11
|
*
|
|
12
|
+
* @since 6.0.0
|
|
13
|
+
*
|
|
12
14
|
* @param array $context home link block context.
|
|
13
15
|
* @return array Colors CSS classes and inline styles.
|
|
14
16
|
*/
|
|
@@ -61,6 +63,8 @@ function block_core_home_link_build_css_colors( $context ) {
|
|
|
61
63
|
* Build an array with CSS classes and inline styles defining the font sizes
|
|
62
64
|
* which will be applied to the home link markup in the front-end.
|
|
63
65
|
*
|
|
66
|
+
* @since 6.0.0
|
|
67
|
+
*
|
|
64
68
|
* @param array $context Home link block context.
|
|
65
69
|
* @return array Font size CSS classes and inline styles.
|
|
66
70
|
*/
|
|
@@ -88,6 +92,8 @@ function block_core_home_link_build_css_font_sizes( $context ) {
|
|
|
88
92
|
/**
|
|
89
93
|
* Builds an array with classes and style for the li wrapper
|
|
90
94
|
*
|
|
95
|
+
* @since 6.0.0
|
|
96
|
+
*
|
|
91
97
|
* @param array $context Home link block context.
|
|
92
98
|
* @return string The li wrapper attributes.
|
|
93
99
|
*/
|
|
@@ -121,6 +127,8 @@ function block_core_home_link_build_li_wrapper_attributes( $context ) {
|
|
|
121
127
|
/**
|
|
122
128
|
* Renders the `core/home-link` block.
|
|
123
129
|
*
|
|
130
|
+
* @since 6.0.0
|
|
131
|
+
*
|
|
124
132
|
* @param array $attributes The block attributes.
|
|
125
133
|
* @param string $content The saved content.
|
|
126
134
|
* @param WP_Block $block The parsed block.
|
|
@@ -155,6 +163,8 @@ function render_block_core_home_link( $attributes, $content, $block ) {
|
|
|
155
163
|
/**
|
|
156
164
|
* Register the home block
|
|
157
165
|
*
|
|
166
|
+
* @since 6.0.0
|
|
167
|
+
*
|
|
158
168
|
* @uses render_block_core_home_link()
|
|
159
169
|
* @throws WP_Error An WP_Error exception parsing the block definition.
|
|
160
170
|
*/
|
package/src/image/edit.js
CHANGED
|
@@ -7,6 +7,7 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { getBlobByURL, isBlobURL, revokeBlobURL } from '@wordpress/blob';
|
|
10
|
+
import { store as blocksStore } from '@wordpress/blocks';
|
|
10
11
|
import { Placeholder } from '@wordpress/components';
|
|
11
12
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
12
13
|
import {
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
useBlockEditingMode,
|
|
20
21
|
} from '@wordpress/block-editor';
|
|
21
22
|
import { useEffect, useRef, useState } from '@wordpress/element';
|
|
22
|
-
import { __ } from '@wordpress/i18n';
|
|
23
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
23
24
|
import { image as icon, plugins as pluginsIcon } from '@wordpress/icons';
|
|
24
25
|
import { store as noticesStore } from '@wordpress/notices';
|
|
25
26
|
|
|
@@ -335,14 +336,14 @@ export function ImageEdit( {
|
|
|
335
336
|
} );
|
|
336
337
|
|
|
337
338
|
// Much of this description is duplicated from MediaPlaceholder.
|
|
338
|
-
const { lockUrlControls = false } = useSelect(
|
|
339
|
+
const { lockUrlControls = false, lockUrlControlsMessage } = useSelect(
|
|
339
340
|
( select ) => {
|
|
340
341
|
if ( ! isSingleSelected ) {
|
|
341
342
|
return {};
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
const blockBindingsSource = unlock(
|
|
345
|
-
select(
|
|
346
|
+
select( blocksStore )
|
|
346
347
|
).getBlockBindingsSource( metadata?.bindings?.url?.source );
|
|
347
348
|
|
|
348
349
|
return {
|
|
@@ -350,6 +351,13 @@ export function ImageEdit( {
|
|
|
350
351
|
!! metadata?.bindings?.url &&
|
|
351
352
|
( ! blockBindingsSource ||
|
|
352
353
|
blockBindingsSource?.lockAttributesEditing ),
|
|
354
|
+
lockUrlControlsMessage: blockBindingsSource?.label
|
|
355
|
+
? sprintf(
|
|
356
|
+
/* translators: %s: Label of the bindings source. */
|
|
357
|
+
__( 'Connected to %s' ),
|
|
358
|
+
blockBindingsSource.label
|
|
359
|
+
)
|
|
360
|
+
: __( 'Connected to dynamic data' ),
|
|
353
361
|
};
|
|
354
362
|
},
|
|
355
363
|
[ isSingleSelected ]
|
|
@@ -361,7 +369,7 @@ export function ImageEdit( {
|
|
|
361
369
|
[ borderProps.className ]:
|
|
362
370
|
!! borderProps.className && ! isSingleSelected,
|
|
363
371
|
} ) }
|
|
364
|
-
withIllustration
|
|
372
|
+
withIllustration
|
|
365
373
|
icon={ lockUrlControls ? pluginsIcon : icon }
|
|
366
374
|
label={ __( 'Image' ) }
|
|
367
375
|
instructions={
|
|
@@ -386,7 +394,7 @@ export function ImageEdit( {
|
|
|
386
394
|
<span
|
|
387
395
|
className={ 'block-bindings-media-placeholder-message' }
|
|
388
396
|
>
|
|
389
|
-
{
|
|
397
|
+
{ lockUrlControlsMessage }
|
|
390
398
|
</span>
|
|
391
399
|
) : (
|
|
392
400
|
content
|
package/src/image/edit.native.js
CHANGED
|
@@ -889,7 +889,7 @@ export class ImageEdit extends Component {
|
|
|
889
889
|
return (
|
|
890
890
|
<MediaUpload
|
|
891
891
|
allowedTypes={ [ MEDIA_TYPE_IMAGE ] }
|
|
892
|
-
isReplacingMedia
|
|
892
|
+
isReplacingMedia
|
|
893
893
|
onSelect={ this.onSelectMediaUploadOption }
|
|
894
894
|
onSelectURL={ this.onSelectURL }
|
|
895
895
|
render={ ( { open, getMediaOptions } ) => {
|
package/src/image/editor.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Provide special styling for the placeholder.
|
|
2
2
|
// @todo: this particular minimal style of placeholder could be componentized further.
|
|
3
3
|
.wp-block-image.wp-block-image {
|
|
4
|
+
|
|
4
5
|
// Show Placeholder style on-select.
|
|
5
6
|
&.is-selected .components-placeholder {
|
|
6
7
|
// Block UI appearance.
|
package/src/image/image.js
CHANGED
|
@@ -33,7 +33,7 @@ import { useEffect, useMemo, useState, useRef } from '@wordpress/element';
|
|
|
33
33
|
import { __, _x, sprintf, isRTL } from '@wordpress/i18n';
|
|
34
34
|
import { DOWN } from '@wordpress/keycodes';
|
|
35
35
|
import { getFilename } from '@wordpress/url';
|
|
36
|
-
import { switchToBlockType } from '@wordpress/blocks';
|
|
36
|
+
import { switchToBlockType, store as blocksStore } from '@wordpress/blocks';
|
|
37
37
|
import { crop, overlayText, upload } from '@wordpress/icons';
|
|
38
38
|
import { store as noticesStore } from '@wordpress/notices';
|
|
39
39
|
import { store as coreStore } from '@wordpress/core-data';
|
|
@@ -78,7 +78,7 @@ const ImageWrapper = ( { href, children } ) => {
|
|
|
78
78
|
<a
|
|
79
79
|
href={ href }
|
|
80
80
|
onClick={ ( event ) => event.preventDefault() }
|
|
81
|
-
aria-disabled
|
|
81
|
+
aria-disabled
|
|
82
82
|
style={ {
|
|
83
83
|
// When the Image block is linked,
|
|
84
84
|
// it's wrapped with a disabled <a /> tag.
|
|
@@ -410,15 +410,19 @@ export default function Image( {
|
|
|
410
410
|
lockUrlControls = false,
|
|
411
411
|
lockHrefControls = false,
|
|
412
412
|
lockAltControls = false,
|
|
413
|
+
lockAltControlsMessage,
|
|
413
414
|
lockTitleControls = false,
|
|
415
|
+
lockTitleControlsMessage,
|
|
416
|
+
lockCaption = false,
|
|
414
417
|
} = useSelect(
|
|
415
418
|
( select ) => {
|
|
416
419
|
if ( ! isSingleSelected ) {
|
|
417
420
|
return {};
|
|
418
421
|
}
|
|
419
|
-
|
|
420
|
-
const {
|
|
421
|
-
|
|
422
|
+
const { getBlockBindingsSource } = unlock( select( blocksStore ) );
|
|
423
|
+
const { getBlockParentsByBlockName } = unlock(
|
|
424
|
+
select( blockEditorStore )
|
|
425
|
+
);
|
|
422
426
|
const {
|
|
423
427
|
url: urlBinding,
|
|
424
428
|
alt: altBinding,
|
|
@@ -444,14 +448,32 @@ export default function Image( {
|
|
|
444
448
|
// Disable editing the link of the URL if the image is inside a pattern instance.
|
|
445
449
|
// This is a temporary solution until we support overriding the link on the frontend.
|
|
446
450
|
hasParentPattern,
|
|
451
|
+
lockCaption:
|
|
452
|
+
// Disable editing the caption if the image is inside a pattern instance.
|
|
453
|
+
// This is a temporary solution until we support overriding the caption on the frontend.
|
|
454
|
+
hasParentPattern,
|
|
447
455
|
lockAltControls:
|
|
448
456
|
!! altBinding &&
|
|
449
457
|
( ! altBindingSource ||
|
|
450
458
|
altBindingSource?.lockAttributesEditing ),
|
|
459
|
+
lockAltControlsMessage: altBindingSource?.label
|
|
460
|
+
? sprintf(
|
|
461
|
+
/* translators: %s: Label of the bindings source. */
|
|
462
|
+
__( 'Connected to %s' ),
|
|
463
|
+
altBindingSource.label
|
|
464
|
+
)
|
|
465
|
+
: __( 'Connected to dynamic data' ),
|
|
451
466
|
lockTitleControls:
|
|
452
467
|
!! titleBinding &&
|
|
453
468
|
( ! titleBindingSource ||
|
|
454
469
|
titleBindingSource?.lockAttributesEditing ),
|
|
470
|
+
lockTitleControlsMessage: titleBindingSource?.label
|
|
471
|
+
? sprintf(
|
|
472
|
+
/* translators: %s: Label of the bindings source. */
|
|
473
|
+
__( 'Connected to %s' ),
|
|
474
|
+
titleBindingSource.label
|
|
475
|
+
)
|
|
476
|
+
: __( 'Connected to dynamic data' ),
|
|
455
477
|
};
|
|
456
478
|
},
|
|
457
479
|
[ clientId, isSingleSelected, metadata?.bindings ]
|
|
@@ -551,11 +573,7 @@ export default function Image( {
|
|
|
551
573
|
disabled={ lockAltControls }
|
|
552
574
|
help={
|
|
553
575
|
lockAltControls ? (
|
|
554
|
-
<>
|
|
555
|
-
{ __(
|
|
556
|
-
'Connected to a custom field'
|
|
557
|
-
) }
|
|
558
|
-
</>
|
|
576
|
+
<>{ lockAltControlsMessage }</>
|
|
559
577
|
) : (
|
|
560
578
|
<>
|
|
561
579
|
<ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
|
|
@@ -601,11 +619,7 @@ export default function Image( {
|
|
|
601
619
|
disabled={ lockTitleControls }
|
|
602
620
|
help={
|
|
603
621
|
lockTitleControls ? (
|
|
604
|
-
<>
|
|
605
|
-
{ __(
|
|
606
|
-
'Connected to a custom field'
|
|
607
|
-
) }
|
|
608
|
-
</>
|
|
622
|
+
<>{ lockTitleControlsMessage }</>
|
|
609
623
|
) : (
|
|
610
624
|
<>
|
|
611
625
|
{ __(
|
|
@@ -633,7 +647,7 @@ export default function Image( {
|
|
|
633
647
|
{ isSingleSelected && (
|
|
634
648
|
<ToolsPanelItem
|
|
635
649
|
label={ __( 'Alternative text' ) }
|
|
636
|
-
isShownByDefault
|
|
650
|
+
isShownByDefault
|
|
637
651
|
hasValue={ () => !! alt }
|
|
638
652
|
onDeselect={ () =>
|
|
639
653
|
setAttributes( { alt: undefined } )
|
|
@@ -646,11 +660,7 @@ export default function Image( {
|
|
|
646
660
|
readOnly={ lockAltControls }
|
|
647
661
|
help={
|
|
648
662
|
lockAltControls ? (
|
|
649
|
-
<>
|
|
650
|
-
{ __(
|
|
651
|
-
'Connected to a custom field'
|
|
652
|
-
) }
|
|
653
|
-
</>
|
|
663
|
+
<>{ lockAltControlsMessage }</>
|
|
654
664
|
) : (
|
|
655
665
|
<>
|
|
656
666
|
<ExternalLink href="https://www.w3.org/WAI/tutorials/images/decision-tree">
|
|
@@ -688,7 +698,7 @@ export default function Image( {
|
|
|
688
698
|
readOnly={ lockTitleControls }
|
|
689
699
|
help={
|
|
690
700
|
lockTitleControls ? (
|
|
691
|
-
<>{
|
|
701
|
+
<>{ lockTitleControlsMessage }</>
|
|
692
702
|
) : (
|
|
693
703
|
<>
|
|
694
704
|
{ __(
|
|
@@ -907,6 +917,7 @@ export default function Image( {
|
|
|
907
917
|
which causes duplicated image upload. */ }
|
|
908
918
|
{ ! temporaryURL && controls }
|
|
909
919
|
{ img }
|
|
920
|
+
|
|
910
921
|
<Caption
|
|
911
922
|
attributes={ attributes }
|
|
912
923
|
setAttributes={ setAttributes }
|
|
@@ -914,6 +925,7 @@ export default function Image( {
|
|
|
914
925
|
insertBlocksAfter={ insertBlocksAfter }
|
|
915
926
|
label={ __( 'Image caption text' ) }
|
|
916
927
|
showToolbarButton={ isSingleSelected && hasNonContentControls }
|
|
928
|
+
disableEditing={ lockCaption }
|
|
917
929
|
/>
|
|
918
930
|
</>
|
|
919
931
|
);
|
package/src/image/index.php
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* Renders the `core/image` block on the server,
|
|
10
10
|
* adding a data-id attribute to the element if core/gallery has added on pre-render.
|
|
11
11
|
*
|
|
12
|
+
* @since 5.9.0
|
|
13
|
+
*
|
|
12
14
|
* @param array $attributes The block attributes.
|
|
13
15
|
* @param string $content The block content.
|
|
14
16
|
* @param WP_Block $block The block object.
|
|
@@ -85,6 +87,8 @@ function render_block_core_image( $attributes, $content, $block ) {
|
|
|
85
87
|
*
|
|
86
88
|
* This is used to determine whether the lightbox should be rendered or not.
|
|
87
89
|
*
|
|
90
|
+
* @since 6.4.0
|
|
91
|
+
*
|
|
88
92
|
* @param array $block Block data.
|
|
89
93
|
*
|
|
90
94
|
* @return array Filtered block data.
|
|
@@ -115,6 +119,8 @@ function block_core_image_get_lightbox_settings( $block ) {
|
|
|
115
119
|
/**
|
|
116
120
|
* Adds the directives and layout needed for the lightbox behavior.
|
|
117
121
|
*
|
|
122
|
+
* @since 6.4.0
|
|
123
|
+
*
|
|
118
124
|
* @param string $block_content Rendered block content.
|
|
119
125
|
* @param array $block Block object.
|
|
120
126
|
*
|
|
@@ -219,6 +225,9 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
|
|
219
225
|
return $body_content;
|
|
220
226
|
}
|
|
221
227
|
|
|
228
|
+
/**
|
|
229
|
+
* @since 6.5.0
|
|
230
|
+
*/
|
|
222
231
|
function block_core_image_print_lightbox_overlay() {
|
|
223
232
|
$close_button_label = esc_attr__( 'Close' );
|
|
224
233
|
|
|
@@ -238,7 +247,7 @@ function block_core_image_print_lightbox_overlay() {
|
|
|
238
247
|
}
|
|
239
248
|
|
|
240
249
|
echo <<<HTML
|
|
241
|
-
<div
|
|
250
|
+
<div
|
|
242
251
|
class="wp-lightbox-overlay zoom"
|
|
243
252
|
data-wp-interactive="core/image"
|
|
244
253
|
data-wp-context='{}'
|
|
@@ -278,6 +287,8 @@ HTML;
|
|
|
278
287
|
|
|
279
288
|
/**
|
|
280
289
|
* Registers the `core/image` block on server.
|
|
290
|
+
*
|
|
291
|
+
* @since 5.9.0
|
|
281
292
|
*/
|
|
282
293
|
function register_block_core_image() {
|
|
283
294
|
register_block_type_from_metadata(
|
|
@@ -36,6 +36,8 @@ function wp_latest_comments_draft_or_post_title( $post = 0 ) {
|
|
|
36
36
|
/**
|
|
37
37
|
* Renders the `core/latest-comments` block on server.
|
|
38
38
|
*
|
|
39
|
+
* @since 5.1.0
|
|
40
|
+
*
|
|
39
41
|
* @param array $attributes The block attributes.
|
|
40
42
|
*
|
|
41
43
|
* @return string Returns the post content with latest comments added.
|
|
@@ -145,6 +147,8 @@ function render_block_core_latest_comments( $attributes = array() ) {
|
|
|
145
147
|
|
|
146
148
|
/**
|
|
147
149
|
* Registers the `core/latest-comments` block.
|
|
150
|
+
*
|
|
151
|
+
* @since 5.3.0
|
|
148
152
|
*/
|
|
149
153
|
function register_block_core_latest_comments() {
|
|
150
154
|
register_block_type_from_metadata(
|
|
@@ -201,7 +201,7 @@ class LatestPostsEdit extends Component {
|
|
|
201
201
|
value={ featuredImageAlign }
|
|
202
202
|
onChange={ this.onSetFeaturedImageAlign }
|
|
203
203
|
controls={ [ 'left', 'center', 'right' ] }
|
|
204
|
-
isBottomSheetControl
|
|
204
|
+
isBottomSheetControl
|
|
205
205
|
/>
|
|
206
206
|
<ToggleControl
|
|
207
207
|
label={ __( 'Add link to featured image' ) }
|
|
@@ -18,6 +18,8 @@ $block_core_latest_posts_excerpt_length = 0;
|
|
|
18
18
|
* Callback for the excerpt_length filter used by
|
|
19
19
|
* the Latest Posts block at render time.
|
|
20
20
|
*
|
|
21
|
+
* @since 5.4.0
|
|
22
|
+
*
|
|
21
23
|
* @return int Returns the global $block_core_latest_posts_excerpt_length variable
|
|
22
24
|
* to allow the excerpt_length filter respect the Latest Block setting.
|
|
23
25
|
*/
|
|
@@ -29,6 +31,8 @@ function block_core_latest_posts_get_excerpt_length() {
|
|
|
29
31
|
/**
|
|
30
32
|
* Renders the `core/latest-posts` block on server.
|
|
31
33
|
*
|
|
34
|
+
* @since 5.0.0
|
|
35
|
+
*
|
|
32
36
|
* @param array $attributes The block attributes.
|
|
33
37
|
*
|
|
34
38
|
* @return string Returns the post content with latest posts added.
|
|
@@ -218,6 +222,8 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
218
222
|
|
|
219
223
|
/**
|
|
220
224
|
* Registers the `core/latest-posts` block on server.
|
|
225
|
+
*
|
|
226
|
+
* @since 5.0.0
|
|
221
227
|
*/
|
|
222
228
|
function register_block_core_latest_posts() {
|
|
223
229
|
register_block_type_from_metadata(
|
|
@@ -241,6 +247,8 @@ add_action( 'init', 'register_block_core_latest_posts' );
|
|
|
241
247
|
* TODO: Remove when and if the bottom client-side deprecation for this block
|
|
242
248
|
* is removed.
|
|
243
249
|
*
|
|
250
|
+
* @since 5.5.0
|
|
251
|
+
*
|
|
244
252
|
* @param array $block A single parsed block object.
|
|
245
253
|
*
|
|
246
254
|
* @return array The migrated block object.
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
const OrderedListSettings = ( { setAttributes, reversed, start, type } ) => (
|
|
14
14
|
<InspectorControls>
|
|
15
|
-
<PanelBody title={ __( '
|
|
15
|
+
<PanelBody title={ __( 'Settings' ) }>
|
|
16
16
|
<TextControl
|
|
17
17
|
__nextHasNoMarginBottom
|
|
18
18
|
label={ __( 'Start value' ) }
|
package/src/list-item/edit.js
CHANGED
|
@@ -29,7 +29,6 @@ import {
|
|
|
29
29
|
useOutdentListItem,
|
|
30
30
|
useSplit,
|
|
31
31
|
useMerge,
|
|
32
|
-
useCopy,
|
|
33
32
|
} from './hooks';
|
|
34
33
|
import { convertToListItems } from './utils';
|
|
35
34
|
|
|
@@ -79,7 +78,7 @@ export default function ListItemEdit( {
|
|
|
79
78
|
mergeBlocks,
|
|
80
79
|
} ) {
|
|
81
80
|
const { placeholder, content } = attributes;
|
|
82
|
-
const blockProps = useBlockProps(
|
|
81
|
+
const blockProps = useBlockProps();
|
|
83
82
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
84
83
|
renderAppender: false,
|
|
85
84
|
__unstableDisableDropZone: true,
|