PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 3.5.0
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v3.5.0
4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 trunk 1.0.0 2.0.0 2.0.1 2.0.2 2.0.3 3.0 3.0.1 3.0.2 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.2 3.1.3 3.2.0 3.2.1 3.2.2 3.2.4 3.2.5 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.4.0 3.4.1 3.4.2 3.4.5 3.4.6 3.5.0 3.5.1 3.5.2 3.5.3 3.5.4 3.5.6 3.5.7 3.5.8 3.5.9 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1
superb-blocks / src / admin / controllers / class-dashboard-controller.php
superb-blocks / src / admin / controllers Last commit date
wizard 1 year ago class-dashboard-controller.php 1 year ago class-newsletter-signup-controller.php 1 year ago class-notice-controller.php 1 year ago class-settings-controller.php 1 year ago class-troubleshooting-controller.php 1 year ago
class-dashboard-controller.php
515 lines
1 <?php
2
3 namespace SuperbAddons\Admin\Controllers;
4
5 defined('ABSPATH') || exit();
6
7 use SuperbAddons\Admin\Controllers\Wizard\WizardController;
8 use SuperbAddons\Admin\Pages\AdditionalCSSPage;
9 use SuperbAddons\Admin\Pages\DashboardPage;
10 use SuperbAddons\Admin\Pages\SettingsPage;
11 use SuperbAddons\Admin\Pages\SupportPage;
12 use SuperbAddons\Admin\Pages\Wizard\PageWizardMainPage;
13 use SuperbAddons\Admin\Utils\AdminLinkSource;
14 use SuperbAddons\Admin\Utils\AdminLinkUtil;
15 use SuperbAddons\Components\Admin\FeedbackModal;
16 use SuperbAddons\Config\Capabilities;
17 use SuperbAddons\Data\Controllers\RestController;
18
19 use SuperbAddons\Components\Admin\Navigation;
20 use SuperbAddons\Data\Controllers\CSSController;
21 use SuperbAddons\Data\Controllers\KeyController;
22 use SuperbAddons\Data\Utils\AllowedTemplateHTMLUtil;
23 use SuperbAddons\Data\Utils\ScriptTranslations;
24 use SuperbAddons\Data\Utils\Wizard\WizardActionParameter;
25 use SuperbAddons\Elementor\Controllers\ElementorController;
26 use SuperbAddons\Gutenberg\Controllers\GutenbergController;
27
28 class DashboardController
29 {
30 const MENU_SLUG = 'superbaddons';
31 const DASHBOARD = 'dashboard';
32 const ADDITIONAL_CSS = 'superbaddons-additional-css';
33 const SETTINGS = 'superbaddons-settings';
34 const SUPPORT = 'superbaddons-support';
35
36 const PAGE_WIZARD = 'superbaddons-page-wizard';
37
38 const PREMIUM_CLASS = 'superbaddons-get-premium';
39
40 private $hooks;
41
42 public function __construct()
43 {
44 new SettingsController();
45 new TroubleshootingController();
46 NewsletterSignupController::Initialize();
47 $this->hooks = array();
48 add_action("admin_menu", array($this, 'SuperbAddonsAdminMenu'));
49 add_action("admin_menu", array($this, 'AdminMenuAdditions'));
50 add_filter('plugin_action_links_' . SUPERBADDONS_BASE, array($this, 'PluginActions'));
51 add_action('admin_enqueue_scripts', array($this, 'AdminMenuEnqueues'), 1000);
52 if (!KeyController::HasValidPremiumKey()) {
53 add_action("admin_head", array($this, 'AdminMenuHighlightScripts'));
54 }
55 $this->HandleNotices();
56 }
57
58
59 public function PluginActions($actions)
60 {
61 $added_actions = array(
62 "<a href='" . esc_url(admin_url("admin.php?page=" . self::MENU_SLUG)) . "'>" . esc_html__('Dashboard', "superb-blocks") . "</a>",
63 "<a href='" . esc_url(admin_url("admin.php?page=" . self::SETTINGS)) . "'>" . esc_html__('Settings', "superb-blocks") . "</a>",
64 "<a href='" . esc_url(admin_url("admin.php?page=" . self::SUPPORT)) . "'>" . esc_html__('Support', "superb-blocks") . "</a>"
65 );
66 $actions = array_merge($added_actions, $actions);
67 if (!KeyController::HasValidPremiumKey()) {
68 $actions[] = "<a href='" . esc_url(AdminLinkUtil::GetLink(AdminLinkSource::WP_PLUGIN_PAGE)) . "' class='" . self::PREMIUM_CLASS . "' target='_blank'>" . esc_html__('Get Premium', "superb-blocks") . "</a>";
69 }
70 return $actions;
71 }
72
73 public function SuperbAddonsAdminMenu()
74 {
75 add_menu_page(__('Superb Addons', "superb-blocks"), __('Superb Addons', "superb-blocks") . $this->GetAdminMenuNotification(), Capabilities::CONTRIBUTOR, self::MENU_SLUG, array($this, 'SuperbDashboard'), SUPERBADDONS_ASSETS_PATH . '/img/icon-superb-dashboard-menu.png', '58.6');
76 $this->hooks[self::DASHBOARD] = add_submenu_page(self::MENU_SLUG, __('Superb Addons - Dashboard', "superb-blocks"), __('Dashboard', "superb-blocks"), Capabilities::CONTRIBUTOR, self::MENU_SLUG);
77 $this->hooks[self::PAGE_WIZARD] = add_submenu_page(self::MENU_SLUG, __('Superb Addons - Theme Designer', "superb-blocks"), __('Theme Designer', "superb-blocks"), Capabilities::ADMIN, self::PAGE_WIZARD, array($this, 'PageWizard'));
78 $this->hooks[self::ADDITIONAL_CSS] = add_submenu_page(self::MENU_SLUG, __('Superb Addons - Custom CSS', "superb-blocks"), __('Custom CSS', "superb-blocks"), Capabilities::ADMIN, self::ADDITIONAL_CSS, array($this, 'AdditionalCSS'));
79 $this->hooks[self::SETTINGS] = add_submenu_page(self::MENU_SLUG, __('Superb Addons - Settings', "superb-blocks"), __('Settings', "superb-blocks") . $this->GetAdminMenuNotification(), Capabilities::ADMIN, self::SETTINGS, array($this, 'Settings'));
80 $this->hooks[self::SUPPORT] = add_submenu_page(self::MENU_SLUG, __('Superb Addons - Get Help', "superb-blocks"), __('Get Help', "superb-blocks"), Capabilities::CONTRIBUTOR, self::SUPPORT, array($this, 'Support'));
81 }
82
83 public function AdminMenuAdditions()
84 {
85 // Block theme related admin menu additions
86 if (!function_exists('wp_is_block_theme') || !wp_is_block_theme()) return;
87
88 $front_page_template = get_block_template(get_stylesheet() . "//front-page");
89 if ($front_page_template && isset($front_page_template->id)) {
90 add_pages_page(
91 __('Edit Front Page', "superb-blocks"),
92 __('Edit Front Page', "superb-blocks"),
93 Capabilities::ADMIN,
94 add_query_arg(
95 array(
96 'postType' => 'wp_template',
97 'postId' => urlencode($front_page_template->id),
98 'canvas' => 'edit',
99 ),
100 admin_url('site-editor.php')
101 )
102 );
103 }
104
105 add_pages_page(
106 __('Add Template Page', "superb-blocks"),
107 __('Add Template Page', "superb-blocks"),
108 Capabilities::ADMIN,
109 WizardController::GetWizardURL(WizardActionParameter::ADD_NEW_PAGES)
110 );
111
112 add_theme_page(
113 __('Theme Designer', "superb-blocks"),
114 __('Theme Designer', "superb-blocks"),
115 Capabilities::ADMIN,
116 WizardController::GetWizardURL(WizardActionParameter::INTRO)
117 );
118 }
119
120 private function GetAdminMenuNotification()
121 {
122 $HasRegisteredKey = KeyController::HasRegisteredKey();
123 if ($HasRegisteredKey) {
124 $KeyStatus = KeyController::GetKeyStatus();
125 if (!$KeyStatus['active'] || $KeyStatus['expired'] || !$KeyStatus['verified'] || $KeyStatus['exceeded']) {
126 return sprintf('<span class="update-plugins count-1"><span class="plugin-count" aria-hidden="true">1</span><span class="screen-reader-text">%s</span></span>', esc_html__("Issue Detected", "superb-blocks"));
127 }
128 }
129
130 return;
131 }
132
133 public function AdminMenuHighlightScripts()
134 {
135 ?>
136 <style>
137 tbody#the-list .<?php echo esc_html(self::PREMIUM_CLASS); ?> {
138 color: #4312E2;
139 font-weight: 900;
140 }
141 </style>
142 <?php
143 }
144
145 public function HandleNotices()
146 {
147 add_action('wp_loaded', function () {
148 $options = array("notices" => array());
149 if (!KeyController::HasValidPremiumKey()) {
150 $options["notices"][] = array(
151 'unique_id' => 'addons_delayed',
152 'content' => "addons-notice.php",
153 'delay' => '+6 days'
154 );
155 }
156 if (WizardController::GetWizardRecommenderTransient()) {
157 $options["notices"][] = array(
158 'unique_id' => 'wizard_recommender',
159 'content' => "wizard-recommender-notice.php"
160 );
161 } elseif (WizardController::GetWizardWoocommerceTransient()) {
162 $options["notices"][] = array(
163 'unique_id' => 'wizard_woocommerce',
164 'content' => "wizard-woocommerce-notice.php"
165 );
166 }
167 AdminNoticeController::init($options);
168 });
169 }
170
171 public function AdminMenuEnqueues($page_hook)
172 {
173 if ($page_hook === 'plugins.php') {
174 $this->enqueueCommonStyles();
175 $this->enqueueFeedback();
176 return;
177 }
178
179 if (!in_array($page_hook, array_values($this->hooks))) {
180 return;
181 }
182
183 $this->enqueueCommonStyles();
184 wp_enqueue_style(
185 'superb-addons-admin-dashboard',
186 SUPERBADDONS_ASSETS_PATH . '/css/admin-dashboard.min.css',
187 array(),
188 SUPERBADDONS_VERSION
189 );
190
191 switch ($page_hook) {
192 case $this->hooks[self::DASHBOARD]:
193 $this->enqueuePatternLibraryBase();
194 $this->enqueueDashboard();
195 break;
196
197 case $this->hooks[self::SUPPORT]:
198 $this->enqueueSupport();
199 break;
200
201 case $this->hooks[self::SETTINGS]:
202 $this->enqueueSettings();
203 break;
204
205 case $this->hooks[self::ADDITIONAL_CSS]:
206 $this->enqueueAdditionalCSS();
207 break;
208
209 case $this->hooks[self::PAGE_WIZARD]:
210 $this->enqueuePageWizard();
211 break;
212 }
213 }
214
215 private function enqueueCommonStyles()
216 {
217 wp_enqueue_style(
218 'superb-addons-elements',
219 SUPERBADDONS_ASSETS_PATH . '/css/framework.min.css',
220 array(),
221 SUPERBADDONS_VERSION
222 );
223 wp_enqueue_style(
224 'superb-addons-font-manrope',
225 SUPERBADDONS_ASSETS_PATH . '/fonts/manrope/manrope.css',
226 array(),
227 SUPERBADDONS_VERSION
228 );
229 wp_enqueue_style(
230 'superb-addons-admin-modal',
231 SUPERBADDONS_ASSETS_PATH . '/css/admin-modal.min.css',
232 array(),
233 SUPERBADDONS_VERSION
234 );
235 wp_enqueue_style(
236 'superbaddons-js-snackbar',
237 SUPERBADDONS_ASSETS_PATH . '/lib/js-snackbar.min.css',
238 array(),
239 SUPERBADDONS_VERSION
240 );
241 }
242
243 private function enqueueFeedback()
244 {
245 wp_enqueue_script('superb-addons-feedback', SUPERBADDONS_ASSETS_PATH . '/js/admin/deactivate-feedback.js', array('jquery'), SUPERBADDONS_VERSION, true);
246 wp_localize_script('superb-addons-feedback', 'superbaddonssettings_g', array(
247 "plugin" => plugin_basename(SUPERBADDONS_BASE),
248 "rest" => array(
249 "base" => \get_rest_url(),
250 "namespace" => RestController::NAMESPACE,
251 "nonce" => wp_create_nonce("wp_rest"),
252 "routes" => array(
253 "settings" => SettingsController::SETTINGS_ROUTE,
254 )
255 )
256 ));
257 add_action('admin_footer', function () {
258 new FeedbackModal();
259 });
260 }
261
262 private function enqueuePatternLibraryBase()
263 {
264 GutenbergController::AddonsLibrary();
265 wp_enqueue_script('superb-addons-select2', SUPERBADDONS_ASSETS_PATH . '/lib/select2.min.js', array('jquery'), SUPERBADDONS_VERSION, true);
266 wp_enqueue_style(
267 'superb-dashboard-layout-library',
268 SUPERBADDONS_ASSETS_PATH . '/css/layout-library-editor.min.css',
269 array(),
270 SUPERBADDONS_VERSION
271 );
272 wp_enqueue_style(
273 'superbaddons-select2',
274 SUPERBADDONS_ASSETS_PATH . '/lib/select2.min.css',
275 array(),
276 SUPERBADDONS_VERSION
277 );
278 }
279
280 private function enqueueDashboard()
281 {
282 wp_enqueue_script('superb-addons-library-dashboard', SUPERBADDONS_ASSETS_PATH . '/js/admin/dashboard.js', array('jquery', "wp-i18n"), SUPERBADDONS_VERSION, true);
283 ScriptTranslations::Set('superb-addons-library-dashboard');
284 wp_localize_script('superb-addons-library-dashboard', 'superblayoutlibrary_g', array(
285 "style_placeholder" => esc_html__('All themes', "superb-blocks"),
286 "category_placeholder" => esc_html__('All categories', "superb-blocks"),
287 "snacks" => array(
288 "list_error" => esc_html__('Something went wrong while attempting to list elements. Please try again or contact support if the problem persists.', "superb-blocks")
289 ),
290 "gutenberg_menu_items" => GutenbergController::GetGutenbergLibraryMenuItems(),
291 "elementor_menu_items" => ElementorController::GetElementorLibraryMenuItems(),
292 "rest" => array(
293 "base" => \get_rest_url(),
294 "namespace" => RestController::NAMESPACE,
295 "nonce" => wp_create_nonce("wp_rest"),
296 "routes" => array(
297 "settings" => SettingsController::SETTINGS_ROUTE,
298 )
299 )
300 ));
301 }
302
303 private function enqueueSupport()
304 {
305 wp_enqueue_script('superb-addons-troubleshooting', SUPERBADDONS_ASSETS_PATH . '/js/admin/troubleshooting.js', array('jquery', 'wp-i18n'), SUPERBADDONS_VERSION, true);
306 ScriptTranslations::Set('superb-addons-troubleshooting');
307 wp_localize_script('superb-addons-troubleshooting', 'superbaddonstroubleshooting_g', array(
308 "rest" => array(
309 "base" => \get_rest_url(),
310 "namespace" => RestController::NAMESPACE,
311 "nonce" => wp_create_nonce("wp_rest"),
312 "routes" => array(
313 "troubleshooting" => TroubleshootingController::TROUBLESHOOTING_ROUTE,
314 "tutorial" => TroubleshootingController::TUTORIAL_ROUTE,
315 )
316 ),
317 "steps" => array(
318 "wordpressversion" => array(
319 "title" => esc_html__("WordPress Version", "superb-blocks"),
320 "text" => esc_html__("Checking Compatibility", "superb-blocks"),
321 "errorText" => esc_html__("Incompatible. Please update WordPress.", "superb-blocks"),
322 "successText" => esc_html__("Compatible", "superb-blocks"),
323 ),
324 "elementorversion" => array(
325 "active" => is_plugin_active('elementor/elementor.php'),
326 "title" => esc_html__("Elementor Version", "superb-blocks"),
327 "text" => esc_html__("Checking Compatibility", "superb-blocks"),
328 "errorText" => esc_html__("Incompatible. Please update Elementor.", "superb-blocks"),
329 "successText" => esc_html__("Compatible", "superb-blocks"),
330 ),
331 "connection" => array(
332 "title" => esc_html__("Connection Status", "superb-blocks"),
333 "text" => esc_html__("Checking Connection", "superb-blocks"),
334 "errorText" => esc_html__("No Connection", "superb-blocks"),
335 "successText" => esc_html__("Connected", "superb-blocks"),
336 ),
337 "domainshift" => array(
338 "title" => esc_html__("Connection Update", "superb-blocks"),
339 "text" => esc_html__("Trying New Connection", "superb-blocks"),
340 "errorText" => esc_html__("Connection Blocked", "superb-blocks"),
341 "successText" => esc_html__("Connected", "superb-blocks"),
342 ),
343 "service" => array(
344 "title" => esc_html__("Service Status", "superb-blocks"),
345 "text" => esc_html__("Checking Service", "superb-blocks"),
346 "errorText" => esc_html__("Service Unavailable", "superb-blocks"),
347 "successText" => esc_html__("Service Online", "superb-blocks"),
348 ),
349 "keycheck" => array(
350 "title" => esc_html__("License Key Status", "superb-blocks"),
351 "text" => esc_html__("Checking License Key", "superb-blocks"),
352 "errorText" => esc_html__("Invalid License Key", "superb-blocks"),
353 "successText" => esc_html__("Valid License Key", "superb-blocks"),
354 ),
355 "keyverify" => array(
356 "title" => esc_html__("License Key Verification", "superb-blocks"),
357 "text" => esc_html__("Re-verifying License Key", "superb-blocks"),
358 "errorText" => esc_html__("License could not be verified", "superb-blocks"),
359 "successText" => esc_html__("License Key Verified", "superb-blocks"),
360 ),
361 "cacheclear" => array(
362 "title" => esc_html__("Cache Status", "superb-blocks"),
363 "text" => esc_html__("Clearing Cache", "superb-blocks"),
364 "errorText" => esc_html__("Cache could not be cleared", "superb-blocks"),
365 "successText" => esc_html__("Cache Cleared", "superb-blocks"),
366 )
367 )
368 ));
369 add_action("admin_footer", array($this, 'TroubleshootingTemplates'));
370 }
371
372 private function enqueueSettings()
373 {
374 wp_enqueue_script('superb-addons-settings', SUPERBADDONS_ASSETS_PATH . '/js/admin/settings.js', array('jquery'), SUPERBADDONS_VERSION, true);
375 wp_localize_script('superb-addons-settings', 'superbaddonssettings_g', array(
376 "save_message" => esc_html__("Settings saved successfully.", "superb-blocks"),
377 "modal" => array(
378 "cache" => array(
379 "title" => esc_html__("Clear Cache", "superb-blocks"),
380 "content" => esc_html__("All element- data and images will need to be loaded again if the cache is removed. This should only be done if you are experiencing issues or planning to delete the plugin. Are you sure you want to clear the cache?", "superb-blocks"),
381 "success" => esc_html__("Cache cleared successfully.", "superb-blocks")
382 ),
383 "view_logs" => array(
384 "title" => esc_html__("Error Log", "superb-blocks"),
385 "no_logs" => esc_html__("No errors have been logged.", "superb-blocks"),
386 "icon_unshared" => esc_url(SUPERBADDONS_ASSETS_PATH . "/img/cloud-slash.svg"),
387 "unshared_title" => esc_html__("Error Log Not Shared", "superb-blocks"),
388 "icon_shared" => esc_url(SUPERBADDONS_ASSETS_PATH . "/img/cloud-check.svg"),
389 "shared_title" => esc_html__("Error Log Shared", "superb-blocks"),
390 ),
391 "clear_logs" => array(
392 "title" => esc_html__("Clear Logs", "superb-blocks"),
393 "content" => esc_html__("Error Logs are used for debugging purposes and help improve the plugin when shared with our support team and developers. Are you sure you want to clear the error logs?", "superb-blocks"),
394 "success" => esc_html__("Error logs cleared successfully.", "superb-blocks")
395 ),
396 "remove_key" => array(
397 "title" => esc_html__("Remove License Key", "superb-blocks"),
398 "content" => esc_html__("Are you sure you want to remove your license key from this website?", "superb-blocks"),
399 ),
400 "clear_restoration_points" => array(
401 "title" => esc_html__("Clear Restoration Points", "superb-blocks"),
402 "content" => esc_html__("Restoration points can not be recovered after being cleared. Are you sure you want to clear all restoration points?", "superb-blocks"),
403 "success" => esc_html__("Restoration points cleared successfully.", "superb-blocks")
404 )
405 ),
406 "rest" => array(
407 "base" => \get_rest_url(),
408 "namespace" => RestController::NAMESPACE,
409 "nonce" => wp_create_nonce("wp_rest"),
410 "routes" => array(
411 "settings" => SettingsController::SETTINGS_ROUTE,
412 )
413 )
414 ));
415 }
416
417 private function enqueueAdditionalCSS()
418 {
419 wp_enqueue_style(
420 'superbaddons-select2',
421 SUPERBADDONS_ASSETS_PATH . '/lib/select2.min.css',
422 array(),
423 SUPERBADDONS_VERSION
424 );
425
426 do_action('superbaddons/admin/css-blocks/enqueue');
427
428 wp_enqueue_script('superb-addons-select2', SUPERBADDONS_ASSETS_PATH . '/lib/select2.min.js', array('jquery'), SUPERBADDONS_VERSION, true);
429 $code_editor_settings = wp_enqueue_code_editor(array('type' => 'text/css', 'codemirror' => array('lint' => true)));
430 wp_enqueue_script('superb-addons-css-blocks', SUPERBADDONS_ASSETS_PATH . '/js/admin/cssblocks.js', array('jquery', 'wp-i18n'), SUPERBADDONS_VERSION, true);
431 ScriptTranslations::Set('superb-addons-css-blocks');
432 wp_localize_script('superb-addons-css-blocks', 'superbaddonscssblocks_g', array(
433 "codeEditorSettings" => $code_editor_settings,
434 "rest" => array(
435 "base" => \get_rest_url(),
436 "namespace" => RestController::NAMESPACE,
437 "nonce" => wp_create_nonce("wp_rest"),
438 "routes" => array(
439 "css" => CSSController::CSS_ROUTE,
440 ),
441 "error_message" => esc_html__("An error occurred while updating the CSS block. Please try again.", "superb-blocks"),
442 ),
443 ));
444 }
445
446 private function enqueuePageWizard()
447 {
448 wp_enqueue_style(
449 'superb-addons-page-wizard',
450 SUPERBADDONS_ASSETS_PATH . '/css/page-wizard.min.css',
451 array(),
452 SUPERBADDONS_VERSION
453 );
454 wp_enqueue_script('superb-addons-page-wizard', SUPERBADDONS_ASSETS_PATH . '/js/admin/page-wizard.js', array('jquery', 'wp-i18n'), SUPERBADDONS_VERSION, true);
455 ScriptTranslations::Set('superb-addons-page-wizard');
456 wp_localize_script('superb-addons-page-wizard', 'superbaddonswizard_g', array(
457 "rest" => array(
458 "base" => \get_rest_url(),
459 "namespace" => RestController::NAMESPACE,
460 "nonce" => wp_create_nonce("wp_rest"),
461 "routes" => array(
462 "wizard" => WizardController::WIZARD_ROUTE,
463 )
464 )
465 ));
466 }
467
468 public function TroubleshootingTemplates()
469 {
470 AllowedTemplateHTMLUtil::enable_safe_styles();
471 ob_start();
472 include(SUPERBADDONS_PLUGIN_DIR . 'src/admin/templates/troubleshooting-step.php');
473 $template = ob_get_clean();
474 echo '<script type="text/template" id="tmpl-superb-addons-troubleshooting-step">' . wp_kses($template, "post") . '</script>';
475 AllowedTemplateHTMLUtil::disable_safe_styles();
476 }
477
478 public function SuperbDashboard()
479 {
480 $this->DashboardPageSetup(DashboardPage::class);
481 }
482
483 public function AdditionalCSS()
484 {
485 $this->DashboardPageSetup(AdditionalCSSPage::class);
486 }
487
488 public function Support()
489 {
490 $this->DashboardPageSetup(SupportPage::class);
491 }
492
493 public function Settings()
494 {
495 $this->DashboardPageSetup(SettingsPage::class);
496 }
497
498 public function PageWizard()
499 {
500 $this->DashboardPageSetup(PageWizardMainPage::class, true, __("Theme Designer", "superb-blocks"));
501 }
502
503 private function DashboardPageSetup($page_class, $hide_navigation_items = false, $subtitle = false)
504 {
505 ?>
506 <div class="superbaddons-wrap">
507 <?php new Navigation($hide_navigation_items, $subtitle); ?>
508 <div class="superbaddons-wrap-inner">
509 <?php new $page_class(); ?>
510 </div>
511 </div>
512 <?php
513 }
514 }
515