get_locale_stylesheet_uri()
最后更新于:2021-11-26 09:17:43
get_locale_stylesheet_uri()Retrieves the localized stylesheet URI.
响应
(string) URI to current theme’s localized stylesheet.
源文件
文件: gc-includes/theme.php
function get_locale_stylesheet_uri() {
global $gc_locale;
$stylesheet_dir_uri = get_stylesheet_directory_uri();
$dir = get_stylesheet_directory();
$locale = get_locale();
if ( file_exists( "$dir/$locale.css" ) ) {
$stylesheet_uri = "$stylesheet_dir_uri/$locale.css";
} elseif ( ! empty( $gc_locale->text_direction ) && file_exists( "$dir/{$gc_locale->text_direction}.css" ) ) {
$stylesheet_uri = "$stylesheet_dir_uri/{$gc_locale->text_direction}.css";
} else {
$stylesheet_uri = '';
}
/**
* Filters the localized stylesheet URI.
*
* @since 2.1.0
*
* @param string $stylesheet_uri Localized stylesheet URI.
* @param string $stylesheet_dir_uri Stylesheet directory URI.
*/
return apply_filters( 'locale_stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri );
}