[wp-trac] [WordPress Trac] #47863: Fix odd, unexpected output from shortcode_parse_attts

WordPress Trac noreply at wordpress.org
Mon Aug 12 02:35:19 UTC 2019


#47863: Fix odd, unexpected output from shortcode_parse_attts
--------------------------------------+-----------------------------
 Reporter:  mauteri                   |       Owner:  SergeyBiryukov
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  5.3
Component:  Shortcodes                |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------

Comment (by mauteri):

 Thanks for the feedback, @birgire. All sounds very reasonable. Curious
 about the long array syntax since PHP minimum requirement was just raised
 from 5.2 to 5.6.20 only in last major version. Could that standard now be
 dated since shorthand arrays in PHP was introduced in PHP 5.4 and maybe
 the WordPress standard should be updated to reflect what is possible in
 the new minimum version of PHP?

 Also, I found the `$text` parameter naming to be a bit odd. Just from
 seeing the name of the function `shortcode_parse_atts` seems it should
 ONLY accept shortcodes to have their atts parsed (which made it very odd
 to me when it messed that up in the first place).  Seems a better name for
 that argument would be `$shortcode` to make it very clear that a shortcode
 should be passed to it to have its atts parsed. I'm just thinking of other
 improvements that could be made if you and others agree.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47863#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list