[wp-trac] [WordPress Trac] #34939: Shortcode regex no longer matches [shortcode=XXX]
WordPress Trac
noreply at wordpress.org
Thu Dec 17 06:56:19 UTC 2015
#34939: Shortcode regex no longer matches [shortcode=XXX]
--------------------------+--------------------
Reporter: kraftbj | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.4.1
Component: Shortcodes | Version: 4.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+--------------------
Comment (by kraftbj):
Replying to [comment:16 dd32]:
> (I'm mostly wondering where that syntax came from originally, I suspect
it was accidental and "just worked" with the lazy parser we had)
The backhistory I was able to pull up. The oldest reference I saw of this
was from a WP.com commit from January 2006 (575) when we added support for
a `[youtube=XXX]`, before the Shortcode API existed. It was a
`the_content` filter that replaced this "pre-shortcode" into the full
embed code. There seemed to be other pre-shortcodes in this style. I
didn't research it much, but the few I saw were for adding embed code for
services that no longer exist.
After the Shortcode API was built, WP.com dropped the filter and converted
it to a true shortcode. I don't know if this format was part of the
thought when making the Shortcode API or not, so not sure if this working
was a happy accident or an intentional (albeit maybe undocumented)
feature.
Worth noting that one of the oldest examples of shortcodes noted in the
Codex was this plugin: https://wordpress.org/plugins/bbcode/ by Alex
Mills, which was linked in the
[http://codex.wordpress.org/index.php?title=Shortcode_API&oldid=58597
Codex in June 2008] and still exists in the list of External Resources on
that page as of now. One of the first examples in the plugin's description
includes ` [url="http://wordpress.org/"]WordPress[/url]`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34939#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list