Opened 3 years ago
Closed 3 years ago
#6105 closed enhancement (fixed)
Meta: Forward locale via path to Openverse iframe
Reported by: | sarayourfriend | Owned by: | sarayourfriend |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | WordPress.org Site | Keywords: | has-patch |
Cc: |
Description
Openverse has switched from cookie-based locale forwarding to path-based. This allows the initial render of a non-default locale in the iframe to be correctly SSR'd and also eases testing.
We need to update the wporg-openverse theme to forward the locale via the iframe's path.
Change History (7)
This ticket was mentioned in PR #61 on WordPress/wordpress.org by sarayourfriend.
3 years ago
#1
- Keywords has-patch added
sarayourfriend commented on PR #61:
3 years ago
#2
cc @WordPress/openverse-developers
sarayourfriend commented on PR #61:
3 years ago
#3
Before merging this it needs the new functionality to be put behind a theme setting.
sarayourfriend commented on PR #61:
3 years ago
#4
Okay this is ready for review now. @WordPress/openverse-developers please take a look at this, thanks!
3 years ago
#5
We can also remove step 3 from the README instructions, as the mu-plugin is already set up, at least it is for me?
sarayourfriend commented on PR #61:
3 years ago
#6
We can also remove step 3 from the README instructions, as the mu-plugin is already set up, at least it is for me?
That's just you :slightly_smiling_face: On a fresh clone they're set up by composer install
.
https://meta.trac.wordpress.org/ticket/6105
Forwards the locale via the iframe's path rather than relying on a cookie.
To test, follow setup instructions in the README of the wporg-openverse theme, then visit the site locally. To test that the locales are working, replace the call to
get_locale()
with awp_locale
string (likept_BR
etc) to verify that it is working to forward the locale as expected (as far as I know there's no way to test this "for real" locally as subdomain locale choosing isn't supported in the local wp-env when I tried it).