Changeset 48118
- Timestamp:
- 06/22/2020 12:20:20 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-type.php
r48117 r48118 277 277 public function get_attributes() { 278 278 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(); 292 281 } 293 282 } -
trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php
r48106 r48118 426 426 427 427 /** 428 * Check success response for getting item with layout attribute provided.429 *430 * @ticket 45098431 */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 /**447 428 * Test getting item with post context. 448 429 *
Note: See TracChangeset
for help on using the changeset viewer.