lucatume/wp-wrappers

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
This package is abandoned and no longer maintained. No replacement package was suggested.

WordPress wrappers to streamline development of themes and plugins.

2.0.5 2014-09-18 14:04 UTC

This package is not auto-updated.

Last update: 2016-12-08 10:30:45 UTC


README

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_OptionWrapper::on('my_theme');

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

Serialized tad_OptionWrapper

Much like the tad_OptionWrapper 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_ThemeSupport::addSupport('html5', 'search-form');

// remove the support
tad_ThemeSupport::removeSupport('html5', 'search-form');