[wp-trac] [WordPress Trac] #17657: Shortcode regex doesn't allow for hyphens in shortcode name

WordPress Trac wp-trac at lists.automattic.com
Mon Jul 9 14:46:18 UTC 2012


#17657: Shortcode regex doesn't allow for hyphens in shortcode name
-------------------------------------+------------------------------
 Reporter:  sivel                    |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Shortcodes               |     Version:  2.9.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------

Comment (by redpixelstudios):

 Replying to [comment:7 bobbingwide]:
 > There is a workaround for this problem. Register the longer names first.
 >
 > whether or not a shortcode containing hyphen(s) is handled depends on
 when it's registered.
 > if it's registered before the shortcode that is the same as the prefix
 before the '-' it's OK
 > it it's registed after, then the shorter shortcode will take precedence
 >
 > So if you have shortcodes wp, wp-1, wp-2 and wp-3 then you should
 register wp last.
 >

 Thanks for the reply, bobbingwide. We will take your workaround under
 advisement until the issue can be resolved entirely.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17657#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list