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

apply_filters('wp_loading_optimization_force_header_contexts') is found 1 times:

  • /wp-includes/media.php line 6014
    		 * @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() ) {