wp_loading_optimization_force_header_contexts
Filters the header-specific contexts.
Использование
add_filter( 'wp_loading_optimization_force_header_contexts', 'wp_kama_loading_optimization_force_header_contexts_filter' );
/**
* Function for `wp_loading_optimization_force_header_contexts` filter-hook.
*
* @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.
*
* @return array
*/
function wp_kama_loading_optimization_force_header_contexts_filter( $default_header_enforced_contexts ){
// filter...
return $default_header_enforced_contexts;
}
- $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.
Список изменений
| С версии 6.4.0 | Введена. |
Где вызывается хук
wp_loading_optimization_force_header_contexts
wp-includes/media.php 6309
$header_enforced_contexts = apply_filters( 'wp_loading_optimization_force_header_contexts', $header_enforced_contexts );