- Timestamp:
- 03/02/2025 10:05:08 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php
r56819 r59899 306 306 } 307 307 308 if ( $request->is_method( 'HEAD' ) ) { 309 // Return early as this handler doesn't add any response headers. 310 return new WP_REST_Response(); 311 } 308 312 $response = array(); 309 313 $parent_id = $parent->ID; … … 449 453 $post = $item; 450 454 455 // Don't prepare the response body for HEAD requests. 456 if ( $request->is_method( 'HEAD' ) ) { 457 /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-autosaves-controller.php */ 458 return apply_filters( 'rest_prepare_autosave', new WP_REST_Response(), $post, $request ); 459 } 451 460 $response = $this->revisions_controller->prepare_item_for_response( $post, $request ); 452 461 $fields = $this->get_fields_for_response( $request );
Note: See TracChangeset
for help on using the changeset viewer.