From 6cc9333cece86eb54d773be3676c3763991954d4 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Thu, 11 Mar 2021 16:22:55 +0200 Subject: [PATCH] default to h1 --- packages/block-library/src/query-title/block.json | 2 +- packages/block-library/src/query-title/index.php | 2 +- packages/e2e-tests/fixtures/blocks/core__query-title.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/query-title/block.json b/packages/block-library/src/query-title/block.json index 9c8871135da3c2..6635b27d5e2c37 100644 --- a/packages/block-library/src/query-title/block.json +++ b/packages/block-library/src/query-title/block.json @@ -11,7 +11,7 @@ }, "level": { "type": "number", - "default": 2 + "default": 1 } }, "supports": { diff --git a/packages/block-library/src/query-title/index.php b/packages/block-library/src/query-title/index.php index fcc89751a8cdee..bca5c0049db635 100644 --- a/packages/block-library/src/query-title/index.php +++ b/packages/block-library/src/query-title/index.php @@ -26,7 +26,7 @@ function render_block_core_query_title( $attributes, $content, $block ) { if ( $is_archive ) { $title = get_the_archive_title(); } - $tag_name = isset( $attributes['level'] ) ? 'h' . (int) $attributes['level'] : 'h2'; + $tag_name = isset( $attributes['level'] ) ? 'h' . (int) $attributes['level'] : 'h1'; $align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}"; $wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) ); return sprintf( diff --git a/packages/e2e-tests/fixtures/blocks/core__query-title.json b/packages/e2e-tests/fixtures/blocks/core__query-title.json index 263443fdb64aeb..082dfaeb845e5f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__query-title.json +++ b/packages/e2e-tests/fixtures/blocks/core__query-title.json @@ -4,7 +4,7 @@ "name": "core/query-title", "isValid": true, "attributes": { - "level": 2 + "level": 1 }, "innerBlocks": [], "originalContent": ""