Make WordPress Core


Ignore:
Timestamp:
02/06/2023 03:22:38 PM (2 years ago)
Author:
jorgefilipecosta
Message:

Block editor: Add ID support to block wrapper attributes.

This commit adds support for the ID attribute for dynamically rendered blocks.

Props Soean, flixos90, poena, costdev, Mamaduka.
Closes #56852.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block-supports.php

    r54498 r55230  
    182182    // This is hardcoded on purpose.
    183183    // We only support a fixed list of attributes.
    184     $attributes_to_merge = array( 'style', 'class' );
     184    $attributes_to_merge = array( 'style', 'class', 'id' );
    185185    $attributes          = array();
    186186    foreach ( $attributes_to_merge as $attribute_name ) {
Note: See TracChangeset for help on using the changeset viewer.