Browse Source

page页面支持画廊

pull/14/head
Zisbusy 3 years ago
committed by GitHub
parent
commit
8701b20631
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      Akina/page.php

+ 5
- 1
Akina/page.php View File

@ -38,7 +38,11 @@
<h1 class="entry-title"><?php $this->title() ?></h1> <h1 class="entry-title"><?php $this->title() ?></h1>
</header> </header>
<div class="entry-content"> <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> </div>
</article> </article>
</main> </main>

Loading…
Cancel
Save