Removes all callbacks from the current filter.
$priorityint|falseoptional
Default:false
public function remove_all_filters( $priority = false ) {
if ( ! $this->callbacks ) {
return;
}
if ( false === $priority ) {
$this->callbacks = array();
$this->priorities = array();
} elseif ( isset( $this->callbacks[ $priority ] ) ) {
unset( $this->callbacks[ $priority ] );
$this->priorities = array_keys( $this->callbacks );
}
if ( $this->nesting_level > 0 ) {
$this->resort_active_iterations();
}
}
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_hook/remove_all_filters