Closed renintw closed 5 months ago
It looks like this triggers a notice now, I'm seeing this on my local env:
Notice: Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the language-suggest-front handle. Please see Debugging in WordPress for more information.
Closes https://github.com/WordPress/Learn/issues/2428
The locale information for Learn comes from the query parameter "locale" rather than the URL subdomain, so this PR retrieves the locale and sends it to lang guess for processing.
lang-guess corresponding tweaks: meta.trac.wordpress.org/ticket/7675