@wordpress/block-library 6.1.0 → 7.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 +10 -0
- package/README.md +7 -1
- package/build/audio/edit.js +1 -1
- package/build/audio/edit.js.map +1 -1
- package/build/button/index.js +5 -1
- package/build/button/index.js.map +1 -1
- package/build/calendar/index.js +4 -1
- package/build/calendar/index.js.map +1 -1
- package/build/calendar/transforms.js +27 -0
- package/build/calendar/transforms.js.map +1 -0
- package/build/code/index.js +5 -1
- package/build/code/index.js.map +1 -1
- package/build/code/transforms.js +1 -1
- package/build/code/transforms.js.map +1 -1
- package/build/column/index.js +5 -1
- package/build/column/index.js.map +1 -1
- package/build/columns/index.js +5 -1
- package/build/columns/index.js.map +1 -1
- package/build/comment-author-avatar/index.js +4 -1
- package/build/comment-author-avatar/index.js.map +1 -1
- package/build/comment-author-name/index.js +6 -1
- package/build/comment-author-name/index.js.map +1 -1
- package/build/comment-content/index.js +5 -1
- package/build/comment-content/index.js.map +1 -1
- package/build/comment-date/index.js +6 -1
- package/build/comment-date/index.js.map +1 -1
- package/build/comment-edit-link/index.js +5 -1
- package/build/comment-edit-link/index.js.map +1 -1
- package/build/comment-reply-link/index.js +5 -1
- package/build/comment-reply-link/index.js.map +1 -1
- package/build/comment-template/edit.js +49 -11
- package/build/comment-template/edit.js.map +1 -1
- package/build/comments-pagination/index.js +6 -1
- package/build/comments-pagination/index.js.map +1 -1
- package/build/comments-pagination-next/index.js +4 -1
- package/build/comments-pagination-next/index.js.map +1 -1
- package/build/comments-pagination-previous/index.js +4 -1
- package/build/comments-pagination-previous/index.js.map +1 -1
- package/build/comments-query-loop/index.js +6 -1
- package/build/comments-query-loop/index.js.map +1 -1
- package/build/cover/deprecated.js +181 -15
- package/build/cover/deprecated.js.map +1 -1
- package/build/cover/edit.js +7 -4
- package/build/cover/edit.js.map +1 -1
- package/build/cover/save.js +8 -3
- package/build/cover/save.js.map +1 -1
- package/build/gallery/constants.js +5 -1
- package/build/gallery/constants.js.map +1 -1
- package/build/gallery/edit.js +26 -14
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/shared.js +1 -1
- package/build/gallery/shared.js.map +1 -1
- package/build/gallery/transforms.js +8 -2
- package/build/gallery/transforms.js.map +1 -1
- package/build/gallery/utils.js +4 -3
- package/build/gallery/utils.js.map +1 -1
- package/build/group/index.js +5 -1
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +18 -3
- package/build/group/variations.js.map +1 -1
- package/build/heading/index.js +5 -1
- package/build/heading/index.js.map +1 -1
- package/build/heading/transforms.js +7 -5
- package/build/heading/transforms.js.map +1 -1
- package/build/image/edit.native.js +55 -15
- package/build/image/edit.native.js.map +1 -1
- package/build/index.js +7 -3
- package/build/index.js.map +1 -1
- package/build/latest-posts/edit.js +46 -57
- package/build/latest-posts/edit.js.map +1 -1
- package/build/list/index.js +5 -1
- package/build/list/index.js.map +1 -1
- package/build/media-text/index.js +5 -1
- package/build/media-text/index.js.map +1 -1
- package/build/navigation/edit/existing-menus-options.js +62 -0
- package/build/navigation/edit/existing-menus-options.js.map +1 -0
- package/build/navigation/edit/index.js +4 -5
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/inner-blocks.js +7 -3
- package/build/navigation/edit/inner-blocks.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +25 -33
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/overlay-menu-icon.js +0 -1
- package/build/navigation/edit/overlay-menu-icon.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +26 -71
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/edit/placeholder/placeholder-preview.js +8 -12
- package/build/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build/paragraph/index.js +5 -1
- package/build/paragraph/index.js.map +1 -1
- package/build/paragraph/transforms.js +5 -1
- package/build/paragraph/transforms.js.map +1 -1
- package/build/post-author/index.js +5 -1
- package/build/post-author/index.js.map +1 -1
- package/build/post-author-biography/edit.js +76 -0
- package/build/post-author-biography/edit.js.map +1 -0
- package/build/post-author-biography/index.js +68 -0
- package/build/post-author-biography/index.js.map +1 -0
- package/build/post-author-name/index.js +6 -1
- package/build/post-author-name/index.js.map +1 -1
- package/build/post-comments/index.js +5 -1
- package/build/post-comments/index.js.map +1 -1
- package/build/post-comments-count/index.js +5 -1
- package/build/post-comments-count/index.js.map +1 -1
- package/build/post-comments-form/index.js +5 -1
- package/build/post-comments-form/index.js.map +1 -1
- package/build/post-comments-link/index.js +5 -1
- package/build/post-comments-link/index.js.map +1 -1
- package/build/post-content/edit.js +9 -3
- package/build/post-content/edit.js.map +1 -1
- package/build/post-date/index.js +6 -1
- package/build/post-date/index.js.map +1 -1
- package/build/post-excerpt/index.js +6 -1
- package/build/post-excerpt/index.js.map +1 -1
- package/build/post-terms/index.js +9 -1
- package/build/post-terms/index.js.map +1 -1
- package/build/post-title/edit.js +10 -7
- package/build/post-title/edit.js.map +1 -1
- package/build/post-title/index.js +6 -1
- package/build/post-title/index.js.map +1 -1
- package/build/preformatted/index.js +5 -1
- package/build/preformatted/index.js.map +1 -1
- package/build/pullquote/index.js +5 -1
- package/build/pullquote/index.js.map +1 -1
- package/build/query/index.js +5 -1
- package/build/query/index.js.map +1 -1
- package/build/query-pagination/index.js +6 -1
- package/build/query-pagination/index.js.map +1 -1
- package/build/query-pagination-next/index.js +4 -1
- package/build/query-pagination-next/index.js.map +1 -1
- package/build/query-pagination-previous/index.js +4 -1
- package/build/query-pagination-previous/index.js.map +1 -1
- package/build/query-title/index.js +8 -1
- package/build/query-title/index.js.map +1 -1
- package/build/quote/index.js +1 -5
- package/build/quote/index.js.map +1 -1
- package/build/read-more/edit.js +55 -0
- package/build/read-more/edit.js.map +1 -0
- package/build/read-more/index.js +87 -0
- package/build/read-more/index.js.map +1 -0
- package/build/search/edit.js +1 -1
- package/build/search/edit.js.map +1 -1
- package/build/search/index.js +5 -1
- package/build/search/index.js.map +1 -1
- package/build/site-logo/edit.js +4 -8
- package/build/site-logo/edit.js.map +1 -1
- package/build/site-tagline/edit.js +7 -2
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +5 -1
- package/build/site-tagline/index.js.map +1 -1
- package/build/site-title/index.js +6 -1
- package/build/site-title/index.js.map +1 -1
- package/build/social-link/edit.js +8 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/index.js +1 -1
- package/build/social-links/edit.js +7 -2
- package/build/social-links/edit.js.map +1 -1
- package/build/social-links/index.js +5 -0
- package/build/social-links/index.js.map +1 -1
- package/build/social-links/save.js +2 -0
- package/build/social-links/save.js.map +1 -1
- package/build/table/index.js +5 -1
- package/build/table/index.js.map +1 -1
- package/build/tag-cloud/index.js +12 -1
- package/build/tag-cloud/index.js.map +1 -1
- package/build/tag-cloud/transforms.js +27 -0
- package/build/tag-cloud/transforms.js.map +1 -0
- package/build/term-description/index.js +5 -1
- package/build/term-description/index.js.map +1 -1
- package/build/verse/index.js +5 -1
- package/build/verse/index.js.map +1 -1
- package/build-module/audio/edit.js +1 -1
- package/build-module/audio/edit.js.map +1 -1
- package/build-module/button/index.js +5 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/calendar/index.js +3 -1
- package/build-module/calendar/index.js.map +1 -1
- package/build-module/calendar/transforms.js +18 -0
- package/build-module/calendar/transforms.js.map +1 -0
- package/build-module/code/index.js +5 -1
- package/build-module/code/index.js.map +1 -1
- package/build-module/code/transforms.js +1 -1
- package/build-module/code/transforms.js.map +1 -1
- package/build-module/column/index.js +5 -1
- package/build-module/column/index.js.map +1 -1
- package/build-module/columns/index.js +5 -1
- package/build-module/columns/index.js.map +1 -1
- package/build-module/comment-author-avatar/index.js +4 -1
- package/build-module/comment-author-avatar/index.js.map +1 -1
- package/build-module/comment-author-name/index.js +6 -1
- package/build-module/comment-author-name/index.js.map +1 -1
- package/build-module/comment-content/index.js +5 -1
- package/build-module/comment-content/index.js.map +1 -1
- package/build-module/comment-date/index.js +6 -1
- package/build-module/comment-date/index.js.map +1 -1
- package/build-module/comment-edit-link/index.js +5 -1
- package/build-module/comment-edit-link/index.js.map +1 -1
- package/build-module/comment-reply-link/index.js +5 -1
- package/build-module/comment-reply-link/index.js.map +1 -1
- package/build-module/comment-template/edit.js +48 -13
- package/build-module/comment-template/edit.js.map +1 -1
- package/build-module/comments-pagination/index.js +6 -1
- package/build-module/comments-pagination/index.js.map +1 -1
- package/build-module/comments-pagination-next/index.js +4 -1
- package/build-module/comments-pagination-next/index.js.map +1 -1
- package/build-module/comments-pagination-previous/index.js +4 -1
- package/build-module/comments-pagination-previous/index.js.map +1 -1
- package/build-module/comments-query-loop/index.js +6 -1
- package/build-module/comments-query-loop/index.js.map +1 -1
- package/build-module/cover/deprecated.js +185 -17
- package/build-module/cover/deprecated.js.map +1 -1
- package/build-module/cover/edit.js +7 -4
- package/build-module/cover/edit.js.map +1 -1
- package/build-module/cover/save.js +8 -3
- package/build-module/cover/save.js.map +1 -1
- package/build-module/gallery/constants.js +2 -0
- package/build-module/gallery/constants.js.map +1 -1
- package/build-module/gallery/edit.js +25 -14
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/shared.js +1 -1
- package/build-module/gallery/shared.js.map +1 -1
- package/build-module/gallery/transforms.js +8 -2
- package/build-module/gallery/transforms.js.map +1 -1
- package/build-module/gallery/utils.js +5 -4
- package/build-module/gallery/utils.js.map +1 -1
- package/build-module/group/index.js +5 -1
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +18 -3
- package/build-module/group/variations.js.map +1 -1
- package/build-module/heading/index.js +5 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/transforms.js +7 -5
- package/build-module/heading/transforms.js.map +1 -1
- package/build-module/image/edit.native.js +54 -15
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/index.js +5 -3
- package/build-module/index.js.map +1 -1
- package/build-module/latest-posts/edit.js +47 -58
- package/build-module/latest-posts/edit.js.map +1 -1
- package/build-module/list/index.js +5 -1
- package/build-module/list/index.js.map +1 -1
- package/build-module/media-text/index.js +5 -1
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/navigation/edit/existing-menus-options.js +53 -0
- package/build-module/navigation/edit/existing-menus-options.js.map +1 -0
- package/build-module/navigation/edit/index.js +4 -5
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/inner-blocks.js +8 -4
- package/build-module/navigation/edit/inner-blocks.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +26 -33
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/overlay-menu-icon.js +0 -1
- package/build-module/navigation/edit/overlay-menu-icon.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +26 -71
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/edit/placeholder/placeholder-preview.js +8 -13
- package/build-module/navigation/edit/placeholder/placeholder-preview.js.map +1 -1
- package/build-module/paragraph/index.js +5 -1
- package/build-module/paragraph/index.js.map +1 -1
- package/build-module/paragraph/transforms.js +5 -1
- package/build-module/paragraph/transforms.js.map +1 -1
- package/build-module/post-author/index.js +5 -1
- package/build-module/post-author/index.js.map +1 -1
- package/build-module/post-author-biography/edit.js +64 -0
- package/build-module/post-author-biography/edit.js.map +1 -0
- package/build-module/post-author-biography/index.js +59 -0
- package/build-module/post-author-biography/index.js.map +1 -0
- package/build-module/post-author-name/index.js +6 -1
- package/build-module/post-author-name/index.js.map +1 -1
- package/build-module/post-comments/index.js +5 -1
- package/build-module/post-comments/index.js.map +1 -1
- package/build-module/post-comments-count/index.js +5 -1
- package/build-module/post-comments-count/index.js.map +1 -1
- package/build-module/post-comments-form/index.js +5 -1
- package/build-module/post-comments-form/index.js.map +1 -1
- package/build-module/post-comments-link/index.js +5 -1
- package/build-module/post-comments-link/index.js.map +1 -1
- package/build-module/post-content/edit.js +6 -4
- package/build-module/post-content/edit.js.map +1 -1
- package/build-module/post-date/index.js +6 -1
- package/build-module/post-date/index.js.map +1 -1
- package/build-module/post-excerpt/index.js +6 -1
- package/build-module/post-excerpt/index.js.map +1 -1
- package/build-module/post-terms/index.js +12 -1
- package/build-module/post-terms/index.js.map +1 -1
- package/build-module/post-title/edit.js +10 -8
- package/build-module/post-title/edit.js.map +1 -1
- package/build-module/post-title/index.js +6 -1
- package/build-module/post-title/index.js.map +1 -1
- package/build-module/preformatted/index.js +5 -1
- package/build-module/preformatted/index.js.map +1 -1
- package/build-module/pullquote/index.js +5 -1
- package/build-module/pullquote/index.js.map +1 -1
- package/build-module/query/index.js +5 -1
- package/build-module/query/index.js.map +1 -1
- package/build-module/query-pagination/index.js +6 -1
- package/build-module/query-pagination/index.js.map +1 -1
- package/build-module/query-pagination-next/index.js +4 -1
- package/build-module/query-pagination-next/index.js.map +1 -1
- package/build-module/query-pagination-previous/index.js +4 -1
- package/build-module/query-pagination-previous/index.js.map +1 -1
- package/build-module/query-title/index.js +11 -1
- package/build-module/query-title/index.js.map +1 -1
- package/build-module/quote/index.js +1 -5
- package/build-module/quote/index.js.map +1 -1
- package/build-module/read-more/edit.js +41 -0
- package/build-module/read-more/edit.js.map +1 -0
- package/build-module/read-more/index.js +74 -0
- package/build-module/read-more/index.js.map +1 -0
- package/build-module/search/edit.js +1 -1
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/index.js +5 -1
- package/build-module/search/index.js.map +1 -1
- package/build-module/site-logo/edit.js +4 -8
- package/build-module/site-logo/edit.js.map +1 -1
- package/build-module/site-tagline/edit.js +6 -2
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +5 -1
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/site-title/index.js +6 -1
- package/build-module/site-title/index.js.map +1 -1
- package/build-module/social-link/edit.js +8 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/index.js +1 -1
- package/build-module/social-links/edit.js +7 -2
- package/build-module/social-links/edit.js.map +1 -1
- package/build-module/social-links/index.js +5 -0
- package/build-module/social-links/index.js.map +1 -1
- package/build-module/social-links/save.js +2 -0
- package/build-module/social-links/save.js.map +1 -1
- package/build-module/table/index.js +5 -1
- package/build-module/table/index.js.map +1 -1
- package/build-module/tag-cloud/index.js +11 -1
- package/build-module/tag-cloud/index.js.map +1 -1
- package/build-module/tag-cloud/transforms.js +18 -0
- package/build-module/tag-cloud/transforms.js.map +1 -0
- package/build-module/term-description/index.js +5 -1
- package/build-module/term-description/index.js.map +1 -1
- package/build-module/verse/index.js +5 -1
- package/build-module/verse/index.js.map +1 -1
- package/build-style/common-rtl.css +8 -0
- package/build-style/common.css +8 -0
- package/build-style/cover/style-rtl.css +115 -11
- package/build-style/cover/style.css +115 -11
- package/build-style/editor-rtl.css +77 -67
- package/build-style/editor.css +77 -67
- package/build-style/gallery/style-rtl.css +2 -1
- package/build-style/gallery/style.css +2 -1
- package/build-style/image/style-rtl.css +0 -2
- package/build-style/image/style.css +0 -2
- package/build-style/navigation/editor-rtl.css +77 -67
- package/build-style/navigation/editor.css +77 -67
- package/build-style/quote/style-rtl.css +5 -5
- package/build-style/quote/style.css +5 -5
- package/build-style/read-more/style-rtl.css +87 -0
- package/build-style/read-more/style.css +87 -0
- package/build-style/separator/style-rtl.css +0 -3
- package/build-style/separator/style.css +0 -3
- package/build-style/social-links/style-rtl.css +7 -1
- package/build-style/social-links/style.css +7 -1
- package/build-style/style-rtl.css +149 -23
- package/build-style/style.css +149 -23
- package/package.json +28 -30
- package/src/audio/edit.js +1 -1
- package/src/block/test/edit.native.js +7 -3
- package/src/button/block.json +5 -1
- package/src/buttons/test/edit.native.js +2 -2
- package/src/calendar/index.js +2 -0
- package/src/calendar/transforms.js +23 -0
- package/src/code/block.json +5 -1
- package/src/code/transforms.js +1 -1
- package/src/column/block.json +5 -1
- package/src/columns/block.json +5 -1
- package/src/comment-author-avatar/block.json +4 -1
- package/src/comment-author-name/block.json +6 -1
- package/src/comment-content/block.json +5 -1
- package/src/comment-date/block.json +6 -1
- package/src/comment-date/index.php +1 -1
- package/src/comment-edit-link/block.json +5 -1
- package/src/comment-reply-link/block.json +5 -1
- package/src/comment-template/edit.js +59 -14
- package/src/comments-pagination/block.json +6 -1
- package/src/comments-pagination-next/block.json +4 -1
- package/src/comments-pagination-previous/block.json +4 -1
- package/src/comments-query-loop/block.json +6 -1
- package/src/common.scss +9 -0
- package/src/cover/deprecated.js +211 -1
- package/src/cover/edit.js +8 -4
- package/src/cover/save.js +10 -4
- package/src/cover/style.scss +20 -2
- package/src/cover/test/__snapshots__/edit.native.js.snap +4 -4
- package/src/cover/test/edit.native.js +8 -4
- package/src/embed/test/index.native.js +6 -6
- package/src/gallery/constants.js +2 -0
- package/src/gallery/edit.js +31 -13
- package/src/gallery/shared.js +1 -1
- package/src/gallery/style.scss +4 -1
- package/src/gallery/test/__snapshots__/index.native.js.snap +7 -0
- package/src/gallery/test/index.native.js +128 -0
- package/src/gallery/transforms.js +7 -1
- package/src/gallery/utils.js +7 -3
- package/src/group/block.json +5 -1
- package/src/group/variations.js +11 -1
- package/src/heading/block.json +5 -1
- package/src/heading/transforms.js +2 -5
- package/src/image/edit.native.js +65 -15
- package/src/image/index.php +1 -1
- package/src/image/style.scss +0 -2
- package/src/image/test/edit.native.js +157 -8
- package/src/index.js +35 -31
- package/src/latest-comments/index.php +4 -4
- package/src/latest-posts/edit.js +51 -63
- package/src/latest-posts/index.php +3 -3
- package/src/list/block.json +5 -1
- package/src/media-text/block.json +5 -1
- package/src/missing/test/edit-integration.native.js +2 -2
- package/src/navigation/edit/existing-menus-options.js +70 -0
- package/src/navigation/edit/index.js +4 -3
- package/src/navigation/edit/inner-blocks.js +16 -3
- package/src/navigation/edit/navigation-menu-selector.js +38 -62
- package/src/navigation/edit/overlay-menu-icon.js +0 -1
- package/src/navigation/edit/placeholder/index.js +39 -108
- package/src/navigation/edit/placeholder/placeholder-preview.js +8 -10
- package/src/navigation/editor.scss +119 -100
- package/src/navigation/index.php +3 -3
- package/src/navigation-link/index.php +1 -1
- package/src/navigation-submenu/index.php +1 -1
- package/src/page-list/index.php +5 -5
- package/src/paragraph/block.json +5 -1
- package/src/post-author/block.json +5 -1
- package/src/post-author-biography/block.json +41 -0
- package/src/post-author-biography/edit.js +63 -0
- package/src/post-author-biography/index.js +18 -0
- package/src/post-author-biography/index.php +48 -0
- package/src/post-author-name/block.json +6 -1
- package/src/post-comments/block.json +5 -1
- package/src/post-comments-count/block.json +5 -1
- package/src/post-comments-form/block.json +5 -1
- package/src/post-comments-link/block.json +5 -1
- package/src/post-comments-link/index.php +2 -2
- package/src/post-content/edit.js +4 -4
- package/src/post-date/block.json +6 -1
- package/src/post-date/index.php +1 -1
- package/src/post-excerpt/block.json +6 -1
- package/src/post-excerpt/index.php +1 -1
- package/src/post-terms/block.json +6 -1
- package/src/post-terms/index.js +6 -0
- package/src/post-title/block.json +6 -1
- package/src/post-title/edit.js +8 -7
- package/src/post-title/index.php +1 -1
- package/src/preformatted/block.json +5 -1
- package/src/pullquote/block.json +5 -1
- package/src/query/block.json +5 -1
- package/src/query-pagination/block.json +6 -1
- package/src/query-pagination-next/block.json +4 -1
- package/src/query-pagination-next/index.php +2 -2
- package/src/query-pagination-previous/block.json +4 -1
- package/src/query-pagination-previous/index.php +2 -2
- package/src/query-title/block.json +5 -1
- package/src/query-title/index.js +6 -0
- package/src/quote/block.json +1 -2
- package/src/quote/index.js +0 -1
- package/src/quote/style.scss +3 -3
- package/src/quote/theme.scss +1 -1
- package/src/read-more/block.json +56 -0
- package/src/read-more/edit.js +50 -0
- package/src/read-more/index.js +18 -0
- package/src/read-more/index.php +45 -0
- package/src/read-more/style.scss +12 -0
- package/src/search/block.json +5 -1
- package/src/search/edit.js +2 -1
- package/src/search/index.php +5 -3
- package/src/separator/style.scss +0 -5
- package/src/site-logo/edit.js +4 -8
- package/src/site-tagline/block.json +5 -1
- package/src/site-tagline/edit.js +10 -1
- package/src/site-tagline/index.php +1 -1
- package/src/site-title/block.json +6 -1
- package/src/site-title/index.php +2 -2
- package/src/social-link/block.json +1 -0
- package/src/social-link/edit.js +14 -2
- package/src/social-link/index.php +55 -52
- package/src/social-links/block.json +5 -0
- package/src/social-links/edit.js +8 -1
- package/src/social-links/save.js +7 -1
- package/src/social-links/style.scss +8 -1
- package/src/style.scss +1 -0
- package/src/table/block.json +5 -1
- package/src/tag-cloud/block.json +4 -0
- package/src/tag-cloud/index.js +2 -0
- package/src/tag-cloud/index.php +0 -9
- package/src/tag-cloud/transforms.js +23 -0
- package/src/term-description/block.json +5 -1
- package/src/verse/block.json +5 -1
package/src/latest-posts/edit.js
CHANGED
|
@@ -7,7 +7,6 @@ import classnames from 'classnames';
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
|
-
import { RawHTML } from '@wordpress/element';
|
|
11
10
|
import {
|
|
12
11
|
BaseControl,
|
|
13
12
|
PanelBody,
|
|
@@ -55,6 +54,17 @@ const USERS_LIST_QUERY = {
|
|
|
55
54
|
context: 'view',
|
|
56
55
|
};
|
|
57
56
|
|
|
57
|
+
function getFeaturedImageDetails( post, size ) {
|
|
58
|
+
const image = get( post, [ '_embedded', 'wp:featuredmedia', '0' ] );
|
|
59
|
+
|
|
60
|
+
return {
|
|
61
|
+
url:
|
|
62
|
+
image?.media_details?.sizes?.[ size ]?.source_url ??
|
|
63
|
+
image?.source_url,
|
|
64
|
+
alt: image?.alt_text,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
58
68
|
export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
59
69
|
const {
|
|
60
70
|
postsToShow,
|
|
@@ -77,7 +87,7 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
77
87
|
addLinkToFeaturedImage,
|
|
78
88
|
} = attributes;
|
|
79
89
|
const {
|
|
80
|
-
|
|
90
|
+
imageSizes,
|
|
81
91
|
latestPosts,
|
|
82
92
|
defaultImageWidth,
|
|
83
93
|
defaultImageHeight,
|
|
@@ -85,11 +95,8 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
85
95
|
authorList,
|
|
86
96
|
} = useSelect(
|
|
87
97
|
( select ) => {
|
|
88
|
-
const { getEntityRecords,
|
|
89
|
-
|
|
90
|
-
);
|
|
91
|
-
const { getSettings } = select( blockEditorStore );
|
|
92
|
-
const { imageSizes, imageDimensions } = getSettings();
|
|
98
|
+
const { getEntityRecords, getUsers } = select( coreStore );
|
|
99
|
+
const settings = select( blockEditorStore ).getSettings();
|
|
93
100
|
const catIds =
|
|
94
101
|
categories && categories.length > 0
|
|
95
102
|
? categories.map( ( cat ) => cat.id )
|
|
@@ -101,59 +108,28 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
101
108
|
order,
|
|
102
109
|
orderby: orderBy,
|
|
103
110
|
per_page: postsToShow,
|
|
111
|
+
_embed: 'wp:featuredmedia',
|
|
104
112
|
},
|
|
105
113
|
( value ) => ! isUndefined( value )
|
|
106
114
|
);
|
|
107
115
|
|
|
108
|
-
const posts = getEntityRecords(
|
|
109
|
-
'postType',
|
|
110
|
-
'post',
|
|
111
|
-
latestPostsQuery
|
|
112
|
-
);
|
|
113
|
-
|
|
114
116
|
return {
|
|
115
117
|
defaultImageWidth: get(
|
|
116
|
-
imageDimensions,
|
|
118
|
+
settings.imageDimensions,
|
|
117
119
|
[ featuredImageSizeSlug, 'width' ],
|
|
118
120
|
0
|
|
119
121
|
),
|
|
120
122
|
defaultImageHeight: get(
|
|
121
|
-
imageDimensions,
|
|
123
|
+
settings.imageDimensions,
|
|
122
124
|
[ featuredImageSizeSlug, 'height' ],
|
|
123
125
|
0
|
|
124
126
|
),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
latestPosts: ! Array.isArray( posts )
|
|
132
|
-
? posts
|
|
133
|
-
: posts.map( ( post ) => {
|
|
134
|
-
if ( ! post.featured_media ) return post;
|
|
135
|
-
|
|
136
|
-
const image = getMedia( post.featured_media );
|
|
137
|
-
let url = get(
|
|
138
|
-
image,
|
|
139
|
-
[
|
|
140
|
-
'media_details',
|
|
141
|
-
'sizes',
|
|
142
|
-
featuredImageSizeSlug,
|
|
143
|
-
'source_url',
|
|
144
|
-
],
|
|
145
|
-
null
|
|
146
|
-
);
|
|
147
|
-
if ( ! url ) {
|
|
148
|
-
url = get( image, 'source_url', null );
|
|
149
|
-
}
|
|
150
|
-
const featuredImageInfo = {
|
|
151
|
-
url,
|
|
152
|
-
// eslint-disable-next-line camelcase
|
|
153
|
-
alt: image?.alt_text,
|
|
154
|
-
};
|
|
155
|
-
return { ...post, featuredImageInfo };
|
|
156
|
-
} ),
|
|
127
|
+
imageSizes: settings.imageSizes,
|
|
128
|
+
latestPosts: getEntityRecords(
|
|
129
|
+
'postType',
|
|
130
|
+
'post',
|
|
131
|
+
latestPostsQuery
|
|
132
|
+
),
|
|
157
133
|
categoriesList: getEntityRecords(
|
|
158
134
|
'taxonomy',
|
|
159
135
|
'category',
|
|
@@ -171,6 +147,13 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
171
147
|
selectedAuthor,
|
|
172
148
|
]
|
|
173
149
|
);
|
|
150
|
+
|
|
151
|
+
const imageSizeOptions = imageSizes
|
|
152
|
+
.filter( ( { slug } ) => slug !== 'full' )
|
|
153
|
+
.map( ( { name, slug } ) => ( {
|
|
154
|
+
value: slug,
|
|
155
|
+
label: name,
|
|
156
|
+
} ) );
|
|
174
157
|
const categorySuggestions =
|
|
175
158
|
categoriesList?.reduce(
|
|
176
159
|
( accumulator, category ) => ( {
|
|
@@ -451,11 +434,9 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
451
434
|
'';
|
|
452
435
|
|
|
453
436
|
const {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
} = {},
|
|
458
|
-
} = post;
|
|
437
|
+
url: imageSourceUrl,
|
|
438
|
+
alt: featuredImageAlt,
|
|
439
|
+
} = getFeaturedImageDetails( post, featuredImageSizeSlug );
|
|
459
440
|
const imageClasses = classnames( {
|
|
460
441
|
'wp-block-latest-posts__featured-image': true,
|
|
461
442
|
[ `align${ featuredImageAlign }` ]: !! featuredImageAlign,
|
|
@@ -509,12 +490,18 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
509
490
|
) }
|
|
510
491
|
</div>
|
|
511
492
|
) }
|
|
512
|
-
<a
|
|
513
|
-
{
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
493
|
+
<a
|
|
494
|
+
href={ post.link }
|
|
495
|
+
rel="noreferrer noopener"
|
|
496
|
+
dangerouslySetInnerHTML={
|
|
497
|
+
!! titleTrimmed
|
|
498
|
+
? {
|
|
499
|
+
__html: titleTrimmed,
|
|
500
|
+
}
|
|
501
|
+
: undefined
|
|
502
|
+
}
|
|
503
|
+
>
|
|
504
|
+
{ ! titleTrimmed ? __( '(no title)' ) : null }
|
|
518
505
|
</a>
|
|
519
506
|
{ displayAuthor && currentAuthor && (
|
|
520
507
|
<div className="wp-block-latest-posts__post-author">
|
|
@@ -541,11 +528,12 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) {
|
|
|
541
528
|
) }
|
|
542
529
|
{ displayPostContent &&
|
|
543
530
|
displayPostContentRadio === 'full_post' && (
|
|
544
|
-
<div
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
531
|
+
<div
|
|
532
|
+
className="wp-block-latest-posts__post-full-content"
|
|
533
|
+
dangerouslySetInnerHTML={ {
|
|
534
|
+
__html: post.content.raw.trim(),
|
|
535
|
+
} }
|
|
536
|
+
/>
|
|
549
537
|
) }
|
|
550
538
|
</li>
|
|
551
539
|
);
|
|
@@ -119,7 +119,7 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
119
119
|
if ( ! empty( $author_display_name ) ) {
|
|
120
120
|
$list_items_markup .= sprintf(
|
|
121
121
|
'<div class="wp-block-latest-posts__post-author">%1$s</div>',
|
|
122
|
-
|
|
122
|
+
$byline
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -128,7 +128,7 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
128
128
|
$list_items_markup .= sprintf(
|
|
129
129
|
'<time datetime="%1$s" class="wp-block-latest-posts__post-date">%2$s</time>',
|
|
130
130
|
esc_attr( get_the_date( 'c', $post ) ),
|
|
131
|
-
|
|
131
|
+
get_the_date( '', $post )
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
134
|
|
|
@@ -143,7 +143,7 @@ function render_block_core_latest_posts( $attributes ) {
|
|
|
143
143
|
|
|
144
144
|
$list_items_markup .= sprintf(
|
|
145
145
|
'<div class="wp-block-latest-posts__post-excerpt">%1$s</div>',
|
|
146
|
-
|
|
146
|
+
$trimmed_excerpt
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
149
|
|
package/src/list/block.json
CHANGED
|
@@ -40,7 +40,7 @@ describe( 'Unsupported block', () => {
|
|
|
40
40
|
const initialHtml = `<!-- wp:table -->
|
|
41
41
|
<figure class="wp-block-table"><table><tbody><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></tbody></table></figure>
|
|
42
42
|
<!-- /wp:table -->`;
|
|
43
|
-
const { getByA11yLabel } = initializeEditor( {
|
|
43
|
+
const { getByA11yLabel } = await initializeEditor( {
|
|
44
44
|
initialHtml,
|
|
45
45
|
} );
|
|
46
46
|
|
|
@@ -59,7 +59,7 @@ describe( 'Unsupported block', () => {
|
|
|
59
59
|
const initialHtml = `<!-- wp:table -->
|
|
60
60
|
<figure class="wp-block-table"><table><tbody><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></tbody></table></figure>
|
|
61
61
|
<!-- /wp:table -->`;
|
|
62
|
-
const { getByA11yLabel, getByText } = initializeEditor( {
|
|
62
|
+
const { getByA11yLabel, getByText } = await initializeEditor( {
|
|
63
63
|
initialHtml,
|
|
64
64
|
} );
|
|
65
65
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { MenuGroup, MenuItem } from '@wordpress/components';
|
|
5
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
6
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
7
|
+
|
|
8
|
+
const ExistingMenusOptions = ( {
|
|
9
|
+
showNavigationMenus,
|
|
10
|
+
showClassicMenus = false,
|
|
11
|
+
navigationMenus,
|
|
12
|
+
classicMenus,
|
|
13
|
+
onSelectNavigationMenu,
|
|
14
|
+
onSelectClassicMenu,
|
|
15
|
+
actionLabel,
|
|
16
|
+
} ) => {
|
|
17
|
+
const hasNavigationMenus = !! navigationMenus?.length;
|
|
18
|
+
const hasClassicMenus = !! classicMenus?.length;
|
|
19
|
+
|
|
20
|
+
/* translators: %s: The name of a menu. */
|
|
21
|
+
const createActionLabel = __( "Create from '%s'" );
|
|
22
|
+
|
|
23
|
+
actionLabel = actionLabel || createActionLabel;
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
{ showNavigationMenus && hasNavigationMenus && (
|
|
28
|
+
<MenuGroup label={ __( 'Menus' ) }>
|
|
29
|
+
{ navigationMenus.map( ( menu ) => {
|
|
30
|
+
const label = decodeEntities( menu.title.rendered );
|
|
31
|
+
return (
|
|
32
|
+
<MenuItem
|
|
33
|
+
onClick={ () => {
|
|
34
|
+
onSelectNavigationMenu( menu );
|
|
35
|
+
} }
|
|
36
|
+
key={ menu.id }
|
|
37
|
+
aria-label={ sprintf( actionLabel, label ) }
|
|
38
|
+
>
|
|
39
|
+
{ label }
|
|
40
|
+
</MenuItem>
|
|
41
|
+
);
|
|
42
|
+
} ) }
|
|
43
|
+
</MenuGroup>
|
|
44
|
+
) }
|
|
45
|
+
{ showClassicMenus && hasClassicMenus && (
|
|
46
|
+
<MenuGroup label={ __( 'Classic Menus' ) }>
|
|
47
|
+
{ classicMenus.map( ( menu ) => {
|
|
48
|
+
const label = decodeEntities( menu.name );
|
|
49
|
+
return (
|
|
50
|
+
<MenuItem
|
|
51
|
+
onClick={ () => {
|
|
52
|
+
onSelectClassicMenu( menu );
|
|
53
|
+
} }
|
|
54
|
+
key={ menu.id }
|
|
55
|
+
aria-label={ sprintf(
|
|
56
|
+
createActionLabel,
|
|
57
|
+
label
|
|
58
|
+
) }
|
|
59
|
+
>
|
|
60
|
+
{ label }
|
|
61
|
+
</MenuItem>
|
|
62
|
+
);
|
|
63
|
+
} ) }
|
|
64
|
+
</MenuGroup>
|
|
65
|
+
) }
|
|
66
|
+
</>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export default ExistingMenusOptions;
|
|
@@ -107,7 +107,6 @@ function Navigation( {
|
|
|
107
107
|
hasSubmenuIndicatorSetting = true,
|
|
108
108
|
hasColorSettings = true,
|
|
109
109
|
customPlaceholder: CustomPlaceholder = null,
|
|
110
|
-
customAppender: CustomAppender = null,
|
|
111
110
|
} ) {
|
|
112
111
|
const {
|
|
113
112
|
openSubmenusOnClick,
|
|
@@ -125,7 +124,7 @@ function Navigation( {
|
|
|
125
124
|
setAreaMenu = noop;
|
|
126
125
|
// Navigation areas are deprecated and on their way out. Let's not perform
|
|
127
126
|
// the request unless we're in an environment where the endpoint exists.
|
|
128
|
-
if ( process.env.
|
|
127
|
+
if ( process.env.IS_GUTENBERG_PLUGIN ) {
|
|
129
128
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
130
129
|
[ areaMenu, setAreaMenu ] = useEntityProp(
|
|
131
130
|
'root',
|
|
@@ -500,6 +499,9 @@ function Navigation( {
|
|
|
500
499
|
canUserCreateNavigation={
|
|
501
500
|
canUserCreateNavigation
|
|
502
501
|
}
|
|
502
|
+
canUserSwitchNavigation={
|
|
503
|
+
canSwitchNavigationMenu
|
|
504
|
+
}
|
|
503
505
|
/>
|
|
504
506
|
) }
|
|
505
507
|
</ToolbarDropdownMenu>
|
|
@@ -696,7 +698,6 @@ function Navigation( {
|
|
|
696
698
|
<NavigationInnerBlocks
|
|
697
699
|
isVisible={ ! isPlaceholderShown }
|
|
698
700
|
clientId={ clientId }
|
|
699
|
-
appender={ CustomAppender }
|
|
700
701
|
hasCustomPlaceholder={
|
|
701
702
|
!! CustomPlaceholder
|
|
702
703
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { useEntityBlockEditor } from '@wordpress/core-data';
|
|
5
5
|
import {
|
|
6
6
|
useInnerBlocksProps,
|
|
7
|
+
InnerBlocks,
|
|
7
8
|
__experimentalBlockContentOverlay as BlockContentOverlay,
|
|
8
9
|
store as blockEditorStore,
|
|
9
10
|
} from '@wordpress/block-editor';
|
|
@@ -39,7 +40,6 @@ const LAYOUT = {
|
|
|
39
40
|
export default function NavigationInnerBlocks( {
|
|
40
41
|
isVisible,
|
|
41
42
|
clientId,
|
|
42
|
-
appender: CustomAppender,
|
|
43
43
|
hasCustomPlaceholder,
|
|
44
44
|
orientation,
|
|
45
45
|
} ) {
|
|
@@ -95,7 +95,6 @@ export default function NavigationInnerBlocks( {
|
|
|
95
95
|
const parentOrChildHasSelection =
|
|
96
96
|
isSelected ||
|
|
97
97
|
( isImmediateParentOfSelectedBlock && ! selectedBlockHasDescendants );
|
|
98
|
-
const appender = isVisible && parentOrChildHasSelection ? undefined : false;
|
|
99
98
|
|
|
100
99
|
const placeholder = useMemo( () => <PlaceholderPreview />, [] );
|
|
101
100
|
|
|
@@ -111,7 +110,21 @@ export default function NavigationInnerBlocks( {
|
|
|
111
110
|
__experimentalDefaultBlock: DEFAULT_BLOCK,
|
|
112
111
|
__experimentalDirectInsert: shouldDirectInsert,
|
|
113
112
|
orientation,
|
|
114
|
-
|
|
113
|
+
|
|
114
|
+
// As an exception to other blocks which feature nesting, show
|
|
115
|
+
// the block appender even when a child block is selected.
|
|
116
|
+
// This should be a temporary fix, to be replaced by improvements to
|
|
117
|
+
// the sibling inserter.
|
|
118
|
+
// See https://github.com/WordPress/gutenberg/issues/37572.
|
|
119
|
+
renderAppender:
|
|
120
|
+
isSelected ||
|
|
121
|
+
( isImmediateParentOfSelectedBlock &&
|
|
122
|
+
! selectedBlockHasDescendants ) ||
|
|
123
|
+
// Show the appender while dragging to allow inserting element between item and the appender.
|
|
124
|
+
parentOrChildHasSelection
|
|
125
|
+
? InnerBlocks.ButtonBlockAppender
|
|
126
|
+
: false,
|
|
127
|
+
|
|
115
128
|
// Template lock set to false here so that the Nav
|
|
116
129
|
// Block on the experimental menus screen does not
|
|
117
130
|
// inherit templateLock={ 'all' }.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { MenuGroup, MenuItem
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { decodeEntities } from '@wordpress/html-entities';
|
|
4
|
+
import { MenuGroup, MenuItem } from '@wordpress/components';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
|
|
8
7
|
import { addQueryArgs } from '@wordpress/url';
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -14,19 +13,20 @@ import useNavigationMenu from '../use-navigation-menu';
|
|
|
14
13
|
import useNavigationEntities from '../use-navigation-entities';
|
|
15
14
|
import useConvertClassicMenu from '../use-convert-classic-menu';
|
|
16
15
|
import useCreateNavigationMenu from './use-create-navigation-menu';
|
|
16
|
+
import ExistingMenusOptions from './existing-menus-options';
|
|
17
17
|
|
|
18
18
|
export default function NavigationMenuSelector( {
|
|
19
19
|
clientId,
|
|
20
20
|
onSelect,
|
|
21
21
|
onCreateNew,
|
|
22
22
|
canUserCreateNavigation = false,
|
|
23
|
+
canUserSwitchNavigation = false,
|
|
23
24
|
} ) {
|
|
24
25
|
const {
|
|
25
26
|
menus: classicMenus,
|
|
26
27
|
hasMenus: hasClassicMenus,
|
|
27
28
|
} = useNavigationEntities();
|
|
28
29
|
const { navigationMenus } = useNavigationMenu();
|
|
29
|
-
const ref = useEntityId( 'postType', 'wp_navigation' );
|
|
30
30
|
|
|
31
31
|
const createNavigationMenu = useCreateNavigationMenu( clientId );
|
|
32
32
|
|
|
@@ -49,66 +49,42 @@ export default function NavigationMenuSelector( {
|
|
|
49
49
|
onFinishMenuCreation
|
|
50
50
|
);
|
|
51
51
|
|
|
52
|
+
const showSelectMenus =
|
|
53
|
+
( canUserSwitchNavigation || canUserCreateNavigation ) &&
|
|
54
|
+
( navigationMenus?.length || hasClassicMenus );
|
|
55
|
+
|
|
56
|
+
if ( ! showSelectMenus ) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
|
|
52
60
|
return (
|
|
53
61
|
<>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
value: id,
|
|
68
|
-
label,
|
|
69
|
-
'aria-label': sprintf(
|
|
70
|
-
/* translators: %s: The name of a menu. */
|
|
71
|
-
__( "Switch to '%s'" ),
|
|
72
|
-
label
|
|
73
|
-
),
|
|
74
|
-
};
|
|
75
|
-
} ) }
|
|
76
|
-
/>
|
|
77
|
-
</MenuGroup>
|
|
62
|
+
<ExistingMenusOptions
|
|
63
|
+
showNavigationMenus={ canUserSwitchNavigation }
|
|
64
|
+
showClassicMenus={ canUserCreateNavigation }
|
|
65
|
+
navigationMenus={ navigationMenus }
|
|
66
|
+
classicMenus={ classicMenus }
|
|
67
|
+
onSelectNavigationMenu={ onSelect }
|
|
68
|
+
onSelectClassicMenu={ ( { id, name } ) =>
|
|
69
|
+
convertClassicMenuToBlocks( id, name )
|
|
70
|
+
}
|
|
71
|
+
/* translators: %s: The name of a menu. */
|
|
72
|
+
actionLabel={ __( "Switch to '%s'" ) }
|
|
73
|
+
/>
|
|
74
|
+
|
|
78
75
|
{ canUserCreateNavigation && (
|
|
79
|
-
|
|
80
|
-
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
key={ menu.id }
|
|
92
|
-
>
|
|
93
|
-
{ decodeEntities( menu.name ) }
|
|
94
|
-
</MenuItem>
|
|
95
|
-
);
|
|
96
|
-
} ) }
|
|
97
|
-
</MenuGroup>
|
|
98
|
-
) }
|
|
99
|
-
<MenuGroup label={ __( 'Tools' ) }>
|
|
100
|
-
<MenuItem onClick={ onCreateNew }>
|
|
101
|
-
{ __( 'Create new menu' ) }
|
|
102
|
-
</MenuItem>
|
|
103
|
-
<MenuItem
|
|
104
|
-
href={ addQueryArgs( 'edit.php', {
|
|
105
|
-
post_type: 'wp_navigation',
|
|
106
|
-
} ) }
|
|
107
|
-
>
|
|
108
|
-
{ __( 'Manage menus' ) }
|
|
109
|
-
</MenuItem>
|
|
110
|
-
</MenuGroup>
|
|
111
|
-
</>
|
|
76
|
+
<MenuGroup label={ __( 'Tools' ) }>
|
|
77
|
+
<MenuItem onClick={ onCreateNew }>
|
|
78
|
+
{ __( 'Create new menu' ) }
|
|
79
|
+
</MenuItem>
|
|
80
|
+
<MenuItem
|
|
81
|
+
href={ addQueryArgs( 'edit.php', {
|
|
82
|
+
post_type: 'wp_navigation',
|
|
83
|
+
} ) }
|
|
84
|
+
>
|
|
85
|
+
{ __( 'Manage menus' ) }
|
|
86
|
+
</MenuItem>
|
|
87
|
+
</MenuGroup>
|
|
112
88
|
) }
|
|
113
89
|
</>
|
|
114
90
|
);
|