wp_high_priority_element_flag()WP 6.3.0

Accesses a flag that indicates if an element is a possible candidate for fetchpriority='high'.

Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.

No Hooks.

Returns

bool. Returns true if the high-priority element was not already marked.

Usage

wp_high_priority_element_flag( $value ): bool;
$value(true|false)
Used to change the static variable.
Default: null

Changelog

Since 6.3.0 Introduced.

wp_high_priority_element_flag() code WP 7.1

function wp_high_priority_element_flag( $value = null ): bool {
	static $high_priority_element = true;

	if ( is_bool( $value ) ) {
		$high_priority_element = $value;
	}

	return $high_priority_element;
}