1. 首页
  2. WordPress 函数手册

remove_all_actions()

remove_all_actions( string $tag, int|bool $priority = false )

从动作中移除所有钩子。
Remove all of the hooks from an action.

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


参数(Parameters)

参数 类型 必填 说明
$tag (string) 必需 从中移除挂钩的操作。
$priority (int | bool) 可选 要从中删除它们的优先级号。

返回(Return)

(true)完成后是真的。


源码(Source)

/**
 * Remove all of the hooks from an action.
 *
 * @since 2.7.0
 *
 * @param string   $tag      The action to remove hooks from.
 * @param int|bool $priority The priority number to remove them from. Default false.
 * @return true True when finished.
 */
function remove_all_actions($tag, $priority = false) {
	return remove_all_filters($tag, $priority);
}

//
// Functions for handling plugins.
//
更新版本 源码位置 使用 被使用
2.7.0 wp-includes/plugin.php:596 0 1 function

笔记(Notes)

例子:

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