class My_Theme_Json_Api {
public function __construct() {
add_filter('json_api_encode', array( $this, 'json_api_encode') );
}
public function json_api_encode( $data ) {
if (isset($_GET['exclude_fields'])) {
// ... parse and unset fields here...
}
return $data;
}
}
new My_Theme_Json_Api();
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘exclude subfields from request’ is closed to new replies.