[wp-trac] [WordPress Trac] #53090: Admin color schemes don't work in RTL
WordPress Trac
noreply at wordpress.org
Thu Apr 29 15:36:40 UTC 2021
#53090: Admin color schemes don't work in RTL
----------------------------+-----------------------
Reporter: tomjcafferkey | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 5.7.2
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: css, rtl
----------------------------+-----------------------
Changes (by desrosj):
* keywords: => has-patch
* milestone: => 5.7.2
Comment:
Thanks @tomjcafferkey. I looked into this more, and you are correct!
Thanks for being patient and further explaining.
The admin color scheme stylesheets are an outlier in that they are
registered with `true` as their source, and the actual file URL is
constructed later in `wp_style_loader_src()` via the `style_loader_src`
filter.
I've attached [attachment:"53090.diff"], which ''should'' fix the issue.
However, while this fixes the issue when the plugin is active when using
an RTL language, it causes the color schemes to not load when the plugin
is inactive and using an RTL language.
The reason seems to have something to do with the code in
`wp_style_loader_src()`. The URL being returned is
`'http://1?ver=5.8-alpha-50427-src`. The `1` comes from the value of
`$src` passed. But I haven't figured out why this happens.
@ryelle I was also curious if not using `wp_style_add_data( 'colors',
'rtl', 'replace' )` was intentional.
Moving to 5.7.2, as this would be good to get fixed in the next minor
release, if ready.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53090#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list