wpseek.com
WordPress开发者和主题制作者的搜索引擎



query_vars › WordPress过滤钩子

Since1.5.0
已弃用n/a
apply_filters( 'query_vars', $this->public_query_vars )
参数:
  • (string[]) $public_query_vars The array of allowed query variable names.
    Required: Yes
定义在:
文档:

Filters the query variables allowed before processing.

Allows (publicly allowed) query vars to be added, removed, or changed prior to executing the query. Needed to allow custom rewrite rules using your own arguments to work, or any other custom query variables you want to be publicly available.





源码

$this->public_query_vars = apply_filters( 'query_vars', $this->public_query_vars );