WordPress 2.5.1: Shortcodes updates

WordPress 2.5.1 is out, with a ton of little bug fixes and one important security fix. Go upgrade your 2.5 blogs now.

One area that has changed is shortcodes, those little square bracket shortcuts like [gallery]. In WP 2.5, those were processed before paragraphs were auto-created and quotes were curled. This lead to funky (and invalid) XHTML formatting for block-level shortcodes like the [gallery] one. In 2.5.1, shortcodes are parsed “at 11” — that is, after paragraphs are wrapped and quotes are curled. Additionally, a shortcode with a buffer line between surrounding content will not be paragraph wrapped.

Example:

[gallery]

That shortcode’s output would be untouched by WordPress — whatever the shortcode outputs is going to the browser. Note that if you’re a plugin developer and you want the output of your shortcode to be p-wrapped or have its quotes curled, you’ll have to call those functions yourself. At some point in the future we may add more options for shortcode calling, but for now, you’re on your own for formatting.

Be sure to check out the excellent documentation for this feature!

44 thoughts on “WordPress 2.5.1: Shortcodes updates

  1. Great job guys, I just upgraded to the new version.
    Checking out the the new fixes.
    Keep up the good work.

  2. @Kuya: The strip will be gone in a few hours (if it hasn’t already). Basically WP checks for updates only a limited number of times in a day.

  3. I upgraded to version 2.5.1. None of my RSS link pages work. The shortcode is rendered as text in some cases.

    I’ve tried subbing other plugins but nothing works. Is the a compatible program with version 2.5.1 for putting RSS in a post?

  4. I won’t take any chances yet. I don’t want to screw up my blog. Better wait and watch. I am satisfied with WordPress 2.5… Its just that I have too many assets at risk in case anything goes wrong while updating to 2.5.1

  5. I upgraded from 2.04 to 2.51 two days ago with minimal problems. It was long overdue. Used the automatic upgrade plugin. Had to manually reactivate my plugins, but nothing too painful. I didn’t even know about shortcodes before. Thanks for the info.

  6. Can I get my older version back ??

    I get bug after bug..
    My text does not work properly. can not center images and my page is totaly messed up..
    Have a widget ready theme and am all up to date with my site plugins..

    I wish I never had the 2.5.1 update !!

  7. I took the risk and upgraded the site, http://www.enfotainer.com/

    Everything seems to work fine. However, when I tried to upgrade the theme that I’m currently using, everything went beserk. I’m glad I first backed up the old theme version.

    However, I heard from lots of people that upgrading WP is a must from security point of view. So I suggest everyone to upgrade the WP as soon as upgrades are available. This really minimizes the loophole for hackers, trust me on this!

Comments are closed.