Make WordPress Core


Ignore:
Timestamp:
10/08/2018 06:18:25 PM (6 years ago)
Author:
danielbachhuber
Message:

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.

Props TimothyBlynJacobs.
Fixes #44750.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/tests/phpunit/tests/rest-api/rest-attachments-controller.php

    r43530 r43681  
    12611261
    12621262        $this->assertArrayHasKey( 'self', $links );
     1263        $this->assertArrayHasKey( 'author', $links );
     1264
     1265        $this->assertCount( 1, $links['author'] );
     1266        $this->assertArrayHasKey( 'embeddable', $links['author'][0]['attributes'] );
     1267        $this->assertTrue( $links['author'][0]['attributes']['embeddable'] );
    12631268    }
    12641269
Note: See TracChangeset for help on using the changeset viewer.