With the upcoming release of WordPress 3.4 the focus was on improving the overall theme experience. This means changes to the dashboard and changes to the underlying code. One of the improvements was with registering custom headers, the new streamlined process no longer relied on defining constants. Now simply using add_theme_support(‘custom-header’). This alone wasn’t the end of the improvements, the new system also supports flexible height and width custom headers. Passing an array of arguments to the add_theme_support call to achieve all of this rounds out the functionality improvements.
While the improvements are welcome, as a theme author only supporting the very latest version isn’t a good practice. Backwards compatibility should be thought about until a certain point. This code below will use the new way of adding custom headers if the WordPress version is correct, and fallback to the old way of constants if not. This will allow users who are wary of WordPress upgrades, and those who always run the latest and greatest to both benefit. This is done simply by using the php function version_compare and simply comparing the wp_version variable and the version that should be supported, this case 3.4. The block before the else runs if true and the block after runs if false and an older version. The register_default_headers function is still used to give users a choice of included headers.
Source: Make WordPress Themes

By Frankie Jarrett April 12, 2012 - 1:54 pm
Thanks as usual for the simple and insightful breakdown, Jeremy!