How to format response from ajax tag search?
-
I want to edit the output of search method of post tags.
I found that using function rest_prepare_post_tag is possible.
My code isfunction rest_prepare_post_tag( $response, $object ) { $response->data['post_tag'] = 'test value'; return $response; } add_filter( 'rest_prepare_post_tag', 'rest_prepare_post_tag', 10, 2 );
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘How to format response from ajax tag search?’ is closed to new replies.