https://github.com/wpessential/wpessential-widgets
WPEssential Widgets helpin in registry of widgets in WordPress.
https://github.com/wpessential/wpessential-widgets
Last synced: 5 months ago
JSON representation
WPEssential Widgets helpin in registry of widgets in WordPress.
- Host: GitHub
- URL: https://github.com/wpessential/wpessential-widgets
- Owner: wpessential
- License: gpl-3.0
- Created: 2024-08-07T14:18:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T14:02:41.000Z (over 1 year ago)
- Last Synced: 2025-04-22T17:45:36.703Z (about 1 year ago)
- Language: PHP
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WPEssential Widgets
Help to register the widgets in WordPress.
`composer require wpessential/wpessential-widgets`
Add the single widget to WordPress registry
```php
$sidebar = \WPEssential\Library\Widget::make();
$sidebar->add('YOUR_NAMESPACE\CLASS_NAME');
$sidebar->init();
```
Add the multiple widgets to WordPress registry
```php
$sidebar = \WPEssential\Library\Widget::make();
$sidebar->adds(['YOUR_NAMESPACE\CLASS_NAME']);
$sidebar->init();
```
Remove the single widget from WordPress registry
```php
$sidebar = \WPEssential\Library\Widget::make();
$sidebar->remove('YOUR_NAMESPACE\CLASS_NAME');
$sidebar->init();
```
Remove the multiple widget from WordPress registry
```php
$sidebar = \WPEssential\Library\Widget::make();
$sidebar->removes(['YOUR_NAMESPACE\CLASS_NAME']);
$sidebar->init();
```