get_stylesheet_uri()
get_stylesheet_uri()
检索当前主题样式表的URI。
Retrieves the URI of current theme stylesheet.
说明(Description)
样式表文件名是’样式表’附加到样式表目录URI路径。请参见get_stylesheet_directory_uri()。
返回(Return)
(string)
源码(Source)
/** * Retrieve URI of current theme stylesheet. * * The stylesheet file name is 'style.css' which is appended to {@link * get_stylesheet_directory_uri() stylesheet directory URI} path. * * @since 1.5.0 * * @return string */ function get_stylesheet_uri() { $stylesheet_dir_uri = get_stylesheet_directory_uri(); $stylesheet_uri = $stylesheet_dir_uri . '/style.css'; /** * Filter the URI of the current theme stylesheet. * * @since 1.5.0 * * @param string $stylesheet_uri Stylesheet URI for the current theme/child theme. * @param string $stylesheet_dir_uri Stylesheet directory URI for the current theme/child theme. */ return apply_filters( 'stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri ); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
1.5.0 | wp-includes/theme.php:239 | 1 function | 3 |
笔记(Notes)
输出URL
get_stylesheet_uri() 为WP2原创文章,链接:https://www.wp2.cn/functions/get_stylesheet_uri/