[wp-trac] [WordPress Trac] #47863: Fix odd, unexpected output from shortcode_parse_attts
WordPress Trac
noreply at wordpress.org
Wed Jul 16 01:19:04 UTC 2025
#47863: Fix odd, unexpected output from shortcode_parse_attts
-------------------------------------------------+-------------------------
Reporter: mauteri | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Shortcodes | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests dev- | Focuses:
feedback |
-------------------------------------------------+-------------------------
Comment (by johnjamesjacoby):
r55711 updated the PHPDoc for the `$text` parameter.
> What is everyone's thoughts on introducing this code in a new function
(something like maybe wp_parse_atts), updating core to use the new
function, and deprecating shortcode_parse_atts. That way we can introduce
a better, more reliable function and not break backwards compatibility.
I'd vote not to deprecate `shortcode_parse_atts()` until there is some
other core use-case for that new function.
Adjacent to this, I looked at the the HTML API (that was introduced in
6.2) and it does not appear to have a modern equivalent either
unfortunately, nor does there appear to even be a need to "parse" all of
the attributes from a string into an array anywhere else in core
currently.
With the benefit of hindsight from 5 years ago to now, I think I agree
more with @joyously's last comment, where maybe this is worth leaving as-
is and closing as wontfix?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47863#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list