@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/page-list/index.php
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* Build an array with CSS classes and inline styles defining the colors
|
|
10
10
|
* which will be applied to the pages markup in the front-end when it is a descendant of navigation.
|
|
11
11
|
*
|
|
12
|
+
* @since 5.8.0
|
|
13
|
+
*
|
|
12
14
|
* @param array $attributes Block attributes.
|
|
13
15
|
* @param array $context Navigation block context.
|
|
14
16
|
* @return array Colors CSS classes and inline styles.
|
|
@@ -101,6 +103,8 @@ function block_core_page_list_build_css_colors( $attributes, $context ) {
|
|
|
101
103
|
* Build an array with CSS classes and inline styles defining the font sizes
|
|
102
104
|
* which will be applied to the pages markup in the front-end when it is a descendant of navigation.
|
|
103
105
|
*
|
|
106
|
+
* @since 5.8.0
|
|
107
|
+
*
|
|
104
108
|
* @param array $context Navigation block context.
|
|
105
109
|
* @return array Font size CSS classes and inline styles.
|
|
106
110
|
*/
|
|
@@ -135,6 +139,8 @@ function block_core_page_list_build_css_font_sizes( $context ) {
|
|
|
135
139
|
/**
|
|
136
140
|
* Outputs Page list markup from an array of pages with nested children.
|
|
137
141
|
*
|
|
142
|
+
* @since 5.8.0
|
|
143
|
+
*
|
|
138
144
|
* @param boolean $open_submenus_on_click Whether to open submenus on click instead of hover.
|
|
139
145
|
* @param boolean $show_submenu_icons Whether to show submenu indicator icons.
|
|
140
146
|
* @param boolean $is_navigation_child If block is a child of Navigation block.
|
|
@@ -220,6 +226,8 @@ function block_core_page_list_render_nested_page_list( $open_submenus_on_click,
|
|
|
220
226
|
/**
|
|
221
227
|
* Outputs nested array of pages
|
|
222
228
|
*
|
|
229
|
+
* @since 5.8.0
|
|
230
|
+
*
|
|
223
231
|
* @param array $current_level The level being iterated through.
|
|
224
232
|
* @param array $children The children grouped by parent post ID.
|
|
225
233
|
*
|
|
@@ -240,6 +248,8 @@ function block_core_page_list_nest_pages( $current_level, $children ) {
|
|
|
240
248
|
/**
|
|
241
249
|
* Renders the `core/page-list` block on server.
|
|
242
250
|
*
|
|
251
|
+
* @since 5.8.0
|
|
252
|
+
*
|
|
243
253
|
* @param array $attributes The block attributes.
|
|
244
254
|
* @param string $content The saved content.
|
|
245
255
|
* @param WP_Block $block The parsed block.
|
|
@@ -345,6 +355,8 @@ function render_block_core_page_list( $attributes, $content, $block ) {
|
|
|
345
355
|
|
|
346
356
|
/**
|
|
347
357
|
* Registers the `core/pages` block on server.
|
|
358
|
+
*
|
|
359
|
+
* @since 5.8.0
|
|
348
360
|
*/
|
|
349
361
|
function register_block_core_page_list() {
|
|
350
362
|
register_block_type_from_metadata(
|
package/src/pattern/edit.js
CHANGED
|
@@ -108,6 +108,10 @@ const PatternEdit = ( { attributes, clientId } ) => {
|
|
|
108
108
|
metadata: {
|
|
109
109
|
...clonedBlocks[ 0 ].attributes.metadata,
|
|
110
110
|
categories: selectedPattern.categories,
|
|
111
|
+
patternName: selectedPattern.name,
|
|
112
|
+
name:
|
|
113
|
+
clonedBlocks[ 0 ].attributes.metadata.name ||
|
|
114
|
+
selectedPattern.title,
|
|
111
115
|
},
|
|
112
116
|
};
|
|
113
117
|
}
|
package/src/pattern/index.php
CHANGED
package/src/post-author/edit.js
CHANGED
|
@@ -195,6 +195,7 @@ function PostAuthorEdit( {
|
|
|
195
195
|
<div className="wp-block-post-author__content">
|
|
196
196
|
{ ( ! RichText.isEmpty( byline ) || isSelected ) && (
|
|
197
197
|
<RichText
|
|
198
|
+
identifier="byline"
|
|
198
199
|
className="wp-block-post-author__byline"
|
|
199
200
|
aria-label={ __( 'Post author byline text' ) }
|
|
200
201
|
placeholder={ __( 'Write byline…' ) }
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-author` 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
|
* @param WP_Block $block Block instance.
|
|
@@ -61,6 +63,8 @@ function render_block_core_post_author( $attributes, $content, $block ) {
|
|
|
61
63
|
|
|
62
64
|
/**
|
|
63
65
|
* Registers the `core/post-author` block on the server.
|
|
66
|
+
*
|
|
67
|
+
* @since 5.9.0
|
|
64
68
|
*/
|
|
65
69
|
function register_block_core_post_author() {
|
|
66
70
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-author-biography` 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.
|
|
@@ -37,6 +39,8 @@ function render_block_core_post_author_biography( $attributes, $content, $block
|
|
|
37
39
|
|
|
38
40
|
/**
|
|
39
41
|
* Registers the `core/post-author-biography` block on the server.
|
|
42
|
+
*
|
|
43
|
+
* @since 6.0.0
|
|
40
44
|
*/
|
|
41
45
|
function register_block_core_post_author_biography() {
|
|
42
46
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-author-name` block on the server.
|
|
10
10
|
*
|
|
11
|
+
* @since 6.2.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.
|
|
@@ -43,6 +45,8 @@ function render_block_core_post_author_name( $attributes, $content, $block ) {
|
|
|
43
45
|
|
|
44
46
|
/**
|
|
45
47
|
* Registers the `core/post-author-name` block on the server.
|
|
48
|
+
*
|
|
49
|
+
* @since 6.2.0
|
|
46
50
|
*/
|
|
47
51
|
function register_block_core_post_author_name() {
|
|
48
52
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-comments-form` 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.
|
|
@@ -54,6 +56,8 @@ function render_block_core_post_comments_form( $attributes, $content, $block ) {
|
|
|
54
56
|
|
|
55
57
|
/**
|
|
56
58
|
* Registers the `core/post-comments-form` block on the server.
|
|
59
|
+
*
|
|
60
|
+
* @since 6.0.0
|
|
57
61
|
*/
|
|
58
62
|
function register_block_core_post_comments_form() {
|
|
59
63
|
register_block_type_from_metadata(
|
|
@@ -68,6 +72,8 @@ add_action( 'init', 'register_block_core_post_comments_form' );
|
|
|
68
72
|
/**
|
|
69
73
|
* Use the button block classes for the form-submit button.
|
|
70
74
|
*
|
|
75
|
+
* @since 6.0.0
|
|
76
|
+
*
|
|
71
77
|
* @param array $fields The default comment form arguments.
|
|
72
78
|
*
|
|
73
79
|
* @return array Returns the modified fields.
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-content` 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.
|
|
@@ -63,6 +65,8 @@ function render_block_core_post_content( $attributes, $content, $block ) {
|
|
|
63
65
|
|
|
64
66
|
/**
|
|
65
67
|
* Registers the `core/post-content` block on the server.
|
|
68
|
+
*
|
|
69
|
+
* @since 5.8.0
|
|
66
70
|
*/
|
|
67
71
|
function register_block_core_post_content() {
|
|
68
72
|
register_block_type_from_metadata(
|
package/src/post-date/index.php
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-date` 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.
|
|
@@ -60,6 +62,8 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
60
62
|
|
|
61
63
|
/**
|
|
62
64
|
* Registers the `core/post-date` block on the server.
|
|
65
|
+
*
|
|
66
|
+
* @since 5.8.0
|
|
63
67
|
*/
|
|
64
68
|
function register_block_core_post_date() {
|
|
65
69
|
register_block_type_from_metadata(
|
package/src/post-excerpt/edit.js
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-excerpt` 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.
|
|
@@ -66,6 +68,8 @@ function render_block_core_post_excerpt( $attributes, $content, $block ) {
|
|
|
66
68
|
|
|
67
69
|
/**
|
|
68
70
|
* Registers the `core/post-excerpt` block on the server.
|
|
71
|
+
*
|
|
72
|
+
* @since 5.8.0
|
|
69
73
|
*/
|
|
70
74
|
function register_block_core_post_excerpt() {
|
|
71
75
|
register_block_type_from_metadata(
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"supports": {
|
|
62
62
|
"align": [ "left", "right", "center", "wide", "full" ],
|
|
63
63
|
"color": {
|
|
64
|
-
"__experimentalDuotone": "img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before",
|
|
65
64
|
"text": false,
|
|
66
65
|
"background": false
|
|
67
66
|
},
|
|
@@ -69,7 +68,6 @@
|
|
|
69
68
|
"color": true,
|
|
70
69
|
"radius": true,
|
|
71
70
|
"width": true,
|
|
72
|
-
"__experimentalSelector": "img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay",
|
|
73
71
|
"__experimentalSkipSerialization": true,
|
|
74
72
|
"__experimentalDefaultControls": {
|
|
75
73
|
"color": true,
|
|
@@ -77,6 +75,12 @@
|
|
|
77
75
|
"width": true
|
|
78
76
|
}
|
|
79
77
|
},
|
|
78
|
+
"filter": {
|
|
79
|
+
"duotone": true
|
|
80
|
+
},
|
|
81
|
+
"shadow": {
|
|
82
|
+
"__experimentalSkipSerialization": true
|
|
83
|
+
},
|
|
80
84
|
"html": false,
|
|
81
85
|
"spacing": {
|
|
82
86
|
"margin": true,
|
|
@@ -86,6 +90,13 @@
|
|
|
86
90
|
"clientNavigation": true
|
|
87
91
|
}
|
|
88
92
|
},
|
|
93
|
+
"selectors": {
|
|
94
|
+
"border": ".wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay",
|
|
95
|
+
"shadow": ".wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder",
|
|
96
|
+
"filter": {
|
|
97
|
+
"duotone": ".wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
89
100
|
"editorStyle": "wp-block-post-featured-image-editor",
|
|
90
101
|
"style": "wp-block-post-featured-image"
|
|
91
102
|
}
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
useBlockProps,
|
|
25
25
|
store as blockEditorStore,
|
|
26
26
|
__experimentalUseBorderProps as useBorderProps,
|
|
27
|
+
__experimentalGetShadowClassesAndStyles as getShadowClassesAndStyles,
|
|
27
28
|
useBlockEditingMode,
|
|
28
29
|
} from '@wordpress/block-editor';
|
|
29
30
|
import { useMemo } from '@wordpress/element';
|
|
@@ -35,6 +36,7 @@ import { store as noticesStore } from '@wordpress/notices';
|
|
|
35
36
|
* Internal dependencies
|
|
36
37
|
*/
|
|
37
38
|
import DimensionControls from './dimension-controls';
|
|
39
|
+
import OverlayControls from './overlay-controls';
|
|
38
40
|
import Overlay from './overlay';
|
|
39
41
|
|
|
40
42
|
const ALLOWED_MEDIA_TYPES = [ 'image' ];
|
|
@@ -144,6 +146,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
144
146
|
style: { width, height, aspectRatio },
|
|
145
147
|
} );
|
|
146
148
|
const borderProps = useBorderProps( attributes );
|
|
149
|
+
const shadowProps = getShadowClassesAndStyles( attributes );
|
|
147
150
|
const blockEditingMode = useBlockEditingMode();
|
|
148
151
|
|
|
149
152
|
const placeholder = ( content ) => {
|
|
@@ -158,6 +161,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
158
161
|
height: !! aspectRatio && '100%',
|
|
159
162
|
width: !! aspectRatio && '100%',
|
|
160
163
|
...borderProps.style,
|
|
164
|
+
...shadowProps.style,
|
|
161
165
|
} }
|
|
162
166
|
>
|
|
163
167
|
{ content }
|
|
@@ -178,7 +182,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
178
182
|
|
|
179
183
|
const controls = blockEditingMode === 'default' && (
|
|
180
184
|
<>
|
|
181
|
-
<
|
|
185
|
+
<OverlayControls
|
|
182
186
|
attributes={ attributes }
|
|
183
187
|
setAttributes={ setAttributes }
|
|
184
188
|
clientId={ clientId }
|
|
@@ -259,6 +263,11 @@ export default function PostFeaturedImageEdit( {
|
|
|
259
263
|
) : (
|
|
260
264
|
placeholder()
|
|
261
265
|
) }
|
|
266
|
+
<Overlay
|
|
267
|
+
attributes={ attributes }
|
|
268
|
+
setAttributes={ setAttributes }
|
|
269
|
+
clientId={ clientId }
|
|
270
|
+
/>
|
|
262
271
|
</div>
|
|
263
272
|
</>
|
|
264
273
|
);
|
|
@@ -267,6 +276,7 @@ export default function PostFeaturedImageEdit( {
|
|
|
267
276
|
const label = __( 'Add a featured image' );
|
|
268
277
|
const imageStyles = {
|
|
269
278
|
...borderProps.style,
|
|
279
|
+
...shadowProps.style,
|
|
270
280
|
height: aspectRatio ? '100%' : height,
|
|
271
281
|
width: !! aspectRatio && '100%',
|
|
272
282
|
objectFit: !! ( height || aspectRatio ) && scale,
|
|
@@ -363,6 +373,11 @@ export default function PostFeaturedImageEdit( {
|
|
|
363
373
|
) : (
|
|
364
374
|
image
|
|
365
375
|
) }
|
|
376
|
+
<Overlay
|
|
377
|
+
attributes={ attributes }
|
|
378
|
+
setAttributes={ setAttributes }
|
|
379
|
+
clientId={ clientId }
|
|
380
|
+
/>
|
|
366
381
|
</figure>
|
|
367
382
|
</>
|
|
368
383
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Provide special styling for the placeholder.
|
|
2
|
-
// @todo
|
|
2
|
+
// @todo this particular minimal style of placeholder could be componentized further.
|
|
3
3
|
.wp-block-post-featured-image {
|
|
4
4
|
.block-editor-media-placeholder {
|
|
5
5
|
z-index: 1; // Need to put it above the overlay so the upload button works.
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-featured-image` 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.
|
|
@@ -48,6 +50,13 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
48
50
|
if ( ! empty( $attributes['scale'] ) ) {
|
|
49
51
|
$extra_styles .= "object-fit:{$attributes['scale']};";
|
|
50
52
|
}
|
|
53
|
+
if ( ! empty( $attributes['style']['shadow'] ) ) {
|
|
54
|
+
$shadow_styles = wp_style_engine_get_styles( array( 'shadow' => $attributes['style']['shadow'] ) );
|
|
55
|
+
|
|
56
|
+
if ( ! empty( $shadow_styles['css'] ) ) {
|
|
57
|
+
$extra_styles .= $shadow_styles['css'];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
51
60
|
|
|
52
61
|
if ( ! empty( $extra_styles ) ) {
|
|
53
62
|
$attr['style'] = empty( $attr['style'] ) ? $extra_styles : $attr['style'] . $extra_styles;
|
|
@@ -125,6 +134,8 @@ function render_block_core_post_featured_image( $attributes, $content, $block )
|
|
|
125
134
|
/**
|
|
126
135
|
* Generate markup for the HTML element that will be used for the overlay.
|
|
127
136
|
*
|
|
137
|
+
* @since 6.1.0
|
|
138
|
+
*
|
|
128
139
|
* @param array $attributes Block attributes.
|
|
129
140
|
*
|
|
130
141
|
* @return string HTML markup in string format.
|
|
@@ -191,6 +202,8 @@ function get_block_core_post_featured_image_overlay_element_markup( $attributes
|
|
|
191
202
|
* Generates class names and styles to apply the border support styles for
|
|
192
203
|
* the Post Featured Image block.
|
|
193
204
|
*
|
|
205
|
+
* @since 6.1.0
|
|
206
|
+
*
|
|
194
207
|
* @param array $attributes The block attributes.
|
|
195
208
|
* @return array The border-related classnames and styles for the block.
|
|
196
209
|
*/
|
|
@@ -241,6 +254,8 @@ function get_block_core_post_featured_image_border_attributes( $attributes ) {
|
|
|
241
254
|
|
|
242
255
|
/**
|
|
243
256
|
* Registers the `core/post-featured-image` block on the server.
|
|
257
|
+
*
|
|
258
|
+
* @since 5.8.0
|
|
244
259
|
*/
|
|
245
260
|
function register_block_core_post_featured_image() {
|
|
246
261
|
register_block_type_from_metadata(
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
RangeControl,
|
|
6
|
+
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
7
|
+
} from '@wordpress/components';
|
|
8
|
+
import {
|
|
9
|
+
InspectorControls,
|
|
10
|
+
withColors,
|
|
11
|
+
__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,
|
|
12
|
+
__experimentalUseGradient,
|
|
13
|
+
__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,
|
|
14
|
+
} from '@wordpress/block-editor';
|
|
15
|
+
import { compose } from '@wordpress/compose';
|
|
16
|
+
import { __ } from '@wordpress/i18n';
|
|
17
|
+
|
|
18
|
+
const Overlay = ( {
|
|
19
|
+
clientId,
|
|
20
|
+
attributes,
|
|
21
|
+
setAttributes,
|
|
22
|
+
overlayColor,
|
|
23
|
+
setOverlayColor,
|
|
24
|
+
} ) => {
|
|
25
|
+
const { dimRatio } = attributes;
|
|
26
|
+
const { gradientValue, setGradient } = __experimentalUseGradient();
|
|
27
|
+
const colorGradientSettings = useMultipleOriginColorsAndGradients();
|
|
28
|
+
|
|
29
|
+
if ( ! colorGradientSettings.hasColorsOrGradients ) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<InspectorControls group="color">
|
|
35
|
+
<ColorGradientSettingsDropdown
|
|
36
|
+
__experimentalIsRenderedInSidebar
|
|
37
|
+
settings={ [
|
|
38
|
+
{
|
|
39
|
+
colorValue: overlayColor.color,
|
|
40
|
+
gradientValue,
|
|
41
|
+
label: __( 'Overlay' ),
|
|
42
|
+
onColorChange: setOverlayColor,
|
|
43
|
+
onGradientChange: setGradient,
|
|
44
|
+
isShownByDefault: true,
|
|
45
|
+
resetAllFilter: () => ( {
|
|
46
|
+
overlayColor: undefined,
|
|
47
|
+
customOverlayColor: undefined,
|
|
48
|
+
gradient: undefined,
|
|
49
|
+
customGradient: undefined,
|
|
50
|
+
} ),
|
|
51
|
+
},
|
|
52
|
+
] }
|
|
53
|
+
panelId={ clientId }
|
|
54
|
+
{ ...colorGradientSettings }
|
|
55
|
+
/>
|
|
56
|
+
<ToolsPanelItem
|
|
57
|
+
hasValue={ () => dimRatio !== undefined }
|
|
58
|
+
label={ __( 'Overlay opacity' ) }
|
|
59
|
+
onDeselect={ () => setAttributes( { dimRatio: 0 } ) }
|
|
60
|
+
resetAllFilter={ () => ( {
|
|
61
|
+
dimRatio: 0,
|
|
62
|
+
} ) }
|
|
63
|
+
isShownByDefault
|
|
64
|
+
panelId={ clientId }
|
|
65
|
+
>
|
|
66
|
+
<RangeControl
|
|
67
|
+
__nextHasNoMarginBottom
|
|
68
|
+
label={ __( 'Overlay opacity' ) }
|
|
69
|
+
value={ dimRatio }
|
|
70
|
+
onChange={ ( newDimRatio ) =>
|
|
71
|
+
setAttributes( {
|
|
72
|
+
dimRatio: newDimRatio,
|
|
73
|
+
} )
|
|
74
|
+
}
|
|
75
|
+
min={ 0 }
|
|
76
|
+
max={ 100 }
|
|
77
|
+
step={ 10 }
|
|
78
|
+
required
|
|
79
|
+
__next40pxDefaultSize
|
|
80
|
+
/>
|
|
81
|
+
</ToolsPanelItem>
|
|
82
|
+
</InspectorControls>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default compose( [
|
|
87
|
+
withColors( { overlayColor: 'background-color' } ),
|
|
88
|
+
] )( Overlay );
|
|
@@ -7,35 +7,21 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import {
|
|
10
|
-
RangeControl,
|
|
11
|
-
__experimentalToolsPanelItem as ToolsPanelItem,
|
|
12
|
-
} from '@wordpress/components';
|
|
13
|
-
import {
|
|
14
|
-
InspectorControls,
|
|
15
10
|
withColors,
|
|
16
|
-
__experimentalColorGradientSettingsDropdown as ColorGradientSettingsDropdown,
|
|
17
11
|
__experimentalUseGradient,
|
|
18
12
|
__experimentalUseMultipleOriginColorsAndGradients as useMultipleOriginColorsAndGradients,
|
|
19
13
|
__experimentalUseBorderProps as useBorderProps,
|
|
20
14
|
} from '@wordpress/block-editor';
|
|
21
15
|
import { compose } from '@wordpress/compose';
|
|
22
|
-
import { __ } from '@wordpress/i18n';
|
|
23
16
|
|
|
24
17
|
/**
|
|
25
18
|
* Internal dependencies
|
|
26
19
|
*/
|
|
27
20
|
import { dimRatioToClass } from './utils';
|
|
28
21
|
|
|
29
|
-
const Overlay = ( {
|
|
30
|
-
clientId,
|
|
31
|
-
attributes,
|
|
32
|
-
setAttributes,
|
|
33
|
-
overlayColor,
|
|
34
|
-
setOverlayColor,
|
|
35
|
-
} ) => {
|
|
22
|
+
const Overlay = ( { attributes, overlayColor } ) => {
|
|
36
23
|
const { dimRatio } = attributes;
|
|
37
|
-
const { gradientClass, gradientValue
|
|
38
|
-
__experimentalUseGradient();
|
|
24
|
+
const { gradientClass, gradientValue } = __experimentalUseGradient();
|
|
39
25
|
const colorGradientSettings = useMultipleOriginColorsAndGradients();
|
|
40
26
|
|
|
41
27
|
const borderProps = useBorderProps( attributes );
|
|
@@ -45,79 +31,26 @@ const Overlay = ( {
|
|
|
45
31
|
...borderProps.style,
|
|
46
32
|
};
|
|
47
33
|
|
|
48
|
-
if ( ! colorGradientSettings.hasColorsOrGradients ) {
|
|
34
|
+
if ( ! colorGradientSettings.hasColorsOrGradients || ! dimRatio ) {
|
|
49
35
|
return null;
|
|
50
36
|
}
|
|
51
37
|
|
|
52
38
|
return (
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
borderProps.className
|
|
67
|
-
) }
|
|
68
|
-
style={ overlayStyles }
|
|
69
|
-
/>
|
|
39
|
+
<span
|
|
40
|
+
aria-hidden="true"
|
|
41
|
+
className={ classnames(
|
|
42
|
+
'wp-block-post-featured-image__overlay',
|
|
43
|
+
dimRatioToClass( dimRatio ),
|
|
44
|
+
{
|
|
45
|
+
[ overlayColor.class ]: overlayColor.class,
|
|
46
|
+
'has-background-dim': dimRatio !== undefined,
|
|
47
|
+
'has-background-gradient': gradientValue,
|
|
48
|
+
[ gradientClass ]: gradientClass,
|
|
49
|
+
},
|
|
50
|
+
borderProps.className
|
|
70
51
|
) }
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
__experimentalIsRenderedInSidebar
|
|
74
|
-
settings={ [
|
|
75
|
-
{
|
|
76
|
-
colorValue: overlayColor.color,
|
|
77
|
-
gradientValue,
|
|
78
|
-
label: __( 'Overlay' ),
|
|
79
|
-
onColorChange: setOverlayColor,
|
|
80
|
-
onGradientChange: setGradient,
|
|
81
|
-
isShownByDefault: true,
|
|
82
|
-
resetAllFilter: () => ( {
|
|
83
|
-
overlayColor: undefined,
|
|
84
|
-
customOverlayColor: undefined,
|
|
85
|
-
gradient: undefined,
|
|
86
|
-
customGradient: undefined,
|
|
87
|
-
} ),
|
|
88
|
-
},
|
|
89
|
-
] }
|
|
90
|
-
panelId={ clientId }
|
|
91
|
-
{ ...colorGradientSettings }
|
|
92
|
-
/>
|
|
93
|
-
<ToolsPanelItem
|
|
94
|
-
hasValue={ () => dimRatio !== undefined }
|
|
95
|
-
label={ __( 'Overlay opacity' ) }
|
|
96
|
-
onDeselect={ () => setAttributes( { dimRatio: 0 } ) }
|
|
97
|
-
resetAllFilter={ () => ( {
|
|
98
|
-
dimRatio: 0,
|
|
99
|
-
} ) }
|
|
100
|
-
isShownByDefault
|
|
101
|
-
panelId={ clientId }
|
|
102
|
-
>
|
|
103
|
-
<RangeControl
|
|
104
|
-
__nextHasNoMarginBottom
|
|
105
|
-
label={ __( 'Overlay opacity' ) }
|
|
106
|
-
value={ dimRatio }
|
|
107
|
-
onChange={ ( newDimRatio ) =>
|
|
108
|
-
setAttributes( {
|
|
109
|
-
dimRatio: newDimRatio,
|
|
110
|
-
} )
|
|
111
|
-
}
|
|
112
|
-
min={ 0 }
|
|
113
|
-
max={ 100 }
|
|
114
|
-
step={ 10 }
|
|
115
|
-
required
|
|
116
|
-
__next40pxDefaultSize
|
|
117
|
-
/>
|
|
118
|
-
</ToolsPanelItem>
|
|
119
|
-
</InspectorControls>
|
|
120
|
-
</>
|
|
52
|
+
style={ overlayStyles }
|
|
53
|
+
/>
|
|
121
54
|
);
|
|
122
55
|
};
|
|
123
56
|
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Renders the `core/post-navigation-link` 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
|
*
|
|
@@ -123,6 +125,8 @@ function render_block_core_post_navigation_link( $attributes, $content ) {
|
|
|
123
125
|
|
|
124
126
|
/**
|
|
125
127
|
* Registers the `core/post-navigation-link` block on the server.
|
|
128
|
+
*
|
|
129
|
+
* @since 5.9.0
|
|
126
130
|
*/
|
|
127
131
|
function register_block_core_post_navigation_link() {
|
|
128
132
|
register_block_type_from_metadata(
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
/**
|
|
9
9
|
* Determines whether a block list contains a block that uses the featured image.
|
|
10
10
|
*
|
|
11
|
+
* @since 6.0.0
|
|
12
|
+
*
|
|
11
13
|
* @param WP_Block_List $inner_blocks Inner block instance.
|
|
12
14
|
*
|
|
13
15
|
* @return bool Whether the block list contains a block that uses the featured image.
|
|
@@ -145,6 +147,8 @@ function render_block_core_post_template( $attributes, $content, $block ) {
|
|
|
145
147
|
|
|
146
148
|
/**
|
|
147
149
|
* Registers the `core/post-template` block on the server.
|
|
150
|
+
*
|
|
151
|
+
* @since 5.8.0
|
|
148
152
|
*/
|
|
149
153
|
function register_block_core_post_template() {
|
|
150
154
|
register_block_type_from_metadata(
|