Revert Duolingo JWT friend streak implementation
This commit is contained in:
18
settings.php
18
settings.php
@@ -1529,14 +1529,6 @@ function themeoptions_page(){
|
||||
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><label>Duolingo JWT Token</label></th>
|
||||
<td>
|
||||
<input name="argon_duolingo_jwt" type="text" class="regular-text" value="<?php echo get_option('argon_duolingo_jwt', ''); ?>" placeholder="<?php _e('手动填入抓包得到的 jwt', 'argon');?>">
|
||||
<p class="description"><?php _e('在浏览器登录多邻国网页版后,按 F12 并在 Application -> Cookies 里找到 jwt 并填入,用于自动获取友情连胜数据', 'argon');?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr><th class="subtitle"><h2 id="section-announcement"><?php _e('博客公告', 'argon');?></h2></th></tr>
|
||||
|
||||
<tr>
|
||||
@@ -2870,9 +2862,6 @@ function themeoptions_page(){
|
||||
alert('✗ <?php _e('清除失败:', 'argon'); ?> ' + response.data.message);
|
||||
}
|
||||
$btn.prop('disabled', false).html(originalHtml);
|
||||
}).fail(function() {
|
||||
alert('<?php _e('请求失败,请重试', 'argon'); ?>');
|
||||
$btn.prop('disabled', false).html(originalHtml);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6890,19 +6879,12 @@ function argon_update_themeoptions(){
|
||||
|
||||
argon_update_option('argon_show_duolingo_streak');
|
||||
argon_update_option('argon_duolingo_username');
|
||||
if (isset($_POST['argon_duolingo_jwt'])) {
|
||||
argon_update_option('argon_duolingo_jwt');
|
||||
}
|
||||
delete_option('argon_duolingo_friend_streak');
|
||||
|
||||
// Clean up old transient and options
|
||||
delete_option('argon_duolingo_email');
|
||||
delete_transient('argon_duo_login_error');
|
||||
|
||||
argon_update_option('argon_banner_title');
|
||||
|
||||
argon_update_option('argon_banner_subtitle');
|
||||
|
||||
argon_update_option('argon_banner_background_url');
|
||||
|
||||
argon_update_option('argon_banner_background_color_type');
|
||||
|
||||
Reference in New Issue
Block a user