WP_Hook::has_filters()
Checks if any callbacks have been registered for this hook.
Method of the class: WP_Hook{}
No Hooks.
Return
true|false
. True if callbacks have been registered for the current hook, otherwise false.
Usage
$WP_Hook = new WP_Hook(); $WP_Hook->has_filters();
Changelog
Since 4.7.0 | Introduced. |
WP_Hook::has_filters() WP Hook::has filters code WP 6.7.2
public function has_filters() { foreach ( $this->callbacks as $callbacks ) { if ( $callbacks ) { return true; } } return false; }