- Timestamp:
- 07/25/2022 07:18:41 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r53769 r53778 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_la st_revision_id_and_total_count( $post->ID );2029 $revision = wp_get_latest_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 $la st_revision = $revision['revision'];2038 $latest_revision = $revision['revision']; 2039 2039 2040 2040 $links['predecessor-version'] = array( 2041 'href' => rest_url( trailingslashit( $base ) . $post->ID . '/revisions/' . $la st_revision ),2042 'id' => $la st_revision,2041 'href' => rest_url( trailingslashit( $base ) . $post->ID . '/revisions/' . $latest_revision ), 2042 'id' => $latest_revision, 2043 2043 ); 2044 2044 }
Note: See TracChangeset
for help on using the changeset viewer.