Revert Duolingo code to commit c9cebf0 with public API fix
This commit is contained in:
@@ -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.
@@ -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.
Reference in New Issue
Block a user