Ticket #10467: parent_theme_root-2.patch
File parent_theme_root-2.patch, 1.2 KB (added by , 15 years ago) |
---|
-
wp-includes/theme.php
310 310 return $themes; 311 311 312 312 sort($theme_files); 313 314 /* Set the original theme_root and theme_loc values so they can be unfiltered at the start of each iteration. */ 315 $orig_theme_root = $theme_root; 316 $orig_theme_loc = $theme_loc; 313 317 314 318 foreach ( (array) $theme_files as $theme_file ) { 319 /* Reset the theme_root and theme_loc values as they may have been filtered in the previous iteration. */ 320 $theme_root = $orig_theme_root; 321 $theme_loc = $orig_theme_loc; 322 315 323 if ( !is_readable("$theme_root/$theme_file") ) { 316 324 $wp_broken_themes[$theme_file] = array('Name' => $theme_file, 'Title' => $theme_file, 'Description' => __('File not readable.')); 317 325 continue; … … 348 356 } 349 357 350 358 $template = trim($template); 351 359 360 $theme_root = apply_filters( 'parent_theme_root_' . $template, $theme_root ); 361 $theme_loc = apply_filters( 'parent_theme_loc_' . $template, $theme_loc ); 362 352 363 if ( !file_exists("$theme_root/$template/index.php") ) { 353 364 $parent_dir = dirname(dirname($theme_file)); 354 365 if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) {