Opened 3 years ago
Closed 3 years ago
#5892 closed enhancement (fixed)
Update WordPress.org Openverse theme to pass i18n/L10n info to the iframe
Reported by: | dhruvkb | Owned by: | dd32 |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | General | Keywords: | has-patch |
Cc: |
Description
The GitHub PR (https://github.com/WordPress/wordpress.org/pull/39) adds styling to ensure that the iframe
on site https://wordpress.org/openverse receives i18n data from the parent window (when it asks for it).
Change History (2)
Note: See
TracTickets for help on using
tickets.
Fixes WordPress/openverse-frontend#189
Closes https://meta.trac.wordpress.org/ticket/5892
---
This PR adds functionality for the Openverse frontend loaded in the
iframe
to ask the parent window information about the locale.iframe
—(localeGet
event)→ parent windowiframe
←(localeSet
event)— parent window## Description
The
localeSet
message contains the following data:{{{json
{
}
}}}
| Key | Interpretation |
|
dir
| Value of parent HTMLdir
attribute ||
lang
| Value of parent HTMLlang
attribute ||
locale
| Value of WordPressget_locale()
function |