WP_Hook::has_filters()
Checks if any callbacks have been registered for this hook.
Метод класса: WP_Hook{}
Хуков нет.
Возвращает
true|false
. True if callbacks have been registered for the current hook, otherwise false.
Использование
$WP_Hook = new WP_Hook(); $WP_Hook->has_filters();
Список изменений
С версии 4.7.0 | Введена. |
Код WP_Hook::has_filters() WP Hook::has filters WP 6.7.1
public function has_filters() { foreach ( $this->callbacks as $callbacks ) { if ( $callbacks ) { return true; } } return false; }