[wp-trac] [WordPress Trac] #7045: No name shortcode atts
WordPress Trac
noreply at wordpress.org
Tue Oct 28 23:11:45 UTC 2014
#7045: No name shortcode atts
-------------------------------+-----------------------------
Reporter: Viper007Bond | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Shortcodes | Version: 2.6
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+-----------------------------
Changes (by aaroncampbell):
* keywords: has-patch => reporter-feedback
Comment:
I have a feeling that this really isn't an actual problem. In the last 5
years it looks like "supporting WP.com's old fake shortcode format" was
pretty much the only time this "issue" was hit, and it probably wasn't
that hard to code around.
Here are all the samples I looked at and the attributes they get:
{{{
[test-7045=foo]
array(1) {
[0]=>
string(4) "=foo"
}
}}}
This seems like a really rare issue, and it's a misformatted shortcode.
All you need to do though is ltrim the =
{{{
[test-7045="foo"]
array(1) {
[0]=>
string(6) "="foo""
}
}}}
This also seems rare and is also misformatted. It requires a little more
cleanup, but still the problem is really that this shortcode is wrong (and
as far as I can tell, we've never said otherwise).
{{{
[test-7045 foo]
array(1) {
[0]=>
string(3) "foo"
}
}}}
This is actually properly formatted and I've definitely seen this used
before. This is really the only one here that I think we should consider
fixing, and even then I'm tempted to just say that foo being seen as a
parameter value rather than a parameter name is fine. Thoughts?
{{{
[test-7045 "foo"]
array(1) {
[0]=>
string(3) "foo"
}
}}}
This is actually properly formatted and I've definitely seen this used
before, but treating the foo as a parameter value rather than a parameter
seems sane when it's quoted.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/7045#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list