检索当前样式表的名称。
原型
get_stylesheet()
描述
管理员当前将主题名称设置为前端主题的主题名称。
返回值
(string)
样式表名称。
源文件
路径:wp-includes/theme.php
<?php
...
function get_stylesheet() {
/**
* Filters the name of current stylesheet.
*
* @since 1.5.0
*
* @param string $stylesheet Name of the current stylesheet.
*/
return apply_filters( 'stylesheet', get_option( 'stylesheet' ) );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_stylesheet/