@wordpress/block-library 5.0.1 → 6.0.1
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 +6 -0
- package/README.md +1 -1
- package/build/audio/edit.js +2 -2
- package/build/audio/edit.js.map +1 -1
- package/build/audio/edit.native.js +2 -2
- package/build/audio/edit.native.js.map +1 -1
- package/build/button/edit.js +97 -87
- package/build/button/edit.js.map +1 -1
- package/build/button/edit.native.js +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/button/index.js +4 -1
- package/build/button/index.js.map +1 -1
- package/build/buttons/edit.js +2 -1
- package/build/buttons/edit.js.map +1 -1
- package/build/buttons/index.js +2 -1
- package/build/buttons/index.js.map +1 -1
- package/build/buttons/transforms.js +2 -1
- package/build/buttons/transforms.js.map +1 -1
- package/build/column/index.js +4 -1
- package/build/column/index.js.map +1 -1
- package/build/column/save.js +9 -1
- package/build/column/save.js.map +1 -1
- package/build/columns/edit.native.js +5 -2
- package/build/columns/edit.native.js.map +1 -1
- package/build/columns/index.js +10 -1
- package/build/columns/index.js.map +1 -1
- package/build/cover/deprecated.js +0 -27
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit.js +57 -27
- package/build/cover/edit.js.map +1 -1
- package/build/cover/index.js +11 -1
- package/build/cover/index.js.map +1 -1
- package/build/cover/save.js +2 -1
- package/build/cover/save.js.map +1 -1
- package/build/cover/shared.js +1 -0
- package/build/cover/shared.js.map +1 -1
- package/build/cover/transforms.js +4 -0
- package/build/cover/transforms.js.map +1 -1
- package/build/embed/edit.js +1 -5
- package/build/embed/edit.js.map +1 -1
- package/build/embed/edit.native.js +85 -22
- package/build/embed/edit.native.js.map +1 -1
- package/build/embed/embed-bottom-sheet.native.js +17 -16
- package/build/embed/embed-bottom-sheet.native.js.map +1 -1
- package/build/embed/embed-controls.js +4 -1
- package/build/embed/embed-controls.js.map +1 -1
- package/build/embed/embed-no-preview.native.js +22 -9
- package/build/embed/embed-no-preview.native.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +51 -7
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/embed/embed-preview.native.js +28 -10
- package/build/embed/embed-preview.native.js.map +1 -1
- package/build/embed/variations.js +0 -10
- package/build/embed/variations.js.map +1 -1
- package/build/embed/wp-embed-preview.js +44 -56
- package/build/embed/wp-embed-preview.js.map +1 -1
- package/build/embed/wp-embed-preview.native.js +95 -0
- package/build/embed/wp-embed-preview.native.js.map +1 -0
- package/build/file/deprecated.js +108 -0
- package/build/file/deprecated.js.map +1 -0
- package/build/file/edit.js +8 -1
- package/build/file/edit.js.map +1 -1
- package/build/file/index.js +9 -0
- package/build/file/index.js.map +1 -1
- package/build/file/inspector.js +1 -1
- package/build/file/inspector.js.map +1 -1
- package/build/file/save.js +4 -1
- package/build/file/save.js.map +1 -1
- package/build/file/transforms.js +3 -1
- package/build/file/transforms.js.map +1 -1
- package/build/gallery/constants.js +2 -2
- package/build/gallery/constants.js.map +1 -1
- package/build/gallery/deprecated.js +17 -8
- package/build/gallery/deprecated.js.map +1 -1
- package/build/gallery/edit-wrapper.js +63 -0
- package/build/gallery/edit-wrapper.js.map +1 -0
- package/build/gallery/edit.js +225 -231
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/gallery.js +67 -49
- package/build/gallery/gallery.js.map +1 -1
- package/build/gallery/gallery.native.js +42 -79
- package/build/gallery/gallery.native.js.map +1 -1
- package/build/gallery/index.js +31 -7
- package/build/gallery/index.js.map +1 -1
- package/build/gallery/save.js +26 -43
- package/build/gallery/save.js.map +1 -1
- package/build/gallery/shared.js +9 -2
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +211 -12
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/use-get-media.js +58 -0
- package/build/gallery/use-get-media.js.map +1 -0
- package/build/gallery/use-get-new-images.js +58 -0
- package/build/gallery/use-get-new-images.js.map +1 -0
- package/build/gallery/use-image-sizes.js +73 -0
- package/build/gallery/use-image-sizes.js.map +1 -0
- package/build/gallery/use-short-code-transform.js +63 -0
- package/build/gallery/use-short-code-transform.js.map +1 -0
- package/build/gallery/utils.js +51 -0
- package/build/gallery/utils.js.map +1 -0
- package/build/gallery/v1/constants.js +13 -0
- package/build/gallery/v1/constants.js.map +1 -0
- package/build/gallery/v1/edit.js +459 -0
- package/build/gallery/v1/edit.js.map +1 -0
- package/build/gallery/{gallery-button.native.js → v1/gallery-button.native.js} +0 -0
- package/build/gallery/v1/gallery-button.native.js.map +1 -0
- package/build/gallery/{gallery-image.js → v1/gallery-image.js} +0 -0
- package/build/gallery/v1/gallery-image.js.map +1 -0
- package/build/gallery/{gallery-image.native.js → v1/gallery-image.native.js} +0 -0
- package/build/gallery/v1/gallery-image.native.js.map +1 -0
- package/build/gallery/v1/gallery.js +122 -0
- package/build/gallery/v1/gallery.js.map +1 -0
- package/build/gallery/v1/gallery.native.js +159 -0
- package/build/gallery/v1/gallery.native.js.map +1 -0
- package/build/gallery/v1/save.js +75 -0
- package/build/gallery/v1/save.js.map +1 -0
- package/build/gallery/v1/shared.js +26 -0
- package/build/gallery/v1/shared.js.map +1 -0
- package/build/gallery/{tiles.native.js → v1/tiles.native.js} +2 -1
- package/build/gallery/v1/tiles.native.js.map +1 -0
- package/build/gallery/v1/update-gallery-modal.js +110 -0
- package/build/gallery/v1/update-gallery-modal.js.map +1 -0
- package/build/group/edit.js +21 -5
- package/build/group/edit.js.map +1 -1
- package/build/group/index.js +8 -2
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +31 -0
- package/build/group/variations.js.map +1 -0
- package/build/heading/heading-level-dropdown.js +11 -37
- package/build/heading/heading-level-dropdown.js.map +1 -1
- package/build/home-link/edit.js +2 -2
- package/build/home-link/edit.js.map +1 -1
- package/build/image/edit.js +8 -6
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +46 -17
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +11 -17
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +1 -0
- package/build/image/index.js.map +1 -1
- package/build/image/transforms.js +30 -7
- package/build/image/transforms.js.map +1 -1
- package/build/image/utils.js +23 -0
- package/build/image/utils.js.map +1 -1
- package/build/index.js +3 -1
- package/build/index.js.map +1 -1
- package/build/latest-comments/edit.js +7 -1
- package/build/latest-comments/edit.js.map +1 -1
- package/build/latest-posts/edit.native.js +12 -6
- package/build/latest-posts/edit.native.js.map +1 -1
- package/build/media-text/edit.js +1 -1
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/index.js +2 -0
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/block-navigation-list.js +14 -3
- package/build/navigation/block-navigation-list.js.map +1 -1
- package/build/navigation/edit.js +44 -14
- package/build/navigation/edit.js.map +1 -1
- package/build/navigation/index.js +7 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/menu-items-to-blocks.js +6 -5
- package/build/navigation/menu-items-to-blocks.js.map +1 -1
- package/build/navigation/placeholder-preview.js +3 -3
- package/build/navigation/placeholder-preview.js.map +1 -1
- package/build/navigation/placeholder.js +1 -1
- package/build/navigation/placeholder.js.map +1 -1
- package/build/navigation/use-block-navigator.js +2 -1
- package/build/navigation/use-block-navigator.js.map +1 -1
- package/build/navigation/variations.js +2 -3
- package/build/navigation/variations.js.map +1 -1
- package/build/navigation/view.js +53 -1
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +56 -72
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-link/index.js +6 -2
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/transforms.js +83 -0
- package/build/navigation-link/transforms.js.map +1 -0
- package/build/navigation-submenu/edit.js +651 -0
- package/build/navigation-submenu/edit.js.map +1 -0
- package/build/navigation-submenu/icons.js +27 -0
- package/build/navigation-submenu/icons.js.map +1 -0
- package/build/navigation-submenu/index.js +89 -0
- package/build/navigation-submenu/index.js.map +1 -0
- package/build/navigation-submenu/save.js +18 -0
- package/build/navigation-submenu/save.js.map +1 -0
- package/build/navigation-submenu/transforms.js +82 -0
- package/build/navigation-submenu/transforms.js.map +1 -0
- package/build/navigation-submenu/view.js +51 -0
- package/build/navigation-submenu/view.js.map +1 -0
- package/build/page-list/convert-to-links-modal.js +19 -1
- package/build/page-list/convert-to-links-modal.js.map +1 -1
- package/build/page-list/edit.js +16 -5
- package/build/page-list/edit.js.map +1 -1
- package/build/page-list/index.js +10 -1
- package/build/page-list/index.js.map +1 -1
- package/build/post-author/index.js +2 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-comment/edit.js +7 -4
- package/build/post-comment/edit.js.map +1 -1
- package/build/post-comment-author/edit.js +1 -1
- package/build/post-comment-author/edit.js.map +1 -1
- package/build/post-comment-content/edit.js +16 -12
- package/build/post-comment-content/edit.js.map +1 -1
- package/build/post-content/edit.js +1 -3
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/edit.js +35 -14
- package/build/post-date/edit.js.map +1 -1
- package/build/post-date/index.js +2 -1
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/edit.js +2 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/dimension-controls.js +24 -10
- package/build/post-featured-image/dimension-controls.js.map +1 -1
- package/build/post-featured-image/index.js +5 -0
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +19 -3
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +9 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-template/index.js +5 -2
- package/build/post-template/index.js.map +1 -1
- package/build/post-terms/edit.js +4 -2
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +2 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +3 -3
- package/build/post-title/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/index.js +3 -1
- package/build/query/edit/index.js.map +1 -1
- package/build/query/variations.js +4 -4
- package/build/query/variations.js.map +1 -1
- package/build/query-pagination/deprecated.js +24 -0
- package/build/query-pagination/deprecated.js.map +1 -0
- package/build/query-pagination/edit.js +54 -3
- package/build/query-pagination/edit.js.map +1 -1
- package/build/query-pagination/index.js +20 -1
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination/query-pagination-arrow-controls.js +38 -0
- package/build/query-pagination/query-pagination-arrow-controls.js.map +1 -0
- package/build/query-pagination/save.js +1 -1
- package/build/query-pagination/save.js.map +1 -1
- package/build/query-pagination-next/edit.js +19 -4
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-next/index.js +1 -1
- package/build/query-pagination-previous/edit.js +19 -4
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/query-pagination-previous/index.js +1 -1
- package/build/site-logo/edit.js +75 -30
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-logo/index.js +7 -2
- package/build/site-logo/index.js.map +1 -1
- package/build/site-tagline/index.js +1 -0
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/edit/index.js +25 -6
- package/build/site-title/edit/index.js.map +1 -1
- package/build/site-title/index.js +9 -2
- package/build/site-title/index.js.map +1 -1
- package/build/social-links/deprecated.js +106 -2
- package/build/social-links/deprecated.js.map +1 -1
- package/build/social-links/edit.js +15 -19
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +16 -1
- package/build/social-links/index.js.map +1 -1
- package/build/social-links/save.js +1 -3
- package/build/social-links/save.js.map +1 -1
- package/build/table/index.js +1 -1
- package/build/template-part/edit/advanced-controls.js +3 -1
- package/build/template-part/edit/advanced-controls.js.map +1 -1
- package/build/template-part/edit/index.js +1 -4
- package/build/template-part/edit/index.js.map +1 -1
- package/build/video/edit-common-settings.js +1 -1
- package/build/video/edit-common-settings.js.map +1 -1
- package/build/video/edit.js +10 -5
- package/build/video/edit.js.map +1 -1
- package/build/video/tracks-editor.js +3 -1
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/audio/edit.js +3 -3
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/audio/edit.native.js +3 -3
- package/build-module/audio/edit.native.js.map +1 -1
- package/build-module/button/edit.js +101 -91
- package/build-module/button/edit.js.map +1 -1
- package/build-module/button/edit.native.js +2 -2
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/button/index.js +4 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/buttons/edit.js +2 -1
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/buttons/index.js +2 -1
- package/build-module/buttons/index.js.map +1 -1
- package/build-module/buttons/transforms.js +2 -1
- package/build-module/buttons/transforms.js.map +1 -1
- package/build-module/column/index.js +4 -1
- package/build-module/column/index.js.map +1 -1
- package/build-module/column/save.js +9 -1
- package/build-module/column/save.js.map +1 -1
- package/build-module/columns/edit.native.js +6 -3
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/columns/index.js +10 -1
- package/build-module/columns/index.js.map +1 -1
- package/build-module/cover/deprecated.js +0 -27
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit.js +57 -28
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/index.js +11 -1
- package/build-module/cover/index.js.map +1 -1
- package/build-module/cover/save.js +2 -1
- package/build-module/cover/save.js.map +1 -1
- package/build-module/cover/shared.js +1 -0
- package/build-module/cover/shared.js.map +1 -1
- package/build-module/cover/transforms.js +4 -0
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/embed/edit.js +1 -5
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/edit.native.js +87 -25
- package/build-module/embed/edit.native.js.map +1 -1
- package/build-module/embed/embed-bottom-sheet.native.js +18 -16
- package/build-module/embed/embed-bottom-sheet.native.js.map +1 -1
- package/build-module/embed/embed-controls.js +4 -1
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/embed/embed-no-preview.native.js +22 -10
- package/build-module/embed/embed-no-preview.native.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +51 -8
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/embed/embed-preview.native.js +26 -11
- package/build-module/embed/embed-preview.native.js.map +1 -1
- package/build-module/embed/variations.js +0 -10
- package/build-module/embed/variations.js.map +1 -1
- package/build-module/embed/wp-embed-preview.js +39 -56
- package/build-module/embed/wp-embed-preview.js.map +1 -1
- package/build-module/embed/wp-embed-preview.native.js +83 -0
- package/build-module/embed/wp-embed-preview.native.js.map +1 -0
- package/build-module/file/deprecated.js +98 -0
- package/build-module/file/deprecated.js.map +1 -0
- package/build-module/file/edit.js +8 -1
- package/build-module/file/edit.js.map +1 -1
- package/build-module/file/index.js +8 -0
- package/build-module/file/index.js.map +1 -1
- package/build-module/file/inspector.js +1 -1
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/file/save.js +4 -1
- package/build-module/file/save.js.map +1 -1
- package/build-module/file/transforms.js +2 -1
- package/build-module/file/transforms.js.map +1 -1
- package/build-module/gallery/constants.js +2 -2
- package/build-module/gallery/constants.js.map +1 -1
- package/build-module/gallery/deprecated.js +15 -7
- package/build-module/gallery/deprecated.js.map +1 -1
- package/build-module/gallery/edit-wrapper.js +50 -0
- package/build-module/gallery/edit-wrapper.js.map +1 -0
- package/build-module/gallery/edit.js +222 -234
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/gallery.js +70 -51
- package/build-module/gallery/gallery.js.map +1 -1
- package/build-module/gallery/gallery.native.js +43 -78
- package/build-module/gallery/gallery.native.js.map +1 -1
- package/build-module/gallery/index.js +30 -6
- package/build-module/gallery/index.js.map +1 -1
- package/build-module/gallery/save.js +24 -43
- package/build-module/gallery/save.js.map +1 -1
- package/build-module/gallery/shared.js +8 -2
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +207 -12
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/use-get-media.js +48 -0
- package/build-module/gallery/use-get-media.js.map +1 -0
- package/build-module/gallery/use-get-new-images.js +50 -0
- package/build-module/gallery/use-get-new-images.js.map +1 -0
- package/build-module/gallery/use-image-sizes.js +64 -0
- package/build-module/gallery/use-image-sizes.js.map +1 -0
- package/build-module/gallery/use-short-code-transform.js +53 -0
- package/build-module/gallery/use-short-code-transform.js.map +1 -0
- package/build-module/gallery/utils.js +42 -0
- package/build-module/gallery/utils.js.map +1 -0
- package/build-module/gallery/v1/constants.js +4 -0
- package/build-module/gallery/v1/constants.js.map +1 -0
- package/build-module/gallery/v1/edit.js +430 -0
- package/build-module/gallery/v1/edit.js.map +1 -0
- package/build-module/gallery/{gallery-button.native.js → v1/gallery-button.native.js} +0 -0
- package/build-module/gallery/v1/gallery-button.native.js.map +1 -0
- package/build-module/gallery/{gallery-image.js → v1/gallery-image.js} +0 -0
- package/build-module/gallery/v1/gallery-image.js.map +1 -0
- package/build-module/gallery/{gallery-image.native.js → v1/gallery-image.native.js} +0 -0
- package/build-module/gallery/v1/gallery-image.native.js.map +1 -0
- package/build-module/gallery/v1/gallery.js +102 -0
- package/build-module/gallery/v1/gallery.js.map +1 -0
- package/build-module/gallery/v1/gallery.native.js +136 -0
- package/build-module/gallery/v1/gallery.native.js.map +1 -0
- package/build-module/gallery/v1/save.js +65 -0
- package/build-module/gallery/v1/save.js.map +1 -0
- package/build-module/gallery/v1/shared.js +16 -0
- package/build-module/gallery/v1/shared.js.map +1 -0
- package/build-module/gallery/{tiles.native.js → v1/tiles.native.js} +2 -1
- package/build-module/gallery/v1/tiles.native.js.map +1 -0
- package/build-module/gallery/v1/update-gallery-modal.js +93 -0
- package/build-module/gallery/v1/update-gallery-modal.js.map +1 -0
- package/build-module/group/edit.js +21 -6
- package/build-module/group/edit.js.map +1 -1
- package/build-module/group/index.js +7 -2
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +22 -0
- package/build-module/group/variations.js.map +1 -0
- package/build-module/heading/heading-level-dropdown.js +12 -37
- package/build-module/heading/heading-level-dropdown.js.map +1 -1
- package/build-module/home-link/edit.js +2 -2
- package/build-module/home-link/edit.js.map +1 -1
- package/build-module/image/edit.js +8 -6
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +48 -19
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +11 -15
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +1 -0
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/transforms.js +26 -7
- package/build-module/image/transforms.js.map +1 -1
- package/build-module/image/utils.js +22 -1
- package/build-module/image/utils.js.map +1 -1
- package/build-module/index.js +2 -1
- package/build-module/index.js.map +1 -1
- package/build-module/latest-comments/edit.js +7 -1
- package/build-module/latest-comments/edit.js.map +1 -1
- package/build-module/latest-posts/edit.native.js +12 -6
- package/build-module/latest-posts/edit.native.js.map +1 -1
- package/build-module/media-text/edit.js +1 -1
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/index.js +2 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/block-navigation-list.js +15 -3
- package/build-module/navigation/block-navigation-list.js.map +1 -1
- package/build-module/navigation/edit.js +45 -15
- package/build-module/navigation/edit.js.map +1 -1
- package/build-module/navigation/index.js +7 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/menu-items-to-blocks.js +6 -5
- package/build-module/navigation/menu-items-to-blocks.js.map +1 -1
- package/build-module/navigation/placeholder-preview.js +3 -3
- package/build-module/navigation/placeholder-preview.js.map +1 -1
- package/build-module/navigation/placeholder.js +1 -1
- package/build-module/navigation/placeholder.js.map +1 -1
- package/build-module/navigation/use-block-navigator.js +2 -1
- package/build-module/navigation/use-block-navigator.js.map +1 -1
- package/build-module/navigation/variations.js +2 -3
- package/build-module/navigation/variations.js.map +1 -1
- package/build-module/navigation/view.js +53 -2
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +59 -74
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-link/index.js +5 -2
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-link/transforms.js +74 -0
- package/build-module/navigation-link/transforms.js.map +1 -0
- package/build-module/navigation-submenu/edit.js +628 -0
- package/build-module/navigation-submenu/edit.js.map +1 -0
- package/build-module/navigation-submenu/icons.js +17 -0
- package/build-module/navigation-submenu/icons.js.map +1 -0
- package/build-module/navigation-submenu/index.js +74 -0
- package/build-module/navigation-submenu/index.js.map +1 -0
- package/build-module/navigation-submenu/save.js +10 -0
- package/build-module/navigation-submenu/save.js.map +1 -0
- package/build-module/navigation-submenu/transforms.js +73 -0
- package/build-module/navigation-submenu/transforms.js.map +1 -0
- package/build-module/navigation-submenu/view.js +49 -0
- package/build-module/navigation-submenu/view.js.map +1 -0
- package/build-module/page-list/convert-to-links-modal.js +19 -1
- package/build-module/page-list/convert-to-links-modal.js.map +1 -1
- package/build-module/page-list/edit.js +16 -5
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/page-list/index.js +10 -1
- package/build-module/page-list/index.js.map +1 -1
- package/build-module/post-author/index.js +2 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-comment/edit.js +8 -6
- package/build-module/post-comment/edit.js.map +1 -1
- package/build-module/post-comment-author/edit.js +1 -1
- package/build-module/post-comment-author/edit.js.map +1 -1
- package/build-module/post-comment-content/edit.js +16 -13
- package/build-module/post-comment-content/edit.js.map +1 -1
- package/build-module/post-content/edit.js +1 -3
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/edit.js +36 -16
- package/build-module/post-date/edit.js.map +1 -1
- package/build-module/post-date/index.js +2 -1
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/edit.js +2 -1
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/dimension-controls.js +22 -11
- package/build-module/post-featured-image/dimension-controls.js.map +1 -1
- package/build-module/post-featured-image/index.js +5 -0
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +19 -3
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +9 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-template/index.js +6 -3
- package/build-module/post-template/index.js.map +1 -1
- package/build-module/post-terms/edit.js +5 -3
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +2 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +3 -3
- package/build-module/post-title/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/index.js +4 -2
- package/build-module/query/edit/index.js.map +1 -1
- package/build-module/query/variations.js +4 -4
- package/build-module/query/variations.js.map +1 -1
- package/build-module/query-pagination/deprecated.js +15 -0
- package/build-module/query-pagination/deprecated.js.map +1 -0
- package/build-module/query-pagination/edit.js +52 -5
- package/build-module/query-pagination/edit.js.map +1 -1
- package/build-module/query-pagination/index.js +19 -1
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination/query-pagination-arrow-controls.js +29 -0
- package/build-module/query-pagination/query-pagination-arrow-controls.js.map +1 -0
- package/build-module/query-pagination/save.js +2 -2
- package/build-module/query-pagination/save.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +18 -4
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-next/index.js +1 -1
- package/build-module/query-pagination-previous/edit.js +18 -4
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +1 -1
- package/build-module/site-logo/edit.js +79 -34
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-logo/index.js +7 -2
- package/build-module/site-logo/index.js.map +1 -1
- package/build-module/site-tagline/index.js +1 -0
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/edit/index.js +25 -7
- package/build-module/site-title/edit/index.js.map +1 -1
- package/build-module/site-title/index.js +9 -2
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-links/deprecated.js +106 -2
- package/build-module/social-links/deprecated.js.map +1 -1
- package/build-module/social-links/edit.js +16 -20
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +16 -1
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/social-links/save.js +1 -3
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/table/index.js +1 -1
- package/build-module/template-part/edit/advanced-controls.js +4 -2
- package/build-module/template-part/edit/advanced-controls.js.map +1 -1
- package/build-module/template-part/edit/index.js +1 -4
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/video/edit-common-settings.js +2 -2
- package/build-module/video/edit-common-settings.js.map +1 -1
- package/build-module/video/edit.js +10 -5
- package/build-module/video/edit.js.map +1 -1
- package/build-module/video/tracks-editor.js +2 -1
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/button/style-rtl.css +1 -1
- package/build-style/button/style.css +1 -1
- package/build-style/columns/editor-rtl.css +2 -2
- package/build-style/columns/editor.css +2 -2
- package/build-style/columns/style-rtl.css +4 -4
- package/build-style/columns/style.css +4 -4
- package/build-style/common-rtl.css +4 -105
- package/build-style/common.css +4 -105
- package/build-style/editor-rtl.css +188 -205
- package/build-style/editor.css +188 -205
- package/build-style/embed/style-rtl.css +1 -0
- package/build-style/embed/style.css +1 -0
- package/build-style/gallery/editor-rtl.css +89 -21
- package/build-style/gallery/editor.css +89 -21
- package/build-style/gallery/style-rtl.css +202 -39
- package/build-style/gallery/style.css +202 -39
- package/build-style/group/theme-rtl.css +1 -3
- package/build-style/group/theme.css +1 -3
- package/build-style/heading/style-rtl.css +8 -0
- package/build-style/heading/style.css +8 -0
- package/build-style/html/editor-rtl.css +12 -11
- package/build-style/html/editor.css +12 -11
- package/build-style/list/style-rtl.css +4 -0
- package/build-style/list/style.css +4 -0
- package/build-style/navigation/editor-rtl.css +12 -7
- package/build-style/navigation/editor.css +12 -7
- package/build-style/navigation/style-rtl.css +140 -134
- package/build-style/navigation/style.css +140 -134
- package/build-style/navigation-link/editor-rtl.css +22 -13
- package/build-style/navigation-link/editor.css +22 -13
- package/build-style/{post-content → navigation-submenu}/editor-rtl.css +29 -8
- package/build-style/{post-content → navigation-submenu}/editor.css +29 -8
- package/build-style/{heading/editor.css → navigation-submenu/style-rtl.css} +13 -7
- package/build-style/{heading/editor-rtl.css → navigation-submenu/style.css} +13 -7
- package/build-style/page-list/editor-rtl.css +8 -0
- package/build-style/page-list/editor.css +8 -0
- package/build-style/page-list/style-rtl.css +2 -8
- package/build-style/page-list/style.css +2 -8
- package/build-style/paragraph/style-rtl.css +5 -1
- package/build-style/paragraph/style.css +5 -1
- package/build-style/post-featured-image/editor-rtl.css +4 -8
- package/build-style/post-featured-image/editor.css +4 -8
- package/build-style/post-featured-image/style-rtl.css +1 -0
- package/build-style/post-featured-image/style.css +1 -0
- package/build-style/post-template/style-rtl.css +2 -0
- package/build-style/post-template/style.css +2 -0
- package/build-style/pullquote/style-rtl.css +1 -0
- package/build-style/pullquote/style.css +1 -0
- package/build-style/query-pagination/editor-rtl.css +2 -5
- package/build-style/query-pagination/editor.css +2 -5
- package/build-style/query-pagination/style-rtl.css +17 -6
- package/build-style/query-pagination/style.css +17 -6
- package/build-style/quote/style-rtl.css +3 -0
- package/build-style/quote/style.css +3 -0
- package/build-style/reset-rtl.css +2 -1
- package/build-style/reset.css +2 -1
- package/build-style/social-links/style-rtl.css +0 -5
- package/build-style/social-links/style.css +0 -5
- package/build-style/style-rtl.css +415 -307
- package/build-style/style.css +415 -307
- package/build-style/theme-rtl.css +1 -11
- package/build-style/theme.css +1 -11
- package/package.json +30 -31
- package/src/audio/edit.js +6 -3
- package/src/audio/edit.native.js +9 -3
- package/src/button/block.json +4 -1
- package/src/button/edit.js +107 -115
- package/src/button/edit.native.js +5 -2
- package/src/button/style.scss +1 -1
- package/src/buttons/block.json +2 -1
- package/src/buttons/edit.js +1 -1
- package/src/column/block.json +4 -1
- package/src/column/save.js +11 -1
- package/src/columns/block.json +8 -1
- package/src/columns/edit.native.js +8 -3
- package/src/columns/editor.scss +2 -2
- package/src/columns/index.js +1 -0
- package/src/columns/style.scss +4 -4
- package/src/common.scss +3 -9
- package/src/cover/block.json +11 -1
- package/src/cover/deprecated.js +0 -27
- package/src/cover/edit.js +82 -32
- package/src/cover/save.js +2 -1
- package/src/cover/shared.js +1 -0
- package/src/cover/transforms.js +4 -2
- package/src/editor.scss +4 -20
- package/src/embed/edit.js +1 -11
- package/src/embed/edit.native.js +120 -32
- package/src/embed/embed-bottom-sheet.native.js +26 -20
- package/src/embed/embed-controls.js +10 -1
- package/src/embed/embed-no-preview.native.js +53 -14
- package/src/embed/embed-placeholder.native.js +58 -9
- package/src/embed/embed-preview.native.js +58 -41
- package/src/embed/style.scss +1 -0
- package/src/embed/styles.native.scss +18 -8
- package/src/embed/variations.js +0 -8
- package/src/embed/wp-embed-preview.js +41 -62
- package/src/embed/wp-embed-preview.native.js +80 -0
- package/src/file/block.json +6 -0
- package/src/file/deprecated.js +123 -0
- package/src/file/edit.js +6 -0
- package/src/file/index.js +2 -0
- package/src/file/inspector.js +12 -10
- package/src/file/save.js +3 -0
- package/src/file/test/__snapshots__/edit.native.js.snap +4 -0
- package/src/file/transforms.js +3 -1
- package/src/gallery/block.json +18 -0
- package/src/gallery/constants.js +2 -2
- package/src/gallery/deprecated.js +15 -7
- package/src/gallery/deprecated.scss +132 -0
- package/src/gallery/edit-wrapper.js +47 -0
- package/src/gallery/edit.js +317 -276
- package/src/gallery/editor.scss +106 -22
- package/src/gallery/gallery-styles.native.scss +4 -2
- package/src/gallery/gallery.js +82 -71
- package/src/gallery/gallery.native.js +49 -85
- package/src/gallery/index.js +12 -6
- package/src/gallery/save.js +20 -60
- package/src/gallery/shared.js +9 -2
- package/src/gallery/style.scss +113 -75
- package/src/gallery/transforms.js +212 -11
- package/src/gallery/use-get-media.js +59 -0
- package/src/gallery/use-get-new-images.js +68 -0
- package/src/gallery/use-image-sizes.js +66 -0
- package/src/gallery/use-short-code-transform.js +52 -0
- package/src/gallery/utils.js +46 -0
- package/src/gallery/v1/constants.js +3 -0
- package/src/gallery/v1/edit.js +509 -0
- package/src/gallery/{gallery-button.native.js → v1/gallery-button.native.js} +0 -0
- package/src/gallery/{gallery-image-style.native.scss → v1/gallery-image-style.native.scss} +0 -0
- package/src/gallery/{gallery-image.js → v1/gallery-image.js} +0 -0
- package/src/gallery/{gallery-image.native.js → v1/gallery-image.native.js} +0 -0
- package/src/gallery/v1/gallery-styles.native.scss +8 -0
- package/src/gallery/v1/gallery.js +119 -0
- package/src/gallery/v1/gallery.native.js +162 -0
- package/src/gallery/v1/save.js +81 -0
- package/src/gallery/v1/shared.js +19 -0
- package/src/gallery/{tiles-styles.native.scss → v1/tiles-styles.native.scss} +0 -0
- package/src/gallery/{tiles.native.js → v1/tiles.native.js} +2 -1
- package/src/gallery/v1/update-gallery-modal.js +97 -0
- package/src/group/block.json +4 -1
- package/src/group/edit.js +31 -7
- package/src/group/index.js +2 -0
- package/src/group/theme.scss +1 -3
- package/src/group/variations.js +18 -0
- package/src/heading/heading-level-dropdown.js +26 -58
- package/src/heading/style.scss +3 -0
- package/src/home-link/edit.js +2 -2
- package/src/home-link/index.php +2 -2
- package/src/html/editor.scss +16 -10
- package/src/image/block.json +1 -0
- package/src/image/edit.js +9 -7
- package/src/image/edit.native.js +75 -35
- package/src/image/image.js +10 -14
- package/src/image/styles.native.scss +5 -0
- package/src/image/transforms.js +32 -9
- package/src/image/utils.js +17 -1
- package/src/index.js +2 -0
- package/src/latest-comments/edit.js +4 -0
- package/src/latest-comments/index.php +2 -1
- package/src/latest-posts/edit.native.js +10 -8
- package/src/list/style.scss +8 -3
- package/src/media-text/edit.js +1 -1
- package/src/media-text/index.js +1 -0
- package/src/navigation/block-navigation-list.js +16 -7
- package/src/navigation/block.json +7 -1
- package/src/navigation/edit.js +60 -17
- package/src/navigation/editor.scss +38 -19
- package/src/navigation/index.php +12 -4
- package/src/navigation/menu-items-to-blocks.js +8 -7
- package/src/navigation/placeholder-preview.js +3 -3
- package/src/navigation/placeholder.js +1 -1
- package/src/navigation/style.scss +191 -145
- package/src/navigation/test/menu-items-to-blocks.js +6 -6
- package/src/navigation/use-block-navigator.js +1 -0
- package/src/navigation/variations.js +2 -3
- package/src/navigation/view.js +74 -4
- package/src/navigation-link/block.json +2 -1
- package/src/navigation-link/edit.js +63 -90
- package/src/navigation-link/editor.scss +30 -15
- package/src/navigation-link/index.js +2 -0
- package/src/navigation-link/index.php +8 -8
- package/src/navigation-link/transforms.js +93 -0
- package/src/navigation-submenu/block.json +65 -0
- package/src/navigation-submenu/edit.js +662 -0
- package/src/navigation-submenu/editor.scss +42 -0
- package/src/navigation-submenu/icons.js +16 -0
- package/src/navigation-submenu/index.js +29 -0
- package/src/navigation-submenu/index.php +299 -0
- package/src/navigation-submenu/save.js +8 -0
- package/src/navigation-submenu/style.scss +20 -0
- package/src/navigation-submenu/transforms.js +58 -0
- package/src/navigation-submenu/view.js +62 -0
- package/src/page-list/block.json +11 -1
- package/src/page-list/convert-to-links-modal.js +20 -0
- package/src/page-list/edit.js +18 -4
- package/src/page-list/editor.scss +14 -0
- package/src/page-list/index.php +48 -12
- package/src/page-list/style.scss +2 -14
- package/src/page-list/test/convert-to-links-modal.js +6 -6
- package/src/paragraph/style.scss +10 -1
- package/src/post-author/block.json +2 -1
- package/src/post-comment/edit.js +14 -7
- package/src/post-comment-author/edit.js +13 -10
- package/src/post-comment-content/edit.js +17 -9
- package/src/post-comment-content/index.php +6 -3
- package/src/post-content/edit.js +1 -3
- package/src/post-date/block.json +2 -1
- package/src/post-date/edit.js +36 -22
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-featured-image/block.json +5 -0
- package/src/post-featured-image/dimension-controls.js +43 -35
- package/src/post-featured-image/editor.scss +4 -9
- package/src/post-featured-image/style.scss +1 -0
- package/src/post-navigation-link/block.json +9 -1
- package/src/post-navigation-link/edit.js +29 -2
- package/src/post-navigation-link/index.php +28 -3
- package/src/post-template/block.json +4 -1
- package/src/post-template/index.js +2 -2
- package/src/post-template/index.php +11 -0
- package/src/post-template/style.scss +2 -0
- package/src/post-terms/block.json +2 -1
- package/src/post-terms/edit.js +4 -5
- package/src/post-title/block.json +4 -1
- package/src/post-title/edit.js +4 -6
- package/src/post-title/index.php +1 -1
- package/src/pullquote/style.scss +1 -0
- package/src/query/edit/index.js +3 -3
- package/src/query/variations.js +4 -0
- package/src/query-pagination/block.json +16 -0
- package/src/query-pagination/deprecated.js +19 -0
- package/src/query-pagination/edit.js +58 -3
- package/src/query-pagination/editor.scss +3 -6
- package/src/query-pagination/index.js +2 -0
- package/src/query-pagination/index.php +24 -1
- package/src/query-pagination/query-pagination-arrow-controls.js +44 -0
- package/src/query-pagination/save.js +2 -6
- package/src/query-pagination/style.scss +22 -5
- package/src/query-pagination-next/block.json +1 -1
- package/src/query-pagination-next/edit.js +30 -8
- package/src/query-pagination-next/index.php +5 -1
- package/src/query-pagination-previous/block.json +1 -1
- package/src/query-pagination-previous/edit.js +30 -8
- package/src/query-pagination-previous/index.php +5 -1
- package/src/quote/style.scss +2 -0
- package/src/reset.scss +2 -1
- package/src/search/index.php +12 -15
- package/src/search/test/__snapshots__/edit.native.js.snap +7 -0
- package/src/site-logo/block.json +7 -2
- package/src/site-logo/edit.js +98 -30
- package/src/site-logo/index.php +31 -2
- package/src/site-tagline/block.json +1 -0
- package/src/site-title/block.json +9 -2
- package/src/site-title/edit/index.js +36 -9
- package/src/site-title/index.php +12 -2
- package/src/social-links/block.json +22 -1
- package/src/social-links/deprecated.js +99 -0
- package/src/social-links/edit.js +13 -24
- package/src/social-links/save.js +1 -7
- package/src/social-links/style.scss +0 -8
- package/src/style.scss +1 -5
- package/src/table/block.json +1 -1
- package/src/template-part/edit/advanced-controls.js +3 -3
- package/src/template-part/edit/index.js +0 -3
- package/src/template-part/index.php +1 -1
- package/src/theme.scss +0 -10
- package/src/video/edit-common-settings.js +2 -2
- package/src/video/edit.js +15 -5
- package/src/video/tracks-editor.js +2 -3
- package/build/embed/embed-controls.native.js +0 -32
- package/build/embed/embed-controls.native.js.map +0 -1
- package/build/embed/variations.native.js +0 -10
- package/build/embed/variations.native.js.map +0 -1
- package/build/gallery/gallery-button.native.js.map +0 -1
- package/build/gallery/gallery-image.js.map +0 -1
- package/build/gallery/gallery-image.native.js.map +0 -1
- package/build/gallery/tiles.native.js.map +0 -1
- package/build/image/image-editing/aspect-ratio-dropdown.js +0 -126
- package/build/image/image-editing/aspect-ratio-dropdown.js.map +0 -1
- package/build/image/image-editing/constants.js +0 -16
- package/build/image/image-editing/constants.js.map +0 -1
- package/build/image/image-editing/context.js +0 -59
- package/build/image/image-editing/context.js.map +0 -1
- package/build/image/image-editing/cropper.js +0 -83
- package/build/image/image-editing/cropper.js.map +0 -1
- package/build/image/image-editing/form-controls.js +0 -36
- package/build/image/image-editing/form-controls.js.map +0 -1
- package/build/image/image-editing/index.js +0 -60
- package/build/image/image-editing/index.js.map +0 -1
- package/build/image/image-editing/rotation-button.js +0 -37
- package/build/image/image-editing/rotation-button.js.map +0 -1
- package/build/image/image-editing/use-save-image.js +0 -84
- package/build/image/image-editing/use-save-image.js.map +0 -1
- package/build/image/image-editing/use-transform-image.js +0 -135
- package/build/image/image-editing/use-transform-image.js.map +0 -1
- package/build/image/image-editing/zoom-dropdown.js +0 -55
- package/build/image/image-editing/zoom-dropdown.js.map +0 -1
- package/build-module/embed/embed-controls.native.js +0 -21
- package/build-module/embed/embed-controls.native.js.map +0 -1
- package/build-module/embed/variations.native.js +0 -3
- package/build-module/embed/variations.native.js.map +0 -1
- package/build-module/gallery/gallery-button.native.js.map +0 -1
- package/build-module/gallery/gallery-image.js.map +0 -1
- package/build-module/gallery/gallery-image.native.js.map +0 -1
- package/build-module/gallery/tiles.native.js.map +0 -1
- package/build-module/image/image-editing/aspect-ratio-dropdown.js +0 -115
- package/build-module/image/image-editing/aspect-ratio-dropdown.js.map +0 -1
- package/build-module/image/image-editing/constants.js +0 -7
- package/build-module/image/image-editing/constants.js.map +0 -1
- package/build-module/image/image-editing/context.js +0 -44
- package/build-module/image/image-editing/context.js.map +0 -1
- package/build-module/image/image-editing/cropper.js +0 -69
- package/build-module/image/image-editing/cropper.js.map +0 -1
- package/build-module/image/image-editing/form-controls.js +0 -26
- package/build-module/image/image-editing/form-controls.js.map +0 -1
- package/build-module/image/image-editing/index.js +0 -37
- package/build-module/image/image-editing/index.js.map +0 -1
- package/build-module/image/image-editing/rotation-button.js +0 -26
- package/build-module/image/image-editing/rotation-button.js.map +0 -1
- package/build-module/image/image-editing/use-save-image.js +0 -70
- package/build-module/image/image-editing/use-save-image.js.map +0 -1
- package/build-module/image/image-editing/use-transform-image.js +0 -127
- package/build-module/image/image-editing/use-transform-image.js.map +0 -1
- package/build-module/image/image-editing/zoom-dropdown.js +0 -43
- package/build-module/image/image-editing/zoom-dropdown.js.map +0 -1
- package/src/embed/embed-controls.native.js +0 -23
- package/src/embed/variations.native.js +0 -3
- package/src/heading/editor.scss +0 -20
- package/src/image/image-editing/aspect-ratio-dropdown.js +0 -129
- package/src/image/image-editing/constants.js +0 -6
- package/src/image/image-editing/context.js +0 -56
- package/src/image/image-editing/cropper.js +0 -74
- package/src/image/image-editing/form-controls.js +0 -22
- package/src/image/image-editing/index.js +0 -52
- package/src/image/image-editing/rotation-button.js +0 -24
- package/src/image/image-editing/use-save-image.js +0 -97
- package/src/image/image-editing/use-transform-image.js +0 -162
- package/src/image/image-editing/zoom-dropdown.js +0 -40
- package/src/post-content/editor.scss +0 -11
|
@@ -4,19 +4,41 @@
|
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import { useBlockProps, PlainText } from '@wordpress/block-editor';
|
|
6
6
|
|
|
7
|
+
const arrowMap = {
|
|
8
|
+
none: '',
|
|
9
|
+
arrow: '→',
|
|
10
|
+
chevron: '»',
|
|
11
|
+
};
|
|
12
|
+
|
|
7
13
|
export default function QueryPaginationNextEdit( {
|
|
8
14
|
attributes: { label },
|
|
9
15
|
setAttributes,
|
|
16
|
+
context: { paginationArrow },
|
|
10
17
|
} ) {
|
|
18
|
+
const displayArrow = arrowMap[ paginationArrow ];
|
|
11
19
|
return (
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
aria-label={ __( 'Next page link' ) }
|
|
16
|
-
placeholder={ __( 'Next Page' ) }
|
|
17
|
-
value={ label }
|
|
18
|
-
onChange={ ( newLabel ) => setAttributes( { label: newLabel } ) }
|
|
20
|
+
<a
|
|
21
|
+
href="#pagination-next-pseudo-link"
|
|
22
|
+
onClick={ ( event ) => event.preventDefault() }
|
|
19
23
|
{ ...useBlockProps() }
|
|
20
|
-
|
|
24
|
+
>
|
|
25
|
+
<PlainText
|
|
26
|
+
__experimentalVersion={ 2 }
|
|
27
|
+
tagName="span"
|
|
28
|
+
aria-label={ __( 'Next page link' ) }
|
|
29
|
+
placeholder={ __( 'Next Page' ) }
|
|
30
|
+
value={ label }
|
|
31
|
+
onChange={ ( newLabel ) =>
|
|
32
|
+
setAttributes( { label: newLabel } )
|
|
33
|
+
}
|
|
34
|
+
/>
|
|
35
|
+
{ displayArrow && (
|
|
36
|
+
<span
|
|
37
|
+
className={ `wp-block-query-pagination-next-arrow is-arrow-${ paginationArrow }` }
|
|
38
|
+
>
|
|
39
|
+
{ displayArrow }
|
|
40
|
+
</span>
|
|
41
|
+
) }
|
|
42
|
+
</a>
|
|
21
43
|
);
|
|
22
44
|
}
|
|
@@ -22,7 +22,11 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
|
|
|
22
22
|
$wrapper_attributes = get_block_wrapper_attributes();
|
|
23
23
|
$default_label = __( 'Next Page' );
|
|
24
24
|
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
|
|
25
|
-
$
|
|
25
|
+
$pagination_arrow = get_query_pagination_arrow( $block, true );
|
|
26
|
+
if ( $pagination_arrow ) {
|
|
27
|
+
$label .= $pagination_arrow;
|
|
28
|
+
}
|
|
29
|
+
$content = '';
|
|
26
30
|
|
|
27
31
|
// Check if the pagination is for Query that inherits the global context.
|
|
28
32
|
if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) {
|
|
@@ -4,19 +4,41 @@
|
|
|
4
4
|
import { __ } from '@wordpress/i18n';
|
|
5
5
|
import { useBlockProps, PlainText } from '@wordpress/block-editor';
|
|
6
6
|
|
|
7
|
+
const arrowMap = {
|
|
8
|
+
none: '',
|
|
9
|
+
arrow: '←',
|
|
10
|
+
chevron: '«',
|
|
11
|
+
};
|
|
12
|
+
|
|
7
13
|
export default function QueryPaginationPreviousEdit( {
|
|
8
14
|
attributes: { label },
|
|
9
15
|
setAttributes,
|
|
16
|
+
context: { paginationArrow },
|
|
10
17
|
} ) {
|
|
18
|
+
const displayArrow = arrowMap[ paginationArrow ];
|
|
11
19
|
return (
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
aria-label={ __( 'Previous page link' ) }
|
|
16
|
-
placeholder={ __( 'Previous Page' ) }
|
|
17
|
-
value={ label }
|
|
18
|
-
onChange={ ( newLabel ) => setAttributes( { label: newLabel } ) }
|
|
20
|
+
<a
|
|
21
|
+
href="#pagination-previous-pseudo-link"
|
|
22
|
+
onClick={ ( event ) => event.preventDefault() }
|
|
19
23
|
{ ...useBlockProps() }
|
|
20
|
-
|
|
24
|
+
>
|
|
25
|
+
{ displayArrow && (
|
|
26
|
+
<span
|
|
27
|
+
className={ `wp-block-query-pagination-previous-arrow is-arrow-${ paginationArrow }` }
|
|
28
|
+
>
|
|
29
|
+
{ displayArrow }
|
|
30
|
+
</span>
|
|
31
|
+
) }
|
|
32
|
+
<PlainText
|
|
33
|
+
__experimentalVersion={ 2 }
|
|
34
|
+
tagName="span"
|
|
35
|
+
aria-label={ __( 'Previous page link' ) }
|
|
36
|
+
placeholder={ __( 'Previous Page' ) }
|
|
37
|
+
value={ label }
|
|
38
|
+
onChange={ ( newLabel ) =>
|
|
39
|
+
setAttributes( { label: newLabel } )
|
|
40
|
+
}
|
|
41
|
+
/>
|
|
42
|
+
</a>
|
|
21
43
|
);
|
|
22
44
|
}
|
|
@@ -21,7 +21,11 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
|
|
|
21
21
|
$wrapper_attributes = get_block_wrapper_attributes();
|
|
22
22
|
$default_label = __( 'Previous Page' );
|
|
23
23
|
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
|
|
24
|
-
$
|
|
24
|
+
$pagination_arrow = get_query_pagination_arrow( $block, false );
|
|
25
|
+
if ( $pagination_arrow ) {
|
|
26
|
+
$label = $pagination_arrow . $label;
|
|
27
|
+
}
|
|
28
|
+
$content = '';
|
|
25
29
|
// Check if the pagination is for Query that inherits the global context
|
|
26
30
|
// and handle appropriately.
|
|
27
31
|
if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) {
|
package/src/quote/style.scss
CHANGED
package/src/reset.scss
CHANGED
|
@@ -127,7 +127,8 @@ html :where(.editor-styles-wrapper) {
|
|
|
127
127
|
select:focus {
|
|
128
128
|
color: revert;
|
|
129
129
|
border-color: revert;
|
|
130
|
-
background: revert;
|
|
130
|
+
background-color: revert;
|
|
131
|
+
background-image: revert;
|
|
131
132
|
box-shadow: revert;
|
|
132
133
|
text-shadow: revert;
|
|
133
134
|
cursor: revert;
|
package/src/search/index.php
CHANGED
|
@@ -43,20 +43,17 @@ function render_block_core_search( $attributes ) {
|
|
|
43
43
|
// Border color classes need to be applied to the elements that have a border color.
|
|
44
44
|
$border_color_classes = get_border_color_classes_for_block_core_search( $attributes );
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
$
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
__( 'Search' )
|
|
58
|
-
);
|
|
59
|
-
}
|
|
46
|
+
$label_markup = sprintf(
|
|
47
|
+
'<label for="%1$s" class="wp-block-search__label screen-reader-text">%2$s</label>',
|
|
48
|
+
$input_id,
|
|
49
|
+
empty( $attributes['label'] ) ? __( 'Search' ) : $attributes['label']
|
|
50
|
+
);
|
|
51
|
+
if ( $show_label && ! empty( $attributes['label'] ) ) {
|
|
52
|
+
$label_markup = sprintf(
|
|
53
|
+
'<label for="%1$s" class="wp-block-search__label">%2$s</label>',
|
|
54
|
+
$input_id,
|
|
55
|
+
$attributes['label']
|
|
56
|
+
);
|
|
60
57
|
}
|
|
61
58
|
|
|
62
59
|
if ( $show_input ) {
|
|
@@ -76,7 +73,7 @@ function render_block_core_search( $attributes ) {
|
|
|
76
73
|
$button_classes = $color_classes;
|
|
77
74
|
|
|
78
75
|
if ( ! $is_button_inside ) {
|
|
79
|
-
$button_classes .= $border_color_classes;
|
|
76
|
+
$button_classes .= ' ' . $border_color_classes;
|
|
80
77
|
}
|
|
81
78
|
if ( ! $use_icon_button ) {
|
|
82
79
|
if ( ! empty( $attributes['buttonText'] ) ) {
|
|
@@ -23,6 +23,7 @@ exports[`Search Block renders block with button inside option 1`] = `
|
|
|
23
23
|
disableEditingMenu={false}
|
|
24
24
|
focusable={true}
|
|
25
25
|
fontFamily="serif"
|
|
26
|
+
fontSize={16}
|
|
26
27
|
isMultiline={false}
|
|
27
28
|
maxImagesWidth={200}
|
|
28
29
|
onBackspace={[Function]}
|
|
@@ -126,6 +127,7 @@ exports[`Search Block renders block with button inside option 1`] = `
|
|
|
126
127
|
disableEditingMenu={false}
|
|
127
128
|
focusable={true}
|
|
128
129
|
fontFamily="serif"
|
|
130
|
+
fontSize={16}
|
|
129
131
|
isMultiline={false}
|
|
130
132
|
maxImagesWidth={200}
|
|
131
133
|
minWidth={75}
|
|
@@ -196,6 +198,7 @@ exports[`Search Block renders block with icon button option matches snapshot 1`]
|
|
|
196
198
|
disableEditingMenu={false}
|
|
197
199
|
focusable={true}
|
|
198
200
|
fontFamily="serif"
|
|
201
|
+
fontSize={16}
|
|
199
202
|
isMultiline={false}
|
|
200
203
|
maxImagesWidth={200}
|
|
201
204
|
onBackspace={[Function]}
|
|
@@ -356,6 +359,7 @@ exports[`Search Block renders block with label hidden matches snapshot 1`] = `
|
|
|
356
359
|
disableEditingMenu={false}
|
|
357
360
|
focusable={true}
|
|
358
361
|
fontFamily="serif"
|
|
362
|
+
fontSize={16}
|
|
359
363
|
isMultiline={false}
|
|
360
364
|
maxImagesWidth={200}
|
|
361
365
|
minWidth={75}
|
|
@@ -426,6 +430,7 @@ exports[`Search Block renders with default configuration matches snapshot 1`] =
|
|
|
426
430
|
disableEditingMenu={false}
|
|
427
431
|
focusable={true}
|
|
428
432
|
fontFamily="serif"
|
|
433
|
+
fontSize={16}
|
|
429
434
|
isMultiline={false}
|
|
430
435
|
maxImagesWidth={200}
|
|
431
436
|
onBackspace={[Function]}
|
|
@@ -529,6 +534,7 @@ exports[`Search Block renders with default configuration matches snapshot 1`] =
|
|
|
529
534
|
disableEditingMenu={false}
|
|
530
535
|
focusable={true}
|
|
531
536
|
fontFamily="serif"
|
|
537
|
+
fontSize={16}
|
|
532
538
|
isMultiline={false}
|
|
533
539
|
maxImagesWidth={200}
|
|
534
540
|
minWidth={75}
|
|
@@ -599,6 +605,7 @@ exports[`Search Block renders with no-button option matches snapshot 1`] = `
|
|
|
599
605
|
disableEditingMenu={false}
|
|
600
606
|
focusable={true}
|
|
601
607
|
fontFamily="serif"
|
|
608
|
+
fontSize={16}
|
|
602
609
|
isMultiline={false}
|
|
603
610
|
maxImagesWidth={200}
|
|
604
611
|
onBackspace={[Function]}
|
package/src/site-logo/block.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "core/site-logo",
|
|
4
4
|
"title": "Site Logo",
|
|
5
5
|
"category": "layout",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "Display a graphic to represent this site. Update the block, and the changes apply everywhere it’s used. This is different than the site icon, which is the smaller image visible in your dashboard, browser tabs, etc used to help others recognize this site.",
|
|
7
7
|
"textdomain": "default",
|
|
8
8
|
"attributes": {
|
|
9
9
|
"align": {
|
|
@@ -24,7 +24,12 @@
|
|
|
24
24
|
"supports": {
|
|
25
25
|
"html": false,
|
|
26
26
|
"align": true,
|
|
27
|
-
"alignWide": false
|
|
27
|
+
"alignWide": false,
|
|
28
|
+
"color": {
|
|
29
|
+
"__experimentalDuotone": "img",
|
|
30
|
+
"text": false,
|
|
31
|
+
"background": false
|
|
32
|
+
}
|
|
28
33
|
},
|
|
29
34
|
"styles": [
|
|
30
35
|
{
|
package/src/site-logo/edit.js
CHANGED
|
@@ -8,7 +8,7 @@ import { includes, pick } from 'lodash';
|
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
10
|
import { isBlobURL } from '@wordpress/blob';
|
|
11
|
-
import { useState, useRef } from '@wordpress/element';
|
|
11
|
+
import { useEffect, useState, useRef } from '@wordpress/element';
|
|
12
12
|
import { __, isRTL } from '@wordpress/i18n';
|
|
13
13
|
import {
|
|
14
14
|
Notice,
|
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
ResizableBox,
|
|
18
18
|
Spinner,
|
|
19
19
|
ToggleControl,
|
|
20
|
+
ToolbarButton,
|
|
21
|
+
ToolbarGroup,
|
|
20
22
|
Placeholder,
|
|
21
23
|
} from '@wordpress/components';
|
|
22
24
|
import { useViewportMatch } from '@wordpress/compose';
|
|
@@ -28,10 +30,12 @@ import {
|
|
|
28
30
|
MediaReplaceFlow,
|
|
29
31
|
useBlockProps,
|
|
30
32
|
store as blockEditorStore,
|
|
33
|
+
__experimentalImageEditor as ImageEditor,
|
|
34
|
+
__experimentalImageEditingProvider as ImageEditingProvider,
|
|
31
35
|
} from '@wordpress/block-editor';
|
|
32
36
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
33
37
|
import { store as coreStore } from '@wordpress/core-data';
|
|
34
|
-
import { siteLogo as icon } from '@wordpress/icons';
|
|
38
|
+
import { crop, siteLogo as icon } from '@wordpress/icons';
|
|
35
39
|
|
|
36
40
|
/**
|
|
37
41
|
* Internal dependencies
|
|
@@ -52,19 +56,22 @@ const SiteLogo = ( {
|
|
|
52
56
|
containerRef,
|
|
53
57
|
isSelected,
|
|
54
58
|
setAttributes,
|
|
59
|
+
setLogo,
|
|
55
60
|
logoUrl,
|
|
56
61
|
siteUrl,
|
|
62
|
+
logoId,
|
|
57
63
|
} ) => {
|
|
58
64
|
const clientWidth = useClientWidth( containerRef, [ align ] );
|
|
59
65
|
const isLargeViewport = useViewportMatch( 'medium' );
|
|
60
66
|
const isWideAligned = includes( [ 'wide', 'full' ], align );
|
|
61
67
|
const isResizable = ! isWideAligned && isLargeViewport;
|
|
62
68
|
const [ { naturalWidth, naturalHeight }, setNaturalSize ] = useState( {} );
|
|
69
|
+
const [ isEditingImage, setIsEditingImage ] = useState( false );
|
|
63
70
|
const { toggleSelection } = useDispatch( blockEditorStore );
|
|
64
71
|
const classes = classnames( 'custom-logo-link', {
|
|
65
72
|
'is-transient': isBlobURL( logoUrl ),
|
|
66
73
|
} );
|
|
67
|
-
const { maxWidth, title } = useSelect( ( select ) => {
|
|
74
|
+
const { imageEditing, maxWidth, title } = useSelect( ( select ) => {
|
|
68
75
|
const { getSettings } = select( blockEditorStore );
|
|
69
76
|
const siteEntities = select( coreStore ).getEditedEntityRecord(
|
|
70
77
|
'root',
|
|
@@ -72,10 +79,16 @@ const SiteLogo = ( {
|
|
|
72
79
|
);
|
|
73
80
|
return {
|
|
74
81
|
title: siteEntities.title,
|
|
75
|
-
...pick( getSettings(), [ '
|
|
82
|
+
...pick( getSettings(), [ 'imageEditing', 'maxWidth' ] ),
|
|
76
83
|
};
|
|
77
84
|
}, [] );
|
|
78
85
|
|
|
86
|
+
useEffect( () => {
|
|
87
|
+
if ( ! isSelected ) {
|
|
88
|
+
setIsEditingImage( false );
|
|
89
|
+
}
|
|
90
|
+
}, [ isSelected ] );
|
|
91
|
+
|
|
79
92
|
function onResizeStart() {
|
|
80
93
|
toggleSelection( false );
|
|
81
94
|
}
|
|
@@ -179,6 +192,63 @@ const SiteLogo = ( {
|
|
|
179
192
|
}
|
|
180
193
|
/* eslint-enable no-lonely-if */
|
|
181
194
|
|
|
195
|
+
const canEditImage =
|
|
196
|
+
logoId && naturalWidth && naturalHeight && imageEditing;
|
|
197
|
+
|
|
198
|
+
const imgEdit =
|
|
199
|
+
canEditImage && isEditingImage ? (
|
|
200
|
+
<ImageEditingProvider
|
|
201
|
+
id={ logoId }
|
|
202
|
+
url={ logoUrl }
|
|
203
|
+
naturalWidth={ naturalWidth }
|
|
204
|
+
naturalHeight={ naturalHeight }
|
|
205
|
+
clientWidth={ clientWidth }
|
|
206
|
+
onSaveImage={ ( imageAttributes ) => {
|
|
207
|
+
setLogo( imageAttributes.id );
|
|
208
|
+
} }
|
|
209
|
+
isEditing={ isEditingImage }
|
|
210
|
+
onFinishEditing={ () => setIsEditingImage( false ) }
|
|
211
|
+
>
|
|
212
|
+
<ImageEditor
|
|
213
|
+
url={ logoUrl }
|
|
214
|
+
width={ currentWidth }
|
|
215
|
+
height={ currentHeight }
|
|
216
|
+
clientWidth={ clientWidth }
|
|
217
|
+
naturalHeight={ naturalHeight }
|
|
218
|
+
naturalWidth={ naturalWidth }
|
|
219
|
+
/>
|
|
220
|
+
</ImageEditingProvider>
|
|
221
|
+
) : (
|
|
222
|
+
<ResizableBox
|
|
223
|
+
size={ {
|
|
224
|
+
width: currentWidth,
|
|
225
|
+
height: currentHeight,
|
|
226
|
+
} }
|
|
227
|
+
showHandle={ isSelected }
|
|
228
|
+
minWidth={ minWidth }
|
|
229
|
+
maxWidth={ maxWidthBuffer }
|
|
230
|
+
minHeight={ minHeight }
|
|
231
|
+
maxHeight={ maxWidthBuffer / ratio }
|
|
232
|
+
lockAspectRatio
|
|
233
|
+
enable={ {
|
|
234
|
+
top: false,
|
|
235
|
+
right: showRightHandle,
|
|
236
|
+
bottom: true,
|
|
237
|
+
left: showLeftHandle,
|
|
238
|
+
} }
|
|
239
|
+
onResizeStart={ onResizeStart }
|
|
240
|
+
onResizeStop={ ( event, direction, elt, delta ) => {
|
|
241
|
+
onResizeStop();
|
|
242
|
+
setAttributes( {
|
|
243
|
+
width: parseInt( currentWidth + delta.width, 10 ),
|
|
244
|
+
height: parseInt( currentHeight + delta.height, 10 ),
|
|
245
|
+
} );
|
|
246
|
+
} }
|
|
247
|
+
>
|
|
248
|
+
{ imgWrapper }
|
|
249
|
+
</ResizableBox>
|
|
250
|
+
);
|
|
251
|
+
|
|
182
252
|
return (
|
|
183
253
|
<>
|
|
184
254
|
<InspectorControls>
|
|
@@ -217,31 +287,16 @@ const SiteLogo = ( {
|
|
|
217
287
|
) }
|
|
218
288
|
</PanelBody>
|
|
219
289
|
</InspectorControls>
|
|
220
|
-
<
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
right: showRightHandle,
|
|
231
|
-
bottom: true,
|
|
232
|
-
left: showLeftHandle,
|
|
233
|
-
} }
|
|
234
|
-
onResizeStart={ onResizeStart }
|
|
235
|
-
onResizeStop={ ( event, direction, elt, delta ) => {
|
|
236
|
-
onResizeStop();
|
|
237
|
-
setAttributes( {
|
|
238
|
-
width: parseInt( currentWidth + delta.width, 10 ),
|
|
239
|
-
height: parseInt( currentHeight + delta.height, 10 ),
|
|
240
|
-
} );
|
|
241
|
-
} }
|
|
242
|
-
>
|
|
243
|
-
{ imgWrapper }
|
|
244
|
-
</ResizableBox>
|
|
290
|
+
<BlockControls group="block">
|
|
291
|
+
{ canEditImage && ! isEditingImage && (
|
|
292
|
+
<ToolbarButton
|
|
293
|
+
onClick={ () => setIsEditingImage( true ) }
|
|
294
|
+
icon={ crop }
|
|
295
|
+
label={ __( 'Crop' ) }
|
|
296
|
+
/>
|
|
297
|
+
) }
|
|
298
|
+
</BlockControls>
|
|
299
|
+
{ imgEdit }
|
|
245
300
|
</>
|
|
246
301
|
);
|
|
247
302
|
};
|
|
@@ -272,7 +327,7 @@ export default function LogoEdit( {
|
|
|
272
327
|
const _siteLogo = siteSettings?.site_logo;
|
|
273
328
|
const _readOnlyLogo = siteData?.site_logo;
|
|
274
329
|
const _canUserEdit = canUser( 'update', 'settings' );
|
|
275
|
-
const _siteLogoId = _siteLogo
|
|
330
|
+
const _siteLogoId = _canUserEdit ? _siteLogo : _readOnlyLogo;
|
|
276
331
|
const mediaItem =
|
|
277
332
|
_siteLogoId &&
|
|
278
333
|
select( coreStore ).getMedia( _siteLogoId, {
|
|
@@ -289,6 +344,7 @@ export default function LogoEdit( {
|
|
|
289
344
|
canUserEdit: _canUserEdit,
|
|
290
345
|
url: siteData?.url,
|
|
291
346
|
mediaItemData: mediaItem && {
|
|
347
|
+
id: mediaItem.id,
|
|
292
348
|
url: mediaItem.source_url,
|
|
293
349
|
alt: mediaItem.alt_text,
|
|
294
350
|
},
|
|
@@ -325,6 +381,11 @@ export default function LogoEdit( {
|
|
|
325
381
|
setLogo( media.id );
|
|
326
382
|
};
|
|
327
383
|
|
|
384
|
+
const onRemoveLogo = () => {
|
|
385
|
+
setLogo( null );
|
|
386
|
+
setLogoUrl( undefined );
|
|
387
|
+
};
|
|
388
|
+
|
|
328
389
|
const onUploadError = ( message ) => {
|
|
329
390
|
setError( message[ 2 ] ? message[ 2 ] : null );
|
|
330
391
|
};
|
|
@@ -338,6 +399,11 @@ export default function LogoEdit( {
|
|
|
338
399
|
onSelect={ onSelectLogo }
|
|
339
400
|
onError={ onUploadError }
|
|
340
401
|
/>
|
|
402
|
+
<ToolbarGroup>
|
|
403
|
+
<ToolbarButton onClick={ onRemoveLogo }>
|
|
404
|
+
{ __( 'Reset' ) }
|
|
405
|
+
</ToolbarButton>
|
|
406
|
+
</ToolbarGroup>
|
|
341
407
|
</BlockControls>
|
|
342
408
|
);
|
|
343
409
|
|
|
@@ -357,6 +423,8 @@ export default function LogoEdit( {
|
|
|
357
423
|
isSelected={ isSelected }
|
|
358
424
|
setAttributes={ setAttributes }
|
|
359
425
|
logoUrl={ logoUrl }
|
|
426
|
+
setLogo={ setLogo }
|
|
427
|
+
logoId={ mediaItemData?.id || siteLogoId }
|
|
360
428
|
siteUrl={ url }
|
|
361
429
|
/>
|
|
362
430
|
);
|
package/src/site-logo/index.php
CHANGED
|
@@ -132,7 +132,7 @@ add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' );
|
|
|
132
132
|
* @param array $old_value Previous theme mod settings.
|
|
133
133
|
* @param array $value Updated theme mod settings.
|
|
134
134
|
*/
|
|
135
|
-
function
|
|
135
|
+
function _gutenberg_delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
|
|
136
136
|
// If the custom_logo is being unset, it's being removed from theme mods.
|
|
137
137
|
if ( isset( $old_value['custom_logo'] ) && ! isset( $value['custom_logo'] ) ) {
|
|
138
138
|
delete_option( 'site_logo' );
|
|
@@ -142,7 +142,7 @@ function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
|
|
|
142
142
|
/**
|
|
143
143
|
* Deletes the site logo when all theme mods are being removed.
|
|
144
144
|
*/
|
|
145
|
-
function
|
|
145
|
+
function _gutenberg_delete_site_logo_on_remove_theme_mods() {
|
|
146
146
|
if ( false !== get_theme_support( 'custom-logo' ) ) {
|
|
147
147
|
delete_option( 'site_logo' );
|
|
148
148
|
}
|
|
@@ -160,3 +160,32 @@ function _delete_site_logo_on_remove_custom_logo_on_setup_theme() {
|
|
|
160
160
|
add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' );
|
|
161
161
|
}
|
|
162
162
|
add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_theme', 11 );
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Removes the custom_logo theme-mod when the site_logo option gets deleted.
|
|
166
|
+
*/
|
|
167
|
+
function _delete_custom_logo_on_remove_site_logo() {
|
|
168
|
+
$theme = get_option( 'stylesheet' );
|
|
169
|
+
|
|
170
|
+
// Unhook update and delete actions for custom_logo to prevent a loop of hooks.
|
|
171
|
+
// Remove Gutenberg hooks.
|
|
172
|
+
remove_action( "update_option_theme_mods_$theme", '_gutenberg_delete_site_logo_on_remove_custom_logo', 10 );
|
|
173
|
+
remove_action( "delete_option_theme_mods_$theme", '_gutenberg_delete_site_logo_on_remove_theme_mods' );
|
|
174
|
+
|
|
175
|
+
// Remove Core hooks.
|
|
176
|
+
remove_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10 );
|
|
177
|
+
remove_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' );
|
|
178
|
+
|
|
179
|
+
// Remove the custom logo.
|
|
180
|
+
remove_theme_mod( 'custom_logo' );
|
|
181
|
+
|
|
182
|
+
// Restore update and delete actions.
|
|
183
|
+
// Restore Gutenberg hooks.
|
|
184
|
+
add_action( "update_option_theme_mods_$theme", '_gutenberg_delete_site_logo_on_remove_custom_logo', 10, 2 );
|
|
185
|
+
add_action( "delete_option_theme_mods_$theme", '_gutenberg_delete_site_logo_on_remove_theme_mods' );
|
|
186
|
+
|
|
187
|
+
// Restore Core hooks.
|
|
188
|
+
add_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10, 2 );
|
|
189
|
+
add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' );
|
|
190
|
+
}
|
|
191
|
+
add_action( 'delete_option_site_logo', '_delete_custom_logo_on_remove_site_logo' );
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "core/site-title",
|
|
4
4
|
"title": "Site Title",
|
|
5
5
|
"category": "design",
|
|
6
|
-
"description": "Displays
|
|
6
|
+
"description": "Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.",
|
|
7
7
|
"textdomain": "default",
|
|
8
8
|
"attributes": {
|
|
9
9
|
"level": {
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
},
|
|
13
13
|
"textAlign": {
|
|
14
14
|
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"isLink": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"default": true
|
|
19
|
+
},
|
|
20
|
+
"linkTarget": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "_self"
|
|
15
23
|
}
|
|
16
24
|
},
|
|
17
25
|
"supports": {
|
|
@@ -19,7 +27,6 @@
|
|
|
19
27
|
"html": false,
|
|
20
28
|
"color": {
|
|
21
29
|
"gradients": true,
|
|
22
|
-
"text": false,
|
|
23
30
|
"link": true
|
|
24
31
|
},
|
|
25
32
|
"spacing": {
|
|
@@ -12,9 +12,11 @@ import { __ } from '@wordpress/i18n';
|
|
|
12
12
|
import {
|
|
13
13
|
RichText,
|
|
14
14
|
AlignmentControl,
|
|
15
|
+
InspectorControls,
|
|
15
16
|
BlockControls,
|
|
16
17
|
useBlockProps,
|
|
17
18
|
} from '@wordpress/block-editor';
|
|
19
|
+
import { ToggleControl, PanelBody } from '@wordpress/components';
|
|
18
20
|
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
19
21
|
import { decodeEntities } from '@wordpress/html-entities';
|
|
20
22
|
|
|
@@ -28,7 +30,7 @@ export default function SiteTitleEdit( {
|
|
|
28
30
|
setAttributes,
|
|
29
31
|
insertBlocksAfter,
|
|
30
32
|
} ) {
|
|
31
|
-
const { level, textAlign } = attributes;
|
|
33
|
+
const { level, textAlign, isLink, linkTarget } = attributes;
|
|
32
34
|
const [ title, setTitle ] = useEntityProp( 'root', 'site', 'title' );
|
|
33
35
|
const { canUserEdit, readOnlyTitle } = useSelect( ( select ) => {
|
|
34
36
|
const { canUser, getEntityRecord } = select( coreStore );
|
|
@@ -49,10 +51,11 @@ export default function SiteTitleEdit( {
|
|
|
49
51
|
const siteTitleContent = canUserEdit ? (
|
|
50
52
|
<TagName { ...blockProps }>
|
|
51
53
|
<RichText
|
|
52
|
-
tagName=
|
|
54
|
+
tagName={ isLink ? 'a' : 'span' }
|
|
55
|
+
href={ isLink ? '#site-title-pseudo-link' : undefined }
|
|
53
56
|
aria-label={ __( 'Site title text' ) }
|
|
54
57
|
placeholder={ __( 'Write site title…' ) }
|
|
55
|
-
value={ title
|
|
58
|
+
value={ title }
|
|
56
59
|
onChange={ setTitle }
|
|
57
60
|
allowedFormats={ [] }
|
|
58
61
|
disableLineBreaks
|
|
@@ -63,12 +66,16 @@ export default function SiteTitleEdit( {
|
|
|
63
66
|
</TagName>
|
|
64
67
|
) : (
|
|
65
68
|
<TagName { ...blockProps }>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
{ isLink ? (
|
|
70
|
+
<a
|
|
71
|
+
href="#site-title-pseudo-link"
|
|
72
|
+
onClick={ ( event ) => event.preventDefault() }
|
|
73
|
+
>
|
|
74
|
+
{ readOnlyTitle || __( 'Site Title placeholder' ) }
|
|
75
|
+
</a>
|
|
76
|
+
) : (
|
|
77
|
+
<span>{ title || readOnlyTitle }</span>
|
|
78
|
+
) }
|
|
72
79
|
</TagName>
|
|
73
80
|
);
|
|
74
81
|
return (
|
|
@@ -87,6 +94,26 @@ export default function SiteTitleEdit( {
|
|
|
87
94
|
} }
|
|
88
95
|
/>
|
|
89
96
|
</BlockControls>
|
|
97
|
+
<InspectorControls>
|
|
98
|
+
<PanelBody title={ __( 'Link settings' ) }>
|
|
99
|
+
<ToggleControl
|
|
100
|
+
label={ __( 'Make title link to home' ) }
|
|
101
|
+
onChange={ () => setAttributes( { isLink: ! isLink } ) }
|
|
102
|
+
checked={ isLink }
|
|
103
|
+
/>
|
|
104
|
+
{ isLink && (
|
|
105
|
+
<ToggleControl
|
|
106
|
+
label={ __( 'Open in new tab' ) }
|
|
107
|
+
onChange={ ( value ) =>
|
|
108
|
+
setAttributes( {
|
|
109
|
+
linkTarget: value ? '_blank' : '_self',
|
|
110
|
+
} )
|
|
111
|
+
}
|
|
112
|
+
checked={ linkTarget === '_blank' }
|
|
113
|
+
/>
|
|
114
|
+
) }
|
|
115
|
+
</PanelBody>
|
|
116
|
+
</InspectorControls>
|
|
90
117
|
{ siteTitleContent }
|
|
91
118
|
</>
|
|
92
119
|
);
|