WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 312 | /** |
| 313 | * Filters the REST API response for a widget type. |
| 314 | * |
| 315 | * @since 5.8.0 |
| 316 | * |
| 317 | * @param WP_REST_Response $response The response object. |
| 318 | * @param array $widget_type The array of widget data. |
| 319 | * @param WP_REST_Request $request The request object. |
| 320 | */ |
| 321 | return apply_filters( 'rest_prepare_widget_type', $response, $widget_type, $request ); |
| 322 | } |
| 323 | |
| 324 | /** |
| 325 | * Prepares links for the widget type. |
| 326 | * |
| 327 | * @since 5.8.0 |
| 328 | * |
| 329 | * @param array $widget_type Widget type data. |
| 330 | * @return array Links for the given widget type. |