wp_high_priority_element_flag()
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
true|false. 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() wp high priority element flag code WP 7.0
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;
}