theme_root_uri
Filters the URI for themes directory.
Использование
add_filter( 'theme_root_uri', 'wp_kama_theme_root_uri_filter', 10, 3 );
/**
* Function for `theme_root_uri` filter-hook.
*
* @param string $theme_root_uri The URI for themes directory.
* @param string $siteurl WordPress web address which is set in General Options.
* @param string $stylesheet_or_template The stylesheet or template name of the theme.
*
* @return string
*/
function wp_kama_theme_root_uri_filter( $theme_root_uri, $siteurl, $stylesheet_or_template ){
// filter...
return $theme_root_uri;
}
- $theme_root_uri(строка)
- The URI for themes directory.
- $siteurl(строка)
- WordPress web address which is set in General Options.
- $stylesheet_or_template(строка)
- The stylesheet or template name of the theme.
Список изменений
| С версии 1.5.0 | Введена. |
Где вызывается хук
theme_root_uri
wp-includes/theme.php 682
return apply_filters( 'theme_root_uri', $theme_root_uri, get_option( 'siteurl' ), $stylesheet_or_template );