Ticket #21749: 21749.3.patch
| File 21749.3.patch, 1.6 KB (added by SergeyBiryukov, 9 months ago) |
|---|
-
wp-includes/class-wp-theme.php
794 794 * @return string URL to the stylesheet directory. 795 795 */ 796 796 public function get_stylesheet_directory_uri() { 797 return $this->get_theme_root_uri() . '/' . $this->stylesheet; 797 $stylesheet = str_replace( '%2F', '/', rawurlencode( $this->stylesheet ) ); 798 return $this->get_theme_root_uri() . '/' . $stylesheet; 798 799 } 799 800 800 801 /** … … 814 815 else 815 816 $theme_root_uri = $this->get_theme_root_uri(); 816 817 817 return $theme_root_uri . '/' . $this->template; 818 $template = str_replace( '%2F', '/', rawurlencode( $this->template ) ); 819 return $theme_root_uri . '/' . $template; 818 820 } 819 821 820 822 /** -
wp-includes/theme.php
171 171 * @return string 172 172 */ 173 173 function get_stylesheet_directory_uri() { 174 $stylesheet = get_stylesheet();174 $stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) ); 175 175 $theme_root_uri = get_theme_root_uri( $stylesheet ); 176 176 $stylesheet_dir_uri = "$theme_root_uri/$stylesheet"; 177 177 … … 265 265 * @return string Template directory URI. 266 266 */ 267 267 function get_template_directory_uri() { 268 $template = get_template();268 $template = str_replace( '%2F', '/', rawurlencode( get_template() ) ); 269 269 $theme_root_uri = get_theme_root_uri( $template ); 270 270 $template_dir_uri = "$theme_root_uri/$template"; 271 271
