Ticket #31620: 31620.2.patch
File 31620.2.patch, 1.4 KB (added by , 10 years ago) |
---|
-
src/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_path_normalized = wp_normalize_path( $theme_path ); 638 $content_path_normalized = wp_normalize_path( WP_CONTENT_DIR ); 639 return strpos( $theme_path_normalized, $content_path_normalized ) === 0 ? substr( $theme_path_normalized, strlen( $content_path_normalized ) ) : $theme_path_normalized; 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() -
tests/phpunit/tests/media.php
583 583 wp_delete_attachment( $post_id ); 584 584 585 585 $this->assertEquals( 'This is a comment. / Это комментарий. / Βλέπετε ένα σχόλιο.', $post->post_excerpt ); 586 587 // Delete test image. 588 wp_delete_attachment( $post_id ); 586 589 } 587 590 588 591 }