diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index dfe0f224c8f360..65c4e5cd0fcd82 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -775,7 +775,7 @@ Display the query title. ([Source](https://github.com/WordPress/gutenberg/tree/t - **Name:** core/query-title - **Category:** theme - **Supports:** align (full, wide), color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~ -- **Attributes:** level, showPrefix, showSearchTerm, textAlign, type +- **Attributes:** level, levelOptions, showPrefix, showSearchTerm, textAlign, type ## Quote diff --git a/packages/block-library/src/query-title/block.json b/packages/block-library/src/query-title/block.json index 674daadee3bb69..2a3c7d9f236995 100644 --- a/packages/block-library/src/query-title/block.json +++ b/packages/block-library/src/query-title/block.json @@ -17,6 +17,9 @@ "type": "number", "default": 1 }, + "levelOptions": { + "type": "array" + }, "showPrefix": { "type": "boolean", "default": true diff --git a/packages/block-library/src/query-title/edit.js b/packages/block-library/src/query-title/edit.js index 71f0e26d706842..845809a9300137 100644 --- a/packages/block-library/src/query-title/edit.js +++ b/packages/block-library/src/query-title/edit.js @@ -25,7 +25,14 @@ import { useArchiveLabel } from './use-archive-label'; const SUPPORTED_TYPES = [ 'archive', 'search' ]; export default function QueryTitleEdit( { - attributes: { type, level, textAlign, showPrefix, showSearchTerm }, + attributes: { + type, + level, + levelOptions, + textAlign, + showPrefix, + showSearchTerm, + }, setAttributes, } ) { const { archiveTypeLabel, archiveNameLabel } = useArchiveLabel(); @@ -130,6 +137,7 @@ export default function QueryTitleEdit( { setAttributes( { level: newLevel } ) }