PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.68
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.68
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.68, at admin/partials/wpvr_setting.php

716 lines 45.5 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 $enable_woocommerce = get_option('wpvr_enable_woocommerce', false);
126 $dokan_vendor_active = get_option('dokan_vendor_active', false);
127 ?>
128 <li>
129 <p class="single-settings-title">
130 <?php echo __("Allow the Editors of your site to Create, Edit, Update, and Delete virtual tours (They can access other users' tours):", "wpvr"); ?>
131 </p>
132
133 <span class="wpvr-switcher">
134 <?php
135 if ($editor_active == "true") {
136 ?>
137 <input id="wpvr_editor_active" type="checkbox" checked>
138 <?php
139 } else {
140 ?>
141 <input id="wpvr_editor_active" type="checkbox">
142 <?php
143 }
144 ?>
145 <label for="wpvr_editor_active"></label>
146 </span>
147
148 <span class="wpvr-tooltip">
149 <span class="icon">
150 <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>
151 </span>
152
153 <p>
154 <?php
155 echo wp_kses(
156 sprintf(
157 __('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'),
158 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#1s')
159 ),
160 array(
161 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
162 )
163 );
164 ?>
165 </p>
166 </span>
167
168 </li>
169
170 <li>
171 <p class="single-settings-title">
172 <?php echo __("Allow the Authors of your site to Create, Edit, Update, and Delete virtual tours (They can access their own tours only):", "wpvr"); ?>
173 </p>
174
175 <span class="wpvr-switcher">
176 <?php
177 if ($author_active == "true") {
178 ?>
179 <input id="wpvr_author_active" type="checkbox" checked>
180 <?php
181 } else {
182 ?>
183 <input id="wpvr_author_active" type="checkbox">
184 <?php
185 }
186 ?>
187 <label for="wpvr_author_active"></label>
188 </span>
189
190 <span class="wpvr-tooltip">
191 <span class="icon">
192 <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>
193 </span>
194 <p>
195 <?php
196 echo wp_kses(
197 sprintf(
198 __('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'),
199 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#2s')
200 ),
201 array(
202 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
203 )
204 );
205 ?>
206 </p>
207
208 </span>
209 </li>
210 <?php if(is_plugin_active( 'dokan-lite/dokan.php' ) || is_plugin_active( 'dokan-pro/dokan.php' )) { ?>
211 <li>
212 <p class="single-settings-title">
213 <?php echo __("Allow Dokan Vendors of your site to Create, Edit, Update, and Delete virtual tours (They can access their own tours only):", "wpvr"); ?>
214 </p>
215
216 <span class="wpvr-switcher">
217 <?php
218 if ($dokan_vendor_active == "true") {
219 ?>
220 <input id="wpvr_dokan_vendor_active" type="checkbox" checked>
221 <?php
222 } else {
223 ?>
224 <input id="wpvr_dokan_vendor_active" type="checkbox">
225 <?php
226 }
227 ?>
228 <label for="wpvr_dokan_vendor_active"></label>
229 </span>
230
231 <span class="wpvr-tooltip">
232 <span class="icon">
233 <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>
234 </span>
235 <p><?php echo __('Dokan vendor will be able to Create, Edit, Update, and Delete their own virtual tours only.', 'wpvr'); ?></p>
236 </span>
237 </li>
238
239 <?php } ?>
240
241 <li>
242 <p class="single-settings-title">
243 <?php echo __("Disable Fontawesome from WP VR:", "wpvr"); ?>
244 </p>
245
246 <span class="wpvr-switcher">
247 <?php
248 if ($fontawesome_disable == "true") {
249 ?>
250 <input id="wpvr_fontawesome_disable" type="checkbox" checked>
251 <?php
252 } else {
253 ?>
254 <input id="wpvr_fontawesome_disable" type="checkbox">
255 <?php
256 }
257 ?>
258 <label for="wpvr_fontawesome_disable"></label>
259 </span>
260
261 <span class="wpvr-tooltip">
262 <span class="icon">
263 <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>
264 </span>
265
266 <p>
267 <?php
268 echo wp_kses(
269 sprintf(
270 __('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'),
271 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#3s')
272 ),
273 array(
274 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
275 )
276 );
277 ?>
278 </p>
279 </span>
280 </li>
281
282 <li>
283 <p class="single-settings-title">
284 <?php echo __("Enable mobile media resizer:", "wpvr"); ?>
285 </p>
286
287 <span class="wpvr-switcher">
288 <?php
289 if ($mobile_media_resize == "true") {
290 ?>
291 <input id="mobile_media_resize" type="checkbox" checked>
292 <?php
293 } else {
294 ?>
295 <input id="mobile_media_resize" type="checkbox">
296 <?php
297 }
298 ?>
299 <label for="mobile_media_resize"></label>
300 </span>
301
302 <span class="wpvr-tooltip">
303 <span class="icon">
304 <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>
305 </span>
306 <p><?php echo __(' Automatically adjust media sizes for mobile devices to ensure optimal viewing performance.', 'wpvr'); ?></p>
307 </span>
308 </li>
309
310 <li>
311 <p class="single-settings-title">
312 <?php echo __("Disable WordPress Large Image Handler on WP VR:", "wpvr"); ?>
313 </p>
314
315 <span class="wpvr-switcher">
316 <?php
317 if ($high_res_image == "true") {
318 ?>
319 <input id="high_res_image" type="checkbox" checked>
320 <?php
321 } else {
322 ?>
323 <input id="high_res_image" type="checkbox">
324 <?php
325 }
326 ?>
327 <label for="high_res_image"></label>
328 </span>
329
330 <span class="wpvr-tooltip">
331 <span class="icon">
332 <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>
333 </span>
334
335 <p>
336 <?php
337 echo wp_kses(
338 sprintf(
339 __('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'),
340 esc_url('https://rextheme.com/docs/wp-vr-disable-wordpress-large-image-handler/')
341 ),
342 array(
343 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
344 )
345 );
346 ?>
347 </p>
348
349
350 </span>
351 </li>
352
353 <li>
354 <p class="single-settings-title">
355 <?php echo __("Disable On Hover Content for Mobile:", "wpvr"); ?>
356 </p>
357
358 <span class="wpvr-switcher">
359 <?php
360 if ($dis_on_hover == "true") {
361 ?>
362 <input id="dis_on_hover" type="checkbox" checked>
363 <?php
364 } else {
365 ?>
366 <input id="dis_on_hover" type="checkbox">
367 <?php
368 }
369 ?>
370 <label for="dis_on_hover"></label>
371 </span>
372
373 <span class="wpvr-tooltip">
374 <span class="icon">
375 <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>
376 </span>
377
378 <p>
379 <?php
380 echo wp_kses(
381 sprintf(
382 __('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'),
383 esc_url('https://rextheme.com/docs/wp-vr-auto-resize-images-mobile-devices/')
384 ),
385 array(
386 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
387 )
388 );
389 ?>
390 </p>
391 </span>
392 </li>
393
394 <li>
395 <p class="single-settings-title">
396 <?php echo __("Enable script control (It will load the WP VR scripts on the pages with virtual tours only):", "wpvr"); ?>
397 </p>
398
399 <span class="wpvr-switcher">
400 <?php
401 if ($wpvr_script_control == "true") {
402 ?>
403 <input id="wpvr_script_control" type="checkbox" checked>
404 <?php
405 } else {
406 ?>
407 <input id="wpvr_script_control" type="checkbox">
408 <?php
409 }
410 ?>
411 <label for="wpvr_script_control"></label>
412 </span>
413
414 <span class="wpvr-tooltip">
415 <span class="icon">
416 <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>
417 </span>
418
419 <p>
420 <?php
421 echo wp_kses(
422 sprintf(
423 __('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'),
424 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#5s')
425 ),
426 array(
427 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
428 )
429 );
430 ?>
431 </p>
432
433 </span>
434
435 <div class="inner-settings-wrapper enqueue-script wpvr_enqueue_script_list">
436 <p class="single-settings-inner-title">
437 <?php echo __('List of allowed pages to load WP VR scripts (The URLs of the pages on your site with virtual tours):', 'wpvr'); ?>
438 </p>
439
440 <div class="settings-input-wrapper">
441 <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; ?>" >
442 <span class="hints"><?php echo __("List the pages with virtual tours like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></span>
443 </div>
444 </div>
445 </li>
446
447 <li>
448 <p class="single-settings-title">
449 <?php echo __("Video Tour JS control (It will load the WP VR Video JS library in the listed pages only):", "wpvr"); ?>
450 </p>
451
452 <span class="wpvr-switcher">
453 <?php
454 if ($wpvr_video_script_control == "true") {
455 ?>
456 <input id="wpvr_video_script_control" type="checkbox" checked>
457 <?php
458 } else {
459 ?>
460 <input id="wpvr_video_script_control" type="checkbox">
461 <?php
462 }
463 ?>
464 <label for="wpvr_video_script_control"></label>
465 </span>
466
467 <span class="wpvr-tooltip">
468 <span class="icon">
469 <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>
470 </span>
471
472 <p>
473 <?php
474 echo wp_kses(
475 sprintf(
476 __('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'),
477 esc_url('https://rextheme.com/docs/wp-vr-exclusive-settings/#5s')
478 ),
479 array(
480 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
481 )
482 );
483 ?>
484 </p>
485
486 </span>
487
488 <div class="inner-settings-wrapper enqueue-video-script enqueue-script wpvr_enqueue_video_script_list">
489 <p class="single-settings-inner-title">
490 <?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'); ?>
491 </p>
492
493 <div class="settings-input-wrapper">
494 <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; ?>">
495 <span class="hints"><?php echo __("List the pages like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></span>
496 </div>
497 </div>
498 </li>
499
500 <!-- WPVR front-end notice -->
501 <li class="enqueue-script front-notice">
502 <?php
503 $wpvr_frontend_notice = false;
504 $wpvr_frontend_notice_area = '';
505 $wpvr_frontend_notice = get_option('wpvr_frontend_notice');
506 $wpvr_frontend_notice_area = get_option('wpvr_frontend_notice_area');
507 if (!$wpvr_frontend_notice_area) {
508 $wpvr_frontend_notice_area = __("Flip the phone to landscape mode for a better experience of the tour.", "wpvr");
509 }
510 ?>
511 <p class="single-settings-title">
512 <?php echo __("Front-End Notice for Mobile Visitors:", "wpvr"); ?>
513 </p>
514
515 <span class="wpvr-switcher">
516 <?php
517 if ($wpvr_frontend_notice == "true") {
518 ?>
519 <input id="wpvr_frontend_notice" type="checkbox" checked>
520 <?php
521 } else {
522 ?>
523 <input id="wpvr_frontend_notice" type="checkbox">
524 <?php
525 }
526 ?>
527 <label for="wpvr_frontend_notice"></label>
528 </span>
529
530 <span class="wpvr-tooltip">
531 <span class="icon">
532 <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>
533 </span>
534 <p><?php echo __("Display a message on the front end to inform mobile visitors about virtual tour capabilities or requirements.", 'wpvr'); ?></p>
535 </span>
536
537 <input type="text" id="wpvr_frontend_notice_area" class="materialize-textarea" placeholder="Add your notice here" value="<?php echo $wpvr_frontend_notice_area; ?>">
538 </li>
539
540 <li>
541 <p class="single-settings-title">
542 <?php echo __("VR GLass Support:", "wpvr"); ?>
543 </p>
544
545 <span class="wpvr-switcher">
546 <?php
547 if(is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status) {
548 if ($cardboard_disable == 'true') {
549 ?>
550 <input id="wpvr_cardboard_disable" type="checkbox" checked>
551 <?php
552 } else {
553 ?>
554 <input id="wpvr_cardboard_disable" type="checkbox" >
555 <?php
556 }
557 }
558 ?>
559 <?php if(is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status){ ?>
560 <label for="wpvr_cardboard_disable"></label>
561 <?php }else{ ?>
562
563 <div class='wpvr_cardboard_disable_is_pro'>
564 <span>Pro</span>
565 <label for="wpvr_cardboard_disable" class='wpvr_cardboard_disable_label'></label>
566 </div>
567 <?php } ?>
568 </span>
569
570 <span class="wpvr-tooltip">
571 <span class="icon">
572 <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>
573 </span>
574
575 <p>
576 <?php
577 echo wp_kses(
578 sprintf(
579 __('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'),
580 esc_url('https://rextheme.com/docs/enable-vr-headset-for-phones-wordpress/')
581 ),
582 array(
583 'a' => array('href' => array(), 'target' => array(), 'rel' => array())
584 )
585 );
586 ?>
587 </p>
588 </span>
589 </li>
590
591 <li>
592 <p class="single-settings-title">
593 <?php echo __("Convert any jpeg or png format image to WebP on media upload:", "wpvr"); ?>
594 </p>
595
596 <span class="wpvr-switcher">
597 <!-- WPVR front-end notice -->
598 <?php if (is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status) { ?>
599
600 <?php
601 if ($wpvr_webp_conversion == 'true') {
602 ?>
603 <input id="wpvr_webp_conversion" type="checkbox" checked>
604 <?php
605 } else {
606 ?>
607 <input id="wpvr_webp_conversion" type="checkbox" >
608 <?php
609 }
610 ?>
611 <?php } ?>
612
613 <?php if(is_plugin_active('wpvr-pro/wpvr-pro.php') && 'valid' === $status ){ ?>
614 <label for="wpvr_webp_conversion"></label>
615 <?php }else{ ?>
616
617 <div class='wpvr_cardboard_disable_is_pro'>
618 <span>Pro</span>
619 <label for="wpvr_cardboard_disable" class='wpvr_cardboard_disable_label'></label>
620 </div>
621 <?php } ?>
622 </span>
623
624 <span class="wpvr-tooltip">
625 <span class="icon">
626 <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>
627 </span>
628
629 <p><?php echo __('Automatically convert JPEG or PNG images to the WebP format when uploading, improving load times and image quality.', 'wpvr'); ?></p>
630 </span>
631 </li>
632
633 <?php
634 $wpvr_allow_tracking = get_option( 'wpvr_allow_tracking', 'no' );
635 ?>
636 <li>
637 <p class="single-settings-title">
638 <?php echo __("Allow Usage Data Sharing:", "wpvr"); ?>
639 </p>
640
641 <span class="wpvr-switcher">
642 <input id="wpvr_usage_tracking" type="checkbox" <?php checked( $wpvr_allow_tracking, 'yes' ); ?>>
643 <label for="wpvr_usage_tracking"></label>
644 </span>
645
646 <span class="wpvr-tooltip">
647 <span class="icon">
648 <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>
649 </span>
650 <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>
651 </span>
652 </li>
653
654 <li>
655 <form class="wpvr-version" id="trigger-rollback">
656 <?php wp_nonce_field( 'wpvr_rollback','wpvr_rollback' ); ?>
657 <p class="single-settings-title">
658 <?php _e('Select a Version to Rollback', 'wpvr'); ?>
659 </p>
660 <select class="wpvr-version-select" name="wpvr_version">
661 <?php
662 foreach ( $rollback_versions as $version ) {
663 echo "<option value='".esc_attr( $version )."'>".esc_html($version)."</option>";
664 }
665 ?>
666 </select>
667
668 <input class="wpvr-btn" type="submit" value="Rollback">
669 </form>
670 </li>
671 </ul>
672
673 </div>
674
675 </div>
676 </div>
677
678 <div class="settings-footer-area">
679 <span class="wpvr-alert box wpvr-success">
680 <?php echo __('Succesfully Saved', 'wpvr'); ?>
681 </span>
682
683 <button class="wpvr-btn reset" type="button" id="wpvr_role_reset">
684 <?php echo __('Reset Defaults', 'wpvr'); ?>
685 </button>
686
687 <button class="wpvr-btn" type="submit" id="wpvr_role_submit">
688 <?php echo __('Save Settings', 'wpvr'); ?>
689 <span class="wpvr-loader"></span>
690 </button>
691 </div>
692 </div>
693 </div>
694 </div>
695
696 <?php
697
698 if(is_plugin_active('divi-builder/divi-builder.php')){
699 ?>
700 <script>
701 (function ($) {
702 $(".wpvr-global-settings .block-wrapper:not(#tab1)").hide()
703 $('.wpvr-global-settings li.tab a').first().addClass("active");
704 $('.wpvr-global-settings li.tab').on('click', function(){
705 var target_id = $(this).find("a").attr('href');
706 $(".wpvr-global-settings li.tab a").removeClass('active');
707 $(this).find("a").addClass('active');
708 $(target_id).show();
709 $(target_id).siblings('.block-wrapper').hide();
710 })
711 })(jQuery);
712 </script>
713 <?php
714 }
715
716 ?>