Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_json_encode_options

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
249
250           /**
251            * Filters the JSON encoding options used to send the REST API response.
252            *
253            * @since 6.1.0
254            *
255            * @param int $options             JSON encoding options {@see json_encode()}.
256            * @param WP_REST_Request $request Current request object.
257            */
258           return apply_filters( 'rest_json_encode_options', $options, $request );
259      }
260
261      /**
262       * Handles serving a REST API request.
263       *
264       * Matches the current server URI to a route and runs the first matching
265       * callback then outputs a JSON representation of the returned value.
266       *
267       * @since 4.4.0