1. 首页
  2. WordPress 函数手册

doing_filter()

doing_filter( null|string $filter = null )

检索当前正在处理的筛选器的名称。
Retrieve the name of a filter currently being processed.

目录锚点:#说明#参数#返回#源码#笔记


说明(Description)

另见函数 current_filter()


参数(Parameters)

参数 类型 必填 说明
$filter (null | string) 可选 要检查的筛选器。默认为空,检查当前是否正在运行任何筛选器。

返回(Return)

(bool)筛选器当前是否在堆栈中。


源码(Source)


更新版本 源码位置 使用 被使用
3.9.0 wp-includes/plugin.php:360 2 0

笔记(Notes)

要检查是否应用了任何筛选器,可以编写如下内容:
(来自法典)

doing_filter() 为WP2原创文章,链接:https://www.wp2.cn/functions/doing_filter/