getarchives_where
apply_filters( ‘getarchives_where’, string $sql_where , array $parsed_args )
过滤器::过滤用于检索归档文件的SQL WHERE子句。
Filter Hook: Filters the SQL WHERE clause for retrieving archives.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$sql_where | (string) | 包含WHERE子句的SQL查询的一部分。 |
$parsed_args | (array) | 默认参数的数组。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.2.0 | wp-includes/general-template.php:1866 | 1 | 0 |
笔记(Notes)
修改当前查询并将自己的类别id添加到筛选器的示例:
getarchives_where 为WP2原创文章,链接:https://www.wp2.cn/hook/getarchives_where/