@wordpress/block-library 9.6.1 → 9.7.1-next.5368f64a9.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 +2 -0
- package/build/archives/edit.js +1 -1
- package/build/archives/edit.js.map +1 -1
- package/build/audio/edit.js +2 -1
- package/build/audio/edit.js.map +1 -1
- package/build/block/edit.js +5 -8
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.js +1 -1
- package/build/button/edit.js.map +1 -1
- package/build/buttons/index.js +1 -1
- package/build/categories/index.js +1 -0
- package/build/categories/index.js.map +1 -1
- package/build/comment-edit-link/index.js +13 -2
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +13 -2
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comments/edit/comments-legacy.js +1 -0
- package/build/comments/edit/comments-legacy.js.map +1 -1
- package/build/cover/deprecated.js +1 -1
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit/block-controls.js +4 -2
- package/build/cover/edit/block-controls.js.map +1 -1
- package/build/cover/edit/index.js +6 -3
- package/build/cover/edit/index.js.map +1 -1
- package/build/cover/edit/inspector-controls.js +4 -12
- package/build/cover/edit/inspector-controls.js.map +1 -1
- package/build/details/index.js +3 -1
- package/build/details/index.js.map +1 -1
- package/build/details/transforms.js +24 -0
- package/build/details/transforms.js.map +1 -0
- package/build/embed/edit.js +5 -11
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-placeholder.js +2 -0
- package/build/embed/embed-placeholder.js.map +1 -1
- package/build/embed/embed-preview.js +16 -4
- package/build/embed/embed-preview.js.map +1 -1
- package/build/file/edit.js +12 -1
- package/build/file/edit.js.map +1 -1
- package/build/file/transforms.js +18 -4
- package/build/file/transforms.js.map +1 -1
- package/build/freeform/edit.js +4 -4
- package/build/freeform/edit.js.map +1 -1
- package/build/freeform/modal.js +3 -0
- package/build/freeform/modal.js.map +1 -1
- package/build/home-link/edit.js +3 -9
- package/build/home-link/edit.js.map +1 -1
- package/build/image/edit.js +95 -45
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +39 -24
- package/build/image/image.js.map +1 -1
- package/build/image/transforms.js +0 -13
- package/build/image/transforms.js.map +1 -1
- package/build/image/use-max-width-observer.js +35 -0
- package/build/image/use-max-width-observer.js.map +1 -0
- package/build/image/utils.js +11 -0
- package/build/image/utils.js.map +1 -1
- package/build/latest-posts/edit.js +1 -1
- package/build/latest-posts/edit.js.map +1 -1
- package/build/media-text/deprecated.js +144 -3
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js +5 -5
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/image-fill.js +12 -0
- package/build/media-text/image-fill.js.map +1 -0
- package/build/media-text/media-container.js +21 -18
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/media-container.native.js +0 -7
- package/build/media-text/media-container.native.js.map +1 -1
- package/build/media-text/save.js +5 -6
- package/build/media-text/save.js.map +1 -1
- package/build/missing/edit.js +3 -2
- package/build/missing/edit.js.map +1 -1
- package/build/navigation/edit/deleted-navigation-warning.js +14 -7
- package/build/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build/navigation/edit/index.js +1 -0
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/menu-inspector-controls.js +2 -1
- package/build/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +1 -0
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/responsive-wrapper.js +2 -0
- package/build/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build/navigation/edit/unsaved-inner-blocks.js +4 -4
- package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build/navigation-link/link-ui.js +2 -1
- package/build/navigation-link/link-ui.js.map +1 -1
- package/build/page-list/convert-to-links-modal.js +2 -0
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +4 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/post-comments-form/form.js +1 -0
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +6 -8
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/edit.js +2 -4
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-title/index.js +4 -1
- package/build/post-title/index.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +3 -2
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/query/edit/inspector-controls/index.js +2 -10
- package/build/query/edit/inspector-controls/index.js.map +1 -1
- package/build/query/edit/query-content.js +9 -3
- package/build/query/edit/query-content.js.map +1 -1
- package/build/query/edit/query-placeholder.js +2 -0
- package/build/query/edit/query-placeholder.js.map +1 -1
- package/build/site-logo/edit.js +9 -13
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-title/index.js +4 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +4 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-links/edit.js +10 -9
- package/build/social-links/edit.js.map +1 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +1 -1
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +10 -1
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/placeholder.js +2 -0
- package/build/template-part/edit/placeholder.js.map +1 -1
- package/build/utils/hooks.js +10 -10
- package/build/utils/hooks.js.map +1 -1
- package/build/video/edit.js +16 -12
- package/build/video/edit.js.map +1 -1
- package/build/video/tracks-editor.js +3 -0
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/archives/edit.js +1 -1
- package/build-module/archives/edit.js.map +1 -1
- package/build-module/audio/edit.js +2 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/block/edit.js +6 -9
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.js +1 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/buttons/index.js +1 -1
- package/build-module/categories/index.js +1 -0
- package/build-module/categories/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +13 -2
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +13 -2
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comments/edit/comments-legacy.js +1 -0
- package/build-module/comments/edit/comments-legacy.js.map +1 -1
- package/build-module/cover/deprecated.js +1 -1
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit/block-controls.js +4 -2
- package/build-module/cover/edit/block-controls.js.map +1 -1
- package/build-module/cover/edit/index.js +6 -3
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/cover/edit/inspector-controls.js +5 -13
- package/build-module/cover/edit/inspector-controls.js.map +1 -1
- package/build-module/details/index.js +3 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/details/transforms.js +18 -0
- package/build-module/details/transforms.js.map +1 -0
- package/build-module/embed/edit.js +6 -12
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-placeholder.js +2 -0
- package/build-module/embed/embed-placeholder.js.map +1 -1
- package/build-module/embed/embed-preview.js +16 -4
- package/build-module/embed/embed-preview.js.map +1 -1
- package/build-module/file/edit.js +12 -1
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/transforms.js +18 -4
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/freeform/edit.js +4 -4
- package/build-module/freeform/edit.js.map +1 -1
- package/build-module/freeform/modal.js +3 -0
- package/build-module/freeform/modal.js.map +1 -1
- package/build-module/home-link/edit.js +3 -9
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/image/edit.js +99 -48
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +40 -25
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/transforms.js +0 -13
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/image/use-max-width-observer.js +29 -0
- package/build-module/image/use-max-width-observer.js.map +1 -0
- package/build-module/image/utils.js +11 -1
- package/build-module/image/utils.js.map +1 -1
- package/build-module/latest-posts/edit.js +1 -1
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/media-text/deprecated.js +144 -3
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +5 -5
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/image-fill.js +6 -0
- package/build-module/media-text/image-fill.js.map +1 -0
- package/build-module/media-text/media-container.js +21 -17
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/media-container.native.js +0 -1
- package/build-module/media-text/media-container.native.js.map +1 -1
- package/build-module/media-text/save.js +5 -6
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/missing/edit.js +3 -2
- package/build-module/missing/edit.js.map +1 -1
- package/build-module/navigation/edit/deleted-navigation-warning.js +15 -8
- package/build-module/navigation/edit/deleted-navigation-warning.js.map +1 -1
- package/build-module/navigation/edit/index.js +1 -0
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/menu-inspector-controls.js +2 -1
- package/build-module/navigation/edit/menu-inspector-controls.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +1 -0
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/responsive-wrapper.js +2 -0
- package/build-module/navigation/edit/responsive-wrapper.js.map +1 -1
- package/build-module/navigation/edit/unsaved-inner-blocks.js +4 -4
- package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
- package/build-module/navigation-link/link-ui.js +4 -3
- package/build-module/navigation-link/link-ui.js.map +1 -1
- package/build-module/page-list/convert-to-links-modal.js +2 -0
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +4 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +1 -0
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +6 -8
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/edit.js +3 -5
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-title/index.js +4 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +3 -2
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/query/edit/inspector-controls/index.js +2 -10
- package/build-module/query/edit/inspector-controls/index.js.map +1 -1
- package/build-module/query/edit/query-content.js +10 -4
- package/build-module/query/edit/query-content.js.map +1 -1
- package/build-module/query/edit/query-placeholder.js +2 -0
- package/build-module/query/edit/query-placeholder.js.map +1 -1
- package/build-module/site-logo/edit.js +10 -14
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-title/index.js +4 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +4 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-links/edit.js +11 -10
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +1 -1
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +10 -1
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/placeholder.js +2 -0
- package/build-module/template-part/edit/placeholder.js.map +1 -1
- package/build-module/utils/hooks.js +10 -10
- package/build-module/utils/hooks.js.map +1 -1
- package/build-module/video/edit.js +16 -13
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/tracks-editor.js +3 -0
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/button/editor-rtl.css +0 -4
- package/build-style/button/editor.css +0 -4
- package/build-style/buttons/editor-rtl.css +2 -5
- package/build-style/buttons/editor.css +2 -5
- package/build-style/buttons/style-rtl.css +2 -2
- package/build-style/buttons/style.css +2 -2
- package/build-style/comment-edit-link/style-rtl.css +94 -0
- package/build-style/comment-edit-link/style.css +94 -0
- package/build-style/comment-reply-link/style-rtl.css +94 -0
- package/build-style/comment-reply-link/style.css +94 -0
- package/build-style/comments-pagination/editor-rtl.css +2 -2
- package/build-style/comments-pagination/editor.css +2 -2
- package/build-style/common-rtl.css +2 -2
- package/build-style/common.css +2 -2
- package/build-style/cover/editor-rtl.css +0 -6
- package/build-style/cover/editor.css +0 -6
- package/build-style/editor-rtl.css +35 -99
- package/build-style/editor.css +35 -101
- package/build-style/group/editor-rtl.css +0 -1
- package/build-style/group/editor.css +0 -1
- package/build-style/image/editor-rtl.css +6 -27
- package/build-style/image/editor.css +6 -27
- package/build-style/media-text/editor-rtl.css +3 -1
- package/build-style/media-text/editor.css +3 -1
- package/build-style/media-text/style-rtl.css +20 -0
- package/build-style/media-text/style.css +20 -0
- package/build-style/navigation/editor-rtl.css +1 -2
- package/build-style/navigation/editor.css +1 -2
- package/build-style/post-featured-image/style-rtl.css +1 -1
- package/build-style/post-featured-image/style.css +1 -1
- package/build-style/post-title/style-rtl.css +21 -0
- package/build-style/post-title/style.css +21 -0
- package/build-style/query-pagination/editor-rtl.css +2 -16
- package/build-style/query-pagination/editor.css +2 -18
- package/build-style/query-pagination/style-rtl.css +0 -11
- package/build-style/query-pagination/style.css +0 -13
- package/build-style/site-title/editor-rtl.css +0 -4
- package/build-style/site-title/editor.css +0 -4
- package/build-style/site-title/style-rtl.css +21 -0
- package/build-style/site-title/style.css +21 -0
- package/build-style/social-links/editor-rtl.css +17 -0
- package/build-style/social-links/editor.css +17 -0
- package/build-style/style-rtl.css +75 -16
- package/build-style/style.css +75 -18
- package/build-style/video/editor-rtl.css +0 -29
- package/build-style/video/editor.css +0 -29
- package/package.json +42 -35
- package/src/archives/edit.js +1 -1
- package/src/audio/edit.js +1 -0
- package/src/block/edit.js +9 -11
- package/src/button/edit.js +1 -1
- package/src/button/editor.scss +0 -5
- package/src/buttons/block.json +1 -1
- package/src/buttons/editor.scss +2 -8
- package/src/buttons/style.scss +2 -2
- package/src/categories/block.json +1 -0
- package/src/categories/index.php +13 -2
- package/src/comment-edit-link/block.json +13 -2
- package/src/comment-edit-link/style.scss +4 -0
- package/src/comment-reply-link/block.json +13 -2
- package/src/comment-reply-link/style.scss +4 -0
- package/src/comments/edit/comments-legacy.js +1 -0
- package/src/comments-pagination/editor.scss +1 -1
- package/src/cover/deprecated.js +3 -2
- package/src/cover/edit/block-controls.js +2 -0
- package/src/cover/edit/index.js +6 -1
- package/src/cover/edit/inspector-controls.js +3 -15
- package/src/cover/editor.scss +0 -5
- package/src/cover/test/edit.js +30 -26
- package/src/details/index.js +2 -0
- package/src/details/transforms.js +26 -0
- package/src/embed/edit.js +0 -7
- package/src/embed/embed-placeholder.js +10 -2
- package/src/embed/embed-preview.js +22 -2
- package/src/file/edit.js +11 -0
- package/src/file/index.php +1 -1
- package/src/file/transforms.js +26 -6
- package/src/freeform/edit.js +4 -4
- package/src/freeform/editor.scss +1 -1
- package/src/freeform/modal.js +7 -1
- package/src/gallery/editor.scss +1 -1
- package/src/group/editor.scss +0 -1
- package/src/home-link/edit.js +4 -7
- package/src/image/edit.js +130 -47
- package/src/image/editor.scss +7 -41
- package/src/image/image.js +100 -67
- package/src/image/index.php +1 -1
- package/src/image/transforms.js +0 -23
- package/src/image/use-max-width-observer.js +32 -0
- package/src/image/utils.js +13 -1
- package/src/latest-posts/edit.js +1 -1
- package/src/media-text/deprecated.js +159 -3
- package/src/media-text/edit.js +5 -5
- package/src/media-text/editor.scss +3 -1
- package/src/media-text/image-fill.js +11 -0
- package/src/media-text/index.php +53 -43
- package/src/media-text/media-container.js +25 -25
- package/src/media-text/media-container.native.js +0 -2
- package/src/media-text/save.js +9 -13
- package/src/media-text/style.scss +21 -0
- package/src/media-text/test/image-fill.js +19 -0
- package/src/missing/edit.js +8 -3
- package/src/navigation/edit/deleted-navigation-warning.js +23 -13
- package/src/navigation/edit/index.js +1 -0
- package/src/navigation/edit/menu-inspector-controls.js +3 -1
- package/src/navigation/edit/navigation-menu-delete-control.js +1 -0
- package/src/navigation/edit/placeholder/index.js +1 -0
- package/src/navigation/edit/responsive-wrapper.js +2 -0
- package/src/navigation/edit/unsaved-inner-blocks.js +4 -4
- package/src/navigation/editor.scss +11 -4
- package/src/navigation/index.php +1 -1
- package/src/navigation-link/link-ui.js +4 -3
- package/src/page-list/convert-to-links-modal.js +6 -1
- package/src/page-list/edit.js +6 -1
- package/src/page-list/index.php +3 -1
- package/src/post-comments-form/form.js +1 -0
- package/src/post-featured-image/dimension-controls.js +4 -4
- package/src/post-featured-image/edit.js +3 -6
- package/src/post-featured-image/style.scss +1 -1
- package/src/post-title/block.json +4 -1
- package/src/post-title/style.scss +24 -0
- package/src/query/edit/enhanced-pagination-modal.js +7 -3
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -3
- package/src/query/edit/inspector-controls/index.js +2 -9
- package/src/query/edit/query-content.js +7 -0
- package/src/query/edit/query-placeholder.js +2 -0
- package/src/query/index.php +1 -1
- package/src/query-pagination/editor.scss +1 -21
- package/src/query-pagination/style.scss +0 -15
- package/src/search/index.php +1 -1
- package/src/site-logo/edit.js +11 -20
- package/src/site-title/block.json +4 -1
- package/src/site-title/editor.scss +0 -4
- package/src/site-title/style.scss +24 -0
- package/src/social-link/edit.js +2 -0
- package/src/social-links/edit.js +17 -10
- package/src/social-links/editor.scss +24 -5
- package/src/style.scss +2 -0
- package/src/tag-cloud/index.php +7 -2
- package/src/template-part/edit/advanced-controls.js +0 -1
- package/src/template-part/edit/index.js +12 -10
- package/src/template-part/edit/inner-blocks.js +20 -1
- package/src/template-part/edit/placeholder.js +6 -1
- package/src/utils/hooks.js +11 -11
- package/src/video/edit.js +24 -21
- package/src/video/editor.scss +0 -45
- package/src/video/tracks-editor.js +3 -0
- package/src/media-text/test/media-container.js +0 -24
package/src/page-list/edit.js
CHANGED
|
@@ -225,7 +225,11 @@ export default function PageListEdit( {
|
|
|
225
225
|
page.title?.rendered?.trim() !== ''
|
|
226
226
|
? page.title?.rendered
|
|
227
227
|
: __( '(no title)' ),
|
|
228
|
-
title:
|
|
228
|
+
title:
|
|
229
|
+
// translators: displayed when a page has an empty title.
|
|
230
|
+
page.title?.rendered?.trim() !== ''
|
|
231
|
+
? page.title?.rendered
|
|
232
|
+
: __( '(no title)' ),
|
|
229
233
|
link: page.url,
|
|
230
234
|
hasChildren,
|
|
231
235
|
};
|
|
@@ -338,6 +342,7 @@ export default function PageListEdit( {
|
|
|
338
342
|
<PanelBody title={ __( 'Edit this menu' ) }>
|
|
339
343
|
<p>{ convertDescription }</p>
|
|
340
344
|
<Button
|
|
345
|
+
__next40pxDefaultSize
|
|
341
346
|
variant="primary"
|
|
342
347
|
accessibleWhenDisabled
|
|
343
348
|
disabled={ ! hasResolvedPages }
|
package/src/page-list/index.php
CHANGED
|
@@ -192,7 +192,9 @@ function block_core_page_list_render_nested_page_list( $open_submenus_on_click,
|
|
|
192
192
|
$css_class .= ' menu-item-home';
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
$title
|
|
195
|
+
$title = wp_kses_post( $page['title'] );
|
|
196
|
+
$title = $title ? $title : __( '(no title)' );
|
|
197
|
+
|
|
196
198
|
$aria_label = sprintf(
|
|
197
199
|
/* translators: Accessibility text. %s: Parent page title. */
|
|
198
200
|
__( '%s submenu' ),
|
|
@@ -134,8 +134,7 @@ const DimensionControls = ( {
|
|
|
134
134
|
panelId={ clientId }
|
|
135
135
|
>
|
|
136
136
|
<SelectControl
|
|
137
|
-
|
|
138
|
-
__next40pxDefaultSize={ false }
|
|
137
|
+
__next40pxDefaultSize
|
|
139
138
|
__nextHasNoMarginBottom
|
|
140
139
|
label={ __( 'Aspect ratio' ) }
|
|
141
140
|
value={ aspectRatio }
|
|
@@ -157,6 +156,7 @@ const DimensionControls = ( {
|
|
|
157
156
|
panelId={ clientId }
|
|
158
157
|
>
|
|
159
158
|
<UnitControl
|
|
159
|
+
__next40pxDefaultSize
|
|
160
160
|
label={ __( 'Height' ) }
|
|
161
161
|
labelPosition="top"
|
|
162
162
|
value={ height || '' }
|
|
@@ -179,6 +179,7 @@ const DimensionControls = ( {
|
|
|
179
179
|
panelId={ clientId }
|
|
180
180
|
>
|
|
181
181
|
<UnitControl
|
|
182
|
+
__next40pxDefaultSize
|
|
182
183
|
label={ __( 'Width' ) }
|
|
183
184
|
labelPosition="top"
|
|
184
185
|
value={ width || '' }
|
|
@@ -235,8 +236,7 @@ const DimensionControls = ( {
|
|
|
235
236
|
panelId={ clientId }
|
|
236
237
|
>
|
|
237
238
|
<SelectControl
|
|
238
|
-
|
|
239
|
-
__next40pxDefaultSize={ false }
|
|
239
|
+
__next40pxDefaultSize
|
|
240
240
|
__nextHasNoMarginBottom
|
|
241
241
|
label={ __( 'Resolution' ) }
|
|
242
242
|
value={ sizeSlug || DEFAULT_SIZE }
|
|
@@ -10,7 +10,6 @@ import { isBlobURL } from '@wordpress/blob';
|
|
|
10
10
|
import { useEntityProp, store as coreStore } from '@wordpress/core-data';
|
|
11
11
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
12
12
|
import {
|
|
13
|
-
MenuItem,
|
|
14
13
|
ToggleControl,
|
|
15
14
|
PanelBody,
|
|
16
15
|
Placeholder,
|
|
@@ -309,6 +308,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
309
308
|
mediaLibraryButton={ ( { open } ) => {
|
|
310
309
|
return (
|
|
311
310
|
<Button
|
|
311
|
+
__next40pxDefaultSize
|
|
312
312
|
icon={ upload }
|
|
313
313
|
variant="primary"
|
|
314
314
|
label={ label }
|
|
@@ -366,11 +366,8 @@ export default function PostFeaturedImageEdit( {
|
|
|
366
366
|
accept="image/*"
|
|
367
367
|
onSelect={ onSelectImage }
|
|
368
368
|
onError={ onUploadError }
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
{ __( 'Reset' ) }
|
|
372
|
-
</MenuItem>
|
|
373
|
-
</MediaReplaceFlow>
|
|
369
|
+
onReset={ () => setFeaturedImage( 0 ) }
|
|
370
|
+
/>
|
|
374
371
|
</BlockControls>
|
|
375
372
|
) }
|
|
376
373
|
<figure { ...blockProps }>
|
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
// This block has customizable padding, border-box makes that more predictable.
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
|
|
6
|
+
&[style*="font-weight"] :where(a) {
|
|
7
|
+
font-weight: inherit;
|
|
8
|
+
}
|
|
9
|
+
&[class*="-font-family"] :where(a),
|
|
10
|
+
&[style*="font-family"] :where(a) {
|
|
11
|
+
font-family: inherit;
|
|
12
|
+
}
|
|
13
|
+
&[class*="-font-size"] :where(a),
|
|
14
|
+
&[style*="font-size"] :where(a) {
|
|
15
|
+
font-size: inherit;
|
|
16
|
+
}
|
|
17
|
+
&[style*="line-height"] :where(a) {
|
|
18
|
+
line-height: inherit;
|
|
19
|
+
}
|
|
20
|
+
&[style*="font-style"] :where(a) {
|
|
21
|
+
font-style: inherit;
|
|
22
|
+
}
|
|
23
|
+
&[style*="letter-spacing"] :where(a) {
|
|
24
|
+
letter-spacing: inherit;
|
|
25
|
+
}
|
|
26
|
+
&[style*="text-decoration"] :where(a) {
|
|
27
|
+
text-decoration: inherit;
|
|
28
|
+
}
|
|
29
|
+
|
|
6
30
|
a {
|
|
7
31
|
display: inline-block;
|
|
8
32
|
}
|
|
@@ -42,7 +42,7 @@ export default function EnhancedPaginationModal( {
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
let notice = __(
|
|
45
|
-
'If you still want to prevent full page reloads, remove that block, then disable "
|
|
45
|
+
'If you still want to prevent full page reloads, remove that block, then disable "Reload full page" again in the Query Block settings.'
|
|
46
46
|
);
|
|
47
47
|
if ( hasBlocksFromPlugins ) {
|
|
48
48
|
notice =
|
|
@@ -63,7 +63,7 @@ export default function EnhancedPaginationModal( {
|
|
|
63
63
|
return (
|
|
64
64
|
isOpen && (
|
|
65
65
|
<Modal
|
|
66
|
-
title={ __( 'Query block:
|
|
66
|
+
title={ __( 'Query block: Reload full page enabled' ) }
|
|
67
67
|
className="wp-block-query__enhanced-pagination-modal"
|
|
68
68
|
aria={ {
|
|
69
69
|
describedby: modalDescriptionId,
|
|
@@ -75,7 +75,11 @@ export default function EnhancedPaginationModal( {
|
|
|
75
75
|
>
|
|
76
76
|
<VStack alignment="right" spacing={ 5 }>
|
|
77
77
|
<span id={ modalDescriptionId }>{ notice }</span>
|
|
78
|
-
<Button
|
|
78
|
+
<Button
|
|
79
|
+
__next40pxDefaultSize
|
|
80
|
+
variant="primary"
|
|
81
|
+
onClick={ closeModal }
|
|
82
|
+
>
|
|
79
83
|
{ __( 'OK' ) }
|
|
80
84
|
</Button>
|
|
81
85
|
</VStack>
|
|
@@ -25,11 +25,11 @@ export default function EnhancedPaginationControl( {
|
|
|
25
25
|
);
|
|
26
26
|
} else if ( enhancedPagination ) {
|
|
27
27
|
help = __(
|
|
28
|
-
|
|
28
|
+
'Reload the full page—instead of just the posts list—when visitors navigate between pages.'
|
|
29
29
|
);
|
|
30
30
|
} else if ( hasUnsupportedBlocks ) {
|
|
31
31
|
help = __(
|
|
32
|
-
|
|
32
|
+
'Enhancement disabled because there are non-compatible blocks inside the Query block.'
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -37,7 +37,7 @@ export default function EnhancedPaginationControl( {
|
|
|
37
37
|
<>
|
|
38
38
|
<ToggleControl
|
|
39
39
|
__nextHasNoMarginBottom
|
|
40
|
-
label={ __( '
|
|
40
|
+
label={ __( 'Reload full page' ) }
|
|
41
41
|
help={ help }
|
|
42
42
|
checked={
|
|
43
43
|
! enhancedPagination && ! fullPageClientSideNavigation
|
|
@@ -25,7 +25,6 @@ import AuthorControl from './author-control';
|
|
|
25
25
|
import ParentControl from './parent-control';
|
|
26
26
|
import { TaxonomyControls } from './taxonomy-controls';
|
|
27
27
|
import StickyControl from './sticky-control';
|
|
28
|
-
import EnhancedPaginationControl from './enhanced-pagination-control';
|
|
29
28
|
import CreateNewPostLink from './create-new-post-link';
|
|
30
29
|
import PerPageControl from './per-page-control';
|
|
31
30
|
import OffsetControl from './offset-controls';
|
|
@@ -43,9 +42,8 @@ import { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';
|
|
|
43
42
|
const { BlockInfo } = unlock( blockEditorPrivateApis );
|
|
44
43
|
|
|
45
44
|
export default function QueryInspectorControls( props ) {
|
|
46
|
-
const { attributes, setQuery, setDisplayLayout
|
|
47
|
-
|
|
48
|
-
const { query, displayLayout, enhancedPagination } = attributes;
|
|
45
|
+
const { attributes, setQuery, setDisplayLayout } = props;
|
|
46
|
+
const { query, displayLayout } = attributes;
|
|
49
47
|
const {
|
|
50
48
|
order,
|
|
51
49
|
orderBy,
|
|
@@ -262,11 +260,6 @@ export default function QueryInspectorControls( props ) {
|
|
|
262
260
|
}
|
|
263
261
|
/>
|
|
264
262
|
) }
|
|
265
|
-
<EnhancedPaginationControl
|
|
266
|
-
enhancedPagination={ enhancedPagination }
|
|
267
|
-
setAttributes={ setAttributes }
|
|
268
|
-
clientId={ clientId }
|
|
269
|
-
/>
|
|
270
263
|
</PanelBody>
|
|
271
264
|
) }
|
|
272
265
|
{ ! inherit && showDisplayPanel && (
|
|
@@ -18,6 +18,7 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
18
18
|
/**
|
|
19
19
|
* Internal dependencies
|
|
20
20
|
*/
|
|
21
|
+
import EnhancedPaginationControl from './inspector-controls/enhanced-pagination-control';
|
|
21
22
|
import QueryToolbar from './query-toolbar';
|
|
22
23
|
import QueryInspectorControls from './inspector-controls';
|
|
23
24
|
import EnhancedPaginationModal from './enhanced-pagination-modal';
|
|
@@ -36,6 +37,7 @@ export default function QueryContent( {
|
|
|
36
37
|
queryId,
|
|
37
38
|
query,
|
|
38
39
|
displayLayout,
|
|
40
|
+
enhancedPagination,
|
|
39
41
|
tagName: TagName = 'div',
|
|
40
42
|
query: { inherit } = {},
|
|
41
43
|
} = attributes;
|
|
@@ -161,6 +163,11 @@ export default function QueryContent( {
|
|
|
161
163
|
}
|
|
162
164
|
help={ htmlElementMessages[ TagName ] }
|
|
163
165
|
/>
|
|
166
|
+
<EnhancedPaginationControl
|
|
167
|
+
enhancedPagination={ enhancedPagination }
|
|
168
|
+
setAttributes={ setAttributes }
|
|
169
|
+
clientId={ clientId }
|
|
170
|
+
/>
|
|
164
171
|
</InspectorControls>
|
|
165
172
|
<TagName { ...innerBlocksProps } />
|
|
166
173
|
</>
|
|
@@ -79,6 +79,7 @@ export default function QueryPlaceholder( {
|
|
|
79
79
|
>
|
|
80
80
|
{ !! hasPatterns && (
|
|
81
81
|
<Button
|
|
82
|
+
__next40pxDefaultSize
|
|
82
83
|
variant="primary"
|
|
83
84
|
onClick={ openPatternSelectionModal }
|
|
84
85
|
>
|
|
@@ -87,6 +88,7 @@ export default function QueryPlaceholder( {
|
|
|
87
88
|
) }
|
|
88
89
|
|
|
89
90
|
<Button
|
|
91
|
+
__next40pxDefaultSize
|
|
90
92
|
variant="secondary"
|
|
91
93
|
onClick={ () => {
|
|
92
94
|
setIsStartingBlank( true );
|
package/src/query/index.php
CHANGED
|
@@ -26,7 +26,7 @@ function render_block_core_query( $attributes, $content, $block ) {
|
|
|
26
26
|
if ( $is_interactive ) {
|
|
27
27
|
$suffix = wp_scripts_get_suffix();
|
|
28
28
|
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
|
29
|
-
$module_url = gutenberg_url( '/build/
|
|
29
|
+
$module_url = gutenberg_url( '/build-module/block-library/query/view.min.js' );
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
wp_register_script_module(
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
$pagination-margin: 0.5em;
|
|
2
|
-
|
|
3
1
|
// Center flex items. This has an equivalent in style.scss.
|
|
4
2
|
.wp-block[data-align="center"] > .wp-block-query-pagination {
|
|
5
3
|
justify-content: center;
|
|
6
4
|
}
|
|
7
5
|
|
|
8
|
-
.editor-styles-wrapper {
|
|
6
|
+
:where(.editor-styles-wrapper) {
|
|
9
7
|
.wp-block-query-pagination {
|
|
10
8
|
max-width: 100%;
|
|
11
9
|
&.block-editor-block-list__layout {
|
|
@@ -14,21 +12,3 @@ $pagination-margin: 0.5em;
|
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
.wp-block-query-pagination {
|
|
18
|
-
> .wp-block-query-pagination-next,
|
|
19
|
-
> .wp-block-query-pagination-previous,
|
|
20
|
-
> .wp-block-query-pagination-numbers {
|
|
21
|
-
// Override editor auto block margins.
|
|
22
|
-
margin-left: 0;
|
|
23
|
-
margin-top: $pagination-margin;
|
|
24
|
-
|
|
25
|
-
/*rtl:ignore*/
|
|
26
|
-
margin-right: $pagination-margin;
|
|
27
|
-
margin-bottom: $pagination-margin;
|
|
28
|
-
|
|
29
|
-
&:last-child {
|
|
30
|
-
/*rtl:ignore*/
|
|
31
|
-
margin-right: 0;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
$pagination-margin: 0.5em;
|
|
2
1
|
.wp-block-query-pagination {
|
|
3
|
-
// Increased specificity to override blocks default margin.
|
|
4
|
-
> .wp-block-query-pagination-next,
|
|
5
|
-
> .wp-block-query-pagination-previous,
|
|
6
|
-
> .wp-block-query-pagination-numbers {
|
|
7
|
-
/*rtl:ignore*/
|
|
8
|
-
margin-right: $pagination-margin;
|
|
9
|
-
margin-bottom: $pagination-margin;
|
|
10
|
-
|
|
11
|
-
&:last-child {
|
|
12
|
-
/*rtl:ignore*/
|
|
13
|
-
margin-right: 0;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
2
|
// This moves the next link to the right side of the container,
|
|
18
3
|
// which is important when it's the only block displayed
|
|
19
4
|
// and the block has a "space-between" justification.
|
package/src/search/index.php
CHANGED
|
@@ -82,7 +82,7 @@ function render_block_core_search( $attributes ) {
|
|
|
82
82
|
if ( $is_expandable_searchfield ) {
|
|
83
83
|
$suffix = wp_scripts_get_suffix();
|
|
84
84
|
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
|
85
|
-
$module_url = gutenberg_url( '/build/
|
|
85
|
+
$module_url = gutenberg_url( '/build-module/block-library/search/view.min.js' );
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
wp_register_script_module(
|
package/src/site-logo/edit.js
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
} from '@wordpress/element';
|
|
15
15
|
import { __, isRTL } from '@wordpress/i18n';
|
|
16
16
|
import {
|
|
17
|
-
MenuItem,
|
|
18
17
|
PanelBody,
|
|
19
18
|
RangeControl,
|
|
20
19
|
ResizableBox,
|
|
@@ -356,22 +355,11 @@ function SiteLogoReplaceFlow( {
|
|
|
356
355
|
return (
|
|
357
356
|
<MediaReplaceFlow
|
|
358
357
|
{ ...mediaReplaceProps }
|
|
358
|
+
mediaURL={ mediaURL }
|
|
359
359
|
allowedTypes={ ALLOWED_MEDIA_TYPES }
|
|
360
360
|
accept={ ACCEPT_MEDIA_STRING }
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
mediaURL && (
|
|
364
|
-
<MenuItem
|
|
365
|
-
onClick={ () => {
|
|
366
|
-
onRemoveLogo();
|
|
367
|
-
onClose();
|
|
368
|
-
} }
|
|
369
|
-
>
|
|
370
|
-
{ __( 'Reset' ) }
|
|
371
|
-
</MenuItem>
|
|
372
|
-
)
|
|
373
|
-
}
|
|
374
|
-
</MediaReplaceFlow>
|
|
361
|
+
onReset={ onRemoveLogo }
|
|
362
|
+
/>
|
|
375
363
|
);
|
|
376
364
|
}
|
|
377
365
|
|
|
@@ -435,7 +423,7 @@ export default function LogoEdit( {
|
|
|
435
423
|
context: 'view',
|
|
436
424
|
} );
|
|
437
425
|
const _isRequestingMediaItem =
|
|
438
|
-
_siteLogoId &&
|
|
426
|
+
!! _siteLogoId &&
|
|
439
427
|
! select( coreStore ).hasFinishedResolution( 'getMedia', [
|
|
440
428
|
_siteLogoId,
|
|
441
429
|
{ context: 'view' },
|
|
@@ -639,6 +627,7 @@ export default function LogoEdit( {
|
|
|
639
627
|
render={ ( { open } ) => (
|
|
640
628
|
<div className="block-library-site-logo__inspector-upload-container">
|
|
641
629
|
<Button
|
|
630
|
+
__next40pxDefaultSize
|
|
642
631
|
onClick={ open }
|
|
643
632
|
variant="secondary"
|
|
644
633
|
>
|
|
@@ -664,16 +653,17 @@ export default function LogoEdit( {
|
|
|
664
653
|
{ controls }
|
|
665
654
|
{ mediaInspectorPanel }
|
|
666
655
|
{ ( !! logoUrl || !! temporaryURL ) && logoImage }
|
|
667
|
-
{
|
|
668
|
-
|
|
669
|
-
|
|
656
|
+
{ ( isLoading ||
|
|
657
|
+
( ! temporaryURL && ! logoUrl && ! canUserEdit ) ) && (
|
|
658
|
+
<Placeholder className="site-logo_placeholder" withIllustration>
|
|
659
|
+
{ isLoading && (
|
|
670
660
|
<span className="components-placeholder__preview">
|
|
671
661
|
<Spinner />
|
|
672
662
|
</span>
|
|
673
663
|
) }
|
|
674
664
|
</Placeholder>
|
|
675
665
|
) }
|
|
676
|
-
{ ! temporaryURL && ! logoUrl && canUserEdit && (
|
|
666
|
+
{ ! isLoading && ! temporaryURL && ! logoUrl && canUserEdit && (
|
|
677
667
|
<MediaPlaceholder
|
|
678
668
|
onSelect={ onInitialSelectLogo }
|
|
679
669
|
accept={ ACCEPT_MEDIA_STRING }
|
|
@@ -683,6 +673,7 @@ export default function LogoEdit( {
|
|
|
683
673
|
mediaLibraryButton={ ( { open } ) => {
|
|
684
674
|
return (
|
|
685
675
|
<Button
|
|
676
|
+
__next40pxDefaultSize
|
|
686
677
|
icon={ upload }
|
|
687
678
|
variant="primary"
|
|
688
679
|
label={ __( 'Choose logo' ) }
|
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
// This block has customizable padding, border-box makes that more predictable.
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
|
|
5
|
+
&[style*="font-weight"] :where(a) {
|
|
6
|
+
font-weight: inherit;
|
|
7
|
+
}
|
|
8
|
+
&[class*="-font-family"] :where(a),
|
|
9
|
+
&[style*="font-family"] :where(a) {
|
|
10
|
+
font-family: inherit;
|
|
11
|
+
}
|
|
12
|
+
&[class*="-font-size"] :where(a),
|
|
13
|
+
&[style*="font-size"] :where(a) {
|
|
14
|
+
font-size: inherit;
|
|
15
|
+
}
|
|
16
|
+
&[style*="line-height"] :where(a) {
|
|
17
|
+
line-height: inherit;
|
|
18
|
+
}
|
|
19
|
+
&[style*="font-style"] :where(a) {
|
|
20
|
+
font-style: inherit;
|
|
21
|
+
}
|
|
22
|
+
&[style*="letter-spacing"] :where(a) {
|
|
23
|
+
letter-spacing: inherit;
|
|
24
|
+
}
|
|
25
|
+
&[style*="text-decoration"] :where(a) {
|
|
26
|
+
text-decoration: inherit;
|
|
27
|
+
}
|
|
28
|
+
|
|
5
29
|
:where(a) {
|
|
6
30
|
color: inherit;
|
|
7
31
|
}
|
package/src/social-link/edit.js
CHANGED
package/src/social-links/edit.js
CHANGED
|
@@ -14,8 +14,10 @@ import {
|
|
|
14
14
|
InspectorControls,
|
|
15
15
|
ContrastChecker,
|
|
16
16
|
withColors,
|
|
17
|
+
InnerBlocks,
|
|
17
18
|
__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,
|
|
18
19
|
__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,
|
|
20
|
+
store as blockEditorStore,
|
|
19
21
|
} from '@wordpress/block-editor';
|
|
20
22
|
import {
|
|
21
23
|
MenuGroup,
|
|
@@ -26,6 +28,7 @@ import {
|
|
|
26
28
|
} from '@wordpress/components';
|
|
27
29
|
import { __ } from '@wordpress/i18n';
|
|
28
30
|
import { check } from '@wordpress/icons';
|
|
31
|
+
import { useSelect } from '@wordpress/data';
|
|
29
32
|
|
|
30
33
|
const sizeOptions = [
|
|
31
34
|
{ name: __( 'Small' ), value: 'has-small-icon-size' },
|
|
@@ -55,14 +58,22 @@ export function SocialLinksEdit( props ) {
|
|
|
55
58
|
size,
|
|
56
59
|
} = attributes;
|
|
57
60
|
|
|
61
|
+
const hasSelectedChild = useSelect(
|
|
62
|
+
( select ) =>
|
|
63
|
+
select( blockEditorStore ).hasSelectedInnerBlock( clientId ),
|
|
64
|
+
[ clientId ]
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
const hasAnySelected = isSelected || hasSelectedChild;
|
|
68
|
+
|
|
58
69
|
const logosOnly = attributes.className?.includes( 'is-style-logos-only' );
|
|
59
70
|
|
|
60
71
|
// Remove icon background color when logos only style is selected or
|
|
61
72
|
// restore it when any other style is selected.
|
|
62
|
-
const
|
|
73
|
+
const backgroundBackupRef = useRef( {} );
|
|
63
74
|
useEffect( () => {
|
|
64
75
|
if ( logosOnly ) {
|
|
65
|
-
|
|
76
|
+
backgroundBackupRef.current = {
|
|
66
77
|
iconBackgroundColor,
|
|
67
78
|
iconBackgroundColorValue,
|
|
68
79
|
customIconBackgroundColor,
|
|
@@ -73,8 +84,9 @@ export function SocialLinksEdit( props ) {
|
|
|
73
84
|
iconBackgroundColorValue: undefined,
|
|
74
85
|
} );
|
|
75
86
|
} else {
|
|
76
|
-
setAttributes( { ...
|
|
87
|
+
setAttributes( { ...backgroundBackupRef.current } );
|
|
77
88
|
}
|
|
89
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
90
|
}, [ logosOnly ] );
|
|
79
91
|
|
|
80
92
|
const SocialPlaceholder = (
|
|
@@ -87,12 +99,6 @@ export function SocialLinksEdit( props ) {
|
|
|
87
99
|
</li>
|
|
88
100
|
);
|
|
89
101
|
|
|
90
|
-
const SelectedSocialPlaceholder = (
|
|
91
|
-
<li className="wp-block-social-links__social-prompt">
|
|
92
|
-
{ __( 'Click plus to add' ) }
|
|
93
|
-
</li>
|
|
94
|
-
);
|
|
95
|
-
|
|
96
102
|
// Fallback color values are used maintain selections in case switching
|
|
97
103
|
// themes and named colors in palette do not match.
|
|
98
104
|
const className = clsx( size, {
|
|
@@ -104,10 +110,11 @@ export function SocialLinksEdit( props ) {
|
|
|
104
110
|
|
|
105
111
|
const blockProps = useBlockProps( { className } );
|
|
106
112
|
const innerBlocksProps = useInnerBlocksProps( blockProps, {
|
|
107
|
-
placeholder: isSelected
|
|
113
|
+
placeholder: ! isSelected && SocialPlaceholder,
|
|
108
114
|
templateLock: false,
|
|
109
115
|
orientation: attributes.layout?.orientation ?? 'horizontal',
|
|
110
116
|
__experimentalAppenderTagName: 'li',
|
|
117
|
+
renderAppender: hasAnySelected && InnerBlocks.ButtonBlockAppender,
|
|
111
118
|
} );
|
|
112
119
|
|
|
113
120
|
const POPOVER_PROPS = {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
// Editor specific styles for Social Links.
|
|
2
|
-
.wp-block-social-links {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
margin-left: $grid-unit-10;
|
|
6
|
-
}
|
|
2
|
+
.wp-block-social-links div.block-editor-url-input {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
margin-left: $grid-unit-10;
|
|
7
5
|
}
|
|
8
6
|
|
|
7
|
+
|
|
9
8
|
// Prevent toolbar from jumping when selecting / hovering a link.
|
|
10
9
|
.wp-social-link:hover {
|
|
11
10
|
transform: none;
|
|
@@ -98,3 +97,23 @@
|
|
|
98
97
|
.wp-social-link.wp-social-link__is-incomplete:focus {
|
|
99
98
|
opacity: 1;
|
|
100
99
|
}
|
|
100
|
+
|
|
101
|
+
.wp-block-social-links .block-list-appender {
|
|
102
|
+
position: static; // display inline.
|
|
103
|
+
|
|
104
|
+
.block-editor-button-block-appender.components-button.components-button {
|
|
105
|
+
padding: $grid-unit-10 - 2px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.wp-block-social-links {
|
|
110
|
+
&.has-small-icon-size .block-editor-button-block-appender.components-button.components-button {
|
|
111
|
+
padding: 0;
|
|
112
|
+
}
|
|
113
|
+
&.has-large-icon-size .block-editor-button-block-appender.components-button.components-button {
|
|
114
|
+
padding: $grid-unit-20 - 2px;
|
|
115
|
+
}
|
|
116
|
+
&.has-huge-icon-size .block-editor-button-block-appender.components-button.components-button {
|
|
117
|
+
padding: $grid-unit-30 - 1px;
|
|
118
|
+
}
|
|
119
|
+
}
|
package/src/style.scss
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
@import "./comment-date/style.scss";
|
|
14
14
|
@import "./comment-content/style.scss";
|
|
15
15
|
@import "./comment-author-name/style.scss";
|
|
16
|
+
@import "./comment-edit-link/style.scss";
|
|
17
|
+
@import "./comment-reply-link/style.scss";
|
|
16
18
|
@import "./cover/style.scss";
|
|
17
19
|
@import "./details/style.scss";
|
|
18
20
|
@import "./embed/style.scss";
|
package/src/tag-cloud/index.php
CHANGED
|
@@ -29,8 +29,13 @@ function render_block_core_tag_cloud( $attributes ) {
|
|
|
29
29
|
);
|
|
30
30
|
$tag_cloud = wp_tag_cloud( $args );
|
|
31
31
|
|
|
32
|
-
if (
|
|
33
|
-
|
|
32
|
+
if ( empty( $tag_cloud ) ) {
|
|
33
|
+
// Display placeholder content when there are no tags only in editor.
|
|
34
|
+
if ( wp_is_serving_rest_request() ) {
|
|
35
|
+
$tag_cloud = __( 'There’s no content to show here yet.' );
|
|
36
|
+
} else {
|
|
37
|
+
return '';
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
$wrapper_attributes = get_block_wrapper_attributes();
|