mirror of
https://github.com/typecho/typecho.git
synced 2025-03-25 04:19:45 +01:00
主题缩略图使用screenshot命名的图片
修复主题根目录存在screenshot.png和其他图片时,主题展示图抓取其他图片的问题
This commit is contained in:
parent
55c676d6a5
commit
6005d80b20
@ -69,7 +69,7 @@ class Widget_Themes_List extends Typecho_Widget
|
||||
}
|
||||
|
||||
$screen = array_filter(glob($theme . '/*'), function ($path) {
|
||||
return preg_match("/\.(jpg|png|gif|bmp|jpeg)$/i", $path);
|
||||
return preg_match("/screenshot\.(jpg|png|gif|bmp|jpeg)$/i", $path);
|
||||
});
|
||||
|
||||
if ($screen) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user