[wp-trac] [WordPress Trac] #39006: REST API: Language setting should not be present when no languages are available
WordPress Trac
noreply at wordpress.org
Thu Jan 5 07:11:07 UTC 2017
#39006: REST API: Language setting should not be present when no languages are
available
--------------------------------+-----------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.7.2
Component: Options, Meta APIs | Version: 4.7
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: rest-api
--------------------------------+-----------------------
Changes (by rmccue):
* keywords: has-patch => needs-patch
Comment:
@diddledan FYI, your patch is saved with an encoding that `patch` can't
understand (at least on my system). Converting to UTF-8 in my editor fixed
that, but might want to check settings on your end there :)
----
`wp_get_available_translations()` is located in `wp-admin/includes
/translation-install.php`, which makes me think we should move it outside
of `wp-admin` or reconsider using it.
@ocean90 Thoughts on moving it (and hence also `translations_api()`) out
of admin funcs?
Added [attachment:39006.2.diff] that a) also loads `translation-
install.php` (temporarily! do not commit!), and b) includes an `enum`
containing the available languages. This attachment needs to be redone
based on a decision on the above.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39006#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list