WPDev.one
Core Function
View Source on Trac ↗

remove_action()

remove_action( mixed $hook_name, mixed $callback, mixed $priority = 10 )

Removes a callback function from an action hook.

Parameters 3 required

Name / Type Description
$hook_name
string

The action hook to which the function to be removed is hooked.

Required
mixed

(callable | string | array) $callback The name of the function which should be removed. This function can be called unconditionally to speculatively remove a callback that may or may not exist.

Required
int

$priority Optional. The exact priority used when adding the original action callback. Default 10.

Required

Return Value

(bool)
Whether the function is removed.

Function Information

Since Version
1.2.0
Source File
wp-includes/plugin.php
Advertisement