diff --git a/wp-includes/theme.php b/wp-includes/theme.php index d643a9e289..8a675d44a9 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -187,7 +187,7 @@ function get_stylesheet_directory() { * @return string */ function get_stylesheet_directory_uri() { - $stylesheet = get_stylesheet(); + $stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) ); $theme_root_uri = get_theme_root_uri( $stylesheet ); $stylesheet_dir_uri = "$theme_root_uri/$stylesheet"; @@ -318,7 +318,7 @@ function get_template_directory() { * @return string Template directory URI. */ function get_template_directory_uri() { - $template = get_template(); + $template = str_replace( '%2F', '/', rawurlencode( get_template() ) ); $theme_root_uri = get_theme_root_uri( $template ); $template_dir_uri = "$theme_root_uri/$template";