mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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:
@@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user