[wp-trac] [WordPress Trac] #52802: Possible typo in rest_validate_enum() function
WordPress Trac
noreply at wordpress.org
Sat Mar 13 09:35:59 UTC 2021
#52802: Possible typo in rest_validate_enum() function
----------------------------+----------------------
Reporter: Hareesh Pillai | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: REST API | Version: 5.7
Severity: normal | Resolution: invalid
Keywords: | Focuses:
----------------------------+----------------------
Changes (by SergeyBiryukov):
* status: new => closed
* resolution: => invalid
* component: General => REST API
* milestone: Awaiting Review =>
Comment:
Thanks for the ticket!
The `%2$l` placeholder is not a typo, it's meant for outputting localized
lists of items. See the
[https://developer.wordpress.org/reference/functions/wp_sprintf_l/
wp_sprintf_l()] function for more details, attached via a filter to
[https://developer.wordpress.org/reference/functions/wp_sprintf/
wp_sprintf()].
The `$encoded_enum_values` variable there is an array, so `%2$s` won't
work as expected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52802#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list