This helps you to integrate Dilaz Metabox Plugin into your WordPress theme/plugin development.
-
Download and install Dilaz Metabox plugin.
-
Download Dilaz Metabox Options.
-
Add Dilaz-Metabox-Options to the root directory of your theme or plugin.
i) For example:wp-content/themes/theme-name/Dilaz-Metabox-Options
OR
wp-content/plugins/plugin-name/Dilaz-Metabox-Options
ii) You can optionally rename Dilaz-Metabox-Options folder.
-
Add the code provided below in your themes functions.php file or in your plugin's main/index file.
/**
* Metabox Options
*/
require_once 'Dilaz-Metaboxes-Options/metabox.php';
- Open
Dilaz-Metabox-Options
folder and renameconfig-sample.php
toconfig.php
. - Open
Dilaz-Metabox-Options/config.php
and edit the parameters as you want. Simple guidelines are provided beside each parameter setting. - Open
Dilaz-Metabox-Options/options
folder and renameoptions-sample.php
tooptions.php
. - Open
Dilaz-Metabox-Options/options/options.php
and add your metabox options.
NOTE:
Dilaz-Metabox-Options/custom-options-sample.php
contains examples that show how to use actions hooks to add custom metabox option fields to any Dilaz Metabox implementation.Dilaz-Metabox-Options/default-options.php
contains default options as examples for all possible metabox fields.
Parameter | Type | Since (Dilaz Metabox) | Details |
---|---|---|---|
prefix |
string | v2.5.1 | Used to save settings. Must be unique. |
use_type |
string | v2.5.1 | Where the panel is used. Enter theme if used within a theme OR plugin if used within a plugin. |
default_options |
boolean | v2.5.1 | Whether to load default options. |
custom_options |
boolean | v2.5.1 | Whether to load custom options. |
To get a local working copy of the development repository, do:
git clone https://github.com/Rodgath/Dilaz-Metabox-Options.git
Alternatively, you can download the latest development version as a tarball as follows:
wget --content-disposition https://github.com/Rodgath/Dilaz-Metabox-Options/tarball/master
OR
curl -LJO https://github.com/Rodgath/Dilaz-Metabox-Options/tarball/master