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

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