Download the PHP package ernilambar/widget-helper without Composer
On this page you can find all versions of the php package ernilambar/widget-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ernilambar/widget-helper
More information about ernilambar/widget-helper
Files in ernilambar/widget-helper
Package widget-helper
Short Description WordPress widget helper
License MIT
Homepage https://github.com/ernilambar/widget-helper
Informations about the package widget-helper
Widget Helper
Simple helper library which helps to create WordPress widgets in fast and east way.
Requirements
- WordPress 5.1+.
- PHP 5.6+.
- Composer for managing PHP dependencies.
Installation
First, you'll need to open your command line tool and change directories to your theme folder.
Then, use Composer to install the package.
Assuming you're not already including the Composer autoload file for your theme and are shipping this as part of your theme package, you'll want something like the following bit of code in your theme's functions.php
to autoload this package (and any others).
The Composer autoload file will automatically load up the package for you and make its code available for you to use.
Package comes with the JS and CSS needed for the widgets fields. You can enqueue assets like given in the example below.
Usage
You can create your new widget with extending the helper class.
Available fields
- Text
- URL
- Number
- Checkbox
- Radio
- Radio Image
- Color
- Select
- Dropdown Pages
- Dropdown Taxonomies
- Image
- Textarea
- Heading
- Message
- Separator
Copyright and License
This project is licensed under the MIT.
2020 © Nilambar Sharma.