What’s new in WBF 1.1.0 and Waboot 2.3.0

WBF v1.1.0 and Waboot v2.3.0 are a big step towards the official launch of both platforms and features some interesting changes.

For the 1.1.0 milestone, WBF core architecture has been completely revamped. We switched from a singleton pattern to a dependency injection-like structure. This is the first step to make the framework testable in a more efficient way.

The PluginCore class now acts as a service container. We moved the management of all the additional services WBF provides (notice manager, mobile detect, styles compiler and custom updater) to a ServiceManager class that is injected into the core class. This behavior will be further enhanced in future releases.

The Resource class is now gone and all the methods to get the theme work directories have been implemented into the core.

We also removed the obsolete PageBuilder module and some old legacy code about theme customizations.

Along these changes we added two new shiny modules: Update Channels and Plugin Options. The first allows developers to add an update channel switching feature for their custom updaters in the WBF Status page, the latter makes available an API to easily create settings pages for WBF-compatible plugins. See the linked docs for more informations.

Waboot 2.3.0 has some interesting changes too: finally, it feature an auto-installer for WBF; furthermore the Theme class now has a method called add_component_style() that allows to specify a style file that will be merged into a single style file containing all the active components styles added via this method and this will be automatically enqueued by Waboot.

This completes the Components styles management possibilities along the add_inline_style() method (that merges all the active components styles and put them inline into the html).

From the v2.2.0 we also abandoned the templates/wordpress directory and moved all the WordPress standard templates one level up to reduce unnecessary nesting.

See the changelogs for both WBF and Waboot for more informations.

You can download the new version packages here (WBF) and here (Waboot).

We still need some testing for these new releases, so if you happen to find a bug, do not esitate to report it via our github repositories. Thanks.

How detect mobile browsers with WBF

WBF has a built-in mobile detect service (provided by Mobile_Detect class) that you can use via PHP.

You can use the service like so:

	//Code for WBF 1.0.x
	if(WBF()->get_mobile_detect()->isMobile()){
		//...do stuff
	}

	//Code for WBF 1.1.x
	if(WBF()->services()->get_mobile_detect()->isMobile()){
		//...do stuff
	}

The Mobile_Detect class can do much more than that, like detect the type of browser the user is using. You can refer to the class code examples for more information.