CatPackages.php
4 years ago
Categories.php
4 years ago
ListPackages.php
4 years ago
NewDownloads.php
4 years ago
PackageInfo.php
4 years ago
Search.php
4 years ago
Tags.php
2 years ago
TopDownloads.php
4 years ago
WidgetController.php
2 years ago
WidgetController.php
35 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace WPDM\Widgets; |
| 5 | |
| 6 | |
| 7 | class WidgetController |
| 8 | { |
| 9 | private static $widget_controller_instance = null; |
| 10 | |
| 11 | public static function instance(){ |
| 12 | if ( is_null( self::$widget_controller_instance ) ) { |
| 13 | self::$widget_controller_instance = new self(); |
| 14 | } |
| 15 | return self::$widget_controller_instance; |
| 16 | } |
| 17 | |
| 18 | private function __construct() |
| 19 | { |
| 20 | add_action('widgets_init', function(){ |
| 21 | include_once __DIR__.'/Categories.php'; |
| 22 | include_once __DIR__.'/CatPackages.php'; |
| 23 | include_once __DIR__.'/ListPackages.php'; |
| 24 | include_once __DIR__.'/NewDownloads.php'; |
| 25 | include_once __DIR__.'/PackageInfo.php'; |
| 26 | include_once __DIR__.'/Tags.php'; |
| 27 | include_once __DIR__.'/Search.php'; |
| 28 | include_once __DIR__.'/TopDownloads.php'; |
| 29 | }); |
| 30 | |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | |
| 35 |