wp_resource_hints хук-фильтр . WP 4.6.0
Filters domains and URLs for resource hints of relation type.
Использование
add_filter( 'wp_resource_hints', 'filter_function_name_8727', 10, 2 ); function filter_function_name_8727( $urls, $relation_type ){ // filter... return $urls; }
- $urls(массив)
- URLs to print for resource hints.
- $relation_type(строка)
- The relation type the URLs are printed for, e.g. 'preconnect' or 'prerender'.
Список изменений
С версии 4.6.0 | Введена. |
Где вызывается хук
wp_resource_hints
wp-includes/general-template.php 3333
$urls = apply_filters( 'wp_resource_hints', $urls, $relation_type );