浏览代码

page页面支持画廊

pull/14/head
Zisbusy 3 年前
提交者 GitHub
父节点
当前提交
8701b20631
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. +5
    -1
      Akina/page.php

+ 5
- 1
Akina/page.php 查看文件

@ -38,7 +38,11 @@
<h1 class="entry-title"><?php $this->title() ?></h1>
</header>
<div class="entry-content">
<?php $this->content(); ?>
<?php
$pattern = '/\<img.*?src\=\"(.*?)\"[^>]*>/i';
$replacement = '<a href="$1" alt="'.$this->title.'" title="点击放大图片"><img class="aligncenter" src="$1" title="'.$this->title.'"></a>';
echo preg_replace($pattern, $replacement, $this->content);
?>
</div>
</article>
</main>

正在加载...
取消
保存