diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
commit | 0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch) | |
tree | e139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/blocks/block.php | |
parent | Adding upstream version 6.5.5+dfsg1. (diff) | |
download | wordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.tar.xz wordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.zip |
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/blocks/block.php')
-rw-r--r-- | wp-includes/blocks/block.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/wp-includes/blocks/block.php b/wp-includes/blocks/block.php index 4886373..8beef97 100644 --- a/wp-includes/blocks/block.php +++ b/wp-includes/blocks/block.php @@ -8,6 +8,10 @@ /** * Renders the `core/block` block on server. * + * @since 5.0.0 + * + * @global WP_Embed $wp_embed + * * @param array $attributes The block attributes. * * @return string Rendered HTML of the referenced block. @@ -74,7 +78,7 @@ function render_block_core_block( $attributes ) { * filter so that it is available when a pattern's inner blocks are * rendering via do_blocks given it only receives the inner content. */ - $has_pattern_overrides = isset( $attributes['content'] ); + $has_pattern_overrides = isset( $attributes['content'] ) && null !== get_block_bindings_source( 'core/pattern-overrides' ); if ( $has_pattern_overrides ) { $filter_block_context = static function ( $context ) use ( $attributes ) { $context['pattern/overrides'] = $attributes['content']; @@ -95,6 +99,8 @@ function render_block_core_block( $attributes ) { /** * Registers the `core/block` block. + * + * @since 5.3.0 */ function register_block_core_block() { register_block_type_from_metadata( |