钩子文档

get_pung

💡 云策文档标注

概述

get_pung 是一个 WordPress 过滤器,用于修改指定文章的已 ping URL 列表。开发者可以通过此 Hook 自定义或处理已 ping 的 URL 数组。

关键要点

  • 过滤器名称:get_pung
  • 参数:$pung(数组类型),包含指定文章的已 ping URL 列表
  • 返回值:必须返回一个 URL 数组,否则可能导致代码中断或插件错误
  • 相关函数:get_pung(),用于检索文章的已 ping URL
  • 引入版本:WordPress 2.0.0

注意事项

过滤函数必须返回一个 URL 数组,否则使用 $pung 数组的代码可能出错,并影响其他过滤此数组的插件。


📄 原文内容

Filters the list of already-pinged URLs for the given post.

Parameters

$pungstring[]
Array of URLs already pinged for the given post.

More Information

Note that the filter function must return an array of URLs after it is finished processing, or any code using the $pung array will break, and other plugins also filtering the $pung array may generate errors.

Source

return apply_filters( 'get_pung', $pung );

Changelog

Version Description
2.0.0 Introduced.