PluginProbe ʕ •ᴥ•ʔ
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More / 3.7.0
Superb Addons: Blocks, Patterns, Pre-built Pages, Sliders, Popups, Free Forms, Animations & More v3.7.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 / pages / class-page-support.php
superb-blocks / src / admin / pages Last commit date
wizard 5 months ago class-page-additional-css.php 5 months ago class-page-dashboard.php 5 months ago class-page-settings.php 5 months ago class-page-support.php 5 months ago
class-page-support.php
263 lines
1 <?php
2
3 namespace SuperbAddons\Admin\Pages;
4
5 defined('ABSPATH') || exit();
6
7 use SuperbAddons\Admin\Utils\AdminLinkSource;
8 use SuperbAddons\Admin\Utils\AdminLinkUtil;
9 use SuperbAddons\Components\Admin\ContentBoxLarge;
10 use SuperbAddons\Components\Admin\FeatureRequestBox;
11 use SuperbAddons\Components\Admin\LinkBox;
12 use SuperbAddons\Components\Admin\Modal;
13 use SuperbAddons\Components\Admin\PremiumBox;
14 use SuperbAddons\Components\Admin\ReviewBox;
15 use SuperbAddons\Components\Admin\SupportBox;
16 use SuperbAddons\Elementor\Controllers\ElementorController;
17 use SuperbAddons\Tours\Controllers\TourController;
18
19 class SupportPage
20 {
21 public function __construct()
22 {
23
24 $this->Render();
25 }
26
27 private function Render()
28 {
29 ?>
30 <div class="superbaddons-admindashboard-sidebarlayout">
31 <div class="superbaddons-admindashboard-sidebarlayout-left">
32 <?php new ContentBoxLarge(
33 array(
34 "title" => __("Troubleshooting", "superb-blocks"),
35 "description" => __("Experiencing technical difficulties with Superb Addons? We recommend running the troubleshooting process to scan for and identify common issues.", "superb-blocks"),
36 "image" => "asset-medium-troubleshooting.jpg",
37 "connected_bottom" => true,
38 "class" => 'superbaddons-admindashboard-troubleshooting-image-box-large'
39 )
40 );
41 ?>
42 <div class="spbaddons-troubleshooting-wrapper">
43 <div class="spbaddons-troubleshooting-steps">
44 <!-- Handled by JS -->
45 </div>
46 <button id="spbaddons-troubleshooting-submit-btn" class="superbaddons-element-button superbaddons-element-m0" type="button"><?php echo esc_html__('Start Troubleshooting Process', "superb-blocks"); ?></button>
47 <div class="spbaddons-troubleshooting-result-wrapper" style="display:none;">
48 <?php
49 $this->AddResultBox(
50 "error",
51 "color-warning-octagon.svg",
52 __('Troubleshooting failed', "superb-blocks"),
53 array(
54 __('The troubleshooting process was able to identify errors, but was unable to resolve them.', "superb-blocks"),
55 __('If the errors can not be resolved manually, please contact our support team for further assistance.', "superb-blocks")
56 )
57 );
58
59 $this->AddResultBox(
60 "network",
61 "color-warning-octagon.svg",
62 __('Network error', "superb-blocks"),
63 array(
64 __('Your current WordPress and/or webserver configuration is causing issues with the WordPress REST API.', "superb-blocks"),
65 "",
66 __('This issue can be caused by CORS restrictions on your website.', "superb-blocks"),
67 "",
68 __('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"),
69 "",
70 __('If the issue can not be resolved manually, please contact our support team or your hosting provider for further assistance.', "superb-blocks")
71 )
72 );
73
74 $this->AddResultBox(
75 "success",
76 "checkmark.svg",
77 __('No issues found', "superb-blocks"),
78 array(
79 __('All troubleshooting steps completed succesfully and no issues were found.', "superb-blocks"),
80 __('If you\'re still experiencing issues, please contact our support team for further assistance.', "superb-blocks")
81 )
82 );
83
84 $this->AddResultBox(
85 "resolved",
86 "checkmark.svg",
87 __('Issues resolved', "superb-blocks"),
88 array(
89 __('All found issues have been successfully resolved in the troubleshooting process.', "superb-blocks"),
90 __('If you\'re still experiencing issues, please contact our support team for further assistance.', "superb-blocks")
91 )
92 );
93 ?>
94 </div>
95 </div>
96 <div class="superbaddons-additional-content-wrapper">
97 <h4 class="superbaddons-element-text-sm superbaddons-element-text-dark superbaddons-element-text-800 superbaddons-element-m0"><?php echo esc_html__("Guided Tutorials", "superb-blocks"); ?></h4>
98 <p class="superbaddons-element-text-xs superbaddons-element-text-gray "><?php echo esc_html__("Get started with our guided tutorials of Superb Addons features.", "superb-blocks"); ?></p>
99 <div class="superbaddons-admindashboard-linkbox-wrapper">
100 <?php
101 new LinkBox(
102 array(
103 "id" => "superbaddons-tour-gutenberg-patterns",
104 "icon" => "purple-subtract-square.svg",
105 "title" => __("Gutenberg Patterns", "superb-blocks"),
106 "description" => __("Let's show you where and how to use our library of Gutenberg patterns!", "superb-blocks"),
107 "cta" => __("Start Tutorial", "superb-blocks"),
108 "link" => esc_url(
109 add_query_arg(
110 array(
111 TourController::TOUR_GUTENBERG => TourController::GUTENBERG_TOUR_PATTERNS,
112 TourController::TOUR_NONCE_PARAM => wp_create_nonce(TourController::TOUR_NONCE_ACTION)
113 ),
114 admin_url('post-new.php')
115 )
116 ),
117 "classes" => 'superbaddons-start-tutorial-link-gutenberg'
118 )
119 );
120 new LinkBox(
121 array(
122 "id" => "superbaddons-tour-gutenberg-blocks",
123 "icon" => "purple-cube.svg",
124 "title" => __("Gutenberg Blocks", "superb-blocks"),
125 "description" => __("How do you insert the included blocks? This tutorial will show you.", "superb-blocks"),
126 "cta" => __("Start Tutorial", "superb-blocks"),
127 "link" => esc_url(
128 add_query_arg(
129 array(
130 TourController::TOUR_GUTENBERG => TourController::GUTENBERG_TOUR_BLOCKS,
131 TourController::TOUR_NONCE_PARAM => wp_create_nonce(TourController::TOUR_NONCE_ACTION)
132 ),
133 admin_url('post-new.php')
134 )
135 ),
136 "classes" => 'superbaddons-start-tutorial-link-gutenberg'
137 )
138 );
139 if (ElementorController::is_compatible()) {
140 new LinkBox(
141 array(
142 "id" => "superbaddons-tour-elementor",
143 "icon" => "logo-elementor.svg",
144 "title" => __("Elementor Addons", "superb-blocks"),
145 "description" => __("Love using Elementor? Start the tutorial and see how you can use our Elementor addons.", "superb-blocks"),
146 "cta" => __("Start Tutorial", "superb-blocks"),
147 "link" => esc_url('#' . TourController::TOUR_ELEMENTOR),
148 "classes" => 'superbaddons-start-tutorial-link-elementor superbaddons-flex-basis-100'
149 )
150 );
151 }
152 ?>
153 </div>
154 </div>
155 <div class="superbaddons-additional-content-wrapper">
156 <h4 class="superbaddons-element-text-sm superbaddons-element-text-dark superbaddons-element-text-800 superbaddons-element-m0"><?php echo esc_html__("Knowledge Base", "superb-blocks"); ?></h4>
157 <p class="superbaddons-element-text-xs superbaddons-element-text-gray "><?php echo esc_html__("Looking for answers? Our knowledge base may have what you're looking for.", "superb-blocks"); ?></p>
158 <div class="superbaddons-admindashboard-linkbox-wrapper">
159 <?php
160 new LinkBox(
161 array(
162 "icon" => "purple-list-bullets.svg",
163 "title" => __("All tutorials", "superb-blocks"),
164 "description" => __("We have a library of step by step tutorials which make it easy for you to create the best possible website.", "superb-blocks"),
165 "cta" => __("View all tutorials", "superb-blocks"),
166 "link" => AdminLinkUtil::GetLink(AdminLinkSource::DEFAULT, array("url" => "https://superbthemes.com/documentation/")),
167 )
168 );
169 new LinkBox(
170 array(
171 "icon" => "graduation-cap-duotone.svg",
172 "title" => __("Installation", "superb-blocks"),
173 "description" => __("Get help with the installation process, how to find your license key, how to import demo content, and more.", "superb-blocks"),
174 "cta" => __("View tutorials", "superb-blocks"),
175 "link" => AdminLinkUtil::GetLink(AdminLinkSource::DEFAULT, array("url" => "https://superbthemes.com/documentation/category/installation-process/")),
176 )
177 );
178 new LinkBox(
179 array(
180 "icon" => "cube-duotone.svg",
181 "title" => __("Block Themes", "superb-blocks"),
182 "description" => __("Discover how to utilize the WordPress site editor for personalizing your website, including templates, logo, and navigation.", "superb-blocks"),
183 "cta" => __("View tutorials", "superb-blocks"),
184 "link" => AdminLinkUtil::GetLink(AdminLinkSource::DEFAULT, array("url" => "https://superbthemes.com/documentation/category/block-themes/")),
185 )
186 );
187 new LinkBox(
188 array(
189 "icon" => "fse_icon_pagebuilder_large.svg",
190 "title" => __("Classic Themes", "superb-blocks"),
191 "description" => __("Get a better looking site by learning how to design it properly. Learn how to change colors, fonts, header image and a lot more.", "superb-blocks"),
192 "cta" => __("View tutorials", "superb-blocks"),
193 "link" => AdminLinkUtil::GetLink(AdminLinkSource::DEFAULT, array("url" => "https://superbthemes.com/documentation/category/classic-themes/")),
194 )
195 );
196 new LinkBox(
197 array(
198 "icon" => "plus-square-duotone.svg",
199 "title" => __("Superb Addons", "superb-blocks"),
200 "description" => __("Do you need help with Superb Addons? We've compiled responses to address the most frequently asked questions.", "superb-blocks"),
201 "cta" => __("View tutorials", "superb-blocks"),
202 "link" => AdminLinkUtil::GetLink(AdminLinkSource::DEFAULT, array("url" => "https://superbthemes.com/documentation/category/superb-addons/")),
203 )
204 );
205 new LinkBox(
206 array(
207 "icon" => "arrows-left-right-duotone.svg",
208 "title" => __("Miscellaneous", "superb-blocks"),
209 "description" => __("Learn how to create a child theme, install WooCommerce, and how to optimize your site through a SEO plugin.", "superb-blocks"),
210 "cta" => __("View tutorials", "superb-blocks"),
211 "link" => AdminLinkUtil::GetLink(AdminLinkSource::DEFAULT, array("url" => "https://superbthemes.com/documentation/category/miscellaneous/")),
212 )
213 );
214 ?>
215 </div>
216 </div>
217 <!-- Link Boxes -->
218 <div class="superbaddons-admindashboard-linkbox-wrapper">
219 <?php new FeatureRequestBox(); ?>
220 </div>
221 </div>
222 <div class="superbaddons-admindashboard-sidebarlayout-right">
223 <?php
224 new PremiumBox(AdminLinkSource::SUPPORT);
225 new SupportBox();
226 new ReviewBox();
227 ?>
228 </div>
229 </div>
230 <?php
231 new Modal();
232 }
233
234
235 private function AddResultBox($identity, $icon, $title, $text_arr)
236 {
237 ?>
238 <div class="spbaddons-troubleshooting-result-item spbaddons-troubleshooting-result-<?php echo esc_attr($identity); ?>" style="display:none;">
239 <div class="spbaddons-troubleshooting-result-item-header">
240 <img class="spbaddons-troubleshooting-result-icon" src="<?php echo esc_url(SUPERBADDONS_ASSETS_PATH . '/img/' . $icon); ?>" />
241 <h5>
242 <?php echo esc_html($title); ?>
243 </h5>
244 </div>
245 <div class="spbaddons-troubleshooting-result-item-body">
246 <?php
247 foreach ($text_arr as $text) {
248 if (empty($text)) {
249 echo "<br>";
250 }
251 ?>
252 <p>
253 <?php echo esc_html($text); ?>
254 </p>
255 <?php
256 }
257 ?>
258 </div>
259 </div>
260 <?php
261 }
262 }
263