Make WordPress Core


Ignore:
Timestamp:
06/22/2020 12:20:20 PM (4 years ago)
Author:
gziolo
Message:

Editor: Remove default "layout" block attribute from WP_Block_Type::get_attributes

The merging behavior which assigns the layout attribute in WP_Block_Type gets removed.

Props aduth, TimothyBlynJacobs.
Fixes #50257.

File:
1 edited

Legend:

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

    r48117 r48118  
    277277    public function get_attributes() {
    278278        return is_array( $this->attributes ) ?
    279             array_merge(
    280                 $this->attributes,
    281                 array(
    282                     'layout' => array(
    283                         'type' => 'string',
    284                     ),
    285                 )
    286             ) :
    287             array(
    288                 'layout' => array(
    289                     'type' => 'string',
    290                 ),
    291             );
     279            $this->attributes :
     280            array();
    292281    }
    293282}
Note: See TracChangeset for help on using the changeset viewer.