Removes all of the callback functions from an action hook.
$hook_namestringrequired
$priorityint|falseoptional
Default:false
Prior to Version 4.7
remove_all_actions('wp_footer') will cause an infinite loop condition because the while loop suddenly doesn’t have a next value. In WordPress 3.8.1 you’ll get a warning message like:Warning: next() expects parameter 1 to be array, null given in wp-includes/plugin.php on line 431
Since Version 4.7, these limitations have been addressed. Please refer to https://wordpress.org/support/wordpress-version/version-4-7/#for-developers
function remove_all_actions( $hook_name, $priority = false ) {
return remove_all_filters( $hook_name, $priority );
}
| Version | Description |
|---|---|
| 2.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/remove_all_actions