Smart WYSIWYG Blocks of Content is now 3.1 compatible

Today was a big day for the WordPress community. WordPress 3.1 was released, introducing a bunch of exciting new features. Like most people, I updated some of my WordPress installations right away. One of my clients installations was running my Smart WYSIWYG Smart Blocks of Content plugin and when I updated that installation to 3.1, I instantly noticed that there was something wrong.

All of the Smart Blocks where no longer available and WordPress trimmed the post_type of the Custom Post Type to a lowercase version without spaces. Once I started the plugin, I choose to use ‘Smart Block’ as a post_type, which seemed to be a great idea back then. But with the change to a lowercase version in the WordPress queries, all of the Smart Blocks where no longer query-able, so pretty useless.

Hero of the day is Andrew Nacin, who pointed me to some code in his Log Deprecated Notices plugin, which I could use to fix this problem. Few minutes ago, I fixed the plugin, all new Smart Blocks will be using ‘smartblock’ as post_type and all the old Smart Blocks will be converted to new onces, the minute you update the plugin to version 0.4.1.

UPDATE: Thanks to Brian’s comment, I managed to fix another bug in this plugin. It is fixed in version 0.4.2 which is now the latest version available.

2 thoughts on “Smart WYSIWYG Blocks of Content is now 3.1 compatible

  1. Hi Coen,

    Thanks for the great plugin. It’s been really useful in several situations, and today’s upgrade was very easy.

    One minor issue I’ve had is in using the shortcode. If a shortcode is placed within post or page content, all of the SWBOC content appears at the top of the post, rather than where I placed the shortcode within the content. I was able to fix this by changing..

    line 28 from: the_content();
    to: $content .= get_the_content();

    .. and adding at line 34: return $content;

    Thanks again,
    Brian

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s