Used By
Used By | Description |
---|---|
wp-includes/class-wp-hook.php: WP_Hook::has_filter() | Checks if a specific action has been registered for this hook. |
Checks if any callbacks have been registered for this hook.
(bool) True if callbacks have been registered for the current hook, otherwise false.
File: wp-includes/class-wp-hook.php
public function has_filters() { foreach ( $this->callbacks as $callbacks ) { if ( $callbacks ) { return true; } } return false; }
Version | Description |
---|---|
4.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_hook/has_filters