get_stylesheet_directory()
get_stylesheet_directory() 检索当前主题的样式表目录路径。Retrieve styl…
get_stylesheet_directory()
检索当前主题的样式表目录路径。
Retrieve stylesheet directory path for current theme.
检索当前主题的样式表目录路径。
Retrieve stylesheet directory path for current theme.
目录锚点:#返回#源码#笔记
返回(Return)
(string)当前主题目录的路径。
源码(Source)
/**
* Retrieve stylesheet directory path for current theme.
*
* @since 1.5.0
*
* @return string Path to current theme directory.
*/
function get_stylesheet_directory() {
$stylesheet = get_stylesheet();
$theme_root = get_theme_root( $stylesheet );
$stylesheet_dir = "$theme_root/$stylesheet";
/**
* Filter the stylesheet directory path for current theme.
*
* @since 1.5.0
*
* @param string $stylesheet_dir Absolute path to the current them.
* @param string $stylesheet Directory name of the current theme.
* @param string $theme_root Absolute path to themes directory.
*/
return apply_filters( 'stylesheet_directory', $stylesheet_dir, $stylesheet, $theme_root );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.5.0 | wp-includes/theme.php:188 | 9 | 4 |
笔记(Notes)
基本示例
get_stylesheet_directory()检索子主题的目录。
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。





还没有任何评论,赶紧来占个楼吧!