[wp-trac] [WordPress Trac] #49484: Add option 'OR' to wp_sprintf_l()
WordPress Trac
noreply at wordpress.org
Sun Sep 27 00:11:29 UTC 2020
#49484: Add option 'OR' to wp_sprintf_l()
-----------------------------+-----------------------------
Reporter: pedromendonca | Owner: SergeyBiryukov
Type: feature request | Status: reviewing
Priority: normal | Milestone: 5.6
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+-----------------------------
Comment (by pedromendonca):
I understand, the main issue is backwards compatibility.
If a plugin or theme uses `%la`, it will currently be parsed as a list +
an ‘a’ concatenated.
If an old code uses `%lall` (“%l” concatenated with “all” - bad example
but possible as it is the expected behavior), with the new function
version the “a” would be absorbed as a parameter and cropped out from the
text string.
As for numbering, the $ tells the code that the next character is a
parameter, and not a text character from the string.
I think an upgrade to this function shouldn’t break existing code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49484#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list