-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended[Type] Developer DocumentationDocumentation for developersDocumentation for developers
Description
Description
On this documentaton page Styles in the section on server-side block style registration, the optional parameter style_data
is missing.
It was added with WordPress 6.6. and allows for styles to be added in theme.json like array notation:
Example:
register_block_style(
array( 'core/image' ),
array(
'name' => 'orange-border',
'label' => __( 'Orange Border', 'pauli' ),
'style_data'=> array(
'border' => array(
'color' => '#f5bc42',
'style' => 'solid',
'width' => '4px',
'radius' => '15px'
Step-by-step reproduction instructions
documentaton only.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Metadata
Metadata
Assignees
Labels
[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended[Type] Developer DocumentationDocumentation for developersDocumentation for developers