[wp-trac] [WordPress Trac] #12982: Shortcodes don't allow shortcodes in attributes
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 15 04:47:20 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 Atoon):
Replying to [comment:3 mikeschinkel]:
> While I am normally not the one to disagree with a feature request this
does strike me as violating a lot of the assumptions of attributes in
HTML/XHTML after which shortcodes are at least partially modeled. I fear
potential unintended consequences (read: "hard to squash bugs") if this
were enabled.
>
> Can you give some example use cases where this would really be
important? You've described in abstract but I don't see examples that
demonstrate a need that can only be accomplished using your proposal.
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.
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12982#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list