Download the PHP package tmf/wp-metabox-helper without Composer
On this page you can find all versions of the php package tmf/wp-metabox-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tmf/wp-metabox-helper
More information about tmf/wp-metabox-helper
Files in tmf/wp-metabox-helper
Package wp-metabox-helper
Short Description A Pimple service that facilitates the creation of WordPress metaboxes
License MIT
Informations about the package wp-metabox-helper
WordPress Metabox Helper Service
A Pimple service based on the Hookable Service Provider that facilitates the creation of metaboxes for post meta fields. The items in a metabox representing post meta fields are compatible with WordPress revisions and autosaves. This service can be registered in a pimple container and be used in WordPress themes or plugins.
This metabox helper service comes with the following types of items out of the box:
- Text inputs
- Dropdown fields (implemented with selectize)
- Textareas
- TinyMCE Editors
Usage
This service is installable via Composer and relies on it's class autoloading mechanism. You can package the vendor directory with you theme or plugin, with your WordPress installation or with a setup of your choosing.
-
Create a composer project for your plugin or theme:
-
Add the metabox helper service as a dependency in your composer.json
-
Create a pimple container and register the metabox helper service
- Add a metabox and some metabox items representing post meta values
Extend
If you want to use your own metabox items, your item must implement the Tmf\Wordpress\Service\Metabox\Item\MetaboxItemInterface
interface.
You can, however, extend any of the available items or the Tmf\Wordpress\Service\Metabox\Item\TwigTemplateItemRenderer
. If you want to define your own Twig templates for the item rendering, add a Twig loader to the Twig Chain:
All versions of wp-metabox-helper with dependencies
twig/twig Version ~1.0
koala-framework/composer-extra-assets Version ~1.0