Skip to content

Commit

Permalink
feat:add author card sns icon show config
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfa committed Apr 27, 2024
1 parent 139ce2f commit 5262383
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ 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.5.2`
latest version : `0.5.3`

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

## Changelog

### 0.5.3

- add author card sns icon show config

### 0.5.2

- show sns icons in footer
Expand Down
6 changes: 5 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

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

最新版本: `0.5.2`
最新版本: `0.5.3`

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

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

## 更新日志

### 0.5.3

- 增加一个作者 SNS 图标是否展示的配置

### 0.5.2

- 底部展示 SNS 图标
Expand Down
6 changes: 6 additions & 0 deletions modules/setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,12 @@ function setting_switch($params)
'label' => __('Author bio', 'Farallon'),
'description' => __('Enable author bio', 'Farallon')
],
[
'type' => 'switch',
'name' => 'author_sns',
'label' => __('Author sns icons', 'Farallon'),
'description' => __('Show author sns icons, will not show when author bio is off.', 'Farallon')
],
[
'type' => 'switch',
'name' => 'related',
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Theme URI: https://github.com/bigfa/Farallon
Author: bigfa
Author URI: https://github.com/bigfa
Description: theme 2024
Version: 0.5.1
Version: 0.5.3
Tags: Minimalism, Responsive
*/
11 changes: 8 additions & 3 deletions template-parts/author-card.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<?php
global $farallonSetting; ?>
<div class="author--card">
<?php echo get_avatar(get_the_author_meta('ID'), 64); ?>
<div class="author--name"><?php the_author(); ?></div>
<div class="author--description"><?php the_author_meta('description'); ?></div>
<div class="author--sns">
<?php get_template_part('template-parts/sns'); ?>
</div>
<?php
if ($farallonSetting->get_setting('author_sns')) : ?>
<div class="author--sns">
<?php get_template_part('template-parts/sns'); ?>
</div>
<?php endif; ?>
</div>

0 comments on commit 5262383

Please sign in to comment.