Move to Composer and Packagist complete

I’ve completely moved my library to Packagist to be able to efficiently and reliably manage dependencies using Composer.
I’ve added wrappers and theme customizer to my packages.
Below a copy of the readme files.

Wrappers

A small set of classes wrapping WordPress common operations.

Options

This class allows for creating, reading and updating an options stored in the database. It’s a wrapper around the update_option and load_option methods.
It will create and read array options and keys will be made available using the camelBack format.

// get the 'my_theme' option from the database
$the = \tad\wrappers\Option::on('my_theme');

// if the option defines 'header_text', 'footer_color' and 'sidebar_position'
$headerText = $the->headerText;
$footerColor = $the->footerColor;
$sidebarPosition = $the->sidebarPosition;

Serialized Option

Much like the Option class but without writing support at the moment. Actually feeding it a non-serialized option will not be a problem.

Theme support

Allows for quick addition and removal of theme support in WordPress.

// add HTML5 search form support
\tad\wrappers\ThemeSupport::addSupport('html5', 'search-form');

// remove the support
\tad\wrappers\ThemeSupport::removeSupport('html5', 'search-form');

Theme customizer add-ons

A set of custom controls by paulund, a multi-image control and a theme customizer section wrapper.

Theme customize section

Wraps methods and hooking needed to add sections and fields to the theme customize section to allow code like this

// add the section
$section = new ThemeCustomizeSection('Announcement', 'acme_announcement', 'The home page announcement.', 'acme');

// add a checkbox to toggle showing the announcement on the home page
$section->addSetting('announcement_show', 'Show the announcement on the homeapage.', true, 'checkbox');

// add a text field for the title
$section->addSetting('announcement_title', 'Title', 'Hello', 'textarea');

// add a date picker for the date
$section->addSetting('announcement_date', 'Date', '', 'date-picker');

// add a file upload field for the flyer
$section->addSetting('announcement_flyer', 'Flyer', '', 'upload');

Values will be saved in the acme_announcement option in the database in an array format option.

Customizer controls

I’ve added paulund’s custom controls to the package and mine(s). As seen above those controls can be added to a section using their hyphen-separated slug. See the code for controls.

// add the Multi Image control
$section->addSetting('some_images', 'Some images for fun', '', 'multi-image');

I appreciate your input