Revert Duolingo code to commit c9cebf0 with public API fix

This commit is contained in:
User
2026-03-12 16:36:25 +08:00
parent d1bf6be19d
commit f9dc3f7a40
4 changed files with 3 additions and 3 deletions

View File

@@ -5273,7 +5273,7 @@ function argon_get_duolingo_data($force_refresh = false) {
}
}
$url = 'https://www.duolingo.com/2017-06-30/users?username=' . urlencode($username) . '&fields=streak,streakData%7BcurrentStreak,previousStreak%7D';
$url = 'https://www.duolingo.com/2017-06-30/users?username=' . urlencode($username) . '&fields=users%7Bstreak,streakData%7BcurrentStreak,previousStreak%7D%7D';
$response = wp_remote_get($url, array(
'timeout' => 15,

Binary file not shown.

View File

@@ -1521,7 +1521,7 @@ function themeoptions_page(){
<td>
<input name="argon_duolingo_username" type="text" class="regular-text" value="<?php echo get_option('argon_duolingo_username', ''); ?>" placeholder="<?php _e('输入多邻国用户名', 'argon');?>">
<input name="argon_duolingo_username" type="text" class="regular-text" value="<?php echo get_option('argon_duolingo_username', ''); ?>">
<p class="description"><?php _e('填写你的多邻国用户名以自动获取连胜天数(需要在多邻国隐私设置中开启公开资料)', 'argon');?></p>
@@ -6879,7 +6879,7 @@ function argon_update_themeoptions(){
argon_update_option('argon_show_duolingo_streak');
argon_update_option('argon_duolingo_username');
delete_option('argon_duolingo_email');
delete_transient('argon_duo_login_error');

Binary file not shown.