Index: /branches/4.9/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php =================================================================== --- /branches/4.9/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php (revision 43441) +++ /branches/4.9/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php (revision 43442) @@ -1668,7 +1668,21 @@ if ( in_array( $post->post_type, array( 'post', 'page' ), true ) || post_type_supports( $post->post_type, 'revisions' ) ) { + $revisions = wp_get_post_revisions( $post->ID, array( 'fields' => 'ids' ) ); + $revisions_count = count( $revisions ); + $links['version-history'] = array( - 'href' => rest_url( trailingslashit( $base ) . $post->ID . '/revisions' ), - ); + 'href' => rest_url( trailingslashit( $base ) . $post->ID . '/revisions' ), + 'count' => $revisions_count, + ); + + if ( $revisions_count > 0 ) { + $last_revision = array_shift( $revisions ); + + $links['predecessor-version'] = array( + 'href' => rest_url( trailingslashit( $base ) . $post->ID . '/revisions/' . $last_revision ), + 'id' => $last_revision, + ); + } + } Index: /branches/4.9/tests/phpunit/tests/rest-api/rest-posts-controller.php =================================================================== --- /branches/4.9/tests/phpunit/tests/rest-api/rest-posts-controller.php (revision 43441) +++ /branches/4.9/tests/phpunit/tests/rest-api/rest-posts-controller.php (revision 43442) @@ -1091,4 +1091,6 @@ $this->assertEquals( rest_url( '/wp/v2/posts/' . self::$post_id . '/revisions' ), $links['version-history'][0]['href'] ); + $this->assertEquals( 0, $links['version-history'][0]['attributes']['count'] ); + $this->assertFalse( isset( $links['predecessor-version'] ) ); $attachments_url = rest_url( '/wp/v2/media' ); @@ -1116,4 +1118,26 @@ $category_url = add_query_arg( 'post', self::$post_id, rest_url( '/wp/v2/categories' ) ); $this->assertEquals( $category_url, $cat_link['href'] ); + } + + public function test_get_item_links_predecessor() { + wp_update_post( + array( + 'post_content' => 'This content is marvelous.', + 'ID' => self::$post_id, + ) + ); + $revisions = wp_get_post_revisions( self::$post_id ); + $revision_1 = array_pop( $revisions ); + + $request = new WP_REST_Request( 'GET', sprintf( '/wp/v2/posts/%d', self::$post_id ) ); + $response = rest_get_server()->dispatch( $request ); + + $links = $response->get_links(); + + $this->assertEquals( rest_url( '/wp/v2/posts/' . self::$post_id . '/revisions' ), $links['version-history'][0]['href'] ); + $this->assertEquals( 1, $links['version-history'][0]['attributes']['count'] ); + + $this->assertEquals( rest_url( '/wp/v2/posts/' . self::$post_id . '/revisions/' . $revision_1->ID ), $links['predecessor-version'][0]['href'] ); + $this->assertEquals( $revision_1->ID, $links['predecessor-version'][0]['attributes']['id'] ); } Index: /branches/4.9/tests/phpunit/tests/rest-api/rest-schema-setup.php =================================================================== --- /branches/4.9/tests/phpunit/tests/rest-api/rest-schema-setup.php (revision 43441) +++ /branches/4.9/tests/phpunit/tests/rest-api/rest-schema-setup.php (revision 43442) @@ -426,64 +426,68 @@ 'oembeds.author_url' => 'http://example.org', 'oembeds.html' => '
......', - 'PostsCollection.0.id' => 3, - 'PostsCollection.0.guid.rendered' => 'http://example.org/?p=3', - 'PostsCollection.0.link' => 'http://example.org/?p=3', - 'PostsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3', + 'PostsCollection.0.id' => 4, + 'PostsCollection.0.guid.rendered' => 'http://example.org/?p=4', + 'PostsCollection.0.link' => 'http://example.org/?p=4', + 'PostsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 'PostsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts', 'PostsCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/post', - 'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3', - 'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3/revisions', - 'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3', - 'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3', - 'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3', - 'PostModel.id' => 3, - 'PostModel.guid.rendered' => 'http://example.org/?p=3', - 'PostModel.link' => 'http://example.org/?p=3', + 'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4', + 'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions', + 'PostsCollection.0._links.predecessor-version.0.id' => 5, + 'PostsCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/5', + 'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4', + 'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4', + 'PostsCollection.0._links.wp:term.1.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4', + 'PostModel.id' => 4, + 'PostModel.guid.rendered' => 'http://example.org/?p=4', + 'PostModel.link' => 'http://example.org/?p=4', 'postRevisions.0.author' => 2, - 'postRevisions.0.id' => 4, - 'postRevisions.0.parent' => 3, - 'postRevisions.0.slug' => '3-revision-v1', - 'postRevisions.0.guid.rendered' => 'http://example.org/?p=4', - 'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3', + 'postRevisions.0.id' => 5, + 'postRevisions.0.parent' => 4, + 'postRevisions.0.slug' => '4-revision-v1', + 'postRevisions.0.guid.rendered' => 'http://example.org/?p=5', + 'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 'revision.author' => 2, - 'revision.id' => 4, - 'revision.parent' => 3, - 'revision.slug' => '3-revision-v1', - 'revision.guid.rendered' => 'http://example.org/?p=4', - 'PagesCollection.0.id' => 5, - 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=5', - 'PagesCollection.0.link' => 'http://example.org/?page_id=5', - 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5', + 'revision.id' => 5, + 'revision.parent' => 4, + 'revision.slug' => '4-revision-v1', + 'revision.guid.rendered' => 'http://example.org/?p=5', + 'PagesCollection.0.id' => 6, + 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=6', + 'PagesCollection.0.link' => 'http://example.org/?page_id=6', + 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6', 'PagesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 'PagesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/page', - 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5', - 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5/revisions', - 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5', - 'PageModel.id' => 5, - 'PageModel.guid.rendered' => 'http://example.org/?page_id=5', - 'PageModel.link' => 'http://example.org/?page_id=5', + 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6', + 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6/revisions', + 'PagesCollection.0._links.predecessor-version.0.id' => 7, + 'PagesCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6/revisions/7', + 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6', + 'PageModel.id' => 6, + 'PageModel.guid.rendered' => 'http://example.org/?page_id=6', + 'PageModel.link' => 'http://example.org/?page_id=6', 'pageRevisions.0.author' => 2, - 'pageRevisions.0.id' => 6, - 'pageRevisions.0.parent' => 5, - 'pageRevisions.0.slug' => '5-revision-v1', - 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=6', - 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/5', + 'pageRevisions.0.id' => 7, + 'pageRevisions.0.parent' => 6, + 'pageRevisions.0.slug' => '6-revision-v1', + 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=7', + 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6', 'pageRevision.author' => 2, - 'pageRevision.id' => 6, - 'pageRevision.parent' => 5, - 'pageRevision.slug' => '5-revision-v1', - 'pageRevision.guid.rendered' => 'http://example.org/?p=6', - 'MediaCollection.0.id' => 7, - 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=7', - 'MediaCollection.0.link' => 'http://example.org/?attachment_id=7', + 'pageRevision.id' => 7, + 'pageRevision.parent' => 6, + 'pageRevision.slug' => '6-revision-v1', + 'pageRevision.guid.rendered' => 'http://example.org/?p=7', + 'MediaCollection.0.id' => 8, + 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=8', + 'MediaCollection.0.link' => 'http://example.org/?attachment_id=8', 'MediaCollection.0.description.rendered' => '', 'MediaCollection.0.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', - 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/7', + 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/8', 'MediaCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media', 'MediaCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/attachment', - 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7', - 'MediaModel.id' => 7, - 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=7', - 'MediaModel.link' => 'http://example.org/?attachment_id=7', + 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8', + 'MediaModel.id' => 8, + 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=8', + 'MediaModel.link' => 'http://example.org/?attachment_id=8', 'MediaModel.description.rendered' => '', 'MediaModel.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', @@ -533,12 +537,12 @@ 'me.link' => 'http://example.org/?author=2', 'CommentsCollection.0.id' => 2, - 'CommentsCollection.0.post' => 3, - 'CommentsCollection.0.link' => 'http://example.org/?p=3#comment-2', + 'CommentsCollection.0.post' => 4, + 'CommentsCollection.0.link' => 'http://example.org/?p=4#comment-2', 'CommentsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments/2', 'CommentsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/comments', - 'CommentsCollection.0._links.up.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/3', + 'CommentsCollection.0._links.up.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 'CommentModel.id' => 2, - 'CommentModel.post' => 3, - 'CommentModel.link' => 'http://example.org/?p=3#comment-2', + 'CommentModel.post' => 4, + 'CommentModel.link' => 'http://example.org/?p=4#comment-2', 'settings.title' => 'Test Blog', 'settings.url' => 'http://example.org', Index: /branches/4.9/tests/qunit/fixtures/wp-api-generated.js =================================================================== --- /branches/4.9/tests/qunit/fixtures/wp-api-generated.js (revision 43441) +++ /branches/4.9/tests/qunit/fixtures/wp-api-generated.js (revision 43442) @@ -3535,9 +3535,9 @@ mockedApiResponse.PostsCollection = [ { - "id": 3, + "id": 4, "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", "guid": { - "rendered": "http://example.org/?p=3" + "rendered": "http://example.org/?p=4" }, "modified": "2017-02-14T00:00:00", @@ -3546,5 +3546,5 @@ "status": "publish", "type": "post", - "link": "http://example.org/?p=3", + "link": "http://example.org/?p=4", "title": { "rendered": "REST API Client Fixture: Post" @@ -3575,5 +3575,5 @@ "self": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3" + "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" } ], @@ -3591,15 +3591,22 @@ { "embeddable": true, - "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3" + "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4" } ], "version-history": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3/revisions" + "count": 1, + "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions" + } + ], + "predecessor-version": [ + { + "id": 5, + "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/5" } ], "wp:attachment": [ { - "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3" + "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4" } ], @@ -3608,10 +3615,10 @@ "taxonomy": "category", "embeddable": true, - "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3" + "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4" }, { "taxonomy": "post_tag", "embeddable": true, - "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3" + "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4" } ], @@ -3628,9 +3635,9 @@ mockedApiResponse.PostModel = { - "id": 3, + "id": 4, "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", "guid": { - "rendered": "http://example.org/?p=3" + "rendered": "http://example.org/?p=4" }, "modified": "2017-02-14T00:00:00", @@ -3639,5 +3646,5 @@ "status": "publish", "type": "post", - "link": "http://example.org/?p=3", + "link": "http://example.org/?p=4", "title": { "rendered": "REST API Client Fixture: Post" @@ -3672,11 +3679,11 @@ "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", - "id": 4, + "id": 5, "modified": "2017-02-14T00:00:00", "modified_gmt": "2017-02-14T00:00:00", - "parent": 3, - "slug": "3-revision-v1", + "parent": 4, + "slug": "4-revision-v1", "guid": { - "rendered": "http://example.org/?p=4" + "rendered": "http://example.org/?p=5" }, "title": { @@ -3692,5 +3699,5 @@ "parent": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3" + "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" } ] @@ -3703,11 +3710,11 @@ "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", - "id": 4, + "id": 5, "modified": "2017-02-14T00:00:00", "modified_gmt": "2017-02-14T00:00:00", - "parent": 3, - "slug": "3-revision-v1", + "parent": 4, + "slug": "4-revision-v1", "guid": { - "rendered": "http://example.org/?p=4" + "rendered": "http://example.org/?p=5" }, "title": { @@ -3724,9 +3731,9 @@ mockedApiResponse.PagesCollection = [ { - "id": 5, + "id": 6, "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", "guid": { - "rendered": "http://example.org/?page_id=5" + "rendered": "http://example.org/?page_id=6" }, "modified": "2017-02-14T00:00:00", @@ -3735,5 +3742,5 @@ "status": "publish", "type": "page", - "link": "http://example.org/?page_id=5", + "link": "http://example.org/?page_id=6", "title": { "rendered": "REST API Client Fixture: Page" @@ -3760,5 +3767,5 @@ "self": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/pages/5" + "href": "http://example.org/index.php?rest_route=/wp/v2/pages/6" } ], @@ -3776,15 +3783,22 @@ { "embeddable": true, - "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5" + "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6" } ], "version-history": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/pages/5/revisions" + "count": 1, + "href": "http://example.org/index.php?rest_route=/wp/v2/pages/6/revisions" + } + ], + "predecessor-version": [ + { + "id": 7, + "href": "http://example.org/index.php?rest_route=/wp/v2/pages/6/revisions/7" } ], "wp:attachment": [ { - "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5" + "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6" } ], @@ -3801,9 +3815,9 @@ mockedApiResponse.PageModel = { - "id": 5, + "id": 6, "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", "guid": { - "rendered": "http://example.org/?page_id=5" + "rendered": "http://example.org/?page_id=6" }, "modified": "2017-02-14T00:00:00", @@ -3812,5 +3826,5 @@ "status": "publish", "type": "page", - "link": "http://example.org/?page_id=5", + "link": "http://example.org/?page_id=6", "title": { "rendered": "REST API Client Fixture: Page" @@ -3841,11 +3855,11 @@ "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", - "id": 6, + "id": 7, "modified": "2017-02-14T00:00:00", "modified_gmt": "2017-02-14T00:00:00", - "parent": 5, - "slug": "5-revision-v1", + "parent": 6, + "slug": "6-revision-v1", "guid": { - "rendered": "http://example.org/?p=6" + "rendered": "http://example.org/?p=7" }, "title": { @@ -3861,5 +3875,5 @@ "parent": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/pages/5" + "href": "http://example.org/index.php?rest_route=/wp/v2/pages/6" } ] @@ -3872,11 +3886,11 @@ "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", - "id": 6, + "id": 7, "modified": "2017-02-14T00:00:00", "modified_gmt": "2017-02-14T00:00:00", - "parent": 5, - "slug": "5-revision-v1", + "parent": 6, + "slug": "6-revision-v1", "guid": { - "rendered": "http://example.org/?p=6" + "rendered": "http://example.org/?p=7" }, "title": { @@ -3893,9 +3907,9 @@ mockedApiResponse.MediaCollection = [ { - "id": 7, + "id": 8, "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", "guid": { - "rendered": "http://example.org/?attachment_id=7" + "rendered": "http://example.org/?attachment_id=8" }, "modified": "2017-02-14T00:00:00", @@ -3904,5 +3918,5 @@ "status": "inherit", "type": "attachment", - "link": "http://example.org/?attachment_id=7", + "link": "http://example.org/?attachment_id=8", "title": { "rendered": "REST API Client Fixture: Attachment" @@ -3930,9 +3944,11 @@ "self": [ { - "href": "http://example.org/index.php?rest_route=/wp/v2/media/7" + "attributes": [], + "href": "http://example.org/index.php?rest_route=/wp/v2/media/8" } ], "collection": [ { + "attributes": [], "href": "http://example.org/index.php?rest_route=/wp/v2/media" } @@ -3940,4 +3956,5 @@ "about": [ { + "attributes": [], "href": "http://example.org/index.php?rest_route=/wp/v2/types/attachment" } @@ -3945,6 +3962,8 @@ "replies": [ { - "embeddable": true, - "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7" + "attributes": { + "embeddable": true + }, + "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8" } ] @@ -3954,9 +3973,9 @@ mockedApiResponse.MediaModel = { - "id": 7, + "id": 8, "date": "2017-02-14T00:00:00", "date_gmt": "2017-02-14T00:00:00", "guid": { - "rendered": "http://example.org/?attachment_id=7" + "rendered": "http://example.org/?attachment_id=8" }, "modified": "2017-02-14T00:00:00", @@ -3965,5 +3984,5 @@ "status": "inherit", "type": "attachment", - "link": "http://example.org/?attachment_id=7", + "link": "http://example.org/?attachment_id=8", "title": { "rendered": "REST API Client Fixture: Attachment" @@ -4461,5 +4480,5 @@ { "id": 2, - "post": 3, + "post": 4, "parent": 0, "author": 0, @@ -4471,5 +4490,5 @@ "rendered": "
This is a comment
\n" }, - "link": "http://example.org/?p=3#comment-2", + "link": "http://example.org/?p=4#comment-2", "status": "approved", "type": "comment", @@ -4497,5 +4516,5 @@ "embeddable": true, "post_type": "post", - "href": "http://example.org/index.php?rest_route=/wp/v2/posts/3" + "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" } ] @@ -4506,5 +4525,5 @@ mockedApiResponse.CommentModel = { "id": 2, - "post": 3, + "post": 4, "parent": 0, "author": 0, @@ -4516,5 +4535,5 @@ "rendered": "This is a comment
\n" }, - "link": "http://example.org/?p=3#comment-2", + "link": "http://example.org/?p=4#comment-2", "status": "approved", "type": "comment",