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

603 lines 38.4 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 * get rollback version of WPVR
18 *
19 * @return array|mixed
20 *
21 * @src Inspired from Elementor roll back options
22 */
23 function rex_wpvr_get_roll_back_versions() {
24 $rollback_versions = get_transient( 'rex_wpvr_rollback_versions_' . WPVR_VERSION );
25 if ( false === $rollback_versions ) {
26 $max_versions = 5;
27 require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
28 $plugin_information = plugins_api(
29 'plugin_information', [
30 'slug' => 'wpvr',
31 ]
32 );
33 if ( empty( $plugin_information->versions ) || ! is_array( $plugin_information->versions ) ) {
34 return [];
35 }
36
37 krsort( $plugin_information->versions );
38
39 $rollback_versions = [];
40
41 $current_index = 0;
42 foreach ( $plugin_information->versions as $version => $download_link ) {
43 if ( $max_versions <= $current_index ) {
44 break;
45 }
46
47 $lowercase_version = strtolower( $version );
48 $is_valid_rollback_version = ! preg_match( '/(trunk|beta|rc|dev)/i', $lowercase_version );
49
50 /**
51 * Is rollback version is valid.
52 *
53 * Filters the check whether the rollback version is valid.
54 *
55 * @param bool $is_valid_rollback_version Whether the rollback version is valid.
56 */
57 $is_valid_rollback_version = apply_filters(
58 'rex_wpvr_is_valid_rollback_version',
59 $is_valid_rollback_version,
60 $lowercase_version
61 );
62
63 if ( ! $is_valid_rollback_version ) {
64 continue;
65 }
66
67 if ( version_compare( $version, WPVR_VERSION, '>=' ) ) {
68 continue;
69 }
70
71 $current_index++;
72 $rollback_versions[] = $version;
73 }
74
75 set_transient( 'rex_wpvr_rollback_versions_' . WPVR_VERSION, $rollback_versions, WEEK_IN_SECONDS );
76 }
77 return $rollback_versions;
78 }
79
80 $rollback_versions = function_exists( 'rex_wpvr_get_roll_back_versions' ) ? rex_wpvr_get_roll_back_versions() : array();
81
82 ?>
83 <!-- This file should display the admin pages -->
84 <div class="wpvr-global-settings">
85 <ul class="tabs tabs-icon rex-tabs">
86 <li class="tab col s3 wpvr_tabs_row general-settigs">
87 <a href="#tab1">
88 <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>
89
90 <?php _e('General Settings', 'wpvr'); ?>
91 </a>
92 </li>
93
94 <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
95 <li class="tab col s3 wpvr_tabs_row import">
96 <div class='rex-import-disable'>
97 <span class='is-pro'>Pro</span>
98 <svg width="21" height="14" fill="none" viewBox="0 0 21 14" xmlns="http://www.w3.org/2000/svg"><path stroke="#ABB4C2" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6.5 1h13m-13 6h13m-13 6h13M1.5 1h.01M1.5 7h.01m-.01 6h.01"/></svg>
99 <?php _e('Import', 'wpvr'); ?>
100 </div>
101 </li>
102 <?php } ?>
103
104 <?php if (is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
105 <li class="tab col s3 wpvr_tabs_row import">
106 <a href="#tab2">
107 <svg width="21" height="14" fill="none" viewBox="0 0 21 14" xmlns="http://www.w3.org/2000/svg"><path stroke="#ABB4C2" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6.5 1h13m-13 6h13m-13 6h13M1.5 1h.01M1.5 7h.01m-.01 6h.01"/></svg>
108 <?php _e('Import', 'wpvr'); ?>
109 </a>
110 </li>
111 <?php } ?>
112 </ul>
113
114 <div class="wpvr-global-settings-tab-content">
115 <div id="tab1" class="block-wrapper">
116 <h3 class="tab-content-title"><?php _e('General Settings', 'wpvr'); ?></h3>
117 <div class="rex-upgrade wpvr-settings <?php echo is_plugin_active('wpvr-pro/wpvr-pro.php') ? 'pro-active' : ''; ?>">
118 <h4 class="settings-box-title"><?php _e('Setup Options', 'wpvr'); ?></h4>
119 <div class="parent settings-wrapper">
120 <div class="wpvr_role-container">
121 <ul class="settings-ul">
122 <?php
123 $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
124 $is_integration_module = apply_filters('is_integration_module', false);
125 $editor_active = get_option('wpvr_editor_active');
126 $author_active = get_option('wpvr_author_active');
127 $fontawesome_disable = get_option('wpvr_fontawesome_disable');
128 $cardboard_disable = get_option('wpvr_cardboard_disable');
129 $wpvr_webp_conversion = get_option('wpvr_webp_conversion');
130 $mobile_media_resize = get_option('mobile_media_resize');
131 $wpvr_script_control = get_option('wpvr_script_control');
132 $wpvr_script_list = get_option('wpvr_script_list');
133 $wpvr_video_script_control = get_option('wpvr_video_script_control');
134 $wpvr_video_script_list = get_option('wpvr_video_script_list');
135 $high_res_image = get_option('high_res_image');
136 $dis_on_hover = get_option('dis_on_hover');
137 $enable_woocommerce = get_option('wpvr_enable_woocommerce', false);
138 ?>
139 <li>
140 <p class="single-settings-title">
141 <?php echo __("Allow the Editors of your site to Create, Edit, Update, and Delete virtual tours (They can access other users' tours):", "wpvr"); ?>
142 </p>
143
144 <span class="wpvr-switcher">
145 <?php
146 if ($editor_active == "true") {
147 ?>
148 <input id="wpvr_editor_active" type="checkbox" checked>
149 <?php
150 } else {
151 ?>
152 <input id="wpvr_editor_active" type="checkbox">
153 <?php
154 }
155 ?>
156 <label for="wpvr_editor_active"></label>
157 </span>
158
159 <span class="wpvr-tooltip">
160 <span class="icon">
161 <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>
162 </span>
163 <p><?php echo __('Editors will be able to Create, Edit, Update, and Delete all virtual tours.', 'wpvr'); ?></p>
164 </span>
165 </li>
166
167 <li>
168 <p class="single-settings-title">
169 <?php echo __("Allow the Authors of your site to Create, Edit, Update, and Delete virtual tours (They can access their own tours only):", "wpvr"); ?>
170 </p>
171
172 <span class="wpvr-switcher">
173 <?php
174 if ($author_active == "true") {
175 ?>
176 <input id="wpvr_author_active" type="checkbox" checked>
177 <?php
178 } else {
179 ?>
180 <input id="wpvr_author_active" type="checkbox">
181 <?php
182 }
183 ?>
184 <label for="wpvr_author_active"></label>
185 </span>
186
187 <span class="wpvr-tooltip">
188 <span class="icon">
189 <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>
190 </span>
191 <p><?php echo __('Authors will be able to Create, Edit, Update, and Delete their own virtual tours only.', 'wpvr'); ?></p>
192 </span>
193 </li>
194
195 <li>
196 <p class="single-settings-title">
197 <?php echo __("Disable Fontawesome from WP VR:", "wpvr"); ?>
198 </p>
199
200 <span class="wpvr-switcher">
201 <?php
202 if ($fontawesome_disable == "true") {
203 ?>
204 <input id="wpvr_fontawesome_disable" type="checkbox" checked>
205 <?php
206 } else {
207 ?>
208 <input id="wpvr_fontawesome_disable" type="checkbox">
209 <?php
210 }
211 ?>
212 <label for="wpvr_fontawesome_disable"></label>
213 </span>
214
215 <span class="wpvr-tooltip">
216 <span class="icon">
217 <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>
218 </span>
219 <p>
220 <?php echo __('WP VR will not load Font Awesome library.', 'wpvr'); ?>
221 </p>
222 </span>
223 </li>
224
225 <li>
226 <p class="single-settings-title">
227 <?php echo __("Enable mobile media resizer:", "wpvr"); ?>
228 </p>
229
230 <span class="wpvr-switcher">
231 <?php
232 if ($mobile_media_resize == "true") {
233 ?>
234 <input id="mobile_media_resize" type="checkbox" checked>
235 <?php
236 } else {
237 ?>
238 <input id="mobile_media_resize" type="checkbox">
239 <?php
240 }
241 ?>
242 <label for="mobile_media_resize"></label>
243 </span>
244
245 <span class="wpvr-tooltip">
246 <span class="icon">
247 <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>
248 </span>
249 <p><?php echo __('WP VR will resize each scenes for mobile devices.', 'wpvr'); ?></p>
250 </span>
251 </li>
252
253 <li>
254 <p class="single-settings-title">
255 <?php echo __("Disable WordPress Large Image Handler on WP VR:", "wpvr"); ?>
256 </p>
257
258 <span class="wpvr-switcher">
259 <?php
260 if ($high_res_image == "true") {
261 ?>
262 <input id="high_res_image" type="checkbox" checked>
263 <?php
264 } else {
265 ?>
266 <input id="high_res_image" type="checkbox">
267 <?php
268 }
269 ?>
270 <label for="high_res_image"></label>
271 </span>
272
273 <span class="wpvr-tooltip">
274 <span class="icon">
275 <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>
276 </span>
277 <p><?php echo __("WordPress's default large image handler for images larger than 2560px will be disabled for WP VR. So can create virtual tours with extremely high-quality images. Enabling it will also show high res image on mobile devices. Many devices may not support that resolution.", 'wpvr'); ?></p>
278 </span>
279 </li>
280
281 <li>
282 <p class="single-settings-title">
283 <?php echo __("Disable On Hover Content for Mobile:", "wpvr"); ?>
284 </p>
285
286 <span class="wpvr-switcher">
287 <?php
288 if ($dis_on_hover == "true") {
289 ?>
290 <input id="dis_on_hover" type="checkbox" checked>
291 <?php
292 } else {
293 ?>
294 <input id="dis_on_hover" type="checkbox">
295 <?php
296 }
297 ?>
298 <label for="dis_on_hover"></label>
299 </span>
300
301 <span class="wpvr-tooltip">
302 <span class="icon">
303 <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>
304 </span>
305 <p><?php echo __("You can disable on hover content for mobile devices. As most of the devices are touch based.", 'wpvr'); ?></p>
306 </span>
307 </li>
308
309 <li>
310 <p class="single-settings-title">
311 <?php echo __("Enable script control (It will load the WP VR scripts on the pages with virtual tours only):", "wpvr"); ?>
312 </p>
313
314 <span class="wpvr-switcher">
315 <?php
316 if ($wpvr_script_control == "true") {
317 ?>
318 <input id="wpvr_script_control" type="checkbox" checked>
319 <?php
320 } else {
321 ?>
322 <input id="wpvr_script_control" type="checkbox">
323 <?php
324 }
325 ?>
326 <label for="wpvr_script_control"></label>
327 </span>
328
329 <span class="wpvr-tooltip">
330 <span class="icon">
331 <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>
332 </span>
333 <p><?php echo __("WP VR assets will be loaded on your allowed pages only. If you turn this on, you have to list the URL's of the pages with virtual tours on the 'List of allowed pages to load WP VR scripts' option", 'wpvr'); ?></p>
334 </span>
335
336 <div class="inner-settings-wrapper enqueue-script wpvr_enqueue_script_list">
337 <p class="single-settings-inner-title">
338 <?php echo __('List of allowed pages to load WP VR scripts (The URLs of the pages on your site with virtual tours):', 'wpvr'); ?>
339 </p>
340
341 <div class="settings-input-wrapper">
342 <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; ?>" >
343 <span class="hints"><?php echo __("List the pages with virtual tours like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></span>
344 </div>
345 </div>
346 </li>
347
348 <li>
349 <p class="single-settings-title">
350 <?php echo __("Enable Video JS control (It will load the WP VR Video JS library in the listed pages only):", "wpvr"); ?>
351 </p>
352
353 <span class="wpvr-switcher">
354 <?php
355 if ($wpvr_video_script_control == "true") {
356 ?>
357 <input id="wpvr_video_script_control" type="checkbox" checked>
358 <?php
359 } else {
360 ?>
361 <input id="wpvr_video_script_control" type="checkbox">
362 <?php
363 }
364 ?>
365 <label for="wpvr_video_script_control"></label>
366 </span>
367
368 <span class="wpvr-tooltip">
369 <span class="icon">
370 <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>
371 </span>
372 <p><?php echo __("WP VR assets will be loaded on your allowed pages only. If you turn this on, you have to list the URL's of the pages with virtual tours on the 'List of allowed pages to load WP VR scripts' option", 'wpvr'); ?></p>
373 </span>
374
375 <div class="inner-settings-wrapper enqueue-video-script enqueue-script wpvr_enqueue_video_script_list">
376 <p class="single-settings-inner-title">
377 <?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'); ?>
378 </p>
379
380 <div class="settings-input-wrapper">
381 <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; ?>">
382 <span class="hints"><?php echo __("List the pages like this: https://example.com/tour1/, https://example.com/tour2/", 'wpvr'); ?></span>
383 </div>
384 </div>
385 </li>
386
387 <!-- WPVR front-end notice -->
388 <li class="enqueue-script front-notice">
389 <?php
390 $wpvr_frontend_notice = false;
391 $wpvr_frontend_notice_area = '';
392 $wpvr_frontend_notice = get_option('wpvr_frontend_notice');
393 $wpvr_frontend_notice_area = get_option('wpvr_frontend_notice_area');
394 if (!$wpvr_frontend_notice_area) {
395 $wpvr_frontend_notice_area = __("Flip the phone to landscape mode for a better experience of the tour.", "wpvr");
396 }
397 ?>
398 <p class="single-settings-title">
399 <?php echo __("Front-End Notice for Mobile Visitors:", "wpvr"); ?>
400 </p>
401
402 <span class="wpvr-switcher">
403 <?php
404 if ($wpvr_frontend_notice == "true") {
405 ?>
406 <input id="wpvr_frontend_notice" type="checkbox" checked>
407 <?php
408 } else {
409 ?>
410 <input id="wpvr_frontend_notice" type="checkbox">
411 <?php
412 }
413 ?>
414 <label for="wpvr_frontend_notice"></label>
415 </span>
416
417 <span class="wpvr-tooltip">
418 <span class="icon">
419 <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>
420 </span>
421 <p><?php echo __("The notice will appear on the front end of the virtual tour if viewed from a mobile device.", 'wpvr'); ?></p>
422 </span>
423
424 <input type="text" id="wpvr_frontend_notice_area" class="materialize-textarea" placeholder="Add your notice here" value="<?php echo $wpvr_frontend_notice_area; ?>">
425 </li>
426
427 <li>
428 <p class="single-settings-title">
429 <?php echo __("VR GLass Support:", "wpvr"); ?>
430 </p>
431
432 <span class="wpvr-switcher">
433 <?php
434 if(is_plugin_active('wpvr-pro/wpvr-pro.php')){
435 if ($cardboard_disable == 'true') {
436 ?>
437 <input id="wpvr_cardboard_disable" type="checkbox" checked>
438 <?php
439 } else {
440 ?>
441 <input id="wpvr_cardboard_disable" type="checkbox" >
442 <?php
443 }
444 }
445 ?>
446 <?php if(is_plugin_active('wpvr-pro/wpvr-pro.php')){ ?>
447 <label for="wpvr_cardboard_disable"></label>
448 <?php }else{ ?>
449
450 <div class='wpvr_cardboard_disable_is_pro'>
451 <span>Pro</span>
452 <label for="wpvr_cardboard_disable" class='wpvr_cardboard_disable_label'></label>
453 </div>
454 <?php } ?>
455 </span>
456
457 <span class="wpvr-tooltip">
458 <span class="icon">
459 <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>
460 </span>
461 <p><?php echo __('Will activate the VR Glass support on mobile devices. This is the Beta release. So, if you face any issues with it, please contact us at support@rextheme.com', 'wpvr'); ?></p>
462 </span>
463 </li>
464
465 <li>
466 <p class="single-settings-title">
467 <?php echo __("Convert any jpeg or png format image to WebP on media upload:", "wpvr"); ?>
468 </p>
469
470 <span class="wpvr-switcher">
471 <!-- WPVR front-end notice -->
472 <?php if (is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
473
474 <?php
475 if ($wpvr_webp_conversion == 'true') {
476 ?>
477 <input id="wpvr_webp_conversion" type="checkbox" checked>
478 <?php
479 } else {
480 ?>
481 <input id="wpvr_webp_conversion" type="checkbox" >
482 <?php
483 }
484 ?>
485 <?php } ?>
486
487 <?php if(is_plugin_active('wpvr-pro/wpvr-pro.php')){ ?>
488 <label for="wpvr_webp_conversion"></label>
489 <?php }else{ ?>
490
491 <div class='wpvr_cardboard_disable_is_pro'>
492 <span>Pro</span>
493 <label for="wpvr_cardboard_disable" class='wpvr_cardboard_disable_label'></label>
494 </div>
495 <?php } ?>
496 </span>
497
498 <span class="wpvr-tooltip">
499 <span class="icon">
500 <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>
501 </span>
502 <p><?php echo __('Will convert any jpeg or png image to webp format during media upload. will decrease the image size with no quality compromise and help the site to load faster.', 'wpvr'); ?></p>
503 </span>
504 </li>
505
506 <li>
507 <form class="wpvr-version" id="trigger-rollback">
508 <?php wp_nonce_field( 'wpvr_rollback','wpvr_rollback' ); ?>
509 <p class="single-settings-title">
510 <?php _e('Select a Version to Rollback', 'wpvr'); ?>
511 </p>
512 <select class="wpvr-version-select" name="wpvr_version">
513 <?php
514 foreach ( $rollback_versions as $version ) {
515 echo "<option value='".esc_attr( $version )."'>".esc_html($version)."</option>";
516 }
517 ?>
518 </select>
519
520 <input class="wpvr-btn" type="submit" value="Rollback">
521 </form>
522 </li>
523 </ul>
524
525 </div>
526
527 </div>
528 </div>
529
530 <div class="settings-footer-area">
531 <span class="wpvr-alert box wpvr-success">
532 <?php echo __('Succesfully Saved', 'wpvr'); ?>
533 </span>
534
535 <button class="wpvr-btn reset" type="button" id="wpvr_role_reset">
536 <?php echo __('Reset Defaults', 'wpvr'); ?>
537 </button>
538
539 <button class="wpvr-btn" type="submit" id="wpvr_role_submit">
540 <?php echo __('Save Settings', 'wpvr'); ?>
541 <span class="wpvr-loader"></span>
542 </button>
543 </div>
544 </div>
545
546 <?php
547 if (is_plugin_active('wpvr-pro/wpvr-pro.php')) {
548 ?>
549 <div id="tab2" class="block-wrapper import-tab">
550 <h3 class="tab-content-title"><?php _e('Import', 'wpvr'); ?></h3>
551 <div class="rex-upgrade wpvr-settings">
552 <div class="parent" style="width:100%;">
553 <form id="wpvr_import_from">
554 <a class="wpvr-import-btn" id="wpvr_button_upload">
555 <svg width="41" height="42" fill="none" viewBox="0 0 41 42" xmlns="http://www.w3.org/2000/svg"><circle cx="20.866" cy="21.001" r="20.116" fill="#3F04FE"/><path stroke="#fff" stroke-linecap="round" stroke-width="2" d="M20.75 14.885v12m6-6h-12"/></svg>
556 <?php echo __('Import Your File','wpvr')?>
557 </a>
558
559 <p class="vr-notice"><?php _e('Do not close or refresh the page during import process. It may take few minutes.', 'wpvr'); ?></p>
560
561 <div class="file-path-wrapper">
562 <input class="file-path validate" id="wpvr_file_url" type="text" value="" data-value="">
563
564 <button class="wpvr-btn" type="submit" id="wpvr_button_submit">
565 <?php echo __('Submit','wpvr') ?>
566 <span class="wpvr-loader"></span>
567 </button>
568
569 <span class="wpvr-alert wpvr-success">
570 <?php echo __('Succesfully Saved', 'wpvr'); ?>
571 </span>
572 </div>
573 </form>
574 </div>
575 </div>
576 </div>
577 <?php
578 }
579 ?>
580 </div>
581 </div>
582
583 <?php
584
585 if(is_plugin_active('divi-builder/divi-builder.php')){
586 ?>
587 <script>
588 (function ($) {
589 $(".wpvr-global-settings .block-wrapper:not(#tab1)").hide()
590 $('.wpvr-global-settings li.tab a').first().addClass("active");
591 $('.wpvr-global-settings li.tab').on('click', function(){
592 var target_id = $(this).find("a").attr('href');
593 $(".wpvr-global-settings li.tab a").removeClass('active');
594 $(this).find("a").addClass('active');
595 $(target_id).show();
596 $(target_id).siblings('.block-wrapper').hide();
597 })
598 })(jQuery);
599 </script>
600 <?php
601 }
602
603 ?>