- Timestamp:
- 07/23/2022 03:40:10 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r53760 r53769 2027 2027 2028 2028 if ( in_array( $post->post_type, array( 'post', 'page' ), true ) || post_type_supports( $post->post_type, 'revisions' ) ) { 2029 $revision = wp_get_last est_revision_id_and_total_count( $post->ID );2029 $revision = wp_get_last_revision_id_and_total_count( $post->ID ); 2030 2030 $revisions_count = ! is_wp_error( $revision ) ? $revision['count'] : 0; 2031 2031 … … 2036 2036 2037 2037 if ( $revisions_count > 0 ) { 2038 $last_revision = $revision['revision']; 2038 $last_revision = $revision['revision']; 2039 2039 2040 $links['predecessor-version'] = array( 2040 2041 'href' => rest_url( trailingslashit( $base ) . $post->ID . '/revisions/' . $last_revision ),
Note: See TracChangeset
for help on using the changeset viewer.