The publishing platform and CMS WordPress has released version 3.4 which includes many new features and lots of fixes. If you’re running WordPress, then you will be able to upgrade to the new version automatically from your control panel.
Major Changes Relating to Development of WordPress Sites
Version 3.4 offers a lot of minor updates for developers under Development, Themes, Plugins. The major updates relevant to website builds are:
The biggest noticeable feature is the Theme Customizer which allows users to customize theme options before activating a new theme. Watch the release video to see this functionality in detail.
But what does this change mean from a development standpoint? This post provides some detail. At first it appeared that these options were defaults set in stone. But actually, you can set the allowed theme “controls” in the customizer in your theme. You can even write your own custom controls. The customizer makes use of existing theme options, as one blogger explains:
“You already have a theme options page, right? So somehow, you’re saving those options. And in the theme, it’s reading those options using get_theme_mod or get_option, right? The way the theme customizer works is that it intercepts that call using a filter, changes the option for the previewer case only, and then passes the new option along to the theme. So the theme has no idea that the value it’s getting isn’t in the database, but one the user just selected. That’s the magic trick and why themes don’t have to dramatically change to support this sort of thing.”
- Improved Custom Headers with flexible sizes – “You can now use your own image dimensions”
- Selecting Custom Header Images and Custom Background Images from Media Library Screen
Websites often have a photo header or banner area at the top. Previously, this area needed to cropped at the exact width and height in pixels before choosing the header image in WordPress. Now it will be stretched dynamically to the width if it isn’t the exact size.
Other Noteworthy Improvements
Other noteworthy changes introduced in this release are:
- Support HTML in image captions
- Tweets can now be embedded by simply saving a link to the individual tweet in the editor
- Dashboard Widgets and Default Links are available for translation
- Deprecate add_custom_background() in favor of add_theme_support( ‘custom-background’ )
- Deprecate add_custom_image_header() in favor of add_theme_support( ‘custom-header’ )
- Introduce display_header_text()
- Introduce get_page_template_slug( $id = null ) to return a page’s template (like “showcase.php”);