- Timestamp:
- 12/22/2023 02:10:18 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php
r56714 r57222 388 388 * 389 389 * @since 4.7.0 390 * @since 6.5.0 Added a condition to check that parent id matches revision parent id. 390 391 * 391 392 * @param WP_REST_Request $request Full details about the request. … … 401 402 if ( is_wp_error( $revision ) ) { 402 403 return $revision; 404 } 405 406 if ( (int) $parent->ID !== (int) $revision->post_parent ) { 407 return new WP_Error( 408 'rest_revision_parent_id_mismatch', 409 /* translators: %d: A post id. */ 410 sprintf( __( 'The revision does not belong to the specified parent with id of "%d"' ), $parent->ID ), 411 array( 'status' => 404 ) 412 ); 403 413 } 404 414
Note: See TracChangeset
for help on using the changeset viewer.