函数原型
get_stylesheet_uri(): string
函数描述
Retrieves stylesheet URI for the active theme.
是否弃用
未弃用
函数参数
无
函数返回值
string URI to active theme’s stylesheet.
函数位置
File: wp-includes/theme.php.
函数源码
function get_stylesheet_uri() {
$stylesheet_dir_uri = get_stylesheet_directory_uri();
$stylesheet_uri = $stylesheet_dir_uri . '/style.css';
/**
* Filters the URI of the active theme stylesheet.
*
* @since 1.5.0
*
* @param string $stylesheet_uri Stylesheet URI for the active theme/child theme.
* @param string $stylesheet_dir_uri Stylesheet directory URI for the active theme/child theme.
*/
return apply_filters( 'stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |

