diff options
Diffstat (limited to 'wp-includes/blocks/post-title.php')
-rw-r--r-- | wp-includes/blocks/post-title.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-includes/blocks/post-title.php b/wp-includes/blocks/post-title.php index d0eef85..ed27f2e 100644 --- a/wp-includes/blocks/post-title.php +++ b/wp-includes/blocks/post-title.php @@ -33,7 +33,7 @@ function render_block_core_post_title( $attributes, $content, $block ) { $tag_name = 'h2'; if ( isset( $attributes['level'] ) ) { - $tag_name = 'h' . $attributes['level']; + $tag_name = 0 === $attributes['level'] ? 'p' : 'h' . (int) $attributes['level']; } if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) { @@ -60,6 +60,8 @@ function render_block_core_post_title( $attributes, $content, $block ) { /** * Registers the `core/post-title` block on the server. + * + * @since 5.8.0 */ function register_block_core_post_title() { register_block_type_from_metadata( |