Revert Duolingo JWT friend streak implementation
This commit is contained in:
@@ -664,17 +664,10 @@ $author_desc = get_option('argon_sidebar_author_description');
|
||||
$duo_data = argon_get_duolingo_data();
|
||||
if ($duo_data !== false) :
|
||||
$is_today_done = isset($duo_data['today']) && $duo_data['today'];
|
||||
$duo_friend_streak = isset($duo_data['friend_streak']) ? $duo_data['friend_streak'] : '';
|
||||
$tooltip_attr = !empty($duo_friend_streak) ? ' data-toggle="tooltip" data-placement="bottom" title="' . esc_attr(sprintf(__('友情连胜: %s天', 'argon'), $duo_friend_streak)) . '"' : '';
|
||||
?>
|
||||
<span class="duolingo-streak<?php echo $is_today_done ? '' : ' not-done'; ?>"<?php echo $tooltip_attr; ?>>
|
||||
<span class="duolingo-streak<?php echo $is_today_done ? '' : ' not-done'; ?>">
|
||||
<img src="<?php echo get_template_directory_uri(); ?>/assets/icons/duolingo-streak<?php echo $is_today_done ? '' : '-empty'; ?>.svg" class="duolingo-flame" alt="streak">
|
||||
<?php echo $duo_data['streak']; ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span class="duolingo-streak not-done" data-toggle="tooltip" data-placement="bottom" title="<?php _e('API 获取失败 / 用户名错误 / 或被频控拦截', 'argon'); ?>">
|
||||
<img src="<?php echo get_template_directory_uri(); ?>/assets/icons/duolingo-streak-empty.svg" class="duolingo-flame" alt="streak">
|
||||
?
|
||||
</span>
|
||||
<?php endif; endif; ?>
|
||||
</h6>
|
||||
|
||||
Reference in New Issue
Block a user