wizard
2 months ago
class-page-additional-css.php
2 months ago
class-page-dashboard.php
2 months ago
class-page-form.php
2 months ago
class-page-settings.php
2 months ago
class-page-support.php
2 months ago
class-page-support.php
382 lines
| 1 | <?php |
| 2 | |
| 3 | namespace SuperbAddons\Admin\Pages; |
| 4 | |
| 5 | defined('ABSPATH') || exit(); |
| 6 | |
| 7 | use SuperbAddons\Admin\Controllers\DashboardController; |
| 8 | use SuperbAddons\Admin\Controllers\RewriteCheckController; |
| 9 | use SuperbAddons\Admin\Utils\AdminLinkSource; |
| 10 | use SuperbAddons\Admin\Utils\AdminLinkUtil; |
| 11 | use SuperbAddons\Components\Admin\Modal; |
| 12 | use SuperbAddons\Components\Admin\PremiumBox; |
| 13 | use SuperbAddons\Components\Admin\ReviewBox; |
| 14 | use SuperbAddons\Components\Admin\SupportBox; |
| 15 | use SuperbAddons\Data\Controllers\KeyController; |
| 16 | use SuperbAddons\Elementor\Controllers\ElementorController; |
| 17 | use SuperbAddons\Gutenberg\Controllers\GutenbergController; |
| 18 | use SuperbAddons\Tours\Controllers\TourController; |
| 19 | |
| 20 | class SupportPage |
| 21 | { |
| 22 | public function __construct() |
| 23 | { |
| 24 | $this->Render(); |
| 25 | } |
| 26 | |
| 27 | private function Render() |
| 28 | { |
| 29 | $wp_compatible = GutenbergController::is_compatible(); |
| 30 | $wp_dot = $wp_compatible ? 'superbaddons-status-dot--green' : 'superbaddons-status-dot--red'; |
| 31 | $wp_label = $wp_compatible ? __('WordPress Compatible', 'superb-blocks') : sprintf(/* translators: %s: WordPress version number */__('WordPress %s+ Recommended', 'superb-blocks'), GutenbergController::MINIMUM_WORDPRESS_VERSION); |
| 32 | $elementor_installed = ElementorController::is_installed_and_activated(); |
| 33 | $elementor_compatible = ElementorController::is_compatible(); |
| 34 | $elementor_dot = $elementor_compatible ? 'superbaddons-status-dot--green' : 'superbaddons-status-dot--red'; |
| 35 | $elementor_label = $elementor_compatible ? __('Elementor Compatible', 'superb-blocks') : sprintf(/* translators: %s: Elementor version number */__('Elementor %s+ Required', 'superb-blocks'), ElementorController::MINIMUM_ELEMENTOR_VERSION); |
| 36 | $has_valid_license = KeyController::HasValidPremiumKey(); |
| 37 | $has_registered_key = KeyController::HasRegisteredKey(); |
| 38 | $has_key_issue = false; |
| 39 | if ($has_registered_key) { |
| 40 | $key_status = KeyController::GetKeyStatus(); |
| 41 | $has_key_issue = $key_status['expired'] || !$key_status['active'] || !$key_status['verified'] || $key_status['exceeded']; |
| 42 | } |
| 43 | $license_dot = $has_key_issue ? 'superbaddons-status-dot--red' : ($has_valid_license ? 'superbaddons-status-dot--green' : ($has_registered_key ? 'superbaddons-status-dot--yellow' : 'superbaddons-status-dot--gray')); |
| 44 | $license_label = $has_key_issue ? __('License Issue Detected', 'superb-blocks') : ($has_valid_license ? __('Premium Active', 'superb-blocks') : ($has_registered_key ? __('License Active', 'superb-blocks') : __('Free Plan', 'superb-blocks'))); |
| 45 | $contact_url = AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/contact/", "anchor" => "create-ticket")); |
| 46 | $support_cta = array('text' => __('Contact Support', 'superb-blocks'), 'link' => $contact_url); |
| 47 | ?> |
| 48 | <!-- Status Strip --> |
| 49 | <div class="superbaddons-dashboard-welcome-strip"> |
| 50 | <span class="superbaddons-dashboard-welcome-title"><?php esc_html_e("Get Help", "superb-blocks"); ?></span> |
| 51 | <div class="superbaddons-dashboard-stat-items"> |
| 52 | <span class="superbaddons-dashboard-stat-item"> |
| 53 | <span class="superbaddons-status-dot <?php echo esc_attr($wp_dot); ?>"></span> |
| 54 | <?php echo esc_html($wp_label); ?> |
| 55 | </span> |
| 56 | <?php if ($elementor_installed) : ?> |
| 57 | <span class="superbaddons-dashboard-stat-item"> |
| 58 | <span class="superbaddons-status-dot <?php echo esc_attr($elementor_dot); ?>"></span> |
| 59 | <?php echo esc_html($elementor_label); ?> |
| 60 | </span> |
| 61 | <?php endif; ?> |
| 62 | <span class="superbaddons-dashboard-stat-item"> |
| 63 | <span class="superbaddons-status-dot <?php echo esc_attr($license_dot); ?>"></span> |
| 64 | <?php echo esc_html($license_label); ?> |
| 65 | </span> |
| 66 | </div> |
| 67 | </div> |
| 68 | |
| 69 | <div class="superbaddons-admindashboard-sidebarlayout"> |
| 70 | <div class="superbaddons-admindashboard-sidebarlayout-left"> |
| 71 | |
| 72 | <!-- Quick Actions --> |
| 73 | <div class="superbaddons-dashboard-quick-actions"> |
| 74 | <div class="superbaddons-dashboard-quick-action-card"> |
| 75 | <img src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/arrows-left-right-duotone.svg'); ?>" aria-hidden="true" width="48" height="48" /> |
| 76 | <h5 class="superbaddons-element-text-xs superbaddons-element-text-dark superbaddons-element-text-800"><?php esc_html_e("Automated Diagnostics", "superb-blocks"); ?></h5> |
| 77 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray"><?php esc_html_e("Scan and automatically resolve the most common issues with Superb Addons.", "superb-blocks"); ?></p> |
| 78 | <button id="spbaddons-quick-action-scan-btn" type="button" class="superbaddons-element-button"><?php esc_html_e("Run Automatic Scan", "superb-blocks"); ?></button> |
| 79 | </div> |
| 80 | <div class="superbaddons-dashboard-quick-action-card"> |
| 81 | <img src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/graduation-cap-duotone.svg'); ?>" aria-hidden="true" width="48" height="48" /> |
| 82 | <h5 class="superbaddons-element-text-xs superbaddons-element-text-dark superbaddons-element-text-800"><?php esc_html_e("Knowledge Base", "superb-blocks"); ?></h5> |
| 83 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray"><?php esc_html_e("Browse tutorials, guides, and step-by-step troubleshooting articles.", "superb-blocks"); ?></p> |
| 84 | <a href="#spbaddons-knowledge-base-section" class="superbaddons-element-button"><?php esc_html_e("Browse Articles", "superb-blocks"); ?></a> |
| 85 | </div> |
| 86 | <div class="superbaddons-dashboard-quick-action-card"> |
| 87 | <img src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/purple-subtract-square.svg'); ?>" aria-hidden="true" width="48" height="48" /> |
| 88 | <h5 class="superbaddons-element-text-xs superbaddons-element-text-dark superbaddons-element-text-800"><?php esc_html_e("Learn the Basics", "superb-blocks"); ?></h5> |
| 89 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray"><?php esc_html_e("Interactive tutorials to get you up and running with Superb Addons.", "superb-blocks"); ?></p> |
| 90 | <a href="#spbaddons-learn-section" class="superbaddons-element-button"><?php esc_html_e("Start a Tutorial", "superb-blocks"); ?></a> |
| 91 | </div> |
| 92 | </div> |
| 93 | |
| 94 | <?php if ($has_key_issue && isset($key_status)) : ?> |
| 95 | <!-- License Issue Notice --> |
| 96 | <div class="spbaddons-license-issue-wrapper spbaddons-support-license-notice"> |
| 97 | <?php printf('<img src="%s" alt="%s"/>', esc_url(SUPERBADDONS_ASSETS_PATH . '/img/color-warning-octagon.svg'), esc_attr__("Issue Detected", "superb-blocks")); ?> |
| 98 | <p> |
| 99 | <?php |
| 100 | if ($key_status['expired']) { |
| 101 | esc_html_e('Your subscription has expired. Please renew your subscription or contact support for assistance.', "superb-blocks"); |
| 102 | } elseif (!$key_status['active']) { |
| 103 | esc_html_e('Your license key has been disabled. Please contact support for assistance.', "superb-blocks"); |
| 104 | } elseif (!$key_status['verified']) { |
| 105 | esc_html_e('Your license key verification for this website is no longer valid. Run the automatic scan to resolve this automatically.', "superb-blocks"); |
| 106 | } elseif ($key_status['exceeded']) { |
| 107 | esc_html_e('Your license key has been activated on too many domains. Please renew your subscription, deactivate your license key on some of your domains, or contact support for assistance.', "superb-blocks"); |
| 108 | } |
| 109 | ?> |
| 110 | <?php if ($key_status['expired'] || $key_status['exceeded']) : ?> |
| 111 | <br /> |
| 112 | <a href="<?php echo esc_url(AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/renew-subscription/"))); ?>" target="_blank" class="superbaddons-element-colorlink"> |
| 113 | <?php esc_html_e("Renew License", "superb-blocks"); ?> |
| 114 | </a> |
| 115 | <br /> |
| 116 | <small><?php esc_html_e("If you have already renewed your subscription, run the automatic scan to re-verify your license.", "superb-blocks"); ?></small> |
| 117 | <?php endif; ?> |
| 118 | </p> |
| 119 | <?php if (!$key_status['active']) : ?> |
| 120 | <a href="<?php echo esc_url($contact_url); ?>" target="_blank" class="superbaddons-element-button"> |
| 121 | <?php esc_html_e("Contact Support", "superb-blocks"); ?> |
| 122 | </a> |
| 123 | <?php else : ?> |
| 124 | <button type="button" class="superbaddons-element-button spbaddons-trigger-scan"> |
| 125 | <?php esc_html_e("Run Automatic Scan", "superb-blocks"); ?> |
| 126 | </button> |
| 127 | <?php endif; ?> |
| 128 | </div> |
| 129 | <?php endif; ?> |
| 130 | |
| 131 | <?php if (RewriteCheckController::HasDetectedIssue()) : ?> |
| 132 | <!-- Rewrite Issue Notice --> |
| 133 | <div class="spbaddons-license-issue-wrapper spbaddons-support-rewrite-notice"> |
| 134 | <?php printf('<img src="%s" alt="%s"/>', esc_url(SUPERBADDONS_ASSETS_PATH . '/img/color-warning-octagon.svg'), esc_attr__("Issue Detected", "superb-blocks")); ?> |
| 135 | <p> |
| 136 | <?php esc_html_e('A permalink configuration issue has been detected that may prevent features like license key activation from working correctly. Run the automatic scan below to resolve this automatically.', "superb-blocks"); ?> |
| 137 | </p> |
| 138 | </div> |
| 139 | <?php endif; ?> |
| 140 | |
| 141 | <!-- Automated Diagnostics --> |
| 142 | <div class="superbaddons-settings-section" id="spbaddons-diagnostics-section"> |
| 143 | <div class="superbaddons-dashboard-section-header"> |
| 144 | <h4 class="superbaddons-element-text-sm superbaddons-element-text-dark superbaddons-element-text-800 superbaddons-element-m0"><?php esc_html_e("Automated Diagnostics", "superb-blocks"); ?></h4> |
| 145 | </div> |
| 146 | <p class="superbaddons-element-text-xs superbaddons-element-text-gray"><?php esc_html_e("Checks WordPress compatibility, API connection, license status, and more — resolves most common issues automatically without any manual steps.", "superb-blocks"); ?></p> |
| 147 | <div class="spbaddons-troubleshooting-status-header" id="spbaddons-troubleshooting-status-header"> |
| 148 | <span id="spbaddons-troubleshooting-status-text"></span> |
| 149 | </div> |
| 150 | <div class="spbaddons-troubleshooting-progressbar" id="spbaddons-troubleshooting-progressbar"></div> |
| 151 | <div class="spbaddons-troubleshooting-steps"> |
| 152 | <!-- Populated by JS on page load (pending) and during scan (live) --> |
| 153 | </div> |
| 154 | <div id="spbaddons-troubleshooting-progress" style="display:none;"></div> |
| 155 | <button id="spbaddons-troubleshooting-submit-btn" class="superbaddons-element-button" type="button"><span class="spbaddons-btn-text"><?php esc_html_e("Run Automatic Scan", "superb-blocks"); ?></span></button> |
| 156 | <p class="spbaddons-troubleshooting-reassurance"><?php esc_html_e("Automatically resolves the most common issues — no manual steps required.", "superb-blocks"); ?></p> |
| 157 | <div class="spbaddons-troubleshooting-result-wrapper" style="display:none;"> |
| 158 | <?php |
| 159 | $this->AddResultBox( |
| 160 | "error", |
| 161 | "color-warning-octagon.svg", |
| 162 | __('Troubleshooting failed', "superb-blocks"), |
| 163 | array( |
| 164 | __('The troubleshooting process was able to identify errors, but was unable to resolve them.', "superb-blocks"), |
| 165 | __('If the errors can not be resolved manually, please contact our support team for further assistance.', "superb-blocks") |
| 166 | ), |
| 167 | $support_cta |
| 168 | ); |
| 169 | |
| 170 | $this->AddResultBox( |
| 171 | "permalink", |
| 172 | "color-warning-octagon.svg", |
| 173 | __('Permalink Configuration Issue', "superb-blocks"), |
| 174 | array( |
| 175 | __('The WordPress REST API could not be reached due to a permalink configuration issue.', "superb-blocks"), |
| 176 | "", |
| 177 | __('To resolve this manually, go to Settings → Permalinks in your WordPress dashboard and click "Save Changes" without making any changes. This refreshes the internal URL routing rules.', "superb-blocks"), |
| 178 | "", |
| 179 | __('If the issue persists after refreshing permalinks, please contact our support team or your hosting provider for further assistance.', "superb-blocks") |
| 180 | ), |
| 181 | array('text' => __('Go to Permalinks Settings', 'superb-blocks'), 'link' => admin_url('options-permalink.php')) |
| 182 | ); |
| 183 | |
| 184 | $this->AddResultBox( |
| 185 | "network", |
| 186 | "cloud-slash.svg", |
| 187 | __('Network error', "superb-blocks"), |
| 188 | array( |
| 189 | __('Your current WordPress and/or webserver configuration is causing issues with the WordPress REST API.', "superb-blocks"), |
| 190 | "", |
| 191 | __('This issue can be caused by CORS restrictions on your website.', "superb-blocks"), |
| 192 | "", |
| 193 | __('This issue can also be caused by a misconfigured server, or a security plugin blocking the REST API. You can check if REST API is running correctly on your website by heading to "Tools -> Site Health" from the WordPress dashboard.', "superb-blocks"), |
| 194 | "", |
| 195 | __('If the issue can not be resolved manually, please contact our support team or your hosting provider for further assistance.', "superb-blocks") |
| 196 | ), |
| 197 | $support_cta |
| 198 | ); |
| 199 | |
| 200 | $this->AddResultBox( |
| 201 | "success", |
| 202 | "checkmark.svg", |
| 203 | __('No issues found', "superb-blocks"), |
| 204 | array( |
| 205 | __('All troubleshooting steps completed succesfully and no issues were found.', "superb-blocks"), |
| 206 | __('If you\'re still experiencing issues, please contact our support team for further assistance.', "superb-blocks") |
| 207 | ) |
| 208 | ); |
| 209 | |
| 210 | $this->AddResultBox( |
| 211 | "resolved", |
| 212 | "checkmark.svg", |
| 213 | __('Issues resolved', "superb-blocks"), |
| 214 | array( |
| 215 | __('All found issues have been successfully resolved in the troubleshooting process.', "superb-blocks"), |
| 216 | __('If you\'re still experiencing issues, please contact our support team for further assistance.', "superb-blocks") |
| 217 | ) |
| 218 | ); |
| 219 | ?> |
| 220 | </div> |
| 221 | <div class="spbaddons-troubleshooting-run-again" id="spbaddons-troubleshooting-run-again"> |
| 222 | <button type="button" class="superbaddons-element-button" id="spbaddons-troubleshooting-run-again-btn"><?php esc_html_e("Run Again", "superb-blocks"); ?></button> |
| 223 | </div> |
| 224 | </div> |
| 225 | |
| 226 | <!-- Learn the Basics --> |
| 227 | <div class="superbaddons-settings-section" id="spbaddons-learn-section"> |
| 228 | <div class="superbaddons-dashboard-section-header"> |
| 229 | <h4 class="superbaddons-element-text-sm superbaddons-element-text-dark superbaddons-element-text-800 superbaddons-element-m0"><?php esc_html_e("Learn the Basics", "superb-blocks"); ?></h4> |
| 230 | </div> |
| 231 | <p class="superbaddons-element-text-xs superbaddons-element-text-gray"><?php esc_html_e("Follow along with hands-on tutorials that walk you through the core features — from inserting blocks to browsing the Design Library in the Gutenberg editor.", "superb-blocks"); ?></p> |
| 232 | <div class="superbaddons-dashboard-feature-grid"> |
| 233 | <div class="superbaddons-dashboard-feature-card" id="superbaddons-tour-dashboard-welcome"> |
| 234 | <div class="superbaddons-dashboard-feature-card-header"> |
| 235 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/icon-superb.svg'); ?>" aria-hidden="true" style="width:30px;" /> |
| 236 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Dashboard Tour", "superb-blocks"); ?></strong> |
| 237 | </div> |
| 238 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("A quick walkthrough of the Superb Addons dashboard.", "superb-blocks"); ?></p> |
| 239 | <a class="superbaddons-element-button superbaddons-element-button-sm" href="<?php echo esc_url(add_query_arg(array('page' => DashboardController::MENU_SLUG, 'superb-tour' => 'dashboard'), admin_url('admin.php'))); ?>"><?php esc_html_e("Start Tutorial", "superb-blocks"); ?></a> |
| 240 | </div> |
| 241 | <div class="superbaddons-dashboard-feature-card superbaddons-start-tutorial-link-gutenberg" id="superbaddons-tour-gutenberg-patterns"> |
| 242 | <div class="superbaddons-dashboard-feature-card-header"> |
| 243 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/purple-subtract-square.svg'); ?>" aria-hidden="true" /> |
| 244 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Design Library", "superb-blocks"); ?></strong> |
| 245 | </div> |
| 246 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Let's show you where and how to browse and insert patterns from the Design Library.", "superb-blocks"); ?></p> |
| 247 | <a class="superbaddons-element-button superbaddons-element-button-sm" href="<?php echo esc_url(add_query_arg(array(TourController::TOUR_GUTENBERG => TourController::GUTENBERG_TOUR_PATTERNS, TourController::TOUR_NONCE_PARAM => wp_create_nonce(TourController::TOUR_NONCE_ACTION)), admin_url('post-new.php'))); ?>"><?php esc_html_e("Start Tutorial", "superb-blocks"); ?></a> |
| 248 | </div> |
| 249 | <div class="superbaddons-dashboard-feature-card superbaddons-start-tutorial-link-gutenberg" id="superbaddons-tour-gutenberg-blocks"> |
| 250 | <div class="superbaddons-dashboard-feature-card-header"> |
| 251 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/purple-cube.svg'); ?>" aria-hidden="true" /> |
| 252 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Gutenberg Blocks", "superb-blocks"); ?></strong> |
| 253 | </div> |
| 254 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("How do you insert the included blocks? This tutorial will show you.", "superb-blocks"); ?></p> |
| 255 | <a class="superbaddons-element-button superbaddons-element-button-sm" href="<?php echo esc_url(add_query_arg(array(TourController::TOUR_GUTENBERG => TourController::GUTENBERG_TOUR_BLOCKS, TourController::TOUR_NONCE_PARAM => wp_create_nonce(TourController::TOUR_NONCE_ACTION)), admin_url('post-new.php'))); ?>"><?php esc_html_e("Start Tutorial", "superb-blocks"); ?></a> |
| 256 | </div> |
| 257 | <?php if (ElementorController::is_compatible()) : ?> |
| 258 | <div class="superbaddons-dashboard-feature-card superbaddons-start-tutorial-link-elementor" id="superbaddons-tour-elementor"> |
| 259 | <div class="superbaddons-dashboard-feature-card-header"> |
| 260 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/logo-elementor.svg'); ?>" aria-hidden="true" /> |
| 261 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Elementor Addons", "superb-blocks"); ?></strong> |
| 262 | </div> |
| 263 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("See how you can use our Elementor addons to build beautiful pages.", "superb-blocks"); ?></p> |
| 264 | <a class="superbaddons-element-button superbaddons-element-button-sm" href="<?php echo esc_url('#' . TourController::TOUR_ELEMENTOR); ?>"><?php esc_html_e("Start Tutorial", "superb-blocks"); ?></a> |
| 265 | </div> |
| 266 | <?php endif; ?> |
| 267 | </div> |
| 268 | </div> |
| 269 | |
| 270 | <!-- Knowledge Base --> |
| 271 | <div class="superbaddons-settings-section" id="spbaddons-knowledge-base-section"> |
| 272 | <div class="superbaddons-dashboard-section-header"> |
| 273 | <h4 class="superbaddons-element-text-sm superbaddons-element-text-dark superbaddons-element-text-800 superbaddons-element-m0"><?php esc_html_e("Knowledge Base", "superb-blocks"); ?></h4> |
| 274 | </div> |
| 275 | <p class="superbaddons-element-text-xs superbaddons-element-text-gray"><?php esc_html_e("In-depth articles and reference guides covering themes, plugins, WordPress administration, and common troubleshooting scenarios.", "superb-blocks"); ?></p> |
| 276 | <div class="superbaddons-dashboard-feature-grid"> |
| 277 | <div class="superbaddons-dashboard-feature-card"> |
| 278 | <div class="superbaddons-dashboard-feature-card-header"> |
| 279 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/purple-list-bullets.svg'); ?>" aria-hidden="true" /> |
| 280 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("All Tutorials", "superb-blocks"); ?></strong> |
| 281 | </div> |
| 282 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Browse our complete collection of tutorials and guides.", "superb-blocks"); ?></p> |
| 283 | <a href="<?php echo esc_url(AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/documentation/"))); ?>" target="_blank" class="superbaddons-element-button superbaddons-element-button-sm"><?php esc_html_e("View All", "superb-blocks"); ?></a> |
| 284 | </div> |
| 285 | <div class="superbaddons-dashboard-feature-card"> |
| 286 | <div class="superbaddons-dashboard-feature-card-header"> |
| 287 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/graduation-cap-duotone.svg'); ?>" aria-hidden="true" /> |
| 288 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Getting Started", "superb-blocks"); ?></strong> |
| 289 | </div> |
| 290 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Learn the basics of setting up your plugins, themes, and website.", "superb-blocks"); ?></p> |
| 291 | <a href="<?php echo esc_url(AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/documentation/category/getting-started/"))); ?>" target="_blank" class="superbaddons-element-button superbaddons-element-button-sm"><?php esc_html_e("View Tutorials", "superb-blocks"); ?></a> |
| 292 | </div> |
| 293 | <div class="superbaddons-dashboard-feature-card"> |
| 294 | <div class="superbaddons-dashboard-feature-card-header"> |
| 295 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/cube-duotone.svg'); ?>" aria-hidden="true" /> |
| 296 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Themes & Design", "superb-blocks"); ?></strong> |
| 297 | </div> |
| 298 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Guides on layouts, typography, pages, and navigation.", "superb-blocks"); ?></p> |
| 299 | <a href="<?php echo esc_url(AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/documentation/category/themes-design/"))); ?>" target="_blank" class="superbaddons-element-button superbaddons-element-button-sm"><?php esc_html_e("View Tutorials", "superb-blocks"); ?></a> |
| 300 | </div> |
| 301 | <div class="superbaddons-dashboard-feature-card"> |
| 302 | <div class="superbaddons-dashboard-feature-card-header"> |
| 303 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/purple-features-blocks.svg'); ?>" aria-hidden="true" /> |
| 304 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Plugins & Superb Addons", "superb-blocks"); ?></strong> |
| 305 | </div> |
| 306 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Guides on features, settings, and best practices.", "superb-blocks"); ?></p> |
| 307 | <a href="<?php echo esc_url(AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/documentation/category/plugins-superb-addons/"))); ?>" target="_blank" class="superbaddons-element-button superbaddons-element-button-sm"><?php esc_html_e("View Tutorials", "superb-blocks"); ?></a> |
| 308 | </div> |
| 309 | <div class="superbaddons-dashboard-feature-card"> |
| 310 | <div class="superbaddons-dashboard-feature-card-header"> |
| 311 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/purple-wp.svg'); ?>" aria-hidden="true" /> |
| 312 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("WordPress Basics", "superb-blocks"); ?></strong> |
| 313 | </div> |
| 314 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Site configuration, content management, and general administration.", "superb-blocks"); ?></p> |
| 315 | <a href="<?php echo esc_url(AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/documentation/category/wordpress-basics/"))); ?>" target="_blank" class="superbaddons-element-button superbaddons-element-button-sm"><?php esc_html_e("View Tutorials", "superb-blocks"); ?></a> |
| 316 | </div> |
| 317 | <div class="superbaddons-dashboard-feature-card"> |
| 318 | <div class="superbaddons-dashboard-feature-card-header"> |
| 319 | <img class="superbaddons-dashboard-block-card-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/arrows-left-right-duotone.svg'); ?>" aria-hidden="true" /> |
| 320 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Troubleshooting", "superb-blocks"); ?></strong> |
| 321 | </div> |
| 322 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Step-by-step solutions to common problems and site issues.", "superb-blocks"); ?></p> |
| 323 | <a href="<?php echo esc_url(AdminLinkUtil::GetLink(AdminLinkSource::SUPPORT, array("url" => "https://superbthemes.com/documentation/category/troubleshooting/"))); ?>" target="_blank" class="superbaddons-element-button superbaddons-element-button-sm"><?php esc_html_e("View Tutorials", "superb-blocks"); ?></a> |
| 324 | </div> |
| 325 | </div> |
| 326 | <div class="superbaddons-dashboard-suggest-card superbaddons-support-suggest-card"> |
| 327 | <img src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/purple-bulb.svg'); ?>" aria-hidden="true" /> |
| 328 | <div class="superbaddons-dashboard-suggest-card-content"> |
| 329 | <strong class="superbaddons-element-text-xxs superbaddons-element-text-dark"><?php esc_html_e("Missing Something?", "superb-blocks"); ?></strong> |
| 330 | <p class="superbaddons-element-text-xxs superbaddons-element-text-gray superbaddons-element-m0"><?php esc_html_e("Help shape the future of Superb Addons by sharing your ideas and feature requests.", "superb-blocks"); ?></p> |
| 331 | </div> |
| 332 | <a href="<?php echo esc_url($contact_url); ?>" target="_blank" class="superbaddons-element-colorlink superbaddons-element-text-xxs"><?php esc_html_e("Request Feature", "superb-blocks"); ?> →</a> |
| 333 | </div> |
| 334 | </div> |
| 335 | |
| 336 | </div> |
| 337 | <div class="superbaddons-admindashboard-sidebarlayout-right"> |
| 338 | <?php |
| 339 | new SupportBox(); |
| 340 | new ReviewBox(); |
| 341 | new PremiumBox(AdminLinkSource::SUPPORT); |
| 342 | ?> |
| 343 | </div> |
| 344 | </div> |
| 345 | <?php |
| 346 | new Modal(); |
| 347 | } |
| 348 | |
| 349 | private function AddResultBox($identity, $icon, $title, $text_arr, $cta = false) |
| 350 | { |
| 351 | ?> |
| 352 | <div class="spbaddons-troubleshooting-result-item spbaddons-troubleshooting-result-<?php echo esc_attr($identity); ?>" style="display:none;"> |
| 353 | <div class="spbaddons-troubleshooting-result-item-header"> |
| 354 | <img class="spbaddons-troubleshooting-result-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/' . $icon); ?>" /> |
| 355 | <h5> |
| 356 | <?php echo esc_html($title); ?> |
| 357 | </h5> |
| 358 | </div> |
| 359 | <div class="spbaddons-troubleshooting-result-item-body"> |
| 360 | <?php |
| 361 | foreach ($text_arr as $text) { |
| 362 | if (empty($text)) { |
| 363 | echo "<br>"; |
| 364 | } |
| 365 | ?> |
| 366 | <p> |
| 367 | <?php echo esc_html($text); ?> |
| 368 | </p> |
| 369 | <?php |
| 370 | } |
| 371 | ?> |
| 372 | </div> |
| 373 | <?php if ($cta && isset($cta['text']) && isset($cta['link'])) : ?> |
| 374 | <div class="spbaddons-troubleshooting-result-item-cta"> |
| 375 | <a class="superbaddons-element-button" href="<?php echo esc_url($cta['link']); ?>" target="_blank"><?php echo esc_html($cta['text']); ?></a> |
| 376 | </div> |
| 377 | <?php endif; ?> |
| 378 | </div> |
| 379 | <?php |
| 380 | } |
| 381 | } |
| 382 |