PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.71
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.71
9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 8.5.4 All 221 releases
wpvr / admin / partials / wpvr_setting.php

wpvr_setting.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.71, at admin/partials/wpvr_setting.php

736 lines 47.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit; // Exit if accessed directly
3 /**
4 * Provide a admin area view for the plugin
5 *
6 * This file is used to markup the admin-facing aspects of the plugin.
7 *
8 * @link http://rextheme.com/
9 * @since 1.0.0
10 *
11 * @package Wpvr
12 * @subpackage Wpvr/admin/partials
13 */
14 ?>
15 <?php
16
17
18 $status = get_option('wpvr_edd_license_status');
19
20 /**
21 * get rollback version of WPVR
22 *
23 * @return array|mixed
24 *
25 * @src Inspired from Elementor roll back options
26 */
27 function rex_wpvr_get_roll_back_versions()
28 {
29 $max_number = 5;
30 $transient_key = 'rex_wpvr_rollback_versions_' . WPVR_VERSION;
31
32 // Check cached version
33 if ($rollback_versions = get_transient($transient_key)) {
34 return $rollback_versions;
35 }
36
37 require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
38 $plugin_information = plugins_api('plugin_information', ['slug' => 'wpvr']);
39
40 if (empty($plugin_information->versions) || !is_array($plugin_information->versions)) {
41 return [];
42 }
43
44
45 $latest_version = $plugin_information->versions;
46 unset($latest_version['trunk']);
47
48 $valid_versions = [];
49
50 foreach ($latest_version as $version => $download_link) {
51 $lowercase_version = strtolower($version);
52 $is_valid_rollback_version =
53 preg_match('/^\d+\.\d+\.\d+$/', $version) &&
54 !preg_match('/(beta|rc|dev)/i', $lowercase_version) &&
55 version_compare($version, WPVR_VERSION, '<');
56
57 /**
58 * Filters whether the rollback version is valid.
59 *
60 * @param bool $is_valid_rollback_version Whether the rollback version is valid.
61 * @param string $lowercase_version The lowercase version string.
62 */
63 $is_valid_rollback_version = apply_filters(
64 'rex_wpvr_is_valid_rollback_version',
65 $is_valid_rollback_version,
66 $lowercase_version
67 );
68
69 if ($is_valid_rollback_version) {
70 $valid_versions[] = $version;
71 }
72 }
73
74 usort($valid_versions, function ($a, $b) {
75 return version_compare($b, $a);
76 });
77
78 $rollback_versions = array_slice($valid_versions, 0, $max_number);
79
80 // Cache the results for a week
81 set_transient($transient_key, $rollback_versions, WEEK_IN_SECONDS);
82
83 return $rollback_versions;
84 }
85
86
87 $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ? rex_wpvr_get_roll_back_versions() : array();
88
89 ?>
90 <!-- This file should display the admin pages -->
91 <div class="wpvr-global-settings">
92 <ul class="tabs tabs-icon rex-tabs">
93 <li class="tab col s3 wpvr_tabs_row general-settigs">
94 <a href="#tab1">
95 <svg width="19" height="18" fill="none" viewBox="0 0 19 18" xmlns="http://www.w3.org/2000/svg"><path fill="#ABB4C2" stroke="#ABB4C2" stroke-width=".1" d="M17.71 10.43l-.75-.616a1.055 1.055 0 010-1.628l.75-.617c.532-.438.668-1.19.323-1.788L16.554 3.22a1.402 1.402 0 00-1.71-.614l-.909.34a1.055 1.055 0 01-1.41-.814l-.16-.957A1.402 1.402 0 0010.978 0H8.021c-.69 0-1.274.494-1.387 1.175l-.16.957a1.055 1.055 0 01-1.41.814l-.908-.34a1.402 1.402 0 00-1.711.614L.966 5.78a1.402 1.402 0 00.324 1.79l.749.616a1.055 1.055 0 010 1.628l-.749.617a1.402 1.402 0 00-.324 1.789l1.479 2.56a1.402 1.402 0 001.71.614l.91-.34a1.055 1.055 0 011.41.814l.159.957C6.747 17.505 7.33 18 8.02 18h2.957c.69 0 1.274-.494 1.387-1.175l.16-.957a1.054 1.054 0 011.41-.814l.908.34a1.402 1.402 0 001.712-.614l1.478-2.56a1.402 1.402 0 00-.324-1.79zm-2.373 3.647l-.909-.34a2.46 2.46 0 00-3.29 1.9l-.16.957H8.021l-.16-.957a2.46 2.46 0 00-3.29-1.9l-.909.34-1.478-2.56.749-.617a2.46 2.46 0 000-3.8l-.75-.616 1.48-2.561.908.34a2.46 2.46 0 003.29-1.9l.16-.957h2.957l.16.957a2.46 2.46 0 003.29 1.9l.909-.34 1.479 2.56s0 0 0 0l-.75.617a2.46 2.46 0 000 3.8l.75.616-1.48 2.561zM9.5 5.531A3.473 3.473 0 006.03 9a3.473 3.473 0 003.47 3.469A3.473 3.473 0 0012.968 9 3.473 3.473 0 009.5 5.531zm0 5.532A2.065 2.065 0 017.437 9c0-1.137.925-2.063 2.063-2.063 1.137 0 2.062.926 2.062 2.063A2.065 2.065 0 019.5 11.063z"/></svg>
96
97 <?php _e('General Settings', 'wpvr'); ?>
98 </a>
99 </li>
100 </ul>
101
102 <div class="wpvr-global-settings-tab-content">
103 <div id="tab1" class="block-wrapper">
104 <h3 class="tab-content-title"><?php _e('General Settings', 'wpvr'); ?></h3>
105 <div class="rex-upgrade wpvr-settings <?php echo is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status ? 'pro-active' : ''; ?>">
106 <h4 class="settings-box-title"><?php _e('Setup Options', 'wpvr'); ?></h4>
107 <div class="parent settings-wrapper">
108 <div class="wpvr_role-container">
109 <ul class="settings-ul">
110 <?php
111 $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
112 $is_integration_module = apply_filters('is_integration_module', false);
113 $editor_active = get_option('wpvr_editor_active');
114 $author_active = get_option('wpvr_author_active');
115 $fontawesome_disable = get_option('wpvr_fontawesome_disable');
116 $cardboard_disable = get_option('wpvr_cardboard_disable');
117 $wpvr_webp_conversion = get_option('wpvr_webp_conversion');
118 $mobile_media_resize = get_option('mobile_media_resize');
119 $wpvr_script_control = get_option('wpvr_script_control');
120 $wpvr_script_list = get_option('wpvr_script_list');
121 $wpvr_video_script_control = get_option('wpvr_video_script_control');
122 $wpvr_video_script_list = get_option('wpvr_video_script_list');
123 $high_res_image = get_option('high_res_image');
124 $dis_on_hover = get_option('dis_on_hover');
125 $wpvr_mobile_hotspot_tip = get_option('wpvr_mobile_hotspot_tip');
126 $enable_woocommerce = get_option('wpvr_enable_woocommerce', false);
127 $dokan_vendor_active = get_option('dokan_vendor_active', false);
128 ?>
129 <li>
130 <p class="single-settings-title">
131 <?php echo __("Allow the Editors of your site to Create, Edit, Update, and Delete virtual tours (They can access other users' tours):", "wpvr"); ?>
132 </p>
133
134 <span class="wpvr-switcher">
135 <?php
136 if ($editor_active == "true") {
137 ?>
138 <input id="wpvr_editor_active" type="checkbox" checked>
139 <?php
140 } else {
141 ?>
142 <input id="wpvr_editor_active" type="checkbox">
143 <?php
144 }
145 ?>
146 <label for="wpvr_editor_active"></label>
147 </span>
148
149 <span class="wpvr-tooltip">
150 <span class="icon">
151 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
152 </span>
153
154 <p>
155 <?php
156 echo wp_kses(
157 sprintf(
158 __('Enable editors to manage all virtual tours on your site, including those created by other users. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
159 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#1s')
160 ),
161 array(
162 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
163 )
164 );
165 ?>
166 </p>
167 </span>
168
169 </li>
170
171 <li>
172 <p class="single-settings-title">
173 <?php echo __("Allow the Authors of your site to Create, Edit, Update, and Delete virtual tours (They can access their own tours only):", "wpvr"); ?>
174 </p>
175
176 <span class="wpvr-switcher">
177 <?php
178 if ($author_active == "true") {
179 ?>
180 <input id="wpvr_author_active" type="checkbox" checked>
181 <?php
182 } else {
183 ?>
184 <input id="wpvr_author_active" type="checkbox">
185 <?php
186 }
187 ?>
188 <label for="wpvr_author_active"></label>
189 </span>
190
191 <span class="wpvr-tooltip">
192 <span class="icon">
193 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
194 </span>
195 <p>
196 <?php
197 echo wp_kses(
198 sprintf(
199 __('Grant authors permission to manage only their own virtual tours without accessing others\' tours. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
200 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#2s')
201 ),
202 array(
203 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
204 )
205 );
206 ?>
207 </p>
208
209 </span>
210 </li>
211 <?php if(is_plugin_active( 'dokan-lite/dokan.php' ) || is_plugin_active( 'dokan-pro/dokan.php' )) { ?>
212 <li>
213 <p class="single-settings-title">
214 <?php echo __("Allow Dokan Vendors of your site to Create, Edit, Update, and Delete virtual tours (They can access their own tours only):", "wpvr"); ?>
215 </p>
216
217 <span class="wpvr-switcher">
218 <?php
219 if ($dokan_vendor_active == "true") {
220 ?>
221 <input id="wpvr_dokan_vendor_active" type="checkbox" checked>
222 <?php
223 } else {
224 ?>
225 <input id="wpvr_dokan_vendor_active" type="checkbox">
226 <?php
227 }
228 ?>
229 <label for="wpvr_dokan_vendor_active"></label>
230 </span>
231
232 <span class="wpvr-tooltip">
233 <span class="icon">
234 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
235 </span>
236 <p><?php echo __('Dokan vendor will be able to Create, Edit, Update, and Delete their own virtual tours only.', 'wpvr'); ?></p>
237 </span>
238 </li>
239
240 <?php } ?>
241
242 <li>
243 <p class="single-settings-title">
244 <?php echo __("Disable Fontawesome from WP VR:", "wpvr"); ?>
245 </p>
246
247 <span class="wpvr-switcher">
248 <?php
249 if ($fontawesome_disable == "true") {
250 ?>
251 <input id="wpvr_fontawesome_disable" type="checkbox" checked>
252 <?php
253 } else {
254 ?>
255 <input id="wpvr_fontawesome_disable" type="checkbox">
256 <?php
257 }
258 ?>
259 <label for="wpvr_fontawesome_disable"></label>
260 </span>
261
262 <span class="wpvr-tooltip">
263 <span class="icon">
264 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
265 </span>
266
267 <p>
268 <?php
269 echo wp_kses(
270 sprintf(
271 __('Turn off the Fontawesome icon library in WP VR if you prefer to use custom icons or other icon libraries. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
272 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#3s')
273 ),
274 array(
275 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
276 )
277 );
278 ?>
279 </p>
280 </span>
281 </li>
282
283 <li>
284 <p class="single-settings-title">
285 <?php echo __("Enable mobile media resizer:", "wpvr"); ?>
286 </p>
287
288 <span class="wpvr-switcher">
289 <?php
290 if ($mobile_media_resize == "true") {
291 ?>
292 <input id="mobile_media_resize" type="checkbox" checked>
293 <?php
294 } else {
295 ?>
296 <input id="mobile_media_resize" type="checkbox">
297 <?php
298 }
299 ?>
300 <label for="mobile_media_resize"></label>
301 </span>
302
303 <span class="wpvr-tooltip">
304 <span class="icon">
305 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
306 </span>
307 <p><?php echo __(' Automatically adjust media sizes for mobile devices to ensure optimal viewing performance.', 'wpvr'); ?></p>
308 </span>
309 </li>
310
311 <li>
312 <p class="single-settings-title">
313 <?php echo __("Disable WordPress Large Image Handler on WP VR:", "wpvr"); ?>
314 </p>
315
316 <span class="wpvr-switcher">
317 <?php
318 if ($high_res_image == "true") {
319 ?>
320 <input id="high_res_image" type="checkbox" checked>
321 <?php
322 } else {
323 ?>
324 <input id="high_res_image" type="checkbox">
325 <?php
326 }
327 ?>
328 <label for="high_res_image"></label>
329 </span>
330
331 <span class="wpvr-tooltip">
332 <span class="icon">
333 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
334 </span>
335
336 <p>
337 <?php
338 echo wp_kses(
339 sprintf(
340 __('Prevent WordPress from resizing large images, keeping the original size for better quality in tours. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
341 esc_url('https://rextheme.com/docs/wp-vr-disable-wordpress-large-image-handler/')
342 ),
343 array(
344 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
345 )
346 );
347 ?>
348 </p>
349
350
351 </span>
352 </li>
353
354 <li>
355 <p class="single-settings-title">
356 <?php echo __("Disable On Hover Content for Mobile:", "wpvr"); ?>
357 </p>
358
359 <span class="wpvr-switcher">
360 <?php
361 if ($dis_on_hover == "true") {
362 ?>
363 <input id="dis_on_hover" type="checkbox" checked>
364 <?php
365 } else {
366 ?>
367 <input id="dis_on_hover" type="checkbox">
368 <?php
369 }
370 ?>
371 <label for="dis_on_hover"></label>
372 </span>
373
374 <span class="wpvr-tooltip">
375 <span class="icon">
376 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
377 </span>
378
379 <p>
380 <?php
381 echo wp_kses(
382 sprintf(
383 __('Turn off hover-based content interactions on mobile devices to enhance usability on touch screens. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
384 esc_url('https://rextheme.com/docs/wp-vr-auto-resize-images-mobile-devices/')
385 ),
386 array(
387 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
388 )
389 );
390 ?>
391 </p>
392 </span>
393 </li>
394
395 <li>
396 <p class="single-settings-title">
397 <?php echo __("Enable Mobile Hotspot Tip:", "wpvr"); ?>
398 </p>
399
400 <span class="wpvr-switcher">
401 <input id="wpvr_mobile_hotspot_tip" type="checkbox"
402 <?php echo ($wpvr_mobile_hotspot_tip === 'true') ? 'checked' : ''; ?>>
403 <label for="wpvr_mobile_hotspot_tip"></label>
404 </span>
405
406 <span class="wpvr-tooltip">
407 <span class="icon">
408 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
409 </span>
410 <p><?php echo __('When enabled, a tip message is shown to mobile visitors after their first interaction with the virtual tour.', 'wpvr'); ?></p>
411 </span>
412 </li>
413
414 <li>
415 <p class="single-settings-title">
416 <?php echo __("Enable script control (It will load the WP VR scripts on the pages with virtual tours only):", "wpvr"); ?>
417 </p>
418
419 <span class="wpvr-switcher">
420 <?php
421 if ($wpvr_script_control == "true") {
422 ?>
423 <input id="wpvr_script_control" type="checkbox" checked>
424 <?php
425 } else {
426 ?>
427 <input id="wpvr_script_control" type="checkbox">
428 <?php
429 }
430 ?>
431 <label for="wpvr_script_control"></label>
432 </span>
433
434 <span class="wpvr-tooltip">
435 <span class="icon">
436 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
437 </span>
438
439 <p>
440 <?php
441 echo wp_kses(
442 sprintf(
443 __('Load WP VR scripts only on pages with virtual tours, improving page load times on other pages. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
444 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#5s')
445 ),
446 array(
447 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
448 )
449 );
450 ?>
451 </p>
452
453 </span>
454
455 <div class="inner-settings-wrapper enqueue-script wpvr_enqueue_script_list">
456 <p class="single-settings-inner-title">
457 <?php echo __('List of allowed pages to load WP VR scripts (The URLs of the pages on your site with virtual tours):', 'wpvr'); ?>
458 </p>
459
460 <div class="settings-input-wrapper">
461 <input type="text" id="wpvr_script_list" class="materialize-textarea" placeholder="https://example.com/tour1/,https://example.com/tour2/" value="<?php echo $wpvr_script_list; ?>" >
462 <span class="hints"><?php echo __("List the pages with virtual tours like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></span>
463 </div>
464 </div>
465 </li>
466
467 <li>
468 <p class="single-settings-title">
469 <?php echo __("Video Tour JS control (It will load the WP VR Video JS library in the listed pages only):", "wpvr"); ?>
470 </p>
471
472 <span class="wpvr-switcher">
473 <?php
474 if ($wpvr_video_script_control == "true") {
475 ?>
476 <input id="wpvr_video_script_control" type="checkbox" checked>
477 <?php
478 } else {
479 ?>
480 <input id="wpvr_video_script_control" type="checkbox">
481 <?php
482 }
483 ?>
484 <label for="wpvr_video_script_control"></label>
485 </span>
486
487 <span class="wpvr-tooltip">
488 <span class="icon">
489 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
490 </span>
491
492 <p>
493 <?php
494 echo wp_kses(
495 sprintf(
496 __('Activate the Video.js library only on pages that contain virtual video tours, optimizing resources. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
497 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#5s')
498 ),
499 array(
500 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
501 )
502 );
503 ?>
504 </p>
505
506 </span>
507
508 <div class="inner-settings-wrapper enqueue-video-script enqueue-script wpvr_enqueue_video_script_list">
509 <p class="single-settings-inner-title">
510 <?php echo __('List of allowed pages to load WP VR Video JS library (The URLs of the pages on your site, You want to load Video JS):', 'wpvr'); ?>
511 </p>
512
513 <div class="settings-input-wrapper">
514 <input type="text" id="wpvr_video_script_list" class="materialize-textarea" placeholder="https://example.com/video-tour1/,https://example.com/video-tour2/" value="<?php echo $wpvr_video_script_list; ?>">
515 <span class="hints"><?php echo __("List the pages like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></span>
516 </div>
517 </div>
518 </li>
519
520 <!-- WPVR front-end notice -->
521 <li class="enqueue-script front-notice">
522 <?php
523 $wpvr_frontend_notice = false;
524 $wpvr_frontend_notice_area = '';
525 $wpvr_frontend_notice = get_option('wpvr_frontend_notice');
526 $wpvr_frontend_notice_area = get_option('wpvr_frontend_notice_area');
527 if (!$wpvr_frontend_notice_area) {
528 $wpvr_frontend_notice_area = __("Flip the phone to landscape mode for a better experience of the tour.", "wpvr");
529 }
530 ?>
531 <p class="single-settings-title">
532 <?php echo __("Front-End Notice for Mobile Visitors:", "wpvr"); ?>
533 </p>
534
535 <span class="wpvr-switcher">
536 <?php
537 if ($wpvr_frontend_notice == "true") {
538 ?>
539 <input id="wpvr_frontend_notice" type="checkbox" checked>
540 <?php
541 } else {
542 ?>
543 <input id="wpvr_frontend_notice" type="checkbox">
544 <?php
545 }
546 ?>
547 <label for="wpvr_frontend_notice"></label>
548 </span>
549
550 <span class="wpvr-tooltip">
551 <span class="icon">
552 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
553 </span>
554 <p><?php echo __("Display a message on the front end to inform mobile visitors about virtual tour capabilities or requirements.", 'wpvr'); ?></p>
555 </span>
556
557 <input type="text" id="wpvr_frontend_notice_area" class="materialize-textarea" placeholder="Add your notice here" value="<?php echo $wpvr_frontend_notice_area; ?>">
558 </li>
559
560 <li>
561 <p class="single-settings-title">
562 <?php echo __("VR GLass Support:", "wpvr"); ?>
563 </p>
564
565 <span class="wpvr-switcher">
566 <?php
567 if(is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status) {
568 if ($cardboard_disable == 'true') {
569 ?>
570 <input id="wpvr_cardboard_disable" type="checkbox" checked>
571 <?php
572 } else {
573 ?>
574 <input id="wpvr_cardboard_disable" type="checkbox" >
575 <?php
576 }
577 }
578 ?>
579 <?php if(is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status){ ?>
580 <label for="wpvr_cardboard_disable"></label>
581 <?php }else{ ?>
582
583 <div class='wpvr_cardboard_disable_is_pro'>
584 <span>Pro</span>
585 <label for="wpvr_cardboard_disable" class='wpvr_cardboard_disable_label'></label>
586 </div>
587 <?php } ?>
588 </span>
589
590 <span class="wpvr-tooltip">
591 <span class="icon">
592 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
593 </span>
594
595 <p>
596 <?php
597 echo wp_kses(
598 sprintf(
599 __('Enable compatibility with VR glasses for immersive viewing of virtual tours on supported devices. <a href="%s" target="_blank" rel="noopener noreferrer">View Doc</a>', 'wpvr'),
600 esc_url('https://rextheme.com/docs/enable-vr-headset-for-phones-wordpress/')
601 ),
602 array(
603 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
604 )
605 );
606 ?>
607 </p>
608 </span>
609 </li>
610
611 <li>
612 <p class="single-settings-title">
613 <?php echo __("Convert any jpeg or png format image to WebP on media upload:", "wpvr"); ?>
614 </p>
615
616 <span class="wpvr-switcher">
617 <!-- WPVR front-end notice -->
618 <?php if (is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status) { ?>
619
620 <?php
621 if ($wpvr_webp_conversion == 'true') {
622 ?>
623 <input id="wpvr_webp_conversion" type="checkbox" checked>
624 <?php
625 } else {
626 ?>
627 <input id="wpvr_webp_conversion" type="checkbox" >
628 <?php
629 }
630 ?>
631 <?php } ?>
632
633 <?php if(is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status ){ ?>
634 <label for="wpvr_webp_conversion"></label>
635 <?php }else{ ?>
636
637 <div class='wpvr_cardboard_disable_is_pro'>
638 <span>Pro</span>
639 <label for="wpvr_cardboard_disable" class='wpvr_cardboard_disable_label'></label>
640 </div>
641 <?php } ?>
642 </span>
643
644 <span class="wpvr-tooltip">
645 <span class="icon">
646 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
647 </span>
648
649 <p><?php echo __('Automatically convert JPEG or PNG images to the WebP format when uploading, improving load times and image quality.', 'wpvr'); ?></p>
650 </span>
651 </li>
652
653 <?php
654 $wpvr_allow_tracking = get_option( 'wpvr_allow_tracking', 'no' );
655 ?>
656 <li>
657 <p class="single-settings-title">
658 <?php echo __("Allow Usage Data Sharing:", "wpvr"); ?>
659 </p>
660
661 <span class="wpvr-switcher">
662 <input id="wpvr_usage_tracking" type="checkbox" <?php checked( $wpvr_allow_tracking, 'yes' ); ?>>
663 <label for="wpvr_usage_tracking"></label>
664 </span>
665
666 <span class="wpvr-tooltip">
667 <span class="icon">
668 <svg width="15" height="16" fill="none" viewBox="0 0 15 16" xmlns="http://www.w3.org/2000/svg"><path stroke="#73707D" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.333" d="M5.56 5.9a2.08 2.08 0 01.873-1.114 1.92 1.92 0 011.351-.259 1.98 1.98 0 011.192.717c.305.38.471.86.47 1.356 0 1.4-2 2.1-2 2.1m.054 2.8h.006m6.66-3.5c0 3.866-2.984 7-6.666 7C3.818 15 .833 11.866.833 8S3.818 1 7.5 1s6.666 3.134 6.666 7z"/></svg>
669 </span>
670 <p><?php echo __('Share your site URL, email, and anonymous usage data to help us improve WP VR. You can disable this at any time.', 'wpvr'); ?></p>
671 </span>
672 </li>
673
674 <li>
675 <form class="wpvr-version" id="trigger-rollback">
676 <?php wp_nonce_field( 'wpvr_rollback','wpvr_rollback' ); ?>
677 <p class="single-settings-title">
678 <?php _e('Select a Version to Rollback', 'wpvr'); ?>
679 </p>
680 <select class="wpvr-version-select" name="wpvr_version">
681 <?php
682 foreach ( $rollback_versions as $version ) {
683 echo "<option value='".esc_attr( $version )."'>".esc_html($version)."</option>";
684 }
685 ?>
686 </select>
687
688 <input class="wpvr-btn" type="submit" value="Rollback">
689 </form>
690 </li>
691 </ul>
692
693 </div>
694
695 </div>
696 </div>
697
698 <div class="settings-footer-area">
699 <span class="wpvr-alert box wpvr-success">
700 <?php echo __('Succesfully Saved', 'wpvr'); ?>
701 </span>
702
703 <button class="wpvr-btn reset" type="button" id="wpvr_role_reset">
704 <?php echo __('Reset Defaults', 'wpvr'); ?>
705 </button>
706
707 <button class="wpvr-btn" type="submit" id="wpvr_role_submit">
708 <?php echo __('Save Settings', 'wpvr'); ?>
709 <span class="wpvr-loader"></span>
710 </button>
711 </div>
712 </div>
713 </div>
714 </div>
715
716 <?php
717
718 if(is_plugin_active('divi-builder/divi-builder.php')){
719 ?>
720 <script>
721 (function ($) {
722 $(".wpvr-global-settings .block-wrapper:not(#tab1)").hide()
723 $('.wpvr-global-settings li.tab a').first().addClass("active");
724 $('.wpvr-global-settings li.tab').on('click', function(){
725 var target_id = $(this).find("a").attr('href');
726 $(".wpvr-global-settings li.tab a").removeClass('active');
727 $(this).find("a").addClass('active');
728 $(target_id).show();
729 $(target_id).siblings('.block-wrapper').hide();
730 })
731 })(jQuery);
732 </script>
733 <?php
734 }
735
736 ?>