This helps you to integrate Dilaz Panel Plugin into your WordPress theme/plugin development.
-
Download and install Dilaz Panel plugin.
-
Download Dilaz Panel Options.
-
Add Dilaz-Panel-Options to the root directory of your theme or plugin.
i) For example:wp-content/themes/theme-name/Dilaz-Panel-Options
OR
wp-content/plugins/plugin-name/Dilaz-Panel-Options
ii) You can optionally rename Dilaz-Panel-Options folder.
-
Add the code provided below in your themes functions.php file or in your plugin's main/index file.
/**
* Admin Panel Options
*/
require_once 'Dilaz-Panel-Options/admin.php';
- Open
Dilaz-Panel-Options
folder and renameconfig-sample.php
toconfig.php
. - Open
Dilaz-Panel-Options/config.php
and edit the parameters as you want. Simple guidelines are provided beside each parameter setting. - Open
Dilaz-Panel-Options/options
folder and renameoptions-sample.php
tooptions.php
. - Open
Dilaz-Panel-Options/options/options.php
and add your admin options.
NOTE:
Dilaz-Panel-Options/custom-options-sample.php
contains examples showing how to use actions hooks to add custom admin options to any Dilaz Panel implementation.Dilaz-Panel-Options/default-options.php
contains default options as examples for all possible admin fields.Dilaz-Panel-Options/import-export.php
contains import/export option settings.
Parameter | Type | Default | Since (Dilaz Panel) | Details |
---|---|---|---|---|
option_name |
string | dilaz_options | v2.3 | Used to save settings. Must be unique. |
option_prefix |
string | dilaz_panel | v2.0 | Not used to save settings. Must be unique. |
use_type |
string | theme | v2.0 | Where the panel is used. Enter theme if used within a theme OR plugin if used within a plugin |
default_options |
boolean | true | v2.0 | Whether to load default options. |
custom_options |
boolean | true | v2.0 | Whether to load custom options. |
page_slug |
string | dilaz_panel | v2.0 | Must be unique. |
page_title |
string | Dilaz Panel | v2.0 | The text to be displayed in the title tags of the page when the menu is selected. |
menu_title |
string | Dilaz Panel | v2.0 | The text to be used for the menu. |
options_view_cap |
array | array('manage_options') | v2.7.8 | The capabilities required for this menu to be displayed to the user. |
options_save_cap |
array | array('manage_options') | v2.7.8 | The capabilities required for the user to save the options for the panel. |
menu_icon |
string | null | v2.0 | Dashicon menu icon. |
menu_position |
int | null | v2.3 | Position in menu order. Works with top-level menu only. |
parent_slug |
string | null | v2.3 | The slug name for the parent menu (or the file name of a standard WordPress admin page). |
admin_bar_menu |
boolean | true | v2.0 | 'true' to show panel in admin bar menu. |
import_export |
boolean | true | v2.0 | 'true' to enable import/export field. |
log_title |
string | Changelog | v2.0 | Changlelog title. |
log_url |
string | # | v2.0 | Changlelog url. Leave empty to disable. |
doc_title |
string | Documentation | v2.0 | Documentation title. |
doc_url |
string | # | v2.0 | Documentation url. Leave empty to disable. |
support_title |
string | Support | v2.0 | Support title. |
support_url |
string | # | v2.0 | Support url. Leave empty to disable. |
options_cap |
string | manage_options | v2.0 | Deprecated since v2.7.8. |
To get a local working copy of the development repository, do:
git clone https://github.com/Rodgath/Dilaz-Panel-Options.git
Alternatively, you can download the latest development version as a tarball as follows:
wget --content-disposition https://github.com/Rodgath/Dilaz-Panel-Options/tarball/master
OR
curl -LJO https://github.com/Rodgath/Dilaz-Panel-Options/tarball/master