wp_loading_optimization_force_header_contexts

wp_loading_optimization_force_header_contexts

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('wp_loading_optimization_force_header_contexts') is found 1 times:

  • /wp-includes/media.php line 6062
    6058
    6059
    6060
    6061
    6062
    6063
    6064
    6065
    6066
    6067
    6068
    * @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() ) {