Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Loginout block in Nav block #49160

Merged
merged 2 commits into from
May 4, 2023
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 @@ -383,7 +383,7 @@ Show login & logout links. ([Source](https://github.com/WordPress/gutenberg/tree

- **Name:** core/loginout
- **Category:** theme
- **Supports:** anchor, className, typography (~~fontSize~~)
- **Supports:** anchor, className, typography (fontSize, lineHeight)
- **Attributes:** displayLoginAsForm, redirectToCurrent

## Media & Text
Expand Down
12 changes: 11 additions & 1 deletion packages/block-library/src/loginout/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
"anchor": true,
"className": true,
"typography": {
"fontSize": false
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const ALLOWED_BLOCKS = [
'core/site-title',
'core/site-logo',
'core/navigation-submenu',
'core/loginout',
];

const DEFAULT_BLOCK = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const ALLOWED_BLOCKS = [
'core/site-title',
'core/site-logo',
'core/navigation-submenu',
'core/loginout',
Comment on lines 34 to +37
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should normalize these lists to a single const and import into the relevant files.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done here: #50323

];

export default function UnsavedInnerBlocks( {
Expand Down