theme_file_uri
Filters the URL to a file in the theme.
Использование
add_filter( 'theme_file_uri', 'wp_kama_theme_file_uri_filter', 10, 2 ); /** * Function for `theme_file_uri` filter-hook. * * @param string $url The file URL. * @param string $file The requested file to search for. * * @return string */ function wp_kama_theme_file_uri_filter( $url, $file ){ // filter... return $url; }
- $url(строка)
- The file URL.
- $file(строка)
- The requested file to search for.
Список изменений
С версии 4.7.0 | Введена. |
Где вызывается хук
theme_file_uri
wp-includes/link-template.php 4587
return apply_filters( 'theme_file_uri', $url, $file );