wp_loading_optimization_force_header_contexts
wp_loading_optimization_force_header_contexts
Appears in: wordpress-6.4, wordpress-6.4.1, wordpress-6.4.2, wordpress-6.4.3, wordpress-6.5, wordpress-6.5.2, wordpress-6.5.3, wordpress-6.5.4, wordpress-6.5.5, wordpress-6.6, wordpress-6.6.1, wordpress-6.6.2, wordpress-6.7, wordpress-6.7.1, wordpress-6.7.2
Hook Type: filter
Displaying hooks found in version: wordpress-6.7.2apply_filters('wp_loading_optimization_force_header_contexts') is found 1 times:
- /wp-includes/media.php line 606260586059606060616062606360646065606660676068
* @param
array
$default_header_enforced_contexts
Map of contexts
for
which elements should be considered
* in the header of the page,
as
$context
=>
$enabled
* pairs. The
$enabled
should always be true.
*/
$header_enforced_contexts
= apply_filters(
'wp_loading_optimization_force_header_contexts'
,
$header_enforced_contexts
);
// Consider elements with these header-specific contexts to be in viewport.
if
( isset(
$header_enforced_contexts
[
$context
] ) ) {
$maybe_in_viewport
= true;
$maybe_increase_count
= true;
}
elseif
( ! is_admin() && in_the_loop() && is_main_query() ) {