-
Notifications
You must be signed in to change notification settings - Fork 1
Add new task provider: Select site locale #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Test on Playground |
|
||
$response = \wp_remote_get( 'https://api.wordpress.org/translations/core/1.0/' ); | ||
if ( \is_wp_error( $response ) ) { | ||
return []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache empty array for 5 mins like we do in https://github.com/Emilia-Capital/progress-planner/blob/e0af996a7bc0ac478007dcbd6002ed6f46d91fc2/classes/class-lessons.php#L64-L67 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, feel free to push it! 👍
Checks if the browser language is not the same as the site locale, and adds a new task in case they differ.
Fixes https://github.com/ProgressPlanner/progress-planner-pro/issues/135