Download the PHP package wordpressvn/wp-meta-box without Composer
On this page you can find all versions of the php package wordpressvn/wp-meta-box. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wordpressvn/wp-meta-box
More information about wordpressvn/wp-meta-box
Files in wordpressvn/wp-meta-box
Package wp-meta-box
Short Description Handy package to make creating WordPress meta boxes a breeze.
License GPL-2.0
Informations about the package wp-meta-box
WP Meta Box
This package aims to make it easier to create meta boxes for WordPress plugins.
⚠️ Untill the first stable release, the API is subject to change. Use at your own risk.
Installation
Usage
Basic example
Available types
- Text
- Date
- Number
- Textarea
- Checkbox
- Choices (Radio Buttons)
- Color
- Select
- Select2
- Media
- Image
- Code Editor
- WP Editor
- Repeater
Text
Date
Number
Textarea
Checkbox
Choices (radio buttons)
Color
Select
You can allow multiple values too.
Select2
Select2 gives you a customizable select box with support for searching.
You can use select2
the same way you use the regular select
.
If you would like to search the options through ajax, you can do this by defining two callbacks (or function names). One for fetching and filtering the options and one for getting the value callback.
The below example is using select2 to select a page.
You may allow multiple values by settings the multiple
value in config
to true. If you want to use the ajax functionality here, be sure to define value callback here as well.
You can pass anything you'd like to the select2 configuration using config
, the exception being the ajax part of the configuration.
A list of options can be found here.
The Select2 that comes with the package is loaded from the Cloudflare CDN. You can overwrite this using the wmb_select2_assets
filter hook.
Media
Image
Code editor
WP Editor
You can provide a config
array to customize the editor. For more information on this config check out the wp.editor documentation.
Repeater
Example of a gallery using the repeater option:
Contributors
License
MIT. Please see the License File for more information.