WordPress at Your Fingertips

remove_action() WP 1.0

Removes a function from a specified action hook.

This can be used to remove default functions attached to a specific action hook and possibly replace them with a substitute.

To remove a hook, the $callback and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.

1 time — 0.00001 sec (speed of light) | 50000 times — 0.06 sec (speed of light)

No Hooks.


true|false. Whether the function is removed.


remove_action( $hook_name, $callback, $priority );
$hook_name(string) (required)
The action hook to which the function to be removed is hooked.
$callback(callable) (required)
The name of the function which should be removed.
The exact priority used when adding the original action callback.
Default: 10


Since 1.2.0 Introduced.

Code of remove_action() WP 5.8

function remove_action( $hook_name, $callback, $priority = 10 ) {
	return remove_filter( $hook_name, $callback, $priority );

From tag: Actions (hooks)

More from category: Hooks (actions, filters)

No comments
    Log In