Ticket #39466: 39466.3.diff
File 39466.3.diff, 3.3 KB (added by , 8 years ago) |
---|
-
src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
1767 1767 'description' => __( 'A named status for the object.' ), 1768 1768 'type' => 'string', 1769 1769 'enum' => array_keys( get_post_stati( array( 'internal' => false ) ) ), 1770 'context' => array( ' edit' ),1770 'context' => array( 'view', 'edit' ), 1771 1771 ), 1772 1772 'type' => array( 1773 1773 'description' => __( 'Type of Post for the object.' ), -
tests/phpunit/includes/testcase-rest-post-type-controller.php
134 134 $this->assertFalse( isset( $data['excerpt'] ) ); 135 135 } 136 136 137 $this->assertEquals( $post->post_status, $data['status'] ); 137 138 $this->assertEquals( $post->guid, $data['guid']['rendered'] ); 138 139 139 140 if ( 'edit' === $context ) { 140 141 $this->assertEquals( $post->guid, $data['guid']['raw'] ); 141 $this->assertEquals( $post->post_status, $data['status'] );142 142 143 143 if ( '0000-00-00 00:00:00' === $post->post_date_gmt ) { 144 144 $this->assertNull( $data['date_gmt'] ); -
tests/qunit/fixtures/wp-api-generated.js
3384 3384 "modified": "2017-02-14T00:00:00", 3385 3385 "modified_gmt": "2017-02-14T00:00:00", 3386 3386 "slug": "restapi-client-fixture-post", 3387 "status": "publish", 3387 3388 "type": "post", 3388 3389 "link": "http://example.org/?p=3", 3389 3390 "title": { … … 3474 3475 "modified": "2017-02-14T00:00:00", 3475 3476 "modified_gmt": "2017-02-14T00:00:00", 3476 3477 "slug": "restapi-client-fixture-post", 3478 "status": "publish", 3477 3479 "type": "post", 3478 3480 "link": "http://example.org/?p=3", 3479 3481 "title": { … … 3552 3554 "modified": "2017-02-14T00:00:00", 3553 3555 "modified_gmt": "2017-02-14T00:00:00", 3554 3556 "slug": "restapi-client-fixture-page", 3557 "status": "publish", 3555 3558 "type": "page", 3556 3559 "link": "http://example.org/?page_id=5", 3557 3560 "title": { … … 3626 3629 "modified": "2017-02-14T00:00:00", 3627 3630 "modified_gmt": "2017-02-14T00:00:00", 3628 3631 "slug": "restapi-client-fixture-page", 3632 "status": "publish", 3629 3633 "type": "page", 3630 3634 "link": "http://example.org/?page_id=5", 3631 3635 "title": { … … 3700 3704 "modified": "2017-02-14T00:00:00", 3701 3705 "modified_gmt": "2017-02-14T00:00:00", 3702 3706 "slug": "restapi-client-fixture-attachment", 3707 "status": "inherit", 3703 3708 "type": "attachment", 3704 3709 "link": "http://example.org/?attachment_id=7", 3705 3710 "title": { … … 3758 3763 "modified": "2017-02-14T00:00:00", 3759 3764 "modified_gmt": "2017-02-14T00:00:00", 3760 3765 "slug": "restapi-client-fixture-attachment", 3766 "status": "inherit", 3761 3767 "type": "attachment", 3762 3768 "link": "http://example.org/?attachment_id=7", 3763 3769 "title": {