Encode spaces in get_template_directory_uri() and get_stylesheet_directory_uri().

props SergeyBiryukov.
fixes #21969.


git-svn-id: https://develop.svn.wordpress.org/trunk@27710 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2014-03-25 13:06:21 +00:00
parent 87bfc847b1
commit c9531d6d67
2 changed files with 20 additions and 2 deletions
+2 -2
View File
@@ -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";