@@ 194-209 (lines=16) @@ | ||
191 | * |
|
192 | * @return string |
|
193 | */ |
|
194 | function get_stylesheet_directory_uri() { |
|
195 | $stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) ); |
|
196 | $theme_root_uri = get_theme_root_uri( $stylesheet ); |
|
197 | $stylesheet_dir_uri = "$theme_root_uri/$stylesheet"; |
|
198 | ||
199 | /** |
|
200 | * Filters the stylesheet directory URI. |
|
201 | * |
|
202 | * @since 1.5.0 |
|
203 | * |
|
204 | * @param string $stylesheet_dir_uri Stylesheet directory URI. |
|
205 | * @param string $stylesheet Name of the activated theme's directory. |
|
206 | * @param string $theme_root_uri Themes root URI. |
|
207 | */ |
|
208 | return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri ); |
|
209 | } |
|
210 | ||
211 | /** |
|
212 | * Retrieves the URI of current theme stylesheet. |
|
@@ 327-342 (lines=16) @@ | ||
324 | * |
|
325 | * @return string Template directory URI. |
|
326 | */ |
|
327 | function get_template_directory_uri() { |
|
328 | $template = str_replace( '%2F', '/', rawurlencode( get_template() ) ); |
|
329 | $theme_root_uri = get_theme_root_uri( $template ); |
|
330 | $template_dir_uri = "$theme_root_uri/$template"; |
|
331 | ||
332 | /** |
|
333 | * Filters the current theme directory URI. |
|
334 | * |
|
335 | * @since 1.5.0 |
|
336 | * |
|
337 | * @param string $template_dir_uri The URI of the current theme directory. |
|
338 | * @param string $template Directory name of the current theme. |
|
339 | * @param string $theme_root_uri The themes root URI. |
|
340 | */ |
|
341 | return apply_filters( 'template_directory_uri', $template_dir_uri, $template, $theme_root_uri ); |
|
342 | } |
|
343 | ||
344 | /** |
|
345 | * Retrieve theme roots. |