Skip to content

Commit

Permalink
REST API: Add rest_prepare_global_styles_revision filter
Browse files Browse the repository at this point in the history
Adds filter to modify global styles revision data before sending to API response.
  • Loading branch information
patil-vipul committed Dec 30, 2024
1 parent f3ccc4a commit 0d990df
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,18 @@ public function prepare_item_for_response( $post, $request ) {
);
}

return $response;
/**
* Filters a global styles revision returned from the REST API.
*
* Allows modification of the global styles revision right before it is returned.
*
* @since 6.7.2
*
* @param WP_REST_Response $response The response object.
* @param WP_Post $post Post revision object.
* @param WP_REST_Request $request Request used to generate the response.
*/
return apply_filters( 'rest_prepare_global_styles_revision', $response, $post, $request );
}

/**
Expand Down

0 comments on commit 0d990df

Please sign in to comment.