Commit Graph

40 Commits

Author SHA1 Message Date
Scott Taylor 947aa04900 Update the inline docs for `add_shortcode()` to eliminate suggestion to use `extract()`.
See #22400.

Built from https://develop.svn.wordpress.org/trunk@28413


git-svn-id: http://core.svn.wordpress.org/trunk@28240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 03:28:15 +00:00
Andrew Nacin 5468377d3e Bail early from shortcode functions if no delimiter is present.
This is a significant performance improvement for processing content without shortcodes, and only the slightest hit when content contains shortcodes (which must then undergo processing anyway). Performance results on the ticket.

props TobiasBg.
fixes #23855.

Built from https://develop.svn.wordpress.org/trunk@27394


git-svn-id: http://core.svn.wordpress.org/trunk@27242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 07:11:13 +00:00
Drew Jaynes cd8cedc40d First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713.

Built from https://develop.svn.wordpress.org/trunk@26868


git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +00:00
Andrew Nacin 70fd806759 Revert r25824:25875 from the core.svn.wordpress.org repository.
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.


git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00
Andrew Nacin 8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

Built from https://develop.svn.wordpress.org/trunk@25825


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Ryan Boren b87d4b77e5 Pinking shears
Built from https://develop.svn.wordpress.org/trunk@25880


git-svn-id: http://core.svn.wordpress.org/trunk@25792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 14:38:10 +00:00
Sergey Biryukov c227a3d78a Inline documentation for hooks in wp-includes/shortcodes.php.
props natejacobs.
see #25229.
Built from https://develop.svn.wordpress.org/trunk@25423


git-svn-id: http://core.svn.wordpress.org/trunk@25348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-13 09:02:09 +00:00
Andrew Nacin 3139a0451e Variables passed by reference do not need to be set first.
props kovshenin.
see #24222.



git-svn-id: http://core.svn.wordpress.org/trunk@24129 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-29 14:48:31 +00:00
Mark Jaquith 53d12e91bc Introduce [audio] and [video] shortcodes, and use MediaElement.js to play them.
props wonderboymusic. see #23282.

git-svn-id: http://core.svn.wordpress.org/trunk@23729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-16 05:25:44 +00:00
Andrew Nacin c3a174becd Add shortcode_atts_$shortcode filter for when the name of the shortcode is passed to shortcode_atts(). props coffee2code. fixes #15155.
git-svn-id: http://core.svn.wordpress.org/trunk@23626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-06 20:07:40 +00:00
Jon Cave df39c7be71 Update shortcode regular expression commentary. See #17657.
git-svn-id: http://core.svn.wordpress.org/trunk@22401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 14:47:33 +00:00
Ryan Boren 3757d63f6b Allow hyphens in shortcode names.
Props kovshenin, solarissmoke, aaroncampbell
fixes #17657


git-svn-id: http://core.svn.wordpress.org/trunk@22382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 22:27:36 +00:00
Andrew Nacin ab5878259e Add a comment to get_shortcode_regex() mentioning its near clones elsewhere. see #21996.
git-svn-id: http://core.svn.wordpress.org/trunk@22005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 01:16:31 +00:00
ryan e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan 83b131f8e3 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:50:54 +00:00
ryan 80351b789d Avoid preg backtrack limit errors with large posts when processing shortcodes. Props mdawaffe. fixes #15600
git-svn-id: http://svn.automattic.com/wordpress/trunk@18952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-10-12 16:50:30 +00:00
duck_ 2f51b9be0d Fix typos in documentation (wp-includes/[i-z]). See #18560.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-05 19:08:15 +00:00
markjaquith e0872e840c Make it obvious that do_shortcode_tag passes the tag as the third parameter. plus code spacing cleanup.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-01-17 22:51:15 +00:00
markjaquith f4ae37b9f1 Do not destroy characters surrounding shortcodes in strip_shortcodes(). fixes #10326
git-svn-id: http://svn.automattic.com/wordpress/trunk@12206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-11-18 08:12:05 +00:00
ryan e8b6fe7347 Trim trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@10810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-03-18 02:43:45 +00:00
westi 56436d1ffc Fix regression in shortcode behaviour. Fixes #9238 props tellyworth.
git-svn-id: http://svn.automattic.com/wordpress/trunk@10658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-27 17:01:59 +00:00
westi e5003996e3 Introduce a simple mechanism for escaping shortcodes by doubling the [[]]. Fixes #6518 props tellyworth.
git-svn-id: http://svn.automattic.com/wordpress/trunk@10576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2009-02-15 16:01:14 +00:00
ryan e02f178aa0 Pass tag name when using shortcodes. Props Viper007Bond. fixes #6606
git-svn-id: http://svn.automattic.com/wordpress/trunk@8613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-11 04:00:33 +00:00
ryan 35b18e5034 Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@8600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-08-09 05:36:14 +00:00
ryan f0935b49ae phpdoc for shortcodes from jacobsantos. fixes #7184
git-svn-id: http://svn.automattic.com/wordpress/trunk@8196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-06-26 15:55:33 +00:00
ryan 570cb5374c Strip shortcodes when making excerpts. Props hailin. fixes #7100
git-svn-id: http://svn.automattic.com/wordpress/trunk@8054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-06-05 20:11:38 +00:00
markjaquith ca6bd9ebd5 Don't wpautop()-wrap shortcodes that stand alone. fixes #6444 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@7815 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-25 00:45:31 +00:00
markjaquith 6930439dfe Revert [7700] from trunk in preparation for a different #6444 solution
git-svn-id: http://svn.automattic.com/wordpress/trunk@7814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-25 00:43:44 +00:00
ryan c77c239754 Normalize whitespace when parsing shortcodes. Props azaozz. fixes #6562 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@7769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-22 20:54:51 +00:00
markjaquith 9df4077f95 Allow shortcodes to run before or after wpautop()/texturize() formatting. Default to before for WP 2.5 compat. Props AaronCampbell
git-svn-id: http://svn.automattic.com/wordpress/trunk@7699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-04-16 21:07:04 +00:00
markjaquith 359fb2aced Parse shortcodes AFTER wpautop() to avoid mangling. Have wptexturize() ignore shortcodes so quotes stay straight. fixes #6444 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@7581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-31 07:56:58 +00:00
matt a419491688 Shortcode quotes were getting texturized, which can cause a bit of chaos. Fixes #6436.
git-svn-id: http://svn.automattic.com/wordpress/trunk@7561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-28 15:23:09 +00:00
ryan 193b20c03f Gallery display enhancements from tellyworth. fixes #6368
git-svn-id: http://svn.automattic.com/wordpress/trunk@7496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-24 02:57:19 +00:00
ryan c506a8173c Fix insert, gallery, sizing, type queries, errors, thumbs, type fallback. Props andy. see #5911
git-svn-id: http://svn.automattic.com/wordpress/trunk@7172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-03-06 19:48:54 +00:00
ryan 4bbe72cd41 shortcodes should not require var=val format. Props andy. fixes #5892
git-svn-id: http://svn.automattic.com/wordpress/trunk@6939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-20 16:47:50 +00:00
ryan 3e9b80d5ef Support positional attributes in shortcodes. Props tellyworth. fixes #5914
git-svn-id: http://svn.automattic.com/wordpress/trunk@6911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-19 06:52:30 +00:00
ryan 9900f35dd3 Fix floated left gallery layout breaks. Prop s nbachiyski. fixes #5828
git-svn-id: http://svn.automattic.com/wordpress/trunk@6801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-13 06:35:21 +00:00
matt 3b82a74e29 Blow out mem limit, slightly larger thumbnails.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-11 09:02:44 +00:00
ryan d88983793b Trailing whitespace cleanup
git-svn-id: http://svn.automattic.com/wordpress/trunk@6726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-02-05 06:47:27 +00:00
matt f529123061 First pass at async upload, multi-upload, and gallery feature. Modified names from patch. Hat tip: tellyworth, skeltoac.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2008-01-25 19:21:11 +00:00