fix: donate function

pull/409/head^2
Seaton Jiang 2021-08-20 13:01:18 +08:00
parent 8199bd7fbd
commit aed50cfa5e
No known key found for this signature in database
GPG Key ID: 0E05070D261ACFEA
2 changed files with 3 additions and 3 deletions

View File

@ -89,8 +89,8 @@ function theme_autoload()
$data = array(
'site' => home_url(),
'directory' => ASSET_PATH,
'alipay' => kratos_option('g_donate_alipay', ASSET_PATH . '/assets/img/200.png'),
'wechat' => kratos_option('g_donate_wechat', ASSET_PATH . '/assets/img/200.png'),
'alipay' => kratos_option('g_donate_alipay', ASSET_PATH . '/assets/img/200.png', 'g_donate_fieldset'),
'wechat' => kratos_option('g_donate_wechat', ASSET_PATH . '/assets/img/200.png', 'g_donate_fieldset'),
'repeat' => __('您已经赞过了', 'kratos'),
'thanks' => __('感谢您的支持', 'kratos'),
'donate' => __('打赏作者', 'kratos'),

View File

@ -14,7 +14,7 @@
<p class="motto mb-0"><?php echo $description = !empty(get_the_author_meta('description')) ? get_the_author_meta('description') : __('这个人很懒,什么都没留下', 'kratos'); ?></p>
</div>
<div class="share float-md-right text-center">
<?php if (kratos_option('g_donate', false)) { ?>
<?php if (kratos_option('g_donate', false, 'g_donate_fieldset')) { ?>
<a href="javascript:;" id="donate" class="btn btn-donate mr-3" role="button"><i class="kicon i-donate"></i> <?php _e('打赏', 'kratos'); ?></a>
<?php } ?>
<a href="javascript:;" id="thumbs" data-action="love" data-id="<?php the_ID(); ?>" role="button" class="btn btn-thumbs <?php if (isset($_COOKIE['love_' . $post->ID])) echo 'done'; ?>"><i class="kicon i-like"></i><span class="ml-1"><?php _e('点赞', 'kratos'); ?></span></a>