theme_root_uri
云策文档标注
概述
theme_root_uri 是一个 WordPress 过滤器钩子,用于修改主题目录的 URI。它允许开发者动态调整主题资源的访问路径。
关键要点
- 这是一个过滤器钩子,用于过滤主题目录的 URI。
- 接受三个参数:$theme_root_uri(主题目录 URI)、$siteurl(WordPress 网站地址)和 $stylesheet_or_template(主题的样式表或模板名称)。
- 在 get_theme_root_uri() 函数中被调用,用于检索主题目录的 URI。
- 自 WordPress 1.5.0 版本引入。
原文内容
Filters the URI for themes directory.
Parameters
$theme_root_uristring-
The URI for themes directory.
$siteurlstring-
WordPress web address which is set in General Options.
$stylesheet_or_templatestring-
The stylesheet or template name of the theme.
Source
return apply_filters( 'theme_root_uri', $theme_root_uri, get_option( 'siteurl' ), $stylesheet_or_template );
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |