Download the PHP package threadi/easy-settings-for-wordpress without Composer
On this page you can find all versions of the php package threadi/easy-settings-for-wordpress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download threadi/easy-settings-for-wordpress
More information about threadi/easy-settings-for-wordpress
Files in threadi/easy-settings-for-wordpress
Package easy-settings-for-wordpress
Short Description Provides a settings wrapper for WordPress plugins and themes.
License GPL-3.0-or-later
Informations about the package easy-settings-for-wordpress
Easy Settings for WordPress
This composer package adds a simple wrapper for settings for WordPress plugins and themes. You no longer need to worry about inputting or outputting settings for your own implementation - leave that to this package. Use the WordPress-own get_option() to get the values of your settings.
Advantages
- Don't worry about the data type accuracy of your settings - WordPress doesn't (yet) take that into account, but this package does.
- Save time when configuring your plugin settings.
- Use settings that are interdependent.
- Have your AI generate a ready-made JSON file for your settings, which you can then simply drop in.
- And don't worry about updates or cleaning up after them - this package takes care of that for you.
Requirements
- A custom WordPress plugin or theme
- composer to install this package
Installation
Run this in your custom plugin or theme directory:
composer require threadi/easy-settings-for-wordpress
Remember to embed the composer autoloader in your plugin or theme:
require __DIR__ . '/vendor/autoload.php';
Usage
Note: Take a look at the demo plugin to see how this package can be used.
Quick-Start
This will give you a demo view that you can then further customize:
Use it
Follow the documentation here.
Upgrade hints
for 3.0.0
- remove do_not_register() from TextInfo() and Value() fields
- remove set_type() from Checkbox() fields
- use add_data() instead of set_custom_attributes() for Import and Export buttons
- Do not use add_tab() on "Settings"-object.
For developers of this package
Check for WordPress Coding Standards
Initialize
composer install
Run
vendor/bin/phpcs .
Repair
vendor/bin/phpcbf .
Analyze with PHPStan
vendor/bin/phpstan analyse
Check for WordPress VIP Coding Standards
Hint: this check runs against the VIP-GO-platform, not our target for this package. Many warnings can be ignored.
Run
vendor/bin/phpcs --extensions=php --ignore=*/vendor/*,*/tests/*,*/node_modules/* --standard=WordPress-VIP-Go .