Make WordPress Core


Ignore:
Timestamp:
06/22/2020 12:20:20 PM (6 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/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php

    r48106 r48118  
    426426
    427427        /**
    428          * Check success response for getting item with layout attribute provided.
    429          *
    430          * @ticket 45098
    431          */
    432         public function test_get_item_with_layout() {
    433                 wp_set_current_user( self::$user_id );
    434 
    435                 $attributes = array(
    436                         'layout' => 'foo',
    437                 );
    438 
    439                 $request = new WP_REST_Request( 'GET', self::$rest_api_route . self::$block_name );
    440                 $request->set_param( 'context', 'edit' );
    441                 $request->set_param( 'attributes', $attributes );
    442                 $response = rest_get_server()->dispatch( $request );
    443                 $this->assertEquals( 200, $response->get_status() );
    444         }
    445 
    446         /**
    447428         * Test getting item with post context.
    448429         *
Note: See TracChangeset for help on using the changeset viewer.