Encode spaces in get_template_directory_uri() and get_stylesheet_directory_uri().

props SergeyBiryukov.
fixes #21969.

Built from https://develop.svn.wordpress.org/trunk@27710


git-svn-id: http://core.svn.wordpress.org/trunk@27549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-25 13:07:14 +00:00
parent 134ab31b5d
commit 7d3b9ccb22

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";