We reported last week that Twitter Bootstrap version 2.0 was released.
This was a huge update that brought many changes and required extensive work on the WordPress Bootstrap CSS plugin.
We released an updated version of the plugin into beta a week ago and we’re quite happy that in its existing state, it’s good for prime time.
That said though, there are a few things you need to take into consideration before upgrading.
Upgrading from pre-2.0.0 WordPress Twitter Bootstrap plugin
You should know there are 2 versions of the Twitter Bootstrap libraries now available within the admin section of the WordPress plugin:
- Twitter Legacy
1. Twitter Legacy
This is the original version (1.4.x) of Twitter Bootstrap. We appreciate that people need time to migrate when there are big changes in a library such as this.
If you want the option to stay up to date with the plugin’s latest features, while giving you time to migrate your site to Twitter Bootstrap version 2.0, you’re covered!
If, when you upgrade to version 2.0 of the WordPress Twitter Bootstrap CSS plugin, you’re configured to us “Twitter” bootstrap, you will automatically be converted to “Twitter Legacy”.
Bugs notwithstanding, there should be absolutely no change in your website appearance and functionality – you can upgrade this plugin with confidence!
“Twitter” represents the latest public, stable version of Twitter Bootstrap. At the time of writing that’s version 2.0.0.
Certain features and libraries are only available with “Twitter” that are not available with “Twitter Legacy”.
We have been diligent in making the admin interface reflect these differences so there should be minimal confusion.
Hot-Linking option is removed (permanently) from version 2.0.0 onwards
Hot-linking resources on your website comes with its own issues, and maintaining the plugin to support hot-linking was proving more work that the possible benefits.
Apologies to anyone who prefers hot-linking. The migration/upgrade from previous versions will be seamless and shouldn’t present any problems.
WordPress shortcodes support for Twitter Bootstrap elements
Since there were serious changes to the Twitter Bootstrap elements, the plugin shortcodes have changed a lot also.
Where possible we’ve tried to maintain backward compatibility with the “Twitter Legacy” configuration, but this wasn’t always possible.
And, as Twitter Bootstrap continues to evolve, we cannot guarantee long-term support for legacy users. So, please upgrade your site to use the latest version as soon as you can.
The following is a short list of the most important notes to take on the shortcodes system:
- [TBS_BUTTON] supports the classes:
danger. But, whichever you choose, this must be the first class defined in the “class” parameter.
- [TBS_LABEL] supports the classes:
important. But, whichever you choose, this must be the first class defined in the “class” parameter.
- [TBS_BLOCK] is no longer supported. Twitter Bootstrap 2.0+ does not have “blocks” and instead uses “alerts” with specific classes. If you use [TBS_BLOCK] with “Twitter Legacy” you should still get blocks, but they are actually alerts with a legacy class defined. You should change all your [TBS_BLOCK] instances to [TBS_ALERT] and use the
- [TBS_ALERT] shortcode has a “class” parameter which can remain undefined (for the default setting), or can use:
alert-error. To use
alert-success, for example, just separate them in the parameter with space, e.g.:
- [TBS_TWIPSY] is no longer supported. Please use [TBS_TOOLTIP] going forward with the same parameters as twipsy. For now, in version 2.0.0 the old shortcode should still work, but we will not be guaranteeing this as versions progress.
- [TBS_TOOLTIP] is unlike TWIPSY with regards the “placement” parameter. The options are now:
- [TBS_POPOVER] is unchanged and works as with Twitter Legacy 1.4.0
Update: 5th March 2012The following are notable additions to the shortcode system
- [TBS_ICON] allows you to add Twitter Bootstrap Glyphicons to your WordPress site.
- [TBS_BUTTONGROUP] allows you to create Twitter Bootstrap Button Groups
At the time of writing, the other shortcodes are currently untested with version 2.0 and are unlikely to work. If you really need them, stick with Twitter Legacy for now.
In the future, I’ll be posting more detailed how-to on the site to use the newest and latest Twitter Bootstrap shortcodes as they become available and updated.