ClioWP Setting Page is my WordPress Plugin that creates a sample Settings Page. This “test” page contains almost any type of field so that it can be used like a “code Generator“.
You can use it as a boilerplate to create your own plugin. Just remove the code for the settings you don’t need and add your custom plugin code! And of course, rename the main PHP Class and complete the metadata appropriately.
It is free and open-source. It is provided under the GPL v2 license.
Supported Fields
- Common input text
- Date input (date picker)
- DateTime input (DateTime picker)
- Password input
- Number input
- Select input
- Checkbox
- Multiselect
- Textarea
- Color input (color picker)
- WYSIWYG editor
Additional Features
- Set a field as required
- Custom sanitization callbacks
- Save the password as a hash
- Pass Custom arguments to the settings field
Download
https://github.com/pontikis/cliowp-settings-page
How to use it
Before using this code in your own plugin:
- Change the text domain (
cliowp-settings-page
) to your own text domain - Make the appropriate changes in parameters in the constructor
Screenshot
Click the screenshot for a full-size image.
References
- Like most plugins, it uses (in the constructor):
- It creates a Settings page (adds an option to the Settings menu)
- It manages settings using
- WordPress Settings API
- WordPress Options API
wp-admin/options.php
as form action
- Translations / Localization (For PHP)