Skip to content

Doc: style_data missing on Styles page #69917

@bph

Description

@bph

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions