wphooks.info - rest_prepare_taxonomy

rest_prepare_taxonomy

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php:
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
		 * Filters a taxonomy returned from the REST API.
		 *
		 * Allows modification of the taxonomy data right before it is returned.
		 *
		 * @since 4.7.0
		 *
		 * @param WP_REST_Response $response The response object.
		 * @param object           $item     The original taxonomy object.
		 * @param WP_REST_Request  $request  Request used to generate the response.
		 */
		return apply_filters( 'rest_prepare_taxonomy', $response, $taxonomy, $request );
	}

	/**
	 * Retrieves the taxonomy's schema, conforming to JSON Schema.
	 *
	 * @since 4.7.0
	 *
	 * @return array Item schema data.
	 */