Closed luisherranz closed 5 years ago
First, we need to use the query excludeFields insted of the database settings:
excludeFields
$filters = explode(',', $request->get_param('excludeFields')); // instead of $settings = get_option('frontity_settings'); $filters = isset($settings['api_filters']) ? $settings['api_filters'] : array();
in class-rest-api-filter-fields.php.
But we also need that query to be present in the _links urls so they also filter out the excluded fields.
_links
That requires more investigation, but this is a good starting point: https://v2.wp-api.org/extending/linking/
The previous plugin author was using rest_get_server to retrieve the data with both _links and _embed included. https://developer.wordpress.org/reference/classes/wp_rest_server/
rest_get_server
_embed
:tada: This issue has been resolved in version 1.12.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
First, we need to use the query
excludeFields
insted of the database settings:in class-rest-api-filter-fields.php.
But we also need that query to be present in the
_links
urls so they also filter out the excluded fields.That requires more investigation, but this is a good starting point: https://v2.wp-api.org/extending/linking/
The previous plugin author was using
rest_get_server
to retrieve the data with both_links
and_embed
included. https://developer.wordpress.org/reference/classes/wp_rest_server/