diff options
Diffstat (limited to 'libs/Contents.php')
| -rw-r--r-- | libs/Contents.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/Contents.php b/libs/Contents.php index e65d81b..75aa833 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -29,8 +29,8 @@ class Contents * 解析图片 */ static public function parseImages($text){ - //FancyBox - $text = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<center><a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a></center>',$text); + //FancyBox & 图题 + $text = preg_replace('/<img(.*?)src="(.*?)"(.*?)alt="(.*?)"(.*?)>/s','<center><a data-fancybox="gallery" href="${2}" class="gallery-link"><img${1}src="${2}"${3}></a><span class="post-img-alt">${4}</span></center>',$text); return $text; } |
