WP_Hook::remove_all_filters( int|false $priority = false )

Removes all callbacks from the current filter.


Parameters

$priority int|false Optional
The priority number to remove.

Default: false


Top ↑

Source

File: wp-includes/class-wp-hook.php. View all references

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();
	}
}


Top ↑

Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.