pings_open
云策文档标注
概述
pings_open 是一个 WordPress 过滤器,用于控制当前文章是否允许 pingback 和 trackback。它允许开发者动态修改文章对 pings 的开放状态。
关键要点
- 过滤器名称:pings_open
- 参数:$pings_open(布尔值,表示当前文章是否开放 pings)和 $post_id(整数,文章 ID)
- 用途:在 pings_open() 函数中被调用,用于确定文章是否接受 pings
- 引入版本:WordPress 2.5.0
原文内容
Filters whether the current post is open for pings.
Parameters
$pings_openbool-
Whether the current post is open for pings.
$post_idint-
The post ID.
Source
return apply_filters( 'pings_open', $pings_open, $post_id );
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |