| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; // Exit if accessed directly. |
| 5 |
} |
| 6 |
|
| 7 |
/** |
| 8 |
* The template for adding Custom Sidebars and Widgets |
| 9 |
* |
| 10 |
* @package Essential_Widgets |
| 11 |
*/ |
| 12 |
|
| 13 |
// Load Archives Widget |
| 14 |
|
| 15 |
$option = essential_widgets_get_options(); |
| 16 |
$widget_list = essential_widgets_list(); |
| 17 |
|
| 18 |
foreach( $widget_list as $key => $value ) { |
| 19 |
if( 1 == $option[ $key ] ) { |
| 20 |
$widget_file = str_replace( '_', '-', $key ); |
| 21 |
|
| 22 |
// Enqueue active widget files |
| 23 |
include plugin_dir_path( __FILE__ ) . 'class-' . $widget_file . '.php'; |
| 24 |
} |
| 25 |
} |
| 26 |
|