From 736af28d7287b477c7b5f155edf81040c7e779cc Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 23 Jan 2006 10:13:14 +0000 Subject: WP Merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@509 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-includes/functions.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'wp-inst/wp-includes/functions.php') diff --git a/wp-inst/wp-includes/functions.php b/wp-inst/wp-includes/functions.php index e105f94..4a7e9bb 100644 --- a/wp-inst/wp-includes/functions.php +++ b/wp-inst/wp-includes/functions.php @@ -1797,11 +1797,12 @@ function get_themes() { $template = $theme_data['Template']; $stylesheet = dirname($theme_file); - $screenshot = glob("$theme_root/$stylesheet/screenshot.*"); - if ( !empty( $screenshot ) ) - $screenshot = basename( $screenshot[0] ); - else - $screenshot = false; + foreach (array('png', 'gif', 'jpg', 'jpeg') as $ext) { + if (file_exists("$theme_root/$stylesheet/screenshot.$ext")) { + $screenshot = "screenshot.$ext"; + break; + } + } if ( empty($name) ) { $name = dirname($theme_file); -- cgit