- Timestamp:
- 03/11/2025 02:17:41 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r59899 r59970 314 314 } 315 315 316 $response = $is_head_request ? new WP_REST_Response( ) : rest_ensure_response( $comments );316 $response = $is_head_request ? new WP_REST_Response( array() ) : rest_ensure_response( $comments ); 317 317 $response->header( 'X-WP-Total', $total_comments ); 318 318 $response->header( 'X-WP-TotalPages', $max_pages ); … … 1055 1055 if ( $request->is_method( 'HEAD' ) ) { 1056 1056 /** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */ 1057 return apply_filters( 'rest_prepare_comment', new WP_REST_Response( ), $comment, $request );1057 return apply_filters( 'rest_prepare_comment', new WP_REST_Response( array() ), $comment, $request ); 1058 1058 } 1059 1059
Note: See TracChangeset
for help on using the changeset viewer.