comment_feed_where
云策文档标注
概述
comment_feed_where 是一个 WordPress 过滤器,用于在发送评论 feed 查询之前修改其 WHERE 子句。它允许开发者自定义查询条件,以过滤评论 feed 的内容。
关键要点
- 这是一个过滤器钩子,作用于评论 feed 查询的 WHERE 子句。
- 接收两个参数:$cwhere(WHERE 子句字符串)和 $query(WP_Query 实例,通过引用传递)。
- 在 WP_Query::get_posts() 方法中使用,自 WordPress 2.2.0 版本引入。
原文内容
Filters the WHERE clause of the comments feed query before sending.
Parameters
Source
$cwhere = apply_filters_ref_array( 'comment_feed_where', array( $cwhere, &$this ) );
Changelog
| Version | Description |
|---|---|
| 2.2.0 | Introduced. |