WordPress options builder class is a library that helps you setup theme or plugin options that store data in the database with just a few lines of code.
- Fully escaped & sanitized
- More data storage APIs
- Cleaned up styles
- Improved Media field
- Cruft cleanup
- Inline docblocks
- ... and much more!
- Include in your plugin by creating or adding the following to your composer.json file in the root of the plugin
{
"require": {
"WordPress-Phoenix/wordpress-options-builder-class": "3.*"
}
}
- Confirm that composer is installed in your development enviroment using
which composer
. - Open CLI into your plugins root directory and run
composer install
. - Confirm that it created the vendor folder in your plugin.
- In your plugins main file, near the code where you include other files place the following:
if( file_exists( dirname( __FILE__ ) . 'vendor/autoload.php' ) ) {
include_once dirname( __FILE__ ) . 'vendor/autoload.php';
}
- Download the most updated copy of this repository from
https://api.github.com/repos/WordPress-Phoenix/wordpress-options-builder-class/zipball
- Extract the zip file, and copy the PHP file into your plugin project.
- Use SSI (Server Side Includes) to include the file into your plugin.
- Get started at the Wiki describing Panel, Section and Part schemas
- See a full example in the WPOP Example Plugin
- Generate a working copy using the WordPress Development Toolkit and the Abstract Plugin Base.