Ticket #31620: 31620.patch
File 31620.patch, 911 bytes (added by , 9 years ago) |
---|
-
wp-includes/theme.php
626 626 function get_raw_theme_root( $stylesheet_or_template, $skip_cache = false ) { 627 627 global $wp_theme_directories; 628 628 629 if ( count($wp_theme_directories) <= 1 ) 629 $theme_dir_count = count( $wp_theme_directories ); 630 631 if ( 0 === $theme_dir_count ) { 630 632 return '/themes'; 633 } 631 634 635 if ( 1 === $theme_dir_count ) { 636 $theme_path = reset( $wp_theme_directories ); 637 $theme_real_path = realpath( $theme_path ); 638 $content_path = realpath( WP_CONTENT_DIR ); 639 return strpos( $theme_real_path, $content_path ) === 0 ? substr( $theme_real_path, strlen( $content_path ) ) : $theme_path; 640 } 641 632 642 $theme_root = false; 633 643 634 644 // If requesting the root for the current theme, consult options to avoid calling get_theme_roots()