get_stylesheet_directory_uri()
get_stylesheet_directory_uri() 检索样式表目录URI。Retrieve styl…
get_stylesheet_directory_uri()
检索样式表目录URI。
Retrieve stylesheet directory URI.
检索样式表目录URI。
Retrieve stylesheet directory URI.
目录锚点:#返回#源码#笔记
返回(Return)
(string)
源码(Source)
/**
* Retrieve stylesheet directory URI.
*
* @since 1.5.0
*
* @return string
*/
function get_stylesheet_directory_uri() {
$stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) );
$theme_root_uri = get_theme_root_uri( $stylesheet );
$stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
/**
* Filter the stylesheet directory URI.
*
* @since 1.5.0
*
* @param string $stylesheet_dir_uri Stylesheet directory URI.
* @param string $stylesheet Name of the activated theme's directory.
* @param string $theme_root_uri Themes root URI.
*/
return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.5.0 | wp-includes/theme.php:212 | 13 | 4 |
笔记(Notes)
如果使用子主题,则此函数返回当前子主题的URL。如果要将URL返回到根/母主题,请改用get_template_directory_uri()。
图像(HTML)
给定-
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

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