Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
huubl committed Apr 11, 2024
1 parent e0873a0 commit 5d1ac12
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ function gutenberg_register_global_styles_endpoints() {
/**
* Adds the post classes to the REST API response.
*
* @param WP_REST_Response $data Response object.
* @param WP_REST_Response $response Response object.
* @param WP_Post $post Post object.
*
* @return WP_REST_Response Response object.
*/
function gutenberg_add_post_class_to_api_response( $data, $post ) {
$data->data['post_class'] = get_post_class( '', $post->ID );
function gutenberg_add_post_class_to_api_response( $response, $post ) {
$response->data['post_class'] = get_post_class( '', $post->ID );

return $data;
return $response;
}

/**
Expand Down

0 comments on commit 5d1ac12

Please sign in to comment.