检索当前主题名称。
原型
get_current_theme()
返回值
(string)
源文件
路径:wp-includes/deprecated.php
<?php
...
function get_current_theme() {
_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
if ( $theme = get_option( 'current_theme' ) )
return $theme;
return wp_get_theme()->get('Name');
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_current_theme/