mirror of
https://github.com/jkjoy/typecho-theme-farallon.git
synced 2026-06-17 09:44:27 +00:00
Update functions.php
This commit is contained in:
+3
-2
@@ -174,11 +174,12 @@ function allwords() {
|
||||
function show_first_image($content) {
|
||||
preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $content, $matches);
|
||||
// 检查是否找到了图片
|
||||
if(isset($matches[1][0])){
|
||||
if(count($matches) > 0 && count($matches[0]) > 0 ){
|
||||
return $matches[1][0];
|
||||
}
|
||||
} else {
|
||||
return false; // 没有找到图片,返回 false
|
||||
}
|
||||
}
|
||||
//开始增加某些奇怪的东西
|
||||
// 获取月份
|
||||
function getMonth() {
|
||||
|
||||
Reference in New Issue
Block a user