PHP code example of wpessential / wpessential-widgets

1. Go to this page and download the library: Download wpessential/wpessential-widgets library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wpessential / wpessential-widgets example snippets


$sidebar = \WPEssential\Library\Widget::make();
$sidebar->add('YOUR_NAMESPACE\CLASS_NAME');
$sidebar->init();

$sidebar = \WPEssential\Library\Widget::make();
$sidebar->adds(['YOUR_NAMESPACE\CLASS_NAME']);
$sidebar->init();

$sidebar = \WPEssential\Library\Widget::make();
$sidebar->remove('YOUR_NAMESPACE\CLASS_NAME');
$sidebar->init();

$sidebar = \WPEssential\Library\Widget::make();
$sidebar->removes(['YOUR_NAMESPACE\CLASS_NAME']);
$sidebar->init();