Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: rest_{$this->taxonomy}_collection_params

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1089            * This filter registers the collection parameter, but does not map the
1090            * collection parameter to an internal WP_Term_Query parameter.  Use the
1091            * `rest_{$this->taxonomy}_query` filter to set WP_Term_Query parameters.
1092            *
1093            * @since 4.7.0
1094            *
1095            * @param array       $query_params JSON Schema-formatted collection parameters.
1096            * @param WP_Taxonomy $taxonomy     Taxonomy object.
1097            */
1098           return apply_filters( "rest_{$this->taxonomy}_collection_params", $query_params, $taxonomy );
1099      }
1100
1101      /**
1102       * Checks that the taxonomy is valid.
1103       *
1104       * @since 4.7.0
1105       *
1106       * @param string $taxonomy Taxonomy to check.
1107       * @return bool Whether the taxonomy is allowed for REST management.