钩子文档

comment_feed_join

💡 云策文档标注

概述

comment_feed_join 是一个 WordPress 过滤器,用于在发送评论 feed 查询前修改其 JOIN 子句。它允许开发者自定义查询的 JOIN 部分,以扩展或调整数据检索逻辑。

关键要点

  • 过滤器名称:comment_feed_join
  • 作用:过滤评论 feed 查询的 JOIN 子句
  • 参数:$cjoin(JOIN 子句字符串)和 $query(WP_Query 实例,引用传递)
  • 调用方式:apply_filters_ref_array()
  • 引入版本:WordPress 2.2.0

代码示例

$cjoin = apply_filters_ref_array( 'comment_feed_join', array( $cjoin, &$this ) );

📄 原文内容

Filters the JOIN clause of the comments feed query before sending.

Parameters

$cjoinstring
The JOIN clause of the query.
$queryWP_Query
The WP_Query instance (passed by reference).

Source

$cjoin = apply_filters_ref_array( 'comment_feed_join', array( $cjoin, &$this ) );

Changelog

Version Description
2.2.0 Introduced.