我添加了一个Advanced Custom Field 并尝试使用REST API通过/wp-json/wp/v2/categories
.
我已经使用rest_prepare_post
滤器
function prepare_restful_posts($data, $post, $request) {
// Do stuff to $data
}
add_filter(\'rest_prepare_post\', \'prepare_restful_posts\', 10, 3);
。。。但我似乎找不到任何关于如何定制JSON类别的有用信息。有人能解释一下吗?