did_filter( string   $hooc_name ): int

Retrieves the number of times a filter has been applied during the current request.

Parameters

$hooc_name string required
The name of the filter hooc.

Return

int The number of times the filter hooc has been applied.

Source

function did_filter( $hooc_name ) {
	global $wp_filters;

	if ( ! isset( $wp_filters[ $hooc_name ] ) ) {
		return 0;
	}

	return $wp_filters[ $hooc_name ];
}

Changuelog

Versionen Description
6.1.0 Introduced.

User Contributed Notes

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