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

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 15 22:16:02 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
-----------------------------+----------------------------------------------

Comment(by mikeschinkel):

 Replying to [comment:6 Atoon]:
 > It allow a shortcode to display an icon and allow brackets inside quotes
 to have wiki-like internal links, with a plugin. Also, having it like a
 shortcode helps to change the layout later while retaining the data.

 Ahhh.  So it's your desire to mix wiki-like functionality with shortcode
 functionality using the same syntax as MediaWiki. IMO, not a good idea.

 I would argue the following would be much better in the context of
 WordPress and it's something you can do today w/o enhancements to core
 simply by writing your own shortcode:
 {{{
 [infobox-cd
     name="Abbey Road"
     cover="/laserdisc.jpg"
     artist="The Bombay Beach Boys"
     prev="{{The Wall}}"
     next="{{Born in the U.S.A.}}"]
   [country id="mx"][flag] Argentina[/country]
   [country id="dk"][flag] Vanuatu (post-production)[/country]
   [rating stars="3"]
 [/infobox]
 }}}

 > In general I want to have more wiki-like functionality in WordPress.
 MediaWiki has everything I need but feels overwhelming for private use,
 adds to many stuff and pages I don't need

 Sounds good, but I think you are better off using a different internal
 link syntax than MediaWiki, like the double braces I suggested by
 implication in my example.

 Each syntax has it's appropriate context and within WordPress wikipedia's
 exact syntax just isn't appropriate.  Personally I wanted to see
 [http://bitworking.org/projects/URI-Templates/ URI Template] syntax used
 for permalink structures because it's likely to become a standard but
 finally realized that in WordPress URL templates using the "%var%" syntax
 and I became "one" with it.

 > and you can't have pretty permalinks (yeah, that's an issue).

 Yeah you can, it's just a lot of work (but getting easier.) Hook
 "template_redirect" and you can do whatever you want.

 You might also be interested in the ticket I'd like to most see included
 in core: #12935.

 > Of course, not ''every'' wiki-like function should be on core as several
 stuff exist as plugins or even in core like revisions, but at least some
 current core stuff can be tweaked a bit to don't resort to much hacking.

 You can get the above without any hacking of core.  And frankly, it seems
 like a pretty elegant syntax, IMO.

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


More information about the wp-trac mailing list