Make WordPress Core

Changeset 55230


Ignore:
Timestamp:
02/06/2023 03:22:38 PM (17 months 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.

Location:
trunk/src
Files:
1 added
2 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 ) {
  • trunk/src/wp-settings.php

    r55203 r55230  
    328328require ABSPATH . WPINC . '/block-supports/utils.php';
    329329require ABSPATH . WPINC . '/block-supports/align.php';
     330require ABSPATH . WPINC . '/block-supports/anchor.php';
    330331require ABSPATH . WPINC . '/block-supports/border.php';
    331332require ABSPATH . WPINC . '/block-supports/colors.php';
Note: See TracChangeset for help on using the changeset viewer.