Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfa committed Dec 28, 2024
2 parents 15d0880 + 42889bb commit 7da26a3
Show file tree
Hide file tree
Showing 27 changed files with 301 additions and 175 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ Farallon is a simple single column wordpress theme with perfect performace and e

[中文说明](https://github.com/bigfa/Farallon/blob/develop/README_CN.md)

latest version : `0.7.9`
latest version : `0.8.0`

[Simple User Guide(Chinese)](https://fatesinger.com/101971)

## Changelog

### 0.8.0

- style enhancement
- add a config for showing image count of the post

### 0.7.9

- show the update time of post
Expand Down
7 changes: 6 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@

![Wordpress 主题 Farallon](https://static.fatesinger.com/2023/06/u1ak8xgmyn9ec24r.png)

最新版本: `0.7.9`
最新版本: `0.8.0`

本主题禁止各种修改作者链接打包重新发布的行为。

[简单的使用文档](https://fatesinger.com/101971)

## 更新日志

### 0.8.0

- 样式改进
- 增加一个是否显示文章图片数的设置

### 0.7.9

- 增加一个文章更新时间的设置
Expand Down
2 changes: 1 addition & 1 deletion build/css/app.min.css

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ function farallon_setup()
include_once('modules/shortcode.php');
include_once('modules/update.php');

function farallon_get_post_image_count($post_id)
{
$content = get_post_field('post_content', $post_id);
preg_match_all('/<img.*?(?: |\\t|\\r|\\n)?src=[\'"]?(.+?)[\'"]?(?:(?: |\\t|\\r|\\n)+.*?)?>/sim', $content, $strResult, PREG_PATTERN_ORDER);
return count($strResult[1]);
}

function farallon_get_background_image($post_id, $width = null, $height = null)
{
Expand Down
Loading

0 comments on commit 7da26a3

Please sign in to comment.