[wp-trac] [WordPress Trac] #9405: Shortcode parameter names can't have dashes in them

WordPress Trac noreply at wordpress.org
Tue Oct 28 21:09:17 UTC 2014


#9405: Shortcode parameter names can't have dashes in them
-------------------------------------+-----------------------------
 Reporter:  Viper007Bond             |       Owner:
     Type:  defect (bug)             |      Status:  reopened
 Priority:  lowest                   |   Milestone:  Future Release
Component:  Shortcodes               |     Version:  2.8
 Severity:  minor                    |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------------
Changes (by aaroncampbell):

 * keywords:  has-patch => has-patch needs-testing
 * milestone:  Awaiting Review => Future Release


Comment:

 In #17657 we moved to allowing hyphens in shortcode names. I don't
 actually see a reason to limit hyphens from being at the beginning of a
 parameter name, so in [attachment:9405.3.diff] I went with a simpler regex
 change that allows `[\w-]` for all parameter name characters.  I also
 added a unit test.

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


More information about the wp-trac mailing list