[wp-trac] [WordPress Trac] #12982: Shortcodes don't allow shortcodes in attributes

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 15 05:28:00 UTC 2010


#12982: Shortcodes don't allow shortcodes in attributes
-----------------------------+----------------------------------------------
 Reporter:  Atoon            |       Owner:                  
     Type:  feature request  |      Status:  new             
 Priority:  normal           |   Milestone:  Future Release  
Component:  Shortcodes       |     Version:  3.0             
 Severity:  normal           |    Keywords:  needs-unit-tests
-----------------------------+----------------------------------------------
Changes (by mikeschinkel):

 * cc: mikeschinkel@… (removed)


Comment:

 Replying to [comment:4 Atoon]:
 > Indeed it feels unnatural, but in general a plain regex don't behave
 exactly like normal HTML tags, like in the impossibility of embed a same
 shortcode inside the content of itself, as far as I know. In an attribute
 is possible, thought.

 If robustness is a concern I had the chose between a regex and a parser
 I'd not choose the regex solution...

 Replying to [comment:4 Atoon]:
 > I was trying to replicate the usage of MediaWiki templates (or
 "transclusion"), which allow to create snippets with custom snippets and
 markup inside the attributes and even with parse functions (which can
 already be done with PHP).
 [http://en.wikipedia.org/w/index.php?title=D-Sides&action=edit An example,
 although a bit extreme]. I was trying to update an old plugin with a
 similar function, but since shortcodes is already the most similar
 approach I thought it could fit.

 Okay, so I see your inspiration for the request but I still don't see a
 specific use-case that you are trying to accomplish.  Can you give some
 concrete examples?

 Also, rather than:
 {{{
 [foo bar="[baz /]"]content[/foo]
 }}}

 Why would this not be a workable solution?
 {{{
 [foo][bar][baz /][/bar]content[/foo]
 }}}

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


More information about the wp-trac mailing list