diff --git a/inc/theme-options.php b/inc/theme-options.php index 0e05f51..d6064c3 100644 --- a/inc/theme-options.php +++ b/inc/theme-options.php @@ -4,7 +4,7 @@ * 主题选项 * @author Seaton Jiang * @license GPL-3.0 License - * @version 2022.01.26 + * @version 2022.02.20 */ defined('ABSPATH') || exit; @@ -597,6 +597,34 @@ CSF::createSection($prefix, array( 'subtitle' => __('启用/禁用网易云音乐自动播放功能', 'kratos'), 'default' => false, ), + array( + 'id' => 'g_post_comments', + 'type' => 'switcher', + 'title' => __('评论数量展示', 'kratos'), + 'subtitle' => __('启用/禁用首页及文章页面展示阅读数量的功能', 'kratos'), + 'default' => true, + ), + array( + 'id' => 'g_post_views', + 'type' => 'switcher', + 'title' => __('热度数量展示', 'kratos'), + 'subtitle' => __('启用/禁用首页及文章页面展示热度数量的功能', 'kratos'), + 'default' => true, + ), + array( + 'id' => 'g_post_loves', + 'type' => 'switcher', + 'title' => __('点赞数量展示', 'kratos'), + 'subtitle' => __('启用/禁用首页及文章页面展示点赞数量的功能', 'kratos'), + 'default' => true, + ), + array( + 'id' => 'g_post_author', + 'type' => 'switcher', + 'title' => __('作者名称展示', 'kratos'), + 'subtitle' => __('启用/禁用首页展示作者名称的功能', 'kratos'), + 'default' => true, + ), array( 'id' => 'g_post_revision', 'type' => 'switcher', diff --git a/pages/page-content.php b/pages/page-content.php index 4d18035..535a29c 100644 --- a/pages/page-content.php +++ b/pages/page-content.php @@ -4,7 +4,7 @@ * 文章列表 * @author Seaton Jiang * @license GPL-3.0 License - * @version 2022.01.26 + * @version 2022.02.20 */ ?>
@@ -43,19 +43,18 @@
- + + + - - ID, 'love', true)) { - echo get_post_meta($post->ID, 'love', true); - } else { - echo '0'; - } - _e('人点赞', 'kratos'); ?> - + + + + ID, 'love', true)) { echo get_post_meta($post->ID, 'love', true); } else { echo '0'; } _e('人点赞', 'kratos'); ?> + + + diff --git a/single.php b/single.php index 4b354d6..f86d1b5 100644 --- a/single.php +++ b/single.php @@ -4,7 +4,7 @@ * 文章内容 * @author Seaton Jiang * @license GPL-3.0 License - * @version 2022.01.26 + * @version 2022.02.20 */ get_header(); @@ -50,16 +50,13 @@ $col_array = array(

- - ID, 'love', true)) { - echo get_post_meta($post->ID, 'love', true); - } else { - echo '0'; - } - _e('人点赞', 'kratos'); ?> - + + + + ID, 'love', true)) { echo get_post_meta($post->ID, 'love', true); } else { echo '0'; } _e('人点赞', 'kratos'); ?> + + + '; edit_post_link(__('编辑文章', 'kratos'));