@wordpress/block-library 8.30.0 → 8.32.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/block/edit.js +22 -16
- package/build/block/edit.js.map +1 -1
- package/build/button/edit.native.js +1 -1
- package/build/button/edit.native.js.map +1 -1
- package/build/code/save.js +3 -1
- package/build/code/save.js.map +1 -1
- package/build/cover/edit/index.js +2 -1
- package/build/cover/edit/index.js.map +1 -1
- package/build/details/edit.js +1 -0
- package/build/details/edit.js.map +1 -1
- package/build/file/edit.js +2 -0
- package/build/file/edit.js.map +1 -1
- package/build/heading/index.js +4 -3
- package/build/heading/index.js.map +1 -1
- package/build/image/edit.js +10 -39
- package/build/image/edit.js.map +1 -1
- package/build/image/image.js +27 -6
- package/build/image/image.js.map +1 -1
- package/build/media-text/edit.js +33 -9
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/index.js +5 -0
- package/build/media-text/index.js.map +1 -1
- package/build/media-text/media-container.js +30 -11
- package/build/media-text/media-container.js.map +1 -1
- package/build/media-text/save.js +2 -2
- package/build/media-text/save.js.map +1 -1
- package/build/navigation/edit/index.js +23 -29
- package/build/navigation/edit/index.js.map +1 -1
- package/build/navigation/edit/navigation-menu-delete-control.js +12 -20
- package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build/navigation/edit/navigation-menu-selector.js +24 -23
- package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build/navigation/edit/placeholder/index.js +4 -4
- package/build/navigation/edit/placeholder/index.js.map +1 -1
- package/build/navigation/use-navigation-menu.js +15 -12
- package/build/navigation/use-navigation-menu.js.map +1 -1
- package/build/navigation/view.js +12 -2
- package/build/navigation/view.js.map +1 -1
- package/build/navigation-link/edit.js +52 -27
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +31 -9
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/pattern/edit.js +3 -1
- package/build/pattern/edit.js.map +1 -1
- package/build/post-author/edit.js +1 -0
- package/build/post-author/edit.js.map +1 -1
- package/build/post-excerpt/edit.js +1 -0
- package/build/post-excerpt/edit.js.map +1 -1
- package/build/post-featured-image/edit.js +16 -4
- package/build/post-featured-image/edit.js.map +1 -1
- package/build/post-featured-image/index.js +13 -2
- package/build/post-featured-image/index.js.map +1 -1
- package/build/post-featured-image/overlay-controls.js +82 -0
- package/build/post-featured-image/overlay-controls.js.map +1 -0
- package/build/post-featured-image/overlay.js +5 -54
- package/build/post-featured-image/overlay.js.map +1 -1
- package/build/post-navigation-link/edit.js +1 -0
- package/build/post-navigation-link/edit.js.map +1 -1
- package/build/post-terms/edit.js +2 -0
- package/build/post-terms/edit.js.map +1 -1
- package/build/quote/edit.js +18 -23
- package/build/quote/edit.js.map +1 -1
- package/build/read-more/edit.js +1 -0
- package/build/read-more/edit.js.map +1 -1
- package/build/search/edit.js +2 -0
- package/build/search/edit.js.map +1 -1
- package/build/search/edit.native.js +2 -2
- package/build/search/edit.native.js.map +1 -1
- package/build/site-tagline/edit.js +13 -4
- package/build/site-tagline/edit.js.map +1 -1
- package/build/site-tagline/index.js +4 -0
- package/build/site-tagline/index.js.map +1 -1
- package/build/social-link/edit.js +1 -1
- package/build/social-link/edit.js.map +1 -1
- package/build/social-link/icons/medium.js +1 -1
- package/build/social-link/icons/medium.js.map +1 -1
- package/build/social-link/icons/reddit.js +1 -1
- package/build/social-link/icons/reddit.js.map +1 -1
- package/build/table/deprecated.js +285 -175
- package/build/table/deprecated.js.map +1 -1
- package/build/table/index.js +1 -1
- package/build/template-part/edit/index.js +55 -47
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/inner-blocks.js +106 -10
- package/build/template-part/edit/inner-blocks.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +1 -9
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/utils/caption.js +19 -13
- package/build/utils/caption.js.map +1 -1
- package/build/utils/hooks.js +1 -0
- package/build/utils/hooks.js.map +1 -1
- package/build/video/edit.native.js +1 -1
- package/build/video/edit.native.js.map +1 -1
- package/build-module/block/edit.js +23 -17
- package/build-module/block/edit.js.map +1 -1
- package/build-module/button/edit.native.js +1 -1
- package/build-module/button/edit.native.js.map +1 -1
- package/build-module/code/save.js +3 -1
- package/build-module/code/save.js.map +1 -1
- package/build-module/cover/edit/index.js +2 -1
- package/build-module/cover/edit/index.js.map +1 -1
- package/build-module/details/edit.js +1 -0
- package/build-module/details/edit.js.map +1 -1
- package/build-module/file/edit.js +2 -0
- package/build-module/file/edit.js.map +1 -1
- package/build-module/heading/index.js +4 -3
- package/build-module/heading/index.js.map +1 -1
- package/build-module/image/edit.js +11 -40
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/image.js +27 -6
- package/build-module/image/image.js.map +1 -1
- package/build-module/media-text/edit.js +34 -10
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/index.js +5 -0
- package/build-module/media-text/index.js.map +1 -1
- package/build-module/media-text/media-container.js +31 -12
- package/build-module/media-text/media-container.js.map +1 -1
- package/build-module/media-text/save.js +2 -2
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/navigation/edit/index.js +24 -30
- package/build-module/navigation/edit/index.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-delete-control.js +15 -23
- package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
- package/build-module/navigation/edit/navigation-menu-selector.js +24 -23
- package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
- package/build-module/navigation/edit/placeholder/index.js +4 -4
- package/build-module/navigation/edit/placeholder/index.js.map +1 -1
- package/build-module/navigation/use-navigation-menu.js +15 -12
- package/build-module/navigation/use-navigation-menu.js.map +1 -1
- package/build-module/navigation/view.js +12 -2
- package/build-module/navigation/view.js.map +1 -1
- package/build-module/navigation-link/edit.js +55 -30
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +31 -9
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/pattern/edit.js +3 -1
- package/build-module/pattern/edit.js.map +1 -1
- package/build-module/post-author/edit.js +1 -0
- package/build-module/post-author/edit.js.map +1 -1
- package/build-module/post-excerpt/edit.js +1 -0
- package/build-module/post-excerpt/edit.js.map +1 -1
- package/build-module/post-featured-image/edit.js +17 -5
- package/build-module/post-featured-image/edit.js.map +1 -1
- package/build-module/post-featured-image/index.js +13 -2
- package/build-module/post-featured-image/index.js.map +1 -1
- package/build-module/post-featured-image/overlay-controls.js +75 -0
- package/build-module/post-featured-image/overlay-controls.js.map +1 -0
- package/build-module/post-featured-image/overlay.js +7 -56
- package/build-module/post-featured-image/overlay.js.map +1 -1
- package/build-module/post-navigation-link/edit.js +1 -0
- package/build-module/post-navigation-link/edit.js.map +1 -1
- package/build-module/post-terms/edit.js +2 -0
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/quote/edit.js +20 -25
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/read-more/edit.js +1 -0
- package/build-module/read-more/edit.js.map +1 -1
- package/build-module/search/edit.js +2 -0
- package/build-module/search/edit.js.map +1 -1
- package/build-module/search/edit.native.js +2 -2
- package/build-module/search/edit.native.js.map +1 -1
- package/build-module/site-tagline/edit.js +14 -5
- package/build-module/site-tagline/edit.js.map +1 -1
- package/build-module/site-tagline/index.js +4 -0
- package/build-module/site-tagline/index.js.map +1 -1
- package/build-module/social-link/edit.js +1 -1
- package/build-module/social-link/edit.js.map +1 -1
- package/build-module/social-link/icons/medium.js +1 -1
- package/build-module/social-link/icons/medium.js.map +1 -1
- package/build-module/social-link/icons/reddit.js +1 -1
- package/build-module/social-link/icons/reddit.js.map +1 -1
- package/build-module/table/deprecated.js +286 -176
- package/build-module/table/deprecated.js.map +1 -1
- package/build-module/table/index.js +1 -1
- package/build-module/template-part/edit/index.js +58 -50
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/inner-blocks.js +108 -12
- package/build-module/template-part/edit/inner-blocks.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +2 -10
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/utils/caption.js +19 -13
- package/build-module/utils/caption.js.map +1 -1
- package/build-module/utils/hooks.js +1 -0
- package/build-module/utils/hooks.js.map +1 -1
- package/build-module/video/edit.native.js +1 -1
- package/build-module/video/edit.native.js.map +1 -1
- package/build-style/audio/theme-rtl.css +1 -1
- package/build-style/audio/theme.css +1 -1
- package/build-style/cover/style-rtl.css +5 -2
- package/build-style/cover/style.css +5 -2
- package/build-style/editor-rtl.css +22 -12
- package/build-style/editor.css +22 -12
- package/build-style/embed/theme-rtl.css +1 -1
- package/build-style/embed/theme.css +1 -1
- package/build-style/file/editor-rtl.css +3 -0
- package/build-style/file/editor.css +3 -0
- package/build-style/image/editor-rtl.css +0 -3
- package/build-style/image/editor.css +0 -3
- package/build-style/image/theme-rtl.css +1 -1
- package/build-style/image/theme.css +1 -1
- package/build-style/media-text/editor-rtl.css +7 -1
- package/build-style/media-text/editor.css +7 -1
- package/build-style/pullquote/theme-rtl.css +2 -1
- package/build-style/pullquote/theme.css +2 -1
- package/build-style/quote/theme-rtl.css +6 -6
- package/build-style/quote/theme.css +6 -6
- package/build-style/search/style-rtl.css +10 -0
- package/build-style/search/style.css +10 -0
- package/build-style/social-links/editor-rtl.css +0 -4
- package/build-style/social-links/editor.css +0 -4
- package/build-style/social-links/style-rtl.css +2 -2
- package/build-style/social-links/style.css +2 -2
- package/build-style/style-rtl.css +17 -4
- package/build-style/style.css +17 -4
- package/build-style/table/theme-rtl.css +4 -3
- package/build-style/table/theme.css +4 -3
- package/build-style/template-part/editor-rtl.css +12 -4
- package/build-style/template-part/editor.css +12 -4
- package/build-style/template-part/theme-rtl.css +1 -1
- package/build-style/template-part/theme.css +1 -1
- package/build-style/theme-rtl.css +17 -15
- package/build-style/theme.css +17 -15
- package/build-style/video/theme-rtl.css +1 -1
- package/build-style/video/theme.css +1 -1
- package/package.json +34 -34
- package/src/archives/index.php +4 -0
- package/src/audio/theme.scss +1 -1
- package/src/avatar/index.php +6 -0
- package/src/block/edit.js +43 -32
- package/src/block/index.php +4 -0
- package/src/block/test/edit.native.js +67 -0
- package/src/button/edit.native.js +1 -1
- package/src/calendar/index.php +12 -0
- package/src/categories/index.php +6 -0
- package/src/code/save.js +7 -1
- package/src/comment-author-name/index.php +4 -0
- package/src/comment-content/index.php +4 -0
- package/src/comment-date/index.php +4 -0
- package/src/comment-edit-link/index.php +4 -0
- package/src/comment-reply-link/index.php +4 -0
- package/src/comment-template/index.php +4 -0
- package/src/comments/index.php +10 -0
- package/src/comments-pagination/index.php +4 -0
- package/src/comments-pagination-next/index.php +4 -0
- package/src/comments-pagination-numbers/index.php +4 -0
- package/src/comments-pagination-previous/index.php +4 -0
- package/src/comments-title/index.php +4 -0
- package/src/cover/edit/index.js +4 -1
- package/src/cover/index.php +4 -0
- package/src/cover/style.scss +6 -2
- package/src/details/edit.js +1 -0
- package/src/embed/theme.scss +1 -1
- package/src/file/edit.js +2 -0
- package/src/file/editor.scss +3 -0
- package/src/file/index.php +4 -0
- package/src/gallery/editor.scss +1 -1
- package/src/gallery/index.php +7 -1
- package/src/heading/index.js +4 -3
- package/src/heading/index.php +4 -0
- package/src/home-link/index.php +10 -0
- package/src/image/edit.js +11 -40
- package/src/image/editor.scss +2 -7
- package/src/image/image.js +25 -7
- package/src/image/index.php +12 -1
- package/src/image/theme.scss +1 -1
- package/src/latest-comments/index.php +4 -0
- package/src/latest-posts/index.php +8 -0
- package/src/loginout/index.php +4 -0
- package/src/media-text/block.json +5 -0
- package/src/media-text/edit.js +70 -19
- package/src/media-text/editor.scss +7 -1
- package/src/media-text/index.php +70 -0
- package/src/media-text/media-container.js +49 -9
- package/src/media-text/save.js +2 -2
- package/src/navigation/edit/index.js +67 -71
- package/src/navigation/edit/navigation-menu-delete-control.js +22 -49
- package/src/navigation/edit/navigation-menu-selector.js +39 -21
- package/src/navigation/edit/placeholder/index.js +4 -4
- package/src/navigation/edit/test/navigation-menu-selector.js +75 -53
- package/src/navigation/index.php +109 -26
- package/src/navigation/test/use-navigation-menu.js +21 -21
- package/src/navigation/use-navigation-menu.js +23 -9
- package/src/navigation/view.js +11 -2
- package/src/navigation-link/edit.js +64 -39
- package/src/navigation-link/index.php +14 -0
- package/src/navigation-submenu/edit.js +34 -10
- package/src/navigation-submenu/index.php +8 -0
- package/src/page-list/index.php +12 -0
- package/src/page-list-item/index.php +2 -0
- package/src/pattern/edit.js +4 -0
- package/src/pattern/index.php +2 -0
- package/src/post-author/edit.js +1 -0
- package/src/post-author/index.php +4 -0
- package/src/post-author-biography/index.php +4 -0
- package/src/post-author-name/index.php +4 -0
- package/src/post-comments-form/index.php +6 -0
- package/src/post-content/index.php +4 -0
- package/src/post-date/index.php +4 -0
- package/src/post-excerpt/edit.js +1 -0
- package/src/post-excerpt/index.php +4 -0
- package/src/post-featured-image/block.json +13 -2
- package/src/post-featured-image/edit.js +16 -1
- package/src/post-featured-image/editor.scss +1 -1
- package/src/post-featured-image/index.php +15 -0
- package/src/post-featured-image/overlay-controls.js +88 -0
- package/src/post-featured-image/overlay.js +17 -84
- package/src/post-navigation-link/edit.js +1 -0
- package/src/post-navigation-link/index.php +4 -0
- package/src/post-template/index.php +4 -0
- package/src/post-terms/edit.js +2 -0
- package/src/post-terms/index.php +6 -0
- package/src/post-title/index.php +2 -0
- package/src/pullquote/theme.scss +3 -1
- package/src/query/index.php +2 -0
- package/src/query-no-results/index.php +6 -0
- package/src/query-pagination/index.php +4 -0
- package/src/query-pagination-next/index.php +6 -0
- package/src/query-pagination-numbers/index.php +6 -0
- package/src/query-pagination-previous/index.php +4 -0
- package/src/query-title/index.php +4 -0
- package/src/quote/edit.js +27 -37
- package/src/quote/test/edit.native.js +4 -6
- package/src/quote/theme.scss +1 -2
- package/src/read-more/edit.js +1 -0
- package/src/read-more/index.php +4 -0
- package/src/rss/index.php +4 -0
- package/src/search/edit.js +2 -0
- package/src/search/edit.native.js +2 -2
- package/src/search/index.php +19 -1
- package/src/search/style.scss +11 -0
- package/src/shortcode/index.php +4 -0
- package/src/site-logo/editor.scss +2 -2
- package/src/site-logo/index.php +20 -0
- package/src/site-tagline/block.json +4 -0
- package/src/site-tagline/edit.js +16 -3
- package/src/site-tagline/index.php +13 -1
- package/src/site-title/index.php +4 -0
- package/src/social-link/edit.js +1 -1
- package/src/social-link/icons/medium.js +1 -1
- package/src/social-link/icons/reddit.js +1 -1
- package/src/social-link/index.php +22 -9
- package/src/social-link/socials-with-bg.scss +1 -1
- package/src/social-link/socials-without-bg.scss +1 -1
- package/src/social-links/editor.scss +1 -9
- package/src/table/block.json +1 -1
- package/src/table/deprecated.js +308 -175
- package/src/table/theme.scss +4 -2
- package/src/tag-cloud/index.php +4 -0
- package/src/template-part/edit/index.js +87 -79
- package/src/template-part/edit/inner-blocks.js +126 -13
- package/src/template-part/edit/selection-modal.js +1 -22
- package/src/template-part/editor.scss +11 -3
- package/src/template-part/index.php +12 -0
- package/src/template-part/theme.scss +1 -1
- package/src/term-description/index.php +4 -0
- package/src/utils/caption.js +19 -16
- package/src/utils/hooks.js +1 -0
- package/src/video/edit.native.js +2 -0
- package/src/video/editor.scss +2 -2
- package/src/video/theme.scss +1 -1
- package/tsconfig.json +1 -0
package/src/post-terms/edit.js
CHANGED
|
@@ -95,6 +95,7 @@ export default function PostTermsEdit( {
|
|
|
95
95
|
{ isLoading && hasPost && <Spinner /> }
|
|
96
96
|
{ ! isLoading && ( isSelected || prefix ) && (
|
|
97
97
|
<RichText
|
|
98
|
+
identifier="prefix"
|
|
98
99
|
allowedFormats={ ALLOWED_FORMATS }
|
|
99
100
|
className="wp-block-post-terms__prefix"
|
|
100
101
|
aria-label={ __( 'Prefix' ) }
|
|
@@ -138,6 +139,7 @@ export default function PostTermsEdit( {
|
|
|
138
139
|
__( 'Term items not found.' ) ) }
|
|
139
140
|
{ ! isLoading && ( isSelected || suffix ) && (
|
|
140
141
|
<RichText
|
|
142
|
+
identifier="suffix"
|
|
141
143
|
allowedFormats={ ALLOWED_FORMATS }
|
|
142
144
|
className="wp-block-post-terms__suffix"
|
|
143
145
|
aria-label={ __( 'Suffix' ) }
|
package/src/post-terms/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-terms` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -61,6 +63,8 @@ function render_block_core_post_terms( $attributes, $content, $block ) {
|
|
|
61
63
|
/**
|
|
62
64
|
* Returns the available variations for the `core/post-terms` block.
|
|
63
65
|
*
|
|
66
|
+
* @since 6.5.0
|
|
67
|
+
*
|
|
64
68
|
* @return array The available variations for the block.
|
|
65
69
|
*/
|
|
66
70
|
function block_core_post_terms_build_variations() {
|
|
@@ -110,6 +114,8 @@ function block_core_post_terms_build_variations() {
|
|
|
110
114
|
|
|
111
115
|
/**
|
|
112
116
|
* Registers the `core/post-terms` block on the server.
|
|
117
|
+
*
|
|
118
|
+
* @since 5.8.0
|
|
113
119
|
*/
|
|
114
120
|
function register_block_core_post_terms() {
|
|
115
121
|
register_block_type_from_metadata(
|
package/src/post-title/index.php
CHANGED
package/src/pullquote/theme.scss
CHANGED
package/src/query/index.php
CHANGED
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-no-results` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 6.0.0
|
|
12
|
+
*
|
|
13
|
+
* @global WP_Query $wp_query WordPress Query object.
|
|
14
|
+
*
|
|
11
15
|
* @param array $attributes Block attributes.
|
|
12
16
|
* @param string $content Block default content.
|
|
13
17
|
* @param WP_Block $block Block instance.
|
|
@@ -47,6 +51,8 @@ function render_block_core_query_no_results( $attributes, $content, $block ) {
|
|
|
47
51
|
|
|
48
52
|
/**
|
|
49
53
|
* Registers the `core/query-no-results` block on the server.
|
|
54
|
+
*
|
|
55
|
+
* @since 6.0.0
|
|
50
56
|
*/
|
|
51
57
|
function register_block_core_query_no_results() {
|
|
52
58
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.9.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
*
|
|
@@ -35,6 +37,8 @@ function render_block_core_query_pagination( $attributes, $content ) {
|
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
39
|
* Registers the `core/query-pagination` block on the server.
|
|
40
|
+
*
|
|
41
|
+
* @since 5.8.0
|
|
38
42
|
*/
|
|
39
43
|
function register_block_core_query_pagination() {
|
|
40
44
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination-next` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
13
|
+
* @global WP_Query $wp_query WordPress Query object.
|
|
14
|
+
*
|
|
11
15
|
* @param array $attributes Block attributes.
|
|
12
16
|
* @param string $content Block default content.
|
|
13
17
|
* @param WP_Block $block Block instance.
|
|
@@ -84,6 +88,8 @@ function render_block_core_query_pagination_next( $attributes, $content, $block
|
|
|
84
88
|
|
|
85
89
|
/**
|
|
86
90
|
* Registers the `core/query-pagination-next` block on the server.
|
|
91
|
+
*
|
|
92
|
+
* @since 5.8.0
|
|
87
93
|
*/
|
|
88
94
|
function register_block_core_query_pagination_next() {
|
|
89
95
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination-numbers` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
13
|
+
* @global WP_Query $wp_query WordPress Query object.
|
|
14
|
+
*
|
|
11
15
|
* @param array $attributes Block attributes.
|
|
12
16
|
* @param string $content Block default content.
|
|
13
17
|
* @param WP_Block $block Block instance.
|
|
@@ -115,6 +119,8 @@ function render_block_core_query_pagination_numbers( $attributes, $content, $blo
|
|
|
115
119
|
|
|
116
120
|
/**
|
|
117
121
|
* Registers the `core/query-pagination-numbers` block on the server.
|
|
122
|
+
*
|
|
123
|
+
* @since 5.8.0
|
|
118
124
|
*/
|
|
119
125
|
function register_block_core_query_pagination_numbers() {
|
|
120
126
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/query-pagination-previous` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -72,6 +74,8 @@ function render_block_core_query_pagination_previous( $attributes, $content, $bl
|
|
|
72
74
|
|
|
73
75
|
/**
|
|
74
76
|
* Registers the `core/query-pagination-previous` block on the server.
|
|
77
|
+
*
|
|
78
|
+
* @since 5.8.0
|
|
75
79
|
*/
|
|
76
80
|
function register_block_core_query_pagination_previous() {
|
|
77
81
|
register_block_type_from_metadata(
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* For now it only supports Archive title,
|
|
11
11
|
* using queried object information
|
|
12
12
|
*
|
|
13
|
+
* @since 5.8.0
|
|
14
|
+
*
|
|
13
15
|
* @param array $attributes Block attributes.
|
|
14
16
|
*
|
|
15
17
|
* @return string Returns the query title based on the queried object.
|
|
@@ -60,6 +62,8 @@ function render_block_core_query_title( $attributes ) {
|
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
64
|
* Registers the `core/query-title` block on the server.
|
|
65
|
+
*
|
|
66
|
+
* @since 5.8.0
|
|
63
67
|
*/
|
|
64
68
|
function register_block_core_query_title() {
|
|
65
69
|
register_block_type_from_metadata(
|
package/src/quote/edit.js
CHANGED
|
@@ -10,21 +10,21 @@ import { __ } from '@wordpress/i18n';
|
|
|
10
10
|
import {
|
|
11
11
|
AlignmentControl,
|
|
12
12
|
BlockControls,
|
|
13
|
-
RichText,
|
|
14
13
|
useBlockProps,
|
|
15
14
|
useInnerBlocksProps,
|
|
16
15
|
store as blockEditorStore,
|
|
17
16
|
} from '@wordpress/block-editor';
|
|
18
17
|
import { BlockQuotation } from '@wordpress/components';
|
|
19
|
-
import { useDispatch,
|
|
20
|
-
import { createBlock, getDefaultBlockName } from '@wordpress/blocks';
|
|
18
|
+
import { useDispatch, useRegistry } from '@wordpress/data';
|
|
21
19
|
import { Platform, useEffect } from '@wordpress/element';
|
|
22
20
|
import deprecated from '@wordpress/deprecated';
|
|
21
|
+
import { verse } from '@wordpress/icons';
|
|
23
22
|
|
|
24
23
|
/**
|
|
25
24
|
* Internal dependencies
|
|
26
25
|
*/
|
|
27
26
|
import { migrateToQuoteV2 } from './deprecated';
|
|
27
|
+
import { Caption } from '../utils/caption';
|
|
28
28
|
|
|
29
29
|
const isWebPlatform = Platform.OS === 'web';
|
|
30
30
|
|
|
@@ -73,17 +73,12 @@ export default function QuoteEdit( {
|
|
|
73
73
|
clientId,
|
|
74
74
|
className,
|
|
75
75
|
style,
|
|
76
|
+
isSelected,
|
|
76
77
|
} ) {
|
|
77
|
-
const { textAlign
|
|
78
|
+
const { textAlign } = attributes;
|
|
78
79
|
|
|
79
80
|
useMigrateOnLoad( attributes, clientId );
|
|
80
81
|
|
|
81
|
-
const hasSelection = useSelect( ( select ) => {
|
|
82
|
-
const { isBlockSelected, hasSelectedInnerBlock } =
|
|
83
|
-
select( blockEditorStore );
|
|
84
|
-
return hasSelectedInnerBlock( clientId ) || isBlockSelected( clientId );
|
|
85
|
-
}, [] );
|
|
86
|
-
|
|
87
82
|
const blockProps = useBlockProps( {
|
|
88
83
|
className: classNames( className, {
|
|
89
84
|
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
@@ -94,6 +89,7 @@ export default function QuoteEdit( {
|
|
|
94
89
|
template: TEMPLATE,
|
|
95
90
|
templateInsertUpdatesSelection: true,
|
|
96
91
|
__experimentalCaptureToolbars: true,
|
|
92
|
+
renderAppender: false,
|
|
97
93
|
} );
|
|
98
94
|
|
|
99
95
|
return (
|
|
@@ -108,33 +104,27 @@ export default function QuoteEdit( {
|
|
|
108
104
|
</BlockControls>
|
|
109
105
|
<BlockQuotation { ...innerBlocksProps }>
|
|
110
106
|
{ innerBlocksProps.children }
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
createBlock( getDefaultBlockName() )
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
{ ...( ! isWebPlatform ? { textAlign } : {} ) }
|
|
136
|
-
/>
|
|
137
|
-
) }
|
|
107
|
+
<Caption
|
|
108
|
+
attributeKey="citation"
|
|
109
|
+
tagName={ isWebPlatform ? 'cite' : undefined }
|
|
110
|
+
style={ isWebPlatform && { display: 'block' } }
|
|
111
|
+
isSelected={ isSelected }
|
|
112
|
+
attributes={ attributes }
|
|
113
|
+
setAttributes={ setAttributes }
|
|
114
|
+
__unstableMobileNoFocusOnMount
|
|
115
|
+
icon={ verse }
|
|
116
|
+
label={ __( 'Quote citation' ) }
|
|
117
|
+
placeholder={
|
|
118
|
+
// translators: placeholder text used for the
|
|
119
|
+
// citation
|
|
120
|
+
__( 'Add citation' )
|
|
121
|
+
}
|
|
122
|
+
addLabel={ __( 'Add citation' ) }
|
|
123
|
+
removeLabel={ __( 'Remove citation' ) }
|
|
124
|
+
className="wp-block-quote__citation"
|
|
125
|
+
insertBlocksAfter={ insertBlocksAfter }
|
|
126
|
+
{ ...( ! isWebPlatform ? { textAlign } : {} ) }
|
|
127
|
+
/>
|
|
138
128
|
</BlockQuotation>
|
|
139
129
|
</>
|
|
140
130
|
);
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
getEditorHtml,
|
|
11
11
|
fireEvent,
|
|
12
12
|
within,
|
|
13
|
-
waitFor,
|
|
14
13
|
typeInRichText,
|
|
15
14
|
} from 'test/helpers';
|
|
16
15
|
|
|
@@ -40,14 +39,9 @@ describe( 'Quote', () => {
|
|
|
40
39
|
},
|
|
41
40
|
}
|
|
42
41
|
);
|
|
43
|
-
// Await inner blocks to be rendered
|
|
44
|
-
const citationBlock = await waitFor( () =>
|
|
45
|
-
screen.getByPlaceholderText( 'Add citation' )
|
|
46
|
-
);
|
|
47
42
|
|
|
48
43
|
// Act
|
|
49
44
|
fireEvent.press( quoteBlock );
|
|
50
|
-
// screen.debug();
|
|
51
45
|
let quoteTextInput =
|
|
52
46
|
within( quoteBlock ).getByPlaceholderText( 'Start writing…' );
|
|
53
47
|
typeInRichText( quoteTextInput, 'A great statement.' );
|
|
@@ -61,6 +55,10 @@ describe( 'Quote', () => {
|
|
|
61
55
|
'Start writing…'
|
|
62
56
|
)[ 1 ];
|
|
63
57
|
typeInRichText( quoteTextInput, 'Again.' );
|
|
58
|
+
fireEvent.press( screen.getByLabelText( 'Navigate Up' ) );
|
|
59
|
+
fireEvent.press( screen.getByLabelText( 'Add citation' ) );
|
|
60
|
+
const citationBlock =
|
|
61
|
+
await screen.findByPlaceholderText( 'Add citation' );
|
|
64
62
|
const citationTextInput =
|
|
65
63
|
within( citationBlock ).getByPlaceholderText( 'Add citation' );
|
|
66
64
|
typeInRichText( citationTextInput, 'A person' );
|
package/src/quote/theme.scss
CHANGED
package/src/read-more/edit.js
CHANGED
package/src/read-more/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/read-more` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 6.0.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes Block attributes.
|
|
12
14
|
* @param string $content Block default content.
|
|
13
15
|
* @param WP_Block $block Block instance.
|
|
@@ -47,6 +49,8 @@ function render_block_core_read_more( $attributes, $content, $block ) {
|
|
|
47
49
|
|
|
48
50
|
/**
|
|
49
51
|
* Registers the `core/read-more` block on the server.
|
|
52
|
+
*
|
|
53
|
+
* @since 6.0.0
|
|
50
54
|
*/
|
|
51
55
|
function register_block_core_read_more() {
|
|
52
56
|
register_block_type_from_metadata(
|
package/src/rss/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/rss` block on server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.2.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string Returns the block content with received rss items.
|
|
@@ -107,6 +109,8 @@ function render_block_core_rss( $attributes ) {
|
|
|
107
109
|
|
|
108
110
|
/**
|
|
109
111
|
* Registers the `core/rss` block on server.
|
|
112
|
+
*
|
|
113
|
+
* @since 5.2.0
|
|
110
114
|
*/
|
|
111
115
|
function register_block_core_rss() {
|
|
112
116
|
register_block_type_from_metadata(
|
package/src/search/edit.js
CHANGED
|
@@ -347,6 +347,7 @@ export default function SearchEdit( {
|
|
|
347
347
|
|
|
348
348
|
{ ! buttonUseIcon && (
|
|
349
349
|
<RichText
|
|
350
|
+
identifier="buttonText"
|
|
350
351
|
className={ buttonClasses }
|
|
351
352
|
style={ buttonStyles }
|
|
352
353
|
aria-label={ __( 'Button text' ) }
|
|
@@ -546,6 +547,7 @@ export default function SearchEdit( {
|
|
|
546
547
|
|
|
547
548
|
{ showLabel && (
|
|
548
549
|
<RichText
|
|
550
|
+
identifier="label"
|
|
549
551
|
className={ labelClassnames }
|
|
550
552
|
aria-label={ __( 'Label text' ) }
|
|
551
553
|
placeholder={ __( 'Add label…' ) }
|
|
@@ -395,7 +395,7 @@ export default function SearchEdit( {
|
|
|
395
395
|
>
|
|
396
396
|
<RichText
|
|
397
397
|
className="wp-block-search__button"
|
|
398
|
-
identifier="
|
|
398
|
+
identifier="buttonText"
|
|
399
399
|
tagName="p"
|
|
400
400
|
style={ richTextButtonStyle }
|
|
401
401
|
placeholder={ buttonPlaceholderText }
|
|
@@ -449,7 +449,7 @@ export default function SearchEdit( {
|
|
|
449
449
|
>
|
|
450
450
|
<RichText
|
|
451
451
|
className="wp-block-search__label"
|
|
452
|
-
identifier="
|
|
452
|
+
identifier="label"
|
|
453
453
|
tagName="p"
|
|
454
454
|
style={ styles.richTextLabel }
|
|
455
455
|
placeholder={ __( 'Add label…' ) }
|
package/src/search/index.php
CHANGED
|
@@ -207,6 +207,8 @@ function render_block_core_search( $attributes ) {
|
|
|
207
207
|
|
|
208
208
|
/**
|
|
209
209
|
* Registers the `core/search` block on the server.
|
|
210
|
+
*
|
|
211
|
+
* @since 5.2.0
|
|
210
212
|
*/
|
|
211
213
|
function register_block_core_search() {
|
|
212
214
|
register_block_type_from_metadata(
|
|
@@ -221,6 +223,8 @@ add_action( 'init', 'register_block_core_search' );
|
|
|
221
223
|
/**
|
|
222
224
|
* Builds the correct top level classnames for the 'core/search' block.
|
|
223
225
|
*
|
|
226
|
+
* @since 5.6.0
|
|
227
|
+
*
|
|
224
228
|
* @param array $attributes The block attributes.
|
|
225
229
|
*
|
|
226
230
|
* @return string The classnames used in the block.
|
|
@@ -265,6 +269,8 @@ function classnames_for_block_core_search( $attributes ) {
|
|
|
265
269
|
* or not, the generated rule is injected into the appropriate collection of
|
|
266
270
|
* styles for later application in the block's markup.
|
|
267
271
|
*
|
|
272
|
+
* @since 6.1.0
|
|
273
|
+
*
|
|
268
274
|
* @param array $attributes The block attributes.
|
|
269
275
|
* @param string $property Border property to generate rule for e.g. width or color.
|
|
270
276
|
* @param string $side Optional side border. The dictates the value retrieved and final CSS property.
|
|
@@ -310,6 +316,8 @@ function apply_block_core_search_border_style( $attributes, $property, $side, &$
|
|
|
310
316
|
* injects rules into the provided wrapper, button and input style arrays for
|
|
311
317
|
* uniform "flat" borders or those with individual sides configured.
|
|
312
318
|
*
|
|
319
|
+
* @since 6.1.0
|
|
320
|
+
*
|
|
313
321
|
* @param array $attributes The block attributes.
|
|
314
322
|
* @param string $property Border property to generate rule for e.g. width or color.
|
|
315
323
|
* @param array $wrapper_styles Current collection of wrapper styles.
|
|
@@ -331,6 +339,8 @@ function apply_block_core_search_border_styles( $attributes, $property, &$wrappe
|
|
|
331
339
|
* inner input or button and a second for the inner wrapper should the block
|
|
332
340
|
* be positioning the button "inside".
|
|
333
341
|
*
|
|
342
|
+
* @since 5.8.0
|
|
343
|
+
*
|
|
334
344
|
* @param array $attributes The block attributes.
|
|
335
345
|
*
|
|
336
346
|
* @return array Style HTML attribute.
|
|
@@ -457,7 +467,9 @@ function styles_for_block_core_search( $attributes ) {
|
|
|
457
467
|
}
|
|
458
468
|
|
|
459
469
|
/**
|
|
460
|
-
* Returns typography classnames depending on whether there are named font sizes/families
|
|
470
|
+
* Returns typography classnames depending on whether there are named font sizes/families.
|
|
471
|
+
*
|
|
472
|
+
* @since 6.1.0
|
|
461
473
|
*
|
|
462
474
|
* @param array $attributes The block attributes.
|
|
463
475
|
*
|
|
@@ -483,6 +495,8 @@ function get_typography_classes_for_block_core_search( $attributes ) {
|
|
|
483
495
|
* Returns typography styles to be included in an HTML style tag.
|
|
484
496
|
* This excludes text-decoration, which is applied only to the label and button elements of the search block.
|
|
485
497
|
*
|
|
498
|
+
* @since 6.1.0
|
|
499
|
+
*
|
|
486
500
|
* @param array $attributes The block attributes.
|
|
487
501
|
*
|
|
488
502
|
* @return string A string of typography CSS declarations.
|
|
@@ -533,6 +547,8 @@ function get_typography_styles_for_block_core_search( $attributes ) {
|
|
|
533
547
|
/**
|
|
534
548
|
* Returns border color classnames depending on whether there are named or custom border colors.
|
|
535
549
|
*
|
|
550
|
+
* @since 5.9.0
|
|
551
|
+
*
|
|
536
552
|
* @param array $attributes The block attributes.
|
|
537
553
|
*
|
|
538
554
|
* @return string The border color classnames to be applied to the block elements.
|
|
@@ -556,6 +572,8 @@ function get_border_color_classes_for_block_core_search( $attributes ) {
|
|
|
556
572
|
/**
|
|
557
573
|
* Returns color classnames depending on whether there are named or custom text and background colors.
|
|
558
574
|
*
|
|
575
|
+
* @since 5.9.0
|
|
576
|
+
*
|
|
559
577
|
* @param array $attributes The block attributes.
|
|
560
578
|
*
|
|
561
579
|
* @return string The color classnames to be applied to the block elements.
|
package/src/search/style.scss
CHANGED
|
@@ -97,6 +97,17 @@ $button-spacing-y: math.div($grid-unit-15, 2); // 6px
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
// We are lowering the specificity so that the input element can override the rule for the input element inside the search block.
|
|
101
|
+
:where(.wp-block-search__input) {
|
|
102
|
+
font-family: inherit;
|
|
103
|
+
font-weight: inherit;
|
|
104
|
+
font-size: inherit;
|
|
105
|
+
line-height: inherit;
|
|
106
|
+
letter-spacing: inherit;
|
|
107
|
+
text-transform: inherit;
|
|
108
|
+
font-style: inherit;
|
|
109
|
+
}
|
|
110
|
+
|
|
100
111
|
// We are lowering the specificity so that the button element can override the rule for the button inside the search block.
|
|
101
112
|
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
|
|
102
113
|
padding: $grid-unit-05;
|
package/src/shortcode/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Performs wpautop() on the shortcode block content.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.0.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
* @param string $content The block content.
|
|
13
15
|
*
|
|
@@ -19,6 +21,8 @@ function render_block_core_shortcode( $attributes, $content ) {
|
|
|
19
21
|
|
|
20
22
|
/**
|
|
21
23
|
* Registers the `core/shortcode` block on server.
|
|
24
|
+
*
|
|
25
|
+
* @since 5.0.0
|
|
22
26
|
*/
|
|
23
27
|
function register_block_core_shortcode() {
|
|
24
28
|
register_block_type_from_metadata(
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Provide special styling for the placeholder.
|
|
34
|
-
// @todo
|
|
34
|
+
// @todo this particular minimal style of placeholder could be componentized further.
|
|
35
35
|
.wp-block-site-logo.wp-block-site-logo {
|
|
36
36
|
|
|
37
37
|
&.is-default-size .components-placeholder {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
border-radius: inherit;
|
|
55
55
|
|
|
56
56
|
// Provide a minimum size for the placeholder, for when the logo is resized.
|
|
57
|
-
// @todo
|
|
57
|
+
// @todo resizing is currently only possible by adding an image, resizing,
|
|
58
58
|
// and then removing the image again. We might want to enable resizing on the
|
|
59
59
|
// placeholder itself.
|
|
60
60
|
min-height: $grid-unit-60;
|
package/src/site-logo/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/site-logo` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 5.8.0
|
|
12
|
+
*
|
|
11
13
|
* @param array $attributes The block attributes.
|
|
12
14
|
*
|
|
13
15
|
* @return string The render.
|
|
@@ -60,6 +62,8 @@ function render_block_core_site_logo( $attributes ) {
|
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
64
|
* Register a core site setting for a site logo
|
|
65
|
+
*
|
|
66
|
+
* @since 5.8.0
|
|
63
67
|
*/
|
|
64
68
|
function register_block_core_site_logo_setting() {
|
|
65
69
|
register_setting(
|
|
@@ -79,6 +83,8 @@ add_action( 'rest_api_init', 'register_block_core_site_logo_setting', 10 );
|
|
|
79
83
|
|
|
80
84
|
/**
|
|
81
85
|
* Register a core site setting for a site icon
|
|
86
|
+
*
|
|
87
|
+
* @since 5.9.0
|
|
82
88
|
*/
|
|
83
89
|
function register_block_core_site_icon_setting() {
|
|
84
90
|
register_setting(
|
|
@@ -96,6 +102,8 @@ add_action( 'rest_api_init', 'register_block_core_site_icon_setting', 10 );
|
|
|
96
102
|
|
|
97
103
|
/**
|
|
98
104
|
* Registers the `core/site-logo` block on the server.
|
|
105
|
+
*
|
|
106
|
+
* @since 5.8.0
|
|
99
107
|
*/
|
|
100
108
|
function register_block_core_site_logo() {
|
|
101
109
|
register_block_type_from_metadata(
|
|
@@ -111,6 +119,8 @@ add_action( 'init', 'register_block_core_site_logo' );
|
|
|
111
119
|
/**
|
|
112
120
|
* Overrides the custom logo with a site logo, if the option is set.
|
|
113
121
|
*
|
|
122
|
+
* @since 5.8.0
|
|
123
|
+
*
|
|
114
124
|
* @param string $custom_logo The custom logo set by a theme.
|
|
115
125
|
*
|
|
116
126
|
* @return string The site logo if set.
|
|
@@ -125,6 +135,8 @@ add_filter( 'theme_mod_custom_logo', '_override_custom_logo_theme_mod' );
|
|
|
125
135
|
/**
|
|
126
136
|
* Updates the site_logo option when the custom_logo theme-mod gets updated.
|
|
127
137
|
*
|
|
138
|
+
* @since 5.8.0
|
|
139
|
+
*
|
|
128
140
|
* @param mixed $value Attachment ID of the custom logo or an empty value.
|
|
129
141
|
* @return mixed
|
|
130
142
|
*/
|
|
@@ -143,6 +155,8 @@ add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' );
|
|
|
143
155
|
/**
|
|
144
156
|
* Deletes the site_logo when the custom_logo theme mod is removed.
|
|
145
157
|
*
|
|
158
|
+
* @since 5.8.0
|
|
159
|
+
*
|
|
146
160
|
* @param array $old_value Previous theme mod settings.
|
|
147
161
|
* @param array $value Updated theme mod settings.
|
|
148
162
|
*/
|
|
@@ -161,6 +175,8 @@ function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
|
|
|
161
175
|
|
|
162
176
|
/**
|
|
163
177
|
* Deletes the site logo when all theme mods are being removed.
|
|
178
|
+
*
|
|
179
|
+
* @since 5.8.0
|
|
164
180
|
*/
|
|
165
181
|
function _delete_site_logo_on_remove_theme_mods() {
|
|
166
182
|
global $_ignore_site_logo_changes;
|
|
@@ -179,6 +195,8 @@ function _delete_site_logo_on_remove_theme_mods() {
|
|
|
179
195
|
* Hooks `_delete_site_logo_on_remove_theme_mods` in `delete_option_theme_mods_$theme`.
|
|
180
196
|
*
|
|
181
197
|
* Runs on `setup_theme` to account for dynamically-switched themes in the Customizer.
|
|
198
|
+
*
|
|
199
|
+
* @since 5.8.0
|
|
182
200
|
*/
|
|
183
201
|
function _delete_site_logo_on_remove_custom_logo_on_setup_theme() {
|
|
184
202
|
$theme = get_option( 'stylesheet' );
|
|
@@ -189,6 +207,8 @@ add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_the
|
|
|
189
207
|
|
|
190
208
|
/**
|
|
191
209
|
* Removes the custom_logo theme-mod when the site_logo option gets deleted.
|
|
210
|
+
*
|
|
211
|
+
* @since 5.9.0
|
|
192
212
|
*/
|
|
193
213
|
function _delete_custom_logo_on_remove_site_logo() {
|
|
194
214
|
global $_ignore_site_logo_changes;
|