Posted on

Hybrid Core 5.0 Offers a More Modern, Modular Approach to WordPress Theme Development

image credit: Shopify

Version 5.0 of Hybrid Core, one of the longest-running WordPress theme frameworks, is now available. Justin Tadlock celebrated 10 years with his Theme Hybrid community last month and released his new Mythic starter theme into beta. Mythic was built on top of Hybrid Core and developed in tandem with version 5.0.

The framework has been rewritten almost entirely from scratch to be a leaner, more modern starting place for theme development. Tadlock describes it as “a fundamentally different framework, rewritten from the ground up, that supports more modern PHP practices.”

“I started 5.0 with a goal of bringing the framework up to date with more modern PHP practices and code,” he said. “The first iteration of the framework was built in 2008, so it was time to get us ready for the next era of theme building.”

In nearly a decade of supporting the framework, Tadlock found that users didn’t always know how to get started building something from scratch. Many copied one of his existing themes and would add and remove things from it based on their own needs.

Version 5.0 doesn’t necessarily make it easier to build on top of Hybrid Core with its new, more complicated method of bootstrapping, new view system for templating, and requirement for using Composer. This is why Tadlock is officially recommending Mythic as the path for building a theme with Hybrid Core in the future. Most of the documentation and tutorials he plans to create in the future will be centered around the Mythic starter theme, which is nearing a 1.0 release.

For many theme developers, Mythic’s use of the BEM (Block-Element-Modifier) CSS class-naming system is their first introduction to a system of non-hierarchal, component-based CSS. Because BEM doesn’t rely on nested selectors, it’s easier for users to overwrite CSS that they want to change. Tadlock explains the benefit for child themes in a recent post about why Mythic uses BEM.

A handful of the Hybrid add-ons are now available as Composer packages, including one for breadcrumbs, customizer controls and settings, Google fonts, and a featured image script. Tadlock plans to split more parts of the framework off into packages in the future for an increasingly modular core.

Hybrid Core 5.0 requires PHP 5.6+ (with 7.0+ recommended) and WordPress 4.9.6+. Tadlock will support Hybrid Core’s 4.x series for at least another year to give theme authors time to adapt.

Posted on

Gutenberg 3.8 Released, Adds Full Screen Mode

Gutenberg 3.8 is available for download. This release features a full screen mode that hides both the admin bar and the menu. Unlike previous versions of Distraction-Free-Writing mode where things would fade in and out of view, these two items stay hidden until full-screen mode is disabled.

User Interface elements have been added to manage reusable blocks in bulk. Theme authors are now able to register editor styles for blocks by targeting the blocks themselves. This avoids combating CSS specificity and doesn’t require knowledge of the internal DOM structure for the editor. 

The block settings icon has been moved from the right side of blocks to the toolbar. This change sets the foundation for refactoring the toolbar and it reduces clutter by keeping the icons together.

Block Settings Moved to The Right Side of The Toolbar

Gutenberg 3.8 also contains a significant increase in performance thanks to a new hand-coded default block parser.

Having a formal specification of the Gutenberg block grammar has allowed us both to maintain a stable core during the almost 40 releases of the plugin and lately to allow competing parser implementation to evolve and be compared in terms of performance and correctness.

In concrete terms, we are shipping a new default implementation that is hundreds of times faster than the spec and has been stress tested with really long posts (including Moby Dick). These tests are also available for anyone to run against. Memory consumption has also gone down dramatically for server side operations. I’d like to specially thank Dennis Snell and Ivan Enderlin for their great work improving this area.

Matias Ventura

To see a complete list of changes along with links to their corresponding pull requests, check out the release post.

Posted on

Gutenberg is Slowly Rolling Out to WordPress.com Users

As part of the roadmap unveiled at WordCamp EU earlier this year, WordPress.com has started rolling out Gutenberg to a subset of users.

Try Gutenberg Call-out on WordPress.com

According to a WordPress.com Happiness Engineer, the team is testing the implementation to determine the best way and time to enable it. Users will not be able to use Gutenberg unless their theme is updated to support blocks and the various alignment options.

Theme Wranglers are already in the process of adding support to WordPress.com’s nearly 100 free themes.

A quick search of the WordPress.com support forums for Gutenberg provides some insight into what users think about the new editor. For example, this user provided feedback on the use of so many icons without displaying their textual equivalent.

For now, Gutenberg is opt-in but eventually will be opt-out. Once Gutenberg is made available to a wider audience, support documents and official blog posts will be published to inform users about the new editor.