Changeset 27710
- Timestamp:
- 03/25/2014 01:06:21 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r27703 r27710 188 188 */ 189 189 function get_stylesheet_directory_uri() { 190 $stylesheet = get_stylesheet();190 $stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) ); 191 191 $theme_root_uri = get_theme_root_uri( $stylesheet ); 192 192 $stylesheet_dir_uri = "$theme_root_uri/$stylesheet"; … … 319 319 */ 320 320 function get_template_directory_uri() { 321 $template = get_template();321 $template = str_replace( '%2F', '/', rawurlencode( get_template() ) ); 322 322 $theme_root_uri = get_theme_root_uri( $template ); 323 323 $template_dir_uri = "$theme_root_uri/$template"; -
trunk/tests/phpunit/tests/theme/WPTheme.php
r25254 r27710 111 111 } 112 112 113 /** 114 * @ticket 21969 115 */ 116 function test_theme_uris_with_spaces() { 117 $callback = array( $this, 'filter_theme_with_spaces' ); 118 add_filter( 'stylesheet', $callback ); 119 add_filter( 'template', $callback ); 120 121 $this->assertEquals( get_theme_root_uri() . '/subdir/theme%20with%20spaces', get_stylesheet_directory_uri() ); 122 $this->assertEquals( get_theme_root_uri() . '/subdir/theme%20with%20spaces', get_template_directory_uri() ); 123 124 remove_filter( 'stylesheet', $callback ); 125 add_filter( 'template', $callback ); 126 } 127 128 function filter_theme_with_spaces() { 129 return 'subdir/theme with spaces'; 130 } 113 131 }
Note: See TracChangeset
for help on using the changeset viewer.