mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 19:24:34 +00:00
REST API: Persist attributes for attachment links
In [43437], the link definition implementation caused attachment links to be unexpectedly nested under an attributes key. This changeset restores the prior behavior. Merges [43681] to trunk. Props TimothyBlynJacobs, danielbachhuber. Fixes #44750. git-svn-id: https://develop.svn.wordpress.org/trunk@43973 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1467,6 +1467,11 @@ class WP_Test_REST_Attachments_Controller extends WP_Test_REST_Post_Type_Control
|
||||
$links = $response->get_links();
|
||||
|
||||
$this->assertArrayHasKey( 'self', $links );
|
||||
$this->assertArrayHasKey( 'author', $links );
|
||||
|
||||
$this->assertCount( 1, $links['author'] );
|
||||
$this->assertArrayHasKey( 'embeddable', $links['author'][0]['attributes'] );
|
||||
$this->assertTrue( $links['author'][0]['attributes']['embeddable'] );
|
||||
}
|
||||
|
||||
public function test_publish_action_ldo_not_registered() {
|
||||
|
||||
Reference in New Issue
Block a user