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