@wordpress/block-library 9.23.0 → 9.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/button/edit.js +29 -17
- package/build/button/edit.js.map +1 -1
- package/build/code/index.js +2 -1
- package/build/code/index.js.map +1 -1
- package/build/columns/edit.js +18 -22
- package/build/columns/edit.js.map +1 -1
- package/build/comment-author-name/edit.js +41 -12
- package/build/comment-author-name/edit.js.map +1 -1
- package/build/comment-date/edit.js +41 -12
- package/build/comment-date/edit.js.map +1 -1
- package/build/comment-edit-link/edit.js +27 -7
- package/build/comment-edit-link/edit.js.map +1 -1
- package/build/comments/edit/comments-inspector-controls.js +1 -3
- package/build/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build/comments-pagination/edit.js +23 -9
- package/build/comments-pagination/edit.js.map +1 -1
- package/build/comments-title/edit.js +41 -12
- package/build/comments-title/edit.js.map +1 -1
- package/build/details/edit.js +27 -3
- package/build/details/edit.js.map +1 -1
- package/build/details/index.js +2 -1
- package/build/details/index.js.map +1 -1
- package/build/embed/edit.js +2 -4
- package/build/embed/edit.js.map +1 -1
- package/build/embed/embed-controls.js +41 -22
- package/build/embed/embed-controls.js.map +1 -1
- package/build/file/inspector.js +73 -30
- package/build/file/inspector.js.map +1 -1
- package/build/form/edit.js +67 -37
- package/build/form/edit.js.map +1 -1
- package/build/form-input/edit.js +47 -18
- package/build/form-input/edit.js.map +1 -1
- package/build/html/index.js +2 -1
- package/build/html/index.js.map +1 -1
- package/build/image/constants.js +2 -1
- package/build/image/constants.js.map +1 -1
- package/build/image/edit.js +1 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +1 -4
- package/build/image/image.js.map +1 -1
- package/build/latest-posts/edit.js +154 -82
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/ordered-list-settings.js +131 -52
- package/build/list/ordered-list-settings.js.map +1 -1
- package/build/more/index.js +2 -1
- package/build/more/index.js.map +1 -1
- package/build/navigation/edit/index.js +93 -51
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/overlay-menu-preview.js +43 -27
- package/build/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build/navigation-link/index.js +3 -0
- package/build/navigation-link/index.js.map +1 -1
- package/build/navigation-link/transforms.js +2 -0
- package/build/navigation-link/transforms.js.map +1 -1
- package/build/navigation-link/update-attributes.js +1 -0
- package/build/navigation-link/update-attributes.js.map +1 -1
- package/build/navigation-submenu/index.js +3 -0
- package/build/navigation-submenu/index.js.map +1 -1
- package/build/post-comments-count/index.js +3 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-count/transforms.js +26 -0
- package/build/post-comments-count/transforms.js.map +1 -0
- package/build/post-comments-link/index.js +3 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-comments-link/transforms.js +26 -0
- package/build/post-comments-link/transforms.js.map +1 -0
- package/build/post-excerpt/edit.js +3 -1
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-excerpt/index.js +2 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-navigation-link/edit.js +3 -1
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-navigation-link/index.js +2 -1
- package/build/post-navigation-link/index.js.map +1 -1
- package/build/post-navigation-link/variations.js +13 -13
- package/build/post-navigation-link/variations.js.map +1 -1
- package/build/post-template/edit.js +5 -3
- package/build/post-template/edit.js.map +1 -1
- package/build/post-terms/edit.js +3 -1
- package/build/post-terms/edit.js.map +1 -1
- package/build/post-terms/index.js +4 -2
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +56 -18
- package/build/post-title/edit.js.map +1 -1
- package/build/preformatted/transforms.js +5 -1
- package/build/preformatted/transforms.js.map +1 -1
- package/build/query/edit/enhanced-pagination-modal.js +1 -1
- package/build/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build/read-more/index.js +2 -1
- package/build/read-more/index.js.map +1 -1
- package/build/rss/edit.js +120 -46
- package/build/rss/edit.js.map +1 -1
- package/build/rss/index.js +2 -1
- package/build/rss/index.js.map +1 -1
- package/build/search/edit.js +76 -86
- package/build/search/edit.js.map +1 -1
- package/build/separator/edit.js +52 -20
- package/build/separator/edit.js.map +1 -1
- package/build/shortcode/index.js +2 -1
- package/build/shortcode/index.js.map +1 -1
- package/build/social-link/variations.js +53 -48
- package/build/social-link/variations.js.map +1 -1
- package/build/social-links/edit.js +35 -45
- package/build/social-links/edit.js.map +1 -1
- package/build/table/edit.js +3 -2
- package/build/table/edit.js.map +1 -1
- package/build/table/index.js +8 -4
- package/build/table/index.js.map +1 -1
- package/build/video/tracks-editor.js +40 -12
- package/build/video/tracks-editor.js.map +1 -1
- package/build-module/button/edit.js +30 -18
- package/build-module/button/edit.js.map +1 -1
- package/build-module/code/index.js +2 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/columns/edit.js +18 -22
- package/build-module/columns/edit.js.map +1 -1
- package/build-module/comment-author-name/edit.js +42 -13
- package/build-module/comment-author-name/edit.js.map +1 -1
- package/build-module/comment-date/edit.js +42 -13
- package/build-module/comment-date/edit.js.map +1 -1
- package/build-module/comment-edit-link/edit.js +28 -8
- package/build-module/comment-edit-link/edit.js.map +1 -1
- package/build-module/comments/edit/comments-inspector-controls.js +1 -3
- package/build-module/comments/edit/comments-inspector-controls.js.map +1 -1
- package/build-module/comments-pagination/edit.js +24 -10
- package/build-module/comments-pagination/edit.js.map +1 -1
- package/build-module/comments-title/edit.js +42 -13
- package/build-module/comments-title/edit.js.map +1 -1
- package/build-module/details/edit.js +29 -5
- package/build-module/details/edit.js.map +1 -1
- package/build-module/details/index.js +2 -1
- package/build-module/details/index.js.map +1 -1
- package/build-module/embed/edit.js +2 -4
- package/build-module/embed/edit.js.map +1 -1
- package/build-module/embed/embed-controls.js +42 -23
- package/build-module/embed/embed-controls.js.map +1 -1
- package/build-module/file/inspector.js +74 -31
- package/build-module/file/inspector.js.map +1 -1
- package/build-module/form/edit.js +68 -38
- package/build-module/form/edit.js.map +1 -1
- package/build-module/form-input/edit.js +48 -19
- package/build-module/form-input/edit.js.map +1 -1
- package/build-module/html/index.js +2 -1
- package/build-module/html/index.js.map +1 -1
- package/build-module/image/constants.js +1 -0
- package/build-module/image/constants.js.map +1 -1
- package/build-module/image/edit.js +2 -2
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +2 -5
- package/build-module/image/image.js.map +1 -1
- package/build-module/latest-posts/edit.js +155 -83
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/ordered-list-settings.js +132 -53
- package/build-module/list/ordered-list-settings.js.map +1 -1
- package/build-module/more/index.js +2 -1
- package/build-module/more/index.js.map +1 -1
- package/build-module/navigation/edit/index.js +94 -52
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-preview.js +44 -28
- package/build-module/navigation/edit/overlay-menu-preview.js.map +1 -1
- package/build-module/navigation-link/index.js +3 -0
- package/build-module/navigation-link/index.js.map +1 -1
- package/build-module/navigation-link/transforms.js +2 -0
- package/build-module/navigation-link/transforms.js.map +1 -1
- package/build-module/navigation-link/update-attributes.js +1 -0
- package/build-module/navigation-link/update-attributes.js.map +1 -1
- package/build-module/navigation-submenu/index.js +3 -0
- package/build-module/navigation-submenu/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +3 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-count/transforms.js +19 -0
- package/build-module/post-comments-count/transforms.js.map +1 -0
- package/build-module/post-comments-link/index.js +3 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-comments-link/transforms.js +19 -0
- package/build-module/post-comments-link/transforms.js.map +1 -0
- package/build-module/post-excerpt/edit.js +4 -2
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-excerpt/index.js +2 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +4 -2
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-navigation-link/index.js +2 -1
- package/build-module/post-navigation-link/index.js.map +1 -1
- package/build-module/post-navigation-link/variations.js +13 -13
- package/build-module/post-navigation-link/variations.js.map +1 -1
- package/build-module/post-template/edit.js +5 -3
- package/build-module/post-template/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +4 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/post-terms/index.js +4 -2
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +57 -19
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/preformatted/transforms.js +5 -1
- package/build-module/preformatted/transforms.js.map +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js +1 -1
- package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -1
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +3 -6
- package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -1
- package/build-module/read-more/index.js +2 -1
- package/build-module/read-more/index.js.map +1 -1
- package/build-module/rss/edit.js +121 -47
- package/build-module/rss/edit.js.map +1 -1
- package/build-module/rss/index.js +2 -1
- package/build-module/rss/index.js.map +1 -1
- package/build-module/search/edit.js +78 -88
- package/build-module/search/edit.js.map +1 -1
- package/build-module/separator/edit.js +54 -22
- package/build-module/separator/edit.js.map +1 -1
- package/build-module/shortcode/index.js +2 -1
- package/build-module/shortcode/index.js.map +1 -1
- package/build-module/social-link/variations.js +53 -48
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/social-links/edit.js +37 -47
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/table/edit.js +4 -3
- package/build-module/table/edit.js.map +1 -1
- package/build-module/table/index.js +8 -4
- package/build-module/table/index.js.map +1 -1
- package/build-module/video/tracks-editor.js +41 -13
- package/build-module/video/tracks-editor.js.map +1 -1
- package/build-style/archives/editor-rtl.css +47 -11
- package/build-style/archives/editor.css +47 -11
- package/build-style/archives/style-rtl.css +47 -11
- package/build-style/archives/style.css +47 -11
- package/build-style/audio/editor-rtl.css +47 -11
- package/build-style/audio/editor.css +47 -11
- package/build-style/audio/style-rtl.css +47 -11
- package/build-style/audio/style.css +47 -11
- package/build-style/audio/theme-rtl.css +47 -11
- package/build-style/audio/theme.css +47 -11
- package/build-style/avatar/editor-rtl.css +47 -11
- package/build-style/avatar/editor.css +47 -11
- package/build-style/avatar/style-rtl.css +47 -11
- package/build-style/avatar/style.css +47 -11
- package/build-style/button/editor-rtl.css +47 -11
- package/build-style/button/editor.css +47 -11
- package/build-style/button/style-rtl.css +47 -12
- package/build-style/button/style.css +47 -12
- package/build-style/buttons/editor-rtl.css +47 -11
- package/build-style/buttons/editor.css +47 -11
- package/build-style/buttons/style-rtl.css +50 -11
- package/build-style/buttons/style.css +50 -11
- package/build-style/calendar/style-rtl.css +47 -11
- package/build-style/calendar/style.css +47 -11
- package/build-style/categories/editor-rtl.css +47 -11
- package/build-style/categories/editor.css +47 -11
- package/build-style/categories/style-rtl.css +47 -11
- package/build-style/categories/style.css +47 -11
- package/build-style/classic-rtl.css +47 -11
- package/build-style/classic.css +47 -11
- package/build-style/code/editor-rtl.css +47 -11
- package/build-style/code/editor.css +47 -11
- package/build-style/code/style-rtl.css +47 -11
- package/build-style/code/style.css +47 -11
- package/build-style/code/theme-rtl.css +47 -11
- package/build-style/code/theme.css +47 -11
- package/build-style/columns/editor-rtl.css +47 -11
- package/build-style/columns/editor.css +47 -11
- package/build-style/columns/style-rtl.css +47 -11
- package/build-style/columns/style.css +47 -11
- package/build-style/comment-author-avatar/editor-rtl.css +47 -11
- package/build-style/comment-author-avatar/editor.css +47 -11
- package/build-style/comment-author-name/style-rtl.css +47 -11
- package/build-style/comment-author-name/style.css +47 -11
- package/build-style/comment-content/style-rtl.css +47 -11
- package/build-style/comment-content/style.css +47 -11
- package/build-style/comment-date/style-rtl.css +47 -11
- package/build-style/comment-date/style.css +47 -11
- package/build-style/comment-edit-link/style-rtl.css +47 -11
- package/build-style/comment-edit-link/style.css +47 -11
- package/build-style/comment-reply-link/style-rtl.css +47 -11
- package/build-style/comment-reply-link/style.css +47 -11
- package/build-style/comment-template/style-rtl.css +47 -11
- package/build-style/comment-template/style.css +47 -11
- package/build-style/comments/editor-rtl.css +47 -11
- package/build-style/comments/editor.css +47 -11
- package/build-style/comments/style-rtl.css +47 -11
- package/build-style/comments/style.css +47 -11
- package/build-style/comments-pagination/editor-rtl.css +47 -11
- package/build-style/comments-pagination/editor.css +47 -11
- package/build-style/comments-pagination/style-rtl.css +47 -11
- package/build-style/comments-pagination/style.css +47 -11
- package/build-style/comments-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/comments-pagination-numbers/editor.css +47 -11
- package/build-style/comments-title/editor-rtl.css +47 -11
- package/build-style/comments-title/editor.css +47 -11
- package/build-style/common-rtl.css +130 -9
- package/build-style/common.css +130 -9
- package/build-style/cover/editor-rtl.css +47 -11
- package/build-style/cover/editor.css +47 -11
- package/build-style/cover/style-rtl.css +47 -11
- package/build-style/cover/style.css +47 -11
- package/build-style/details/editor-rtl.css +47 -11
- package/build-style/details/editor.css +47 -11
- package/build-style/details/style-rtl.css +47 -11
- package/build-style/details/style.css +47 -11
- package/build-style/editor-elements-rtl.css +47 -11
- package/build-style/editor-elements.css +47 -11
- package/build-style/editor-rtl.css +57 -15
- package/build-style/editor.css +57 -15
- package/build-style/elements-rtl.css +47 -11
- package/build-style/elements.css +47 -11
- package/build-style/embed/editor-rtl.css +47 -11
- package/build-style/embed/editor.css +47 -11
- package/build-style/embed/style-rtl.css +47 -11
- package/build-style/embed/style.css +47 -11
- package/build-style/embed/theme-rtl.css +47 -11
- package/build-style/embed/theme.css +47 -11
- package/build-style/file/editor-rtl.css +47 -11
- package/build-style/file/editor.css +47 -11
- package/build-style/file/style-rtl.css +47 -11
- package/build-style/file/style.css +47 -11
- package/build-style/footnotes/style-rtl.css +47 -11
- package/build-style/footnotes/style.css +47 -11
- package/build-style/form-input/editor-rtl.css +47 -11
- package/build-style/form-input/editor.css +47 -11
- package/build-style/form-input/style-rtl.css +47 -11
- package/build-style/form-input/style.css +47 -11
- package/build-style/form-submission-notification/editor-rtl.css +47 -11
- package/build-style/form-submission-notification/editor.css +47 -11
- package/build-style/form-submit-button/style-rtl.css +47 -11
- package/build-style/form-submit-button/style.css +47 -11
- package/build-style/freeform/editor-rtl.css +47 -11
- package/build-style/freeform/editor.css +47 -11
- package/build-style/gallery/editor-rtl.css +47 -11
- package/build-style/gallery/editor.css +47 -11
- package/build-style/gallery/style-rtl.css +48 -11
- package/build-style/gallery/style.css +48 -11
- package/build-style/gallery/theme-rtl.css +47 -11
- package/build-style/gallery/theme.css +47 -11
- package/build-style/group/editor-rtl.css +47 -11
- package/build-style/group/editor.css +47 -11
- package/build-style/group/style-rtl.css +47 -11
- package/build-style/group/style.css +47 -11
- package/build-style/group/theme-rtl.css +47 -11
- package/build-style/group/theme.css +47 -11
- package/build-style/heading/style-rtl.css +47 -11
- package/build-style/heading/style.css +47 -11
- package/build-style/html/editor-rtl.css +48 -11
- package/build-style/html/editor.css +48 -11
- package/build-style/image/editor-rtl.css +47 -11
- package/build-style/image/editor.css +47 -11
- package/build-style/image/style-rtl.css +47 -11
- package/build-style/image/style.css +47 -11
- package/build-style/image/theme-rtl.css +47 -11
- package/build-style/image/theme.css +47 -11
- package/build-style/latest-comments/style-rtl.css +47 -11
- package/build-style/latest-comments/style.css +47 -11
- package/build-style/latest-posts/editor-rtl.css +47 -11
- package/build-style/latest-posts/editor.css +47 -11
- package/build-style/latest-posts/style-rtl.css +47 -11
- package/build-style/latest-posts/style.css +47 -11
- package/build-style/list/style-rtl.css +47 -11
- package/build-style/list/style.css +47 -11
- package/build-style/loginout/style-rtl.css +47 -11
- package/build-style/loginout/style.css +47 -11
- package/build-style/media-text/editor-rtl.css +47 -11
- package/build-style/media-text/editor.css +47 -11
- package/build-style/media-text/style-rtl.css +47 -11
- package/build-style/media-text/style.css +47 -11
- package/build-style/more/editor-rtl.css +47 -11
- package/build-style/more/editor.css +47 -11
- package/build-style/navigation/editor-rtl.css +55 -14
- package/build-style/navigation/editor.css +55 -14
- package/build-style/navigation/style-rtl.css +47 -11
- package/build-style/navigation/style.css +47 -11
- package/build-style/navigation-link/editor-rtl.css +47 -11
- package/build-style/navigation-link/editor.css +47 -11
- package/build-style/navigation-link/style-rtl.css +47 -11
- package/build-style/navigation-link/style.css +47 -11
- package/build-style/navigation-submenu/editor-rtl.css +47 -11
- package/build-style/navigation-submenu/editor.css +47 -11
- package/build-style/nextpage/editor-rtl.css +47 -11
- package/build-style/nextpage/editor.css +47 -11
- package/build-style/page-list/editor-rtl.css +47 -11
- package/build-style/page-list/editor.css +47 -11
- package/build-style/page-list/style-rtl.css +47 -11
- package/build-style/page-list/style.css +47 -11
- package/build-style/paragraph/editor-rtl.css +47 -11
- package/build-style/paragraph/editor.css +47 -11
- package/build-style/paragraph/style-rtl.css +47 -11
- package/build-style/paragraph/style.css +47 -11
- package/build-style/post-author/editor-rtl.css +47 -11
- package/build-style/post-author/editor.css +47 -11
- package/build-style/post-author/style-rtl.css +47 -11
- package/build-style/post-author/style.css +47 -11
- package/build-style/post-author-biography/style-rtl.css +47 -11
- package/build-style/post-author-biography/style.css +47 -11
- package/build-style/post-author-name/style-rtl.css +47 -11
- package/build-style/post-author-name/style.css +47 -11
- package/build-style/post-comments-count/style-rtl.css +47 -11
- package/build-style/post-comments-count/style.css +47 -11
- package/build-style/post-comments-form/editor-rtl.css +47 -11
- package/build-style/post-comments-form/editor.css +47 -11
- package/build-style/post-comments-form/style-rtl.css +47 -14
- package/build-style/post-comments-form/style.css +47 -14
- package/build-style/post-comments-link/style-rtl.css +47 -11
- package/build-style/post-comments-link/style.css +47 -11
- package/build-style/post-content/style-rtl.css +47 -11
- package/build-style/post-content/style.css +47 -11
- package/build-style/post-date/style-rtl.css +47 -11
- package/build-style/post-date/style.css +47 -11
- package/build-style/post-excerpt/editor-rtl.css +47 -11
- package/build-style/post-excerpt/editor.css +47 -11
- package/build-style/post-excerpt/style-rtl.css +47 -11
- package/build-style/post-excerpt/style.css +47 -11
- package/build-style/post-featured-image/editor-rtl.css +47 -11
- package/build-style/post-featured-image/editor.css +47 -11
- package/build-style/post-featured-image/style-rtl.css +47 -11
- package/build-style/post-featured-image/style.css +47 -11
- package/build-style/post-navigation-link/style-rtl.css +47 -11
- package/build-style/post-navigation-link/style.css +47 -11
- package/build-style/post-template/style-rtl.css +47 -11
- package/build-style/post-template/style.css +47 -11
- package/build-style/post-terms/style-rtl.css +47 -11
- package/build-style/post-terms/style.css +47 -11
- package/build-style/post-time-to-read/style-rtl.css +47 -11
- package/build-style/post-time-to-read/style.css +47 -11
- package/build-style/post-title/style-rtl.css +47 -11
- package/build-style/post-title/style.css +47 -11
- package/build-style/preformatted/style-rtl.css +47 -11
- package/build-style/preformatted/style.css +47 -11
- package/build-style/pullquote/editor-rtl.css +48 -12
- package/build-style/pullquote/editor.css +48 -12
- package/build-style/pullquote/style-rtl.css +49 -14
- package/build-style/pullquote/style.css +49 -14
- package/build-style/pullquote/theme-rtl.css +49 -13
- package/build-style/pullquote/theme.css +49 -13
- package/build-style/query/editor-rtl.css +47 -11
- package/build-style/query/editor.css +47 -11
- package/build-style/query-pagination/editor-rtl.css +47 -11
- package/build-style/query-pagination/editor.css +47 -11
- package/build-style/query-pagination/style-rtl.css +47 -11
- package/build-style/query-pagination/style.css +47 -11
- package/build-style/query-pagination-numbers/editor-rtl.css +47 -11
- package/build-style/query-pagination-numbers/editor.css +47 -11
- package/build-style/query-title/style-rtl.css +47 -11
- package/build-style/query-title/style.css +47 -11
- package/build-style/query-total/style-rtl.css +47 -11
- package/build-style/query-total/style.css +47 -11
- package/build-style/quote/style-rtl.css +47 -11
- package/build-style/quote/style.css +47 -11
- package/build-style/quote/theme-rtl.css +47 -11
- package/build-style/quote/theme.css +47 -11
- package/build-style/read-more/style-rtl.css +47 -11
- package/build-style/read-more/style.css +47 -11
- package/build-style/reset-rtl.css +47 -11
- package/build-style/reset.css +47 -11
- package/build-style/rss/editor-rtl.css +47 -11
- package/build-style/rss/editor.css +47 -11
- package/build-style/rss/style-rtl.css +47 -11
- package/build-style/rss/style.css +47 -11
- package/build-style/search/editor-rtl.css +47 -11
- package/build-style/search/editor.css +47 -11
- package/build-style/search/style-rtl.css +47 -11
- package/build-style/search/style.css +47 -11
- package/build-style/search/theme-rtl.css +47 -11
- package/build-style/search/theme.css +47 -11
- package/build-style/separator/editor-rtl.css +47 -11
- package/build-style/separator/editor.css +47 -11
- package/build-style/separator/style-rtl.css +47 -11
- package/build-style/separator/style.css +47 -11
- package/build-style/separator/theme-rtl.css +47 -11
- package/build-style/separator/theme.css +47 -11
- package/build-style/shortcode/editor-rtl.css +47 -11
- package/build-style/shortcode/editor.css +47 -11
- package/build-style/site-logo/editor-rtl.css +47 -11
- package/build-style/site-logo/editor.css +47 -11
- package/build-style/site-logo/style-rtl.css +47 -11
- package/build-style/site-logo/style.css +47 -11
- package/build-style/site-tagline/editor-rtl.css +47 -11
- package/build-style/site-tagline/editor.css +47 -11
- package/build-style/site-tagline/style-rtl.css +47 -11
- package/build-style/site-tagline/style.css +47 -11
- package/build-style/site-title/editor-rtl.css +47 -11
- package/build-style/site-title/editor.css +47 -11
- package/build-style/site-title/style-rtl.css +47 -11
- package/build-style/site-title/style.css +47 -11
- package/build-style/social-link/editor-rtl.css +47 -11
- package/build-style/social-link/editor.css +47 -11
- package/build-style/social-links/editor-rtl.css +47 -11
- package/build-style/social-links/editor.css +47 -11
- package/build-style/social-links/style-rtl.css +47 -11
- package/build-style/social-links/style.css +47 -11
- package/build-style/spacer/editor-rtl.css +47 -11
- package/build-style/spacer/editor.css +47 -11
- package/build-style/spacer/style-rtl.css +47 -11
- package/build-style/spacer/style.css +47 -11
- package/build-style/style-rtl.css +53 -18
- package/build-style/style.css +53 -18
- package/build-style/table/editor-rtl.css +47 -11
- package/build-style/table/editor.css +47 -11
- package/build-style/table/style-rtl.css +47 -11
- package/build-style/table/style.css +47 -11
- package/build-style/table/theme-rtl.css +47 -11
- package/build-style/table/theme.css +47 -11
- package/build-style/table-of-contents/style-rtl.css +47 -11
- package/build-style/table-of-contents/style.css +47 -11
- package/build-style/tag-cloud/editor-rtl.css +47 -11
- package/build-style/tag-cloud/editor.css +47 -11
- package/build-style/tag-cloud/style-rtl.css +47 -11
- package/build-style/tag-cloud/style.css +47 -11
- package/build-style/template-part/editor-rtl.css +47 -11
- package/build-style/template-part/editor.css +47 -11
- package/build-style/template-part/theme-rtl.css +47 -11
- package/build-style/template-part/theme.css +47 -11
- package/build-style/term-description/style-rtl.css +47 -11
- package/build-style/term-description/style.css +47 -11
- package/build-style/text-columns/editor-rtl.css +47 -11
- package/build-style/text-columns/editor.css +47 -11
- package/build-style/text-columns/style-rtl.css +47 -11
- package/build-style/text-columns/style.css +47 -11
- package/build-style/theme-rtl.css +49 -13
- package/build-style/theme.css +49 -13
- package/build-style/verse/style-rtl.css +47 -11
- package/build-style/verse/style.css +47 -11
- package/build-style/video/editor-rtl.css +47 -11
- package/build-style/video/editor.css +47 -11
- package/build-style/video/style-rtl.css +47 -11
- package/build-style/video/style.css +47 -11
- package/build-style/video/theme-rtl.css +47 -11
- package/build-style/video/theme.css +47 -11
- package/package.json +35 -35
- package/src/button/edit.js +44 -29
- package/src/button/style.scss +0 -1
- package/src/buttons/style.scss +5 -0
- package/src/code/block.json +2 -1
- package/src/columns/edit.js +20 -31
- package/src/comment-author-name/edit.js +54 -13
- package/src/comment-date/edit.js +50 -15
- package/src/comment-edit-link/edit.js +39 -11
- package/src/comments/edit/comments-inspector-controls.js +0 -2
- package/src/comments-pagination/edit.js +29 -9
- package/src/comments-title/edit.js +53 -15
- package/src/details/block.json +2 -1
- package/src/details/edit.js +36 -4
- package/src/embed/edit.js +3 -5
- package/src/embed/embed-controls.js +55 -33
- package/src/file/inspector.js +99 -45
- package/src/form/edit.js +91 -46
- package/src/form-input/edit.js +56 -18
- package/src/gallery/style.scss +1 -0
- package/src/html/block.json +2 -1
- package/src/html/editor.scss +1 -0
- package/src/image/constants.js +1 -0
- package/src/image/edit.js +2 -1
- package/src/image/image.js +7 -5
- package/src/latest-posts/edit.js +206 -98
- package/src/list/ordered-list-settings.js +172 -62
- package/src/more/block.json +2 -1
- package/src/navigation/edit/index.js +127 -64
- package/src/navigation/edit/overlay-menu-preview.js +43 -26
- package/src/navigation/editor.scss +8 -4
- package/src/navigation-link/block.json +3 -0
- package/src/navigation-link/index.php +4 -0
- package/src/navigation-link/transforms.js +2 -1
- package/src/navigation-link/update-attributes.js +1 -0
- package/src/navigation-submenu/block.json +3 -0
- package/src/navigation-submenu/index.php +4 -0
- package/src/post-comments-count/index.js +2 -0
- package/src/post-comments-count/transforms.js +20 -0
- package/src/post-comments-form/style.scss +0 -5
- package/src/post-comments-link/index.js +2 -0
- package/src/post-comments-link/transforms.js +20 -0
- package/src/post-excerpt/block.json +2 -1
- package/src/post-excerpt/edit.js +13 -8
- package/src/post-navigation-link/block.json +2 -1
- package/src/post-navigation-link/edit.js +13 -8
- package/src/post-navigation-link/variations.js +13 -13
- package/src/post-template/edit.js +4 -3
- package/src/post-terms/block.json +4 -2
- package/src/post-terms/edit.js +13 -8
- package/src/post-title/edit.js +76 -24
- package/src/preformatted/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/preformatted/test/transforms.native.js +6 -1
- package/src/preformatted/transforms.js +7 -1
- package/src/pullquote/editor.scss +1 -1
- package/src/pullquote/style.scss +2 -3
- package/src/pullquote/theme.scss +2 -2
- package/src/query/edit/enhanced-pagination-modal.js +1 -5
- package/src/query/edit/inspector-controls/enhanced-pagination-control.js +3 -13
- package/src/read-more/block.json +2 -1
- package/src/rss/block.json +2 -1
- package/src/rss/edit.js +141 -55
- package/src/search/edit.js +84 -99
- package/src/separator/edit.js +66 -21
- package/src/shortcode/block.json +2 -1
- package/src/site-title/index.php +1 -1
- package/src/social-link/index.php +49 -49
- package/src/social-link/variations.js +53 -48
- package/src/social-links/edit.js +39 -60
- package/src/table/block.json +8 -4
- package/src/table/edit.js +6 -2
- package/src/verse/test/__snapshots__/transforms.native.js.snap +6 -0
- package/src/verse/test/transforms.native.js +5 -1
- package/src/video/tracks-editor.js +57 -16
- package/build/search/icons.js +0 -121
- package/build/search/icons.js.map +0 -1
- package/build-module/search/icons.js +0 -114
- package/build-module/search/icons.js.map +0 -1
- package/src/search/icons.js +0 -89
|
@@ -31,10 +31,12 @@ import { EntityProvider, store as coreStore } from '@wordpress/core-data';
|
|
|
31
31
|
|
|
32
32
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
33
33
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
__experimentalToolsPanel as ToolsPanel,
|
|
35
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
36
36
|
__experimentalToggleGroupControl as ToggleGroupControl,
|
|
37
37
|
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
|
38
|
+
__experimentalVStack as VStack,
|
|
39
|
+
ToggleControl,
|
|
38
40
|
Button,
|
|
39
41
|
Spinner,
|
|
40
42
|
Notice,
|
|
@@ -72,6 +74,7 @@ import DeletedNavigationWarning from './deleted-navigation-warning';
|
|
|
72
74
|
import AccessibleDescription from './accessible-description';
|
|
73
75
|
import AccessibleMenuDescription from './accessible-menu-description';
|
|
74
76
|
import { unlock } from '../../lock-unlock';
|
|
77
|
+
import { useToolsPanelDropdownMenuProps } from '../../utils/hooks';
|
|
75
78
|
|
|
76
79
|
function ColorTools( {
|
|
77
80
|
textColor,
|
|
@@ -591,11 +594,25 @@ function Navigation( {
|
|
|
591
594
|
`overlay-menu-preview`
|
|
592
595
|
);
|
|
593
596
|
|
|
597
|
+
const dropdownMenuProps = useToolsPanelDropdownMenuProps();
|
|
598
|
+
|
|
594
599
|
const stylingInspectorControls = (
|
|
595
600
|
<>
|
|
596
601
|
<InspectorControls>
|
|
597
602
|
{ hasSubmenuIndicatorSetting && (
|
|
598
|
-
<
|
|
603
|
+
<ToolsPanel
|
|
604
|
+
label={ __( 'Display' ) }
|
|
605
|
+
resetAll={ () => {
|
|
606
|
+
setAttributes( {
|
|
607
|
+
showSubmenuIcon: true,
|
|
608
|
+
openSubmenusOnClick: false,
|
|
609
|
+
overlayMenu: 'mobile',
|
|
610
|
+
hasIcon: true,
|
|
611
|
+
icon: 'handle',
|
|
612
|
+
} );
|
|
613
|
+
} }
|
|
614
|
+
dropdownMenuProps={ dropdownMenuProps }
|
|
615
|
+
>
|
|
599
616
|
{ isResponsive && (
|
|
600
617
|
<>
|
|
601
618
|
<Button
|
|
@@ -623,88 +640,134 @@ function Navigation( {
|
|
|
623
640
|
</>
|
|
624
641
|
) }
|
|
625
642
|
</Button>
|
|
626
|
-
|
|
627
|
-
|
|
643
|
+
{ overlayMenuPreview && (
|
|
644
|
+
<VStack
|
|
645
|
+
id={ overlayMenuPreviewId }
|
|
646
|
+
spacing={ 4 }
|
|
647
|
+
style={ {
|
|
648
|
+
gridColumn: 'span 2',
|
|
649
|
+
} }
|
|
650
|
+
>
|
|
628
651
|
<OverlayMenuPreview
|
|
629
652
|
setAttributes={ setAttributes }
|
|
630
653
|
hasIcon={ hasIcon }
|
|
631
654
|
icon={ icon }
|
|
632
655
|
hidden={ ! overlayMenuPreview }
|
|
633
656
|
/>
|
|
634
|
-
|
|
635
|
-
|
|
657
|
+
</VStack>
|
|
658
|
+
) }
|
|
636
659
|
</>
|
|
637
660
|
) }
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
661
|
+
|
|
662
|
+
<ToolsPanelItem
|
|
663
|
+
hasValue={ () => overlayMenu !== 'mobile' }
|
|
641
664
|
label={ __( 'Overlay Menu' ) }
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
help={ __(
|
|
645
|
-
'Collapses the navigation options in a menu icon opening an overlay.'
|
|
646
|
-
) }
|
|
647
|
-
onChange={ ( value ) =>
|
|
648
|
-
setAttributes( { overlayMenu: value } )
|
|
665
|
+
onDeselect={ () =>
|
|
666
|
+
setAttributes( { overlayMenu: 'mobile' } )
|
|
649
667
|
}
|
|
650
|
-
|
|
668
|
+
isShownByDefault
|
|
651
669
|
>
|
|
652
|
-
<
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
value=
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
value
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
670
|
+
<ToggleGroupControl
|
|
671
|
+
__next40pxDefaultSize
|
|
672
|
+
__nextHasNoMarginBottom
|
|
673
|
+
label={ __( 'Overlay Menu' ) }
|
|
674
|
+
aria-label={ __( 'Configure overlay menu' ) }
|
|
675
|
+
value={ overlayMenu }
|
|
676
|
+
help={ __(
|
|
677
|
+
'Collapses the navigation options in a menu icon opening an overlay.'
|
|
678
|
+
) }
|
|
679
|
+
onChange={ ( value ) =>
|
|
680
|
+
setAttributes( { overlayMenu: value } )
|
|
681
|
+
}
|
|
682
|
+
isBlock
|
|
683
|
+
>
|
|
684
|
+
<ToggleGroupControlOption
|
|
685
|
+
value="never"
|
|
686
|
+
label={ __( 'Off' ) }
|
|
687
|
+
/>
|
|
688
|
+
<ToggleGroupControlOption
|
|
689
|
+
value="mobile"
|
|
690
|
+
label={ __( 'Mobile' ) }
|
|
691
|
+
/>
|
|
692
|
+
<ToggleGroupControlOption
|
|
693
|
+
value="always"
|
|
694
|
+
label={ __( 'Always' ) }
|
|
695
|
+
/>
|
|
696
|
+
</ToggleGroupControl>
|
|
697
|
+
</ToolsPanelItem>
|
|
698
|
+
|
|
665
699
|
{ hasSubmenus && (
|
|
666
700
|
<>
|
|
667
|
-
<h3
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
setAttributes( {
|
|
673
|
-
openSubmenusOnClick: value,
|
|
674
|
-
...( value && {
|
|
675
|
-
showSubmenuIcon: true,
|
|
676
|
-
} ), // Make sure arrows are shown when we toggle this on.
|
|
677
|
-
} );
|
|
678
|
-
} }
|
|
701
|
+
<h3 className="wp-block-navigation__submenu-header">
|
|
702
|
+
{ __( 'Submenus' ) }
|
|
703
|
+
</h3>
|
|
704
|
+
<ToolsPanelItem
|
|
705
|
+
hasValue={ () => openSubmenusOnClick }
|
|
679
706
|
label={ __( 'Open on click' ) }
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
<ToggleControl
|
|
683
|
-
__nextHasNoMarginBottom
|
|
684
|
-
checked={ showSubmenuIcon }
|
|
685
|
-
onChange={ ( value ) => {
|
|
707
|
+
onDeselect={ () =>
|
|
686
708
|
setAttributes( {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
709
|
+
openSubmenusOnClick: false,
|
|
710
|
+
showSubmenuIcon: true,
|
|
711
|
+
} )
|
|
712
|
+
}
|
|
713
|
+
isShownByDefault
|
|
714
|
+
>
|
|
715
|
+
<ToggleControl
|
|
716
|
+
__nextHasNoMarginBottom
|
|
717
|
+
checked={ openSubmenusOnClick }
|
|
718
|
+
onChange={ ( value ) => {
|
|
719
|
+
setAttributes( {
|
|
720
|
+
openSubmenusOnClick: value,
|
|
721
|
+
...( value && {
|
|
722
|
+
showSubmenuIcon: true,
|
|
723
|
+
} ), // Make sure arrows are shown when we toggle this on.
|
|
724
|
+
} );
|
|
725
|
+
} }
|
|
726
|
+
label={ __( 'Open on click' ) }
|
|
727
|
+
/>
|
|
728
|
+
</ToolsPanelItem>
|
|
729
|
+
|
|
730
|
+
<ToolsPanelItem
|
|
731
|
+
hasValue={ () => ! showSubmenuIcon }
|
|
691
732
|
label={ __( 'Show arrow' ) }
|
|
692
|
-
|
|
733
|
+
onDeselect={ () =>
|
|
734
|
+
setAttributes( {
|
|
735
|
+
showSubmenuIcon: true,
|
|
736
|
+
} )
|
|
737
|
+
}
|
|
738
|
+
isDisabled={
|
|
739
|
+
attributes.openSubmenusOnClick
|
|
740
|
+
}
|
|
741
|
+
isShownByDefault
|
|
742
|
+
>
|
|
743
|
+
<ToggleControl
|
|
744
|
+
__nextHasNoMarginBottom
|
|
745
|
+
checked={ showSubmenuIcon }
|
|
746
|
+
onChange={ ( value ) => {
|
|
747
|
+
setAttributes( {
|
|
748
|
+
showSubmenuIcon: value,
|
|
749
|
+
} );
|
|
750
|
+
} }
|
|
751
|
+
disabled={
|
|
752
|
+
attributes.openSubmenusOnClick
|
|
753
|
+
}
|
|
754
|
+
label={ __( 'Show arrow' ) }
|
|
755
|
+
/>
|
|
756
|
+
</ToolsPanelItem>
|
|
693
757
|
|
|
694
758
|
{ submenuAccessibilityNotice && (
|
|
695
|
-
<
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
</div>
|
|
759
|
+
<Notice
|
|
760
|
+
spokenMessage={ null }
|
|
761
|
+
status="warning"
|
|
762
|
+
isDismissible={ false }
|
|
763
|
+
className="wp-block-navigation__submenu-accessibility-notice"
|
|
764
|
+
>
|
|
765
|
+
{ submenuAccessibilityNotice }
|
|
766
|
+
</Notice>
|
|
704
767
|
) }
|
|
705
768
|
</>
|
|
706
769
|
) }
|
|
707
|
-
</
|
|
770
|
+
</ToolsPanel>
|
|
708
771
|
) }
|
|
709
772
|
</InspectorControls>
|
|
710
773
|
<InspectorControls group="color">
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ToggleControl,
|
|
6
6
|
__experimentalToggleGroupControl as ToggleGroupControl,
|
|
7
7
|
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
|
8
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
8
9
|
} from '@wordpress/components';
|
|
9
10
|
import { __ } from '@wordpress/i18n';
|
|
10
11
|
|
|
@@ -16,36 +17,52 @@ import OverlayMenuIcon from './overlay-menu-icon';
|
|
|
16
17
|
export default function OverlayMenuPreview( { setAttributes, hasIcon, icon } ) {
|
|
17
18
|
return (
|
|
18
19
|
<>
|
|
19
|
-
<
|
|
20
|
-
__nextHasNoMarginBottom
|
|
20
|
+
<ToolsPanelItem
|
|
21
21
|
label={ __( 'Show icon button' ) }
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
) }
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
isShownByDefault
|
|
23
|
+
hasValue={ () => ! hasIcon }
|
|
24
|
+
onDeselect={ () => setAttributes( { hasIcon: true } ) }
|
|
25
|
+
>
|
|
26
|
+
<ToggleControl
|
|
27
|
+
__nextHasNoMarginBottom
|
|
28
|
+
label={ __( 'Show icon button' ) }
|
|
29
|
+
help={ __(
|
|
30
|
+
'Configure the visual appearance of the button that toggles the overlay menu.'
|
|
31
|
+
) }
|
|
32
|
+
onChange={ ( value ) =>
|
|
33
|
+
setAttributes( { hasIcon: value } )
|
|
34
|
+
}
|
|
35
|
+
checked={ hasIcon }
|
|
36
|
+
/>
|
|
37
|
+
</ToolsPanelItem>
|
|
28
38
|
|
|
29
|
-
<
|
|
30
|
-
__next40pxDefaultSize
|
|
31
|
-
__nextHasNoMarginBottom
|
|
32
|
-
className="wp-block-navigation__overlay-menu-icon-toggle-group"
|
|
39
|
+
<ToolsPanelItem
|
|
33
40
|
label={ __( 'Icon' ) }
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
41
|
+
isShownByDefault
|
|
42
|
+
hasValue={ () => icon !== 'handle' }
|
|
43
|
+
onDeselect={ () => setAttributes( { icon: 'handle' } ) }
|
|
37
44
|
>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
value
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
<ToggleGroupControl
|
|
46
|
+
__next40pxDefaultSize
|
|
47
|
+
__nextHasNoMarginBottom
|
|
48
|
+
className="wp-block-navigation__overlay-menu-icon-toggle-group"
|
|
49
|
+
label={ __( 'Icon' ) }
|
|
50
|
+
value={ icon }
|
|
51
|
+
onChange={ ( value ) => setAttributes( { icon: value } ) }
|
|
52
|
+
isBlock
|
|
53
|
+
>
|
|
54
|
+
<ToggleGroupControlOption
|
|
55
|
+
value="handle"
|
|
56
|
+
aria-label={ __( 'handle' ) }
|
|
57
|
+
label={ <OverlayMenuIcon icon="handle" /> }
|
|
58
|
+
/>
|
|
59
|
+
<ToggleGroupControlOption
|
|
60
|
+
value="menu"
|
|
61
|
+
aria-label={ __( 'menu' ) }
|
|
62
|
+
label={ <OverlayMenuIcon icon="menu" /> }
|
|
63
|
+
/>
|
|
64
|
+
</ToggleGroupControl>
|
|
65
|
+
</ToolsPanelItem>
|
|
49
66
|
</>
|
|
50
67
|
);
|
|
51
68
|
}
|
|
@@ -569,7 +569,7 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
569
569
|
// Ref - https://github.com/WordPress/gutenberg/pull/65075#discussion_r1746282734
|
|
570
570
|
height: $grid-unit-40 * 2 !important;
|
|
571
571
|
|
|
572
|
-
|
|
572
|
+
grid-column: span 2;
|
|
573
573
|
|
|
574
574
|
&.open {
|
|
575
575
|
box-shadow: inset 0 0 0 $border-width $gray-200;
|
|
@@ -637,7 +637,11 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
|
|
|
637
637
|
margin-left: 24px;
|
|
638
638
|
}
|
|
639
639
|
|
|
640
|
-
.wp-block-
|
|
641
|
-
|
|
642
|
-
margin-bottom:
|
|
640
|
+
.editor-sidebar__panel .wp-block-navigation__submenu-header {
|
|
641
|
+
margin-top: 0;
|
|
642
|
+
margin-bottom: 0;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.wp-block-navigation__submenu-accessibility-notice {
|
|
646
|
+
grid-column: span 2;
|
|
643
647
|
}
|
|
@@ -249,6 +249,10 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
|
|
|
249
249
|
$html .= ' rel="nofollow"';
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
+
if ( isset( $attributes['title'] ) ) {
|
|
253
|
+
$html .= ' title="' . esc_attr( $attributes['title'] ) . '"';
|
|
254
|
+
}
|
|
255
|
+
|
|
252
256
|
// End appending HTML attributes to anchor tag.
|
|
253
257
|
|
|
254
258
|
// Start anchor tag content.
|
|
@@ -115,12 +115,13 @@ const transforms = {
|
|
|
115
115
|
{
|
|
116
116
|
type: 'block',
|
|
117
117
|
blocks: [ 'core/buttons' ],
|
|
118
|
-
transform: ( { label, url, rel, opensInNewTab } ) => {
|
|
118
|
+
transform: ( { label, url, rel, title, opensInNewTab } ) => {
|
|
119
119
|
return createBlock( 'core/buttons', {}, [
|
|
120
120
|
createBlock( 'core/button', {
|
|
121
121
|
text: label,
|
|
122
122
|
url,
|
|
123
123
|
rel,
|
|
124
|
+
title,
|
|
124
125
|
linkTarget: opensInNewTab ? '_blank' : undefined,
|
|
125
126
|
} ),
|
|
126
127
|
] );
|
|
@@ -19,6 +19,7 @@ import { safeDecodeURI } from '@wordpress/url';
|
|
|
19
19
|
* @property {number} [id] A post or term id.
|
|
20
20
|
* @property {boolean} [opensInNewTab] Sets link target to _blank when true.
|
|
21
21
|
* @property {string} [url] Link href.
|
|
22
|
+
* @property {string} [title] Link title attribute.
|
|
22
23
|
*/
|
|
23
24
|
/**
|
|
24
25
|
* Link Control onChange handler that updates block attributes when a setting is changed.
|
|
@@ -169,6 +169,10 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
|
|
|
169
169
|
$html .= ' rel="nofollow"';
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
if ( isset( $attributes['title'] ) ) {
|
|
173
|
+
$html .= ' title="' . esc_attr( $attributes['title'] ) . '"';
|
|
174
|
+
}
|
|
175
|
+
|
|
172
176
|
$html .= '>';
|
|
173
177
|
// End appending HTML attributes to anchor tag.
|
|
174
178
|
|
|
@@ -9,6 +9,7 @@ import { postCommentsCount as icon } from '@wordpress/icons';
|
|
|
9
9
|
import initBlock from '../utils/init-block';
|
|
10
10
|
import metadata from './block.json';
|
|
11
11
|
import edit from './edit';
|
|
12
|
+
import transforms from './transforms';
|
|
12
13
|
|
|
13
14
|
const { name } = metadata;
|
|
14
15
|
export { metadata, name };
|
|
@@ -16,6 +17,7 @@ export { metadata, name };
|
|
|
16
17
|
export const settings = {
|
|
17
18
|
icon,
|
|
18
19
|
edit,
|
|
20
|
+
transforms,
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export const init = () => initBlock( { name, metadata, settings } );
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createBlock } from '@wordpress/blocks';
|
|
5
|
+
|
|
6
|
+
const transforms = {
|
|
7
|
+
to: [
|
|
8
|
+
{
|
|
9
|
+
type: 'block',
|
|
10
|
+
blocks: [ 'core/post-comments-link' ],
|
|
11
|
+
transform: ( { textAlign } ) => {
|
|
12
|
+
return createBlock( 'core/post-comments-link', {
|
|
13
|
+
textAlign,
|
|
14
|
+
} );
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default transforms;
|
|
@@ -9,6 +9,7 @@ import { postCommentsCount as icon } from '@wordpress/icons';
|
|
|
9
9
|
import initBlock from '../utils/init-block';
|
|
10
10
|
import metadata from './block.json';
|
|
11
11
|
import edit from './edit';
|
|
12
|
+
import transforms from './transforms';
|
|
12
13
|
|
|
13
14
|
const { name } = metadata;
|
|
14
15
|
export { metadata, name };
|
|
@@ -16,6 +17,7 @@ export { metadata, name };
|
|
|
16
17
|
export const settings = {
|
|
17
18
|
edit,
|
|
18
19
|
icon,
|
|
20
|
+
transforms,
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
export const init = () => initBlock( { name, metadata, settings } );
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { createBlock } from '@wordpress/blocks';
|
|
5
|
+
|
|
6
|
+
const transforms = {
|
|
7
|
+
to: [
|
|
8
|
+
{
|
|
9
|
+
type: 'block',
|
|
10
|
+
blocks: [ 'core/post-comments-count' ],
|
|
11
|
+
transform: ( { textAlign } ) => {
|
|
12
|
+
return createBlock( 'core/post-comments-count', {
|
|
13
|
+
textAlign,
|
|
14
|
+
} );
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default transforms;
|
package/src/post-excerpt/edit.js
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
RichText,
|
|
16
16
|
Warning,
|
|
17
17
|
useBlockProps,
|
|
18
|
+
useBlockEditingMode,
|
|
18
19
|
} from '@wordpress/block-editor';
|
|
19
20
|
import {
|
|
20
21
|
ToggleControl,
|
|
@@ -41,6 +42,8 @@ export default function PostExcerptEditor( {
|
|
|
41
42
|
isSelected,
|
|
42
43
|
context: { postId, postType, queryId },
|
|
43
44
|
} ) {
|
|
45
|
+
const blockEditingMode = useBlockEditingMode();
|
|
46
|
+
const showControls = blockEditingMode === 'default';
|
|
44
47
|
const isDescendentOfQueryLoop = Number.isFinite( queryId );
|
|
45
48
|
const userCanEdit = useCanEditEntity( 'postType', postType, postId );
|
|
46
49
|
const [
|
|
@@ -220,14 +223,16 @@ export default function PostExcerptEditor( {
|
|
|
220
223
|
);
|
|
221
224
|
return (
|
|
222
225
|
<>
|
|
223
|
-
|
|
224
|
-
<
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
{ showControls && (
|
|
227
|
+
<BlockControls>
|
|
228
|
+
<AlignmentToolbar
|
|
229
|
+
value={ textAlign }
|
|
230
|
+
onChange={ ( newAlign ) =>
|
|
231
|
+
setAttributes( { textAlign: newAlign } )
|
|
232
|
+
}
|
|
233
|
+
/>
|
|
234
|
+
</BlockControls>
|
|
235
|
+
) }
|
|
231
236
|
<InspectorControls>
|
|
232
237
|
<ToolsPanel
|
|
233
238
|
label={ __( 'Settings' ) }
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
BlockControls,
|
|
20
20
|
AlignmentToolbar,
|
|
21
21
|
useBlockProps,
|
|
22
|
+
useBlockEditingMode,
|
|
22
23
|
} from '@wordpress/block-editor';
|
|
23
24
|
import { __, _x } from '@wordpress/i18n';
|
|
24
25
|
import { useSelect } from '@wordpress/data';
|
|
@@ -37,6 +38,8 @@ export default function PostNavigationLinkEdit( {
|
|
|
37
38
|
},
|
|
38
39
|
setAttributes,
|
|
39
40
|
} ) {
|
|
41
|
+
const blockEditingMode = useBlockEditingMode();
|
|
42
|
+
const showControls = blockEditingMode === 'default';
|
|
40
43
|
const isNext = type === 'next';
|
|
41
44
|
let placeholder = isNext ? __( 'Next' ) : __( 'Previous' );
|
|
42
45
|
|
|
@@ -176,14 +179,16 @@ export default function PostNavigationLinkEdit( {
|
|
|
176
179
|
) }
|
|
177
180
|
/>
|
|
178
181
|
</InspectorControls>
|
|
179
|
-
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
{ showControls && (
|
|
183
|
+
<BlockControls>
|
|
184
|
+
<AlignmentToolbar
|
|
185
|
+
value={ textAlign }
|
|
186
|
+
onChange={ ( nextAlign ) => {
|
|
187
|
+
setAttributes( { textAlign: nextAlign } );
|
|
188
|
+
} }
|
|
189
|
+
/>
|
|
190
|
+
</BlockControls>
|
|
191
|
+
) }
|
|
187
192
|
<div { ...blockProps }>
|
|
188
193
|
{ ! isNext && displayArrow && (
|
|
189
194
|
<span
|
|
@@ -6,34 +6,34 @@ import { next, previous } from '@wordpress/icons';
|
|
|
6
6
|
|
|
7
7
|
const variations = [
|
|
8
8
|
{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
title: __( 'Next Post' ),
|
|
9
|
+
name: 'post-previous',
|
|
10
|
+
title: __( 'Previous Post' ),
|
|
12
11
|
description: __(
|
|
13
|
-
'Displays the post link that
|
|
12
|
+
'Displays the post link that precedes the current post.'
|
|
14
13
|
),
|
|
15
|
-
icon:
|
|
16
|
-
attributes: { type: '
|
|
14
|
+
icon: previous,
|
|
15
|
+
attributes: { type: 'previous' },
|
|
17
16
|
scope: [ 'inserter', 'transform' ],
|
|
18
17
|
example: {
|
|
19
18
|
attributes: {
|
|
20
|
-
label: __( '
|
|
19
|
+
label: __( 'Previous post' ),
|
|
21
20
|
arrow: 'arrow',
|
|
22
21
|
},
|
|
23
22
|
},
|
|
24
23
|
},
|
|
25
24
|
{
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
isDefault: true,
|
|
26
|
+
name: 'post-next',
|
|
27
|
+
title: __( 'Next Post' ),
|
|
28
28
|
description: __(
|
|
29
|
-
'Displays the post link that
|
|
29
|
+
'Displays the post link that follows the current post.'
|
|
30
30
|
),
|
|
31
|
-
icon:
|
|
32
|
-
attributes: { type: '
|
|
31
|
+
icon: next,
|
|
32
|
+
attributes: { type: 'next' },
|
|
33
33
|
scope: [ 'inserter', 'transform' ],
|
|
34
34
|
example: {
|
|
35
35
|
attributes: {
|
|
36
|
-
label: __( '
|
|
36
|
+
label: __( 'Next post' ),
|
|
37
37
|
arrow: 'arrow',
|
|
38
38
|
},
|
|
39
39
|
},
|