| 1 |
<?php |
| 2 |
|
| 3 |
namespace WPAdminify\Inc\Admin; |
| 4 |
|
| 5 |
use WPAdminify\Inc\Utils; |
| 6 |
use \WPAdminify\Inc\Admin\AdminSettings; |
| 7 |
use \WPAdminify\Inc\Admin\AdminSettingsModel; |
| 8 |
use \WPAdminify\Inc\Classes\QuickCircleMenu; |
| 9 |
use \WPAdminify\Inc\Modules\MenuEditor\MenuEditor; |
| 10 |
use \WPAdminify\Inc\Modules\AdminColumns\AdminColumns; |
| 11 |
use \WPAdminify\Inc\Modules\Folders\Folders; |
| 12 |
use \WPAdminify\Inc\Modules\GooglePageSpeed\GooglePageSpeed; |
| 13 |
use \WPAdminify\Inc\Modules\LoginCustomizer\LoginCustomizer; |
| 14 |
use \WPAdminify\Inc\Modules\NotificationBar\NotificationBar; |
| 15 |
use \WPAdminify\Inc\Modules\SidebarGenerator\Sidebar_Generator; |
| 16 |
use \WPAdminify\Inc\Modules\DismissNotices\Dismiss_Admin_Notices; |
| 17 |
use \WPAdminify\Inc\Modules\ActivityLogs\ActivityLogs; |
| 18 |
use \WPAdminify\Inc\Modules\AdminPages\AdminPages; |
| 19 |
use \WPAdminify\Inc\Modules\CustomHeaderFooter\CustomHeaderFooter; |
| 20 |
use \WPAdminify\Inc\Modules\DashboardWidget\DashboardWidget; |
| 21 |
use \WPAdminify\Inc\Modules\PostDuplicator\PostDuplicator; |
| 22 |
use \WPAdminify\Inc\Modules\MenuDuplicator\MenuDuplicator; |
| 23 |
use \WPAdminify\Inc\Modules\PostTypesOrder\PostTypesOrder; |
| 24 |
use \WPAdminify\Inc\Modules\DisableComments\DisableComments; |
| 25 |
use \WPAdminify\Inc\Modules\ServerInformation\ServerInformation; |
| 26 |
use WPAdminify\Inc\Admin\Options\RollbackVersion; |
| 27 |
|
| 28 |
// no direct access allowed |
| 29 |
if (!defined('ABSPATH')) exit; |
| 30 |
/** |
| 31 |
* WP Adminify |
| 32 |
* @package Modules |
| 33 |
* |
| 34 |
* @author Jewel Theme <support@jeweltheme.com> |
| 35 |
*/ |
| 36 |
|
| 37 |
class Modules extends AdminSettingsModel |
| 38 |
{ |
| 39 |
public function __construct() |
| 40 |
{ |
| 41 |
$this->modules_init(); |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Include Moduels |
| 46 |
* |
| 47 |
* @return void |
| 48 |
*/ |
| 49 |
public function modules_init() |
| 50 |
{ |
| 51 |
$this->options = AdminSettings::get_instance()->get(); |
| 52 |
|
| 53 |
if (Utils::check_modules($this->options['folders'])) { |
| 54 |
new Folders(); |
| 55 |
} |
| 56 |
|
| 57 |
if (Utils::check_modules($this->options['quick_menu'])) { |
| 58 |
new QuickCircleMenu(); |
| 59 |
} |
| 60 |
|
| 61 |
if (Utils::check_modules($this->options['login_customizer'])) { |
| 62 |
new LoginCustomizer(); |
| 63 |
} |
| 64 |
|
| 65 |
if (Utils::check_modules($this->options['admin_notices'])) { |
| 66 |
new Dismiss_Admin_Notices(); |
| 67 |
} |
| 68 |
|
| 69 |
if (Utils::check_modules($this->options['admin_columns'])) { |
| 70 |
new AdminColumns(); |
| 71 |
} |
| 72 |
|
| 73 |
if (Utils::check_modules($this->options['menu_editor'])) { |
| 74 |
new MenuEditor(); |
| 75 |
} |
| 76 |
|
| 77 |
if (Utils::check_modules($this->options['dashboard_widgets'])) { |
| 78 |
new DashboardWidget(); |
| 79 |
} |
| 80 |
|
| 81 |
if (Utils::check_modules($this->options['pagespeed_insights'])) { |
| 82 |
new GooglePageSpeed(); |
| 83 |
} |
| 84 |
|
| 85 |
if (Utils::check_modules($this->options['custom_css_js'])) { |
| 86 |
new CustomHeaderFooter(); |
| 87 |
} |
| 88 |
|
| 89 |
if (Utils::check_modules($this->options['menu_duplicator'])) { |
| 90 |
new MenuDuplicator(); |
| 91 |
} |
| 92 |
|
| 93 |
if (Utils::check_modules($this->options['activity_logs'])) { |
| 94 |
new ActivityLogs(); |
| 95 |
} |
| 96 |
|
| 97 |
if (Utils::check_modules($this->options['notification_bar'])) { |
| 98 |
new NotificationBar(); |
| 99 |
} |
| 100 |
|
| 101 |
if (Utils::check_modules($this->options['admin_pages'])) { |
| 102 |
new AdminPages(); |
| 103 |
} |
| 104 |
|
| 105 |
if (Utils::check_modules($this->options['post_duplicator'])) { |
| 106 |
new PostDuplicator(); |
| 107 |
} |
| 108 |
|
| 109 |
if (Utils::check_modules($this->options['post_types_order'])) { |
| 110 |
new PostTypesOrder(); |
| 111 |
} |
| 112 |
|
| 113 |
if (Utils::check_modules($this->options['disable_comments'])) { |
| 114 |
new DisableComments(); |
| 115 |
} |
| 116 |
|
| 117 |
if (Utils::check_modules($this->options['sidebar_generator'])) { |
| 118 |
new Sidebar_Generator(); |
| 119 |
} |
| 120 |
|
| 121 |
if (Utils::check_modules($this->options['server_info'])) { |
| 122 |
new ServerInformation(); |
| 123 |
} |
| 124 |
|
| 125 |
if (Utils::check_modules($this->options['server_info'])) { |
| 126 |
new RollbackVersion(); |
| 127 |
} |
| 128 |
} |
| 129 |
} |
| 130 |
|