Uses
| Uses | Description |
|---|---|
| wp-includes/class-wp-hook.php: WP_Hook::resort_active_iterations() | Handles resetting callback priority keys mid-iteration. |
Removes all callbacks from the current filter.
(int|bool) (Optional) The priority number to remove.
Default value: false
File: wp-includes/class-wp-hook.php
public function remove_all_filters( $priority = false ) {
if ( ! $this->callbacks ) {
return;
}
if ( false === $priority ) {
$this->callbacks = array();
} elseif ( isset( $this->callbacks[ $priority ] ) ) {
unset( $this->callbacks[ $priority ] );
}
if ( $this->nesting_level > 0 ) {
$this->resort_active_iterations();
}
} | Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_hook/remove_all_filters