REST API: Improve the rest_*_collection_params filter docs and fix the terms filter.

The `rest_{$taxonomy}_collection_params` filter in 4.7 is incorrectly using
single quotes instead of double quotes, which means it is not working correctly
as a dynamic filter.  This fixes the quotes around the filter name, and also
updates the docblocks for the other 3 similar filters for better conformance to
the documentation standards.

Props shazahm1hotmailcom, JPry, jnylen0.
Fixes #39300.


git-svn-id: https://develop.svn.wordpress.org/trunk@39621 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
James Nylen
2016-12-20 01:36:47 +00:00
parent 8bbfc6ef28
commit 130adf0dc2
4 changed files with 30 additions and 30 deletions
@@ -971,10 +971,10 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
*
* @since 4.7.0
*
* @param $params JSON Schema-formatted collection parameters.
* @param WP_Taxonomy $taxonomy_obj Taxonomy object.
* @param array $query_params JSON Schema-formatted collection parameters.
* @param WP_Taxonomy $taxonomy Taxonomy object.
*/
return apply_filters( 'rest_{$this->taxonomy}_collection_params', $query_params, $taxonomy );
return apply_filters( "rest_{$this->taxonomy}_collection_params", $query_params, $taxonomy );
}
/**