Hybrid Core 2.0 Adds Composer Support, Removes Widgets From Framework

Theme Hybrid released Hybrid Core 2.0 today after many months in development. The framework, created by Justin Tadlock, powers this site and many other WordPress sites on the web. Version 1.0 was first released in October 2010, built from the engine that made up the base of Tadlock’s popular Hybrid Theme.

Since that time, Hybrid Core has been downloaded hundreds of thousands of times. Version 2.0 includes more than 200 commits and several major changes that will be important for users and theme developers to know about.

Composer Support

Tadlock credits Andrey Savchenko (@Rarst) with helping to add Composer support to Hybrid Core. Composer is a dependency manager for PHP that operates on a project-by-project basis by pulling in all the required libraries to manage them in one place.

Hybrid Core now includes a composer.json file and those familiar with Composer can find the package link on Packagist. Please note that using Composer is optional and not required for using Hybrid Core. For more information on getting started, check out @Rarst’s mini guide on using Composer with WordPress.

Trimming the Framework

Hybrid Core 2.0 is a return to the basics of WordPress theme development in that it further separates functionality from presentation. Tadlock took a blade to the framework and sliced out a sizeable chunk of legacy code, opting to support accompanying plugins to keep the core lean.

Widgets have been completely removed in favor of the Widgets Reloaded plugin, which Tadlock recommends users install if they want to keep their widgets. Entry Views was converted into a WordPress plugin in order to help keep the framework more modular. Several extensions were dropped entirely, along with post and comment-related template shortcodes and deprecated functions prior to 2.0.

Theme developers will be particularly interested in the new attribute system which allows for more flexibility than using body_class(). It includes built-in support for ARIA and Schema.org microdata.

Hybrid Core 2.0 also organizes all of the framework’s template tags into a /functions directory and introduces many new tags for theme authors. “Most of them are on my WordPress ‘wish list,'” Tadlock said. “So I hope to eventually see them added to core WordPress. They are functions that I believe are hugely beneficial to theme authors.”

Overall, Tadlock was able reduce 66 KB from the Hybrid Core zip file, while adding new features for theme developers at the same time. Naturally, if your site was making use of anything that was removed, an update to 2.0 may require you to add a new plugin or make transitions in your theme’s code. You’ll want to review the specifics outlined in the release announcement.

Theme Hybrid has always been on the forefront of defining and redefining WordPress theme frameworks and the relationship between parent/child themes. Tadlock is a purist when it comes to WordPress theme development best practices and his commitment to data portability is admirable in a theme market where many of the largest sellers are only there to make a buck.

Hybrid Core 2.0 is a much leaner version of the framework that theme developers have been working with for years. As documentation is still being written, you’ll need to take it out of the box and explore the code to find all the new goodies. Hybrid Core 2.0, like all Theme Hybrid plugins and themes, is available to download for free.