Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ Describe in a few words what this site is about. This is important for search re

- **Name:** core/site-tagline
- **Category:** theme
- **Supports:** align (full, wide), color (background, gradients, text), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Supports:** align (full, wide), color (background, gradients, text), contentRole, interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~
- **Attributes:** level, levelOptions, textAlign

## Site Title
Expand Down
5 changes: 3 additions & 2 deletions packages/block-editor/src/store/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,16 +519,17 @@ export function isSectionBlock( state, clientId ) {
}

const attributes = getBlockAttributes( state, clientId );
const isTemplatePart = blockName === 'core/template-part';
if (
attributes?.metadata?.patternName &&
( attributes?.metadata?.patternName || isTemplatePart ) &&
!! window?.__experimentalContentOnlyPatternInsertion
) {
return true;
}

// Template parts become sections in navigation mode.
const _isNavigationMode = isNavigationMode( state );
if ( _isNavigationMode && blockName === 'core/template-part' ) {
if ( _isNavigationMode && isTemplatePart ) {
return true;
}

Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2286,6 +2286,9 @@ function getDerivedBlockEditingModesForTree(
const contentOnlyParents = [
...contentOnlyTemplateLockedClientIds,
...unsyncedPatternClientIds,
...( window?.__experimentalContentOnlyPatternInsertion
? templatePartClientIds
: [] ),
];

traverseBlockTree( state, treeClientId, ( block ) => {
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/site-tagline/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"text": true
}
},
"contentRole": true,
"spacing": {
"margin": true,
"padding": true,
Expand Down
Loading