Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_prepare_theme

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
314           /**
315            * Filters theme data returned from the REST API.
316            *
317            * @since 5.0.0
318            *
319            * @param WP_REST_Response $response The response object.
320            * @param WP_Theme         $theme    Theme object used to create response.
321            * @param WP_REST_Request  $request  Request object.
322            */
323           return apply_filters( 'rest_prepare_theme', $response, $theme, $request );
324      }
325
326      /**
327       * Prepares links for the request.
328       *
329       * @since 5.7.0
330       *
331       * @param WP_Theme $theme Theme data.
332       * @return array Links for the given block type.