WP_Hook::has_filters

Advertisement

Summery Summery

Checks if any callbacks have been registered for this hook.

Syntax Syntax

WP_Hook::has_filters()

Return Return

(bool) True if callbacks have been registered for the current hook, otherwise false.

Source Source

File: wp-includes/class-wp-hook.php

	public function has_filters() {
		foreach ( $this->callbacks as $callbacks ) {
			if ( $callbacks ) {
				return true;
			}
		}
		return false;
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply