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 / classes / class-wpvr-meta-field.php

class-wpvr-meta-field.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.4, at admin/classes/class-wpvr-meta-field.php

3,576 lines 128.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if (!defined('ABSPATH')) exit;
4
5 /**
6 * Responsible for managing WPVR meta fields
7 *
8 * @link http://rextheme.com/
9 * @since 8.0.0
10 *
11 * @package Wpvr
12 * @subpackage Wpvr/admin/classes
13 */
14
15
16 class WPVR_Meta_Field {
17
18 /**
19 * Constructor.
20 */
21 public function __construct(){
22
23 }
24
25 /**
26 * Initialize primary meta fields for a Tour
27 *
28 * @return array
29 * @since 8.0.0
30 */
31 public static function get_primary_meta_fields()
32 {
33 $meta_fields = array(
34 'panoid' => null,
35 'autoLoad' => 1,
36 'hfov' => null,
37 'maxHfov' => null,
38 'minHfov' => null,
39 'showControls' => 1,
40 'customcontrol' => null,
41 'preview' => null,
42 'defaultscene' => null,
43 'scenefadeduration' => null,
44 'panodata' => array(
45 'scene-list' => array(
46 array(
47 'scene-id' => null,
48 'scene-type' => 'equirectangular',
49 'hotspot-list' => array(
50 array(
51 'hotspot-title' => null,
52 'hotspot-pitch' => null,
53 'hotspot-yaw' => null,
54 'hotspot-customclass' => null,
55 'hotspot-scene' => null,
56 'hotspot-url' => null,
57 'hotspot-content' => null,
58 'hotspot-hover' => null,
59 'hotspot-type' => 'info',
60 'hotspot-scene-list' => 'none',
61 'wpvr_url_open' => array(
62 0 => 'off'
63 )
64 ),
65 ),
66 'dscene' => 'off',
67 'scene-attachment-url' => null,
68 ),
69 ),
70 ),
71 'previewtext' => 'Click To Load Panorama',
72 );
73 return apply_filters( 'extend_primary_meta_fields', $meta_fields );
74 }
75
76
77 /**
78 * Initialise Tab Navigation Items
79 * @return array
80 * @since 8.0.0
81 */
82 public static function get_navigation_fields() {
83 $fields = array(
84 array(
85 'class' => 'scene',
86 'screen' => 'scene',
87 'href' => 'scenes',
88 'r_src' => 'admin/icon/scenes-regular.png',
89 'h_src' => 'admin/icon/scenes-hover.png',
90 'title' => __('Scenes','wpvr'),
91 'active' => 'active'
92 ),
93 array(
94 'class' => 'hotspot',
95 'screen' => 'hotspot',
96 'href' => 'scenes',
97 'r_src' => 'admin/icon/hotspot-regular.png',
98 'h_src' => 'admin/icon/hotspot-hover.png',
99 'title' => __('Hotspot','wpvr'),
100 'active' => ''
101 ),
102 array(
103 'class' => 'general',
104 'screen' => 'general',
105 'href' => 'general',
106 'r_src' => 'admin/icon/general-regular.png',
107 'h_src' => 'admin/icon/general-hover.png',
108 'title' => __('Settings','wpvr'),
109 'active' => ''
110 ),
111 array(
112 'class' => 'videos',
113 'screen' => 'video',
114 'href' => 'video',
115 'r_src' => 'admin/icon/video-regular.png',
116 'h_src' => 'admin/icon/video-hover.png',
117 'title' => __('Video','wpvr'),
118 'active' => ''
119 ),
120 );
121 return apply_filters( 'extend_rex_pano_nav_menu', $fields );
122 }
123
124
125 /**
126 * Initialise Basic Setting Left Field
127 * @param mixed $preview
128 * @param mixed $previewtext
129 * @param mixed $autoload
130 * @param mixed $control
131 *
132 * @return array
133 * @since 8.0.0
134 */
135 public static function get_basic_setting_left_fields($postdata)
136 {
137 return array(
138 'preview-attachment-url' => array(
139 'class' => 'single-settings preview-setting',
140 'type' => 'preview_image',
141 'value' => $postdata['preview'],
142 'title' => __('Set a Tour Preview Image','wpvr')
143 ),
144 'previewtext' => array(
145 'class' => 'single-settings preview-img-message',
146 'type' => 'preview_image_msg',
147 'value' => $postdata['previewtext'],
148 'title' => __('Preview Image Message','wpvr')
149 ),
150 'autoload' => array(
151 'class' => 'single-settings autoload',
152 'type' => 'basic_setting_checkbox',
153 'title' => __('Tour Autoload','wpvr'),
154 'id' => 'wpvr_autoload',
155 'have_tooltip' => true,
156 'tooltip_text' => __('Tour Preview Image will not appear if this is turned on.','wpvr'),
157 'checked' => $postdata['autoLoad'],
158 ),
159 'controls' => array(
160 'class' => 'single-settings controls',
161 'type' => 'basic_setting_checkbox',
162 'title' => __('Basic Control Buttons','wpvr'),
163 'id' => 'wpvr_controls',
164 'have_tooltip' => true,
165 'tooltip_text' => __('This option will display Zoom In, Zoom Out and Full Screen buttons on the tour.','wpvr'),
166 'checked' => $postdata['showControls'],
167 ),
168 );
169 }
170
171
172 /**
173 * Initialize fields render method
174 * @param mixed $preview
175 * @param mixed $previewtext
176 * @param mixed $autoload
177 * @param mixed $control
178 *
179 * @return void
180 * @since 8.0.0
181 */
182 public static function render_basic_settings_left_fields($postdata)
183 {
184 $fields = self::get_basic_setting_left_fields($postdata);
185
186 foreach($fields as $name => $val) {
187 self::{ 'render_' . $val['type'] }( $name, $val );
188 }
189 }
190
191 /**
192 * Initilize Basic Setting Right Fields
193 * @param mixed $scene_fade_duration
194 * @param mixed $postdata
195 *
196 * @return array
197 * @since 8.0.0
198 */
199 public static function get_basic_setting_right_fields($postdata)
200 {
201 if(!isset($postdata['autoRotate'])){
202 $rotation = 0;
203 }else{
204 $rotation = 1;
205 }
206
207 return array(
208 'vr-tour-layout' => array(
209 'class' => 'single-settings vr-tour-layout '. (!defined('WPVR_PRO_VERSION') ? 'is_pro' : ''),
210 'title' => __('Choose tour layout','wpvr'),
211 'type' => 'tour_layout_select',
212 'value' => isset($postdata['tourLayout']) ? $postdata['tourLayout']: array( 'layout' => 'default', 'layout_icon_bg_color' => '#5a536e','layout_icon_color' => '#ffffff', ),
213 'placeholder' => null,
214 'have_tooltip' => true,
215 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'),
216 ),
217 'scene-fade-duration' => array(
218 'class' => 'single-settings scene-fade-duration',
219 'title' => __('Scene Fade Duration','wpvr'),
220 'type' => 'number_field',
221 'value' => $postdata['scenefadeduration'],
222 'placeholder' => null,
223 'have_tooltip' => true,
224 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'),
225 ),
226 'scene-animation' => array(
227 'class' => 'single-settings scene-animation',
228 'title' => __('Enable Scene Transition','wpvr'),
229 'type' => 'basic_setting_checkbox',
230 'id' => 'wpvr_scene_animation',
231 'package' => 'pro',
232 'checked' => isset($postdata['sceneAnimation']) ? 1 : 0,
233 'value' => isset($postdata['sceneAnimation']) ? $postdata['sceneAnimation'] : 'off',
234 'placeholder' => null,
235 'have_tooltip' => true,
236 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'),
237 ),
238 'scene-animation-name' => array(
239 'class' => 'single-settings scene-animation-name',
240 'title' => __('Select Transition Style','wpvr'),
241 'type' => 'animation_name_select',
242 'id' => 'wpvr_scene_animation_name',
243 'package' => 'pro',
244 'value' => isset($postdata['sceneAnimationName']) ? $postdata['sceneAnimationName'] : 'none',
245 'placeholder' => null,
246 'have_tooltip' => true,
247 'tooltip_text' => __('This will set the scene fade effect and execution time.','wpvr'),
248 ),
249 'autorotation' => array(
250 'class' => 'single-settings autoload',
251 'title' => __('Auto Rotation','wpvr'),
252 'id' => 'wpvr_autorotation',
253 'type' => 'basic_setting_checkbox',
254 'checked' => $rotation,
255 'have_tooltip' => false,
256 'tooltip_text' => '',
257 ),
258 );
259 }
260
261 /**
262 * Initilize Basic Setting Right Fields
263 * @param mixed $scene_fade_duration
264 * @param mixed $postdata
265 *
266 * @return array
267 * @since 8.0.0
268 */
269 public static function get_basic_setting_generic_form_fields($postdata)
270 {
271 if(!isset($postdata['genericform'])){
272 $genericform = "off";
273 }else{
274 $genericform = $postdata['genericform'];
275 }
276
277 return array(
278 'genericform' => array(
279 'class' => 'single-settings genericform',
280 'title' => __('Generic Form','wpvr'),
281 'id' => 'wpvr_generic_form',
282 'type' => 'generic_form_checkbox',
283 'checked' => $genericform,
284 'have_tooltip' => true,
285 'tooltip_text' => __('Disable keyboard control to use the form.','wpvr'),
286 )
287 );
288 }
289
290 /**
291 * Initilize Basic Setting Right Fields
292 * @param mixed $scene_fade_duration
293 * @param mixed $postdata
294 *
295 * @return array
296 * @since 8.0.0
297 */
298 public static function get_basic_setting_call_to_action_fields($postdata)
299 {
300 if(!isset($postdata['calltoaction'])){
301 $calltoaction = "off";
302 }else{
303 $calltoaction = $postdata['calltoaction'];
304 }
305
306 return array(
307 'calltoaction' => array(
308 'class' => 'single-settings calltoaction',
309 'title' => __('Call To Action ','wpvr'),
310 'id' => 'wpvr_cal_to_action_form',
311 'type' => 'call_to_form_checkbox',
312 'checked' => $calltoaction,
313 'have_tooltip' => true,
314 'tooltip_text' => __('Enable the call to action, it will render under the tour.','wpvr'),
315 )
316 );
317 }
318
319 /**
320 * Initilize Basic Setting Right Fields
321 * @param mixed $scene_fade_duration
322 * @param mixed $postdata
323 *
324 * @return array
325 * @since 8.0.0
326 */
327 public static function get_basic_setting_custom_css_fields($postdata)
328 {
329 if(!isset($postdata['customcss_enable'])){
330 $customcss_enable = "off";
331 }else{
332 $customcss_enable = $postdata['customcss_enable'];
333 }
334
335 return array(
336 'customcss' => array(
337 'class' => 'single-settings customcss-switcher',
338 'title' => __('Custom CSS ','wpvr'),
339 'id' => 'wpvr_custom_css',
340 'type' => 'custom_css_form_checkbox',
341 'checked' => $customcss_enable,
342 'have_tooltip' => true,
343 'tooltip_text' => __('Write your custom css','wpvr'),
344 )
345 );
346 }
347
348 /**
349 * Render Basic Setting Right Fields
350 * @param mixed $scene_fade_duration
351 * @param mixed $postdata
352 *
353 * @return void
354 * @since 8.0.0
355 */
356 public static function render_basic_setting_generic_form_fields($postdata)
357 {
358 $fields = self::get_basic_setting_generic_form_fields($postdata);
359
360 foreach($fields as $name => $val) {
361 self::{ 'render_' . $val['type'] }( $name, $val );
362 }
363 }
364 /**
365 * Render Basic Setting Right Fields
366 * @param mixed $scene_fade_duration
367 * @param mixed $postdata
368 *
369 * @return void
370 * @since 8.0.0
371 */
372 public static function render_basic_setting_call_to_action_fields($postdata)
373 {
374 $fields = self::get_basic_setting_call_to_action_fields($postdata);
375 foreach($fields as $name => $val) {
376 self::{ 'render_' . $val['type'] }( $name, $val );
377 }
378 }
379 /**
380 * Render Basic Setting Right Fields
381 * @param mixed $scene_fade_duration
382 * @param mixed $postdata
383 *
384 * @return void
385 * @since 8.0.0
386 */
387 public static function render_basic_setting_custom_css_fields($postdata)
388 {
389 $fields = self::get_basic_setting_custom_css_fields($postdata);
390 foreach($fields as $name => $val) {
391 self::{ 'render_' . $val['type'] }( $name, $val );
392 }
393 }
394
395 /**
396 * Render Basic Setting Right Fields
397 * @param mixed $scene_fade_duration
398 * @param mixed $postdata
399 *
400 * @return void
401 * @since 8.0.0
402 */
403 public static function render_basic_setting_right_fields($postdata)
404 {
405 $fields = self::get_basic_setting_right_fields($postdata);
406
407 foreach($fields as $name => $val) {
408 self::{ 'render_' . $val['type'] }( $name, $val );
409 }
410
411
412 }
413
414
415 /**
416 * Initialize Autorotation Data Wrapper Fields
417 * @param mixed $autorotation
418 * @param mixed $autorotationinactivedelay
419 * @param mixed $autorotationstopdelay
420 *
421 * @return array
422 * @since 8.0.0
423 */
424 public static function get_autorotation_data_wrapper_fields($postdata)
425 {
426 return array(
427 'auto-rotation' => array(
428 'class' => 'single-settings autorotationdata',
429 'title' => __('Rotation Speed and Direction','wpvr'),
430 'type' => 'number_field',
431 'value' => isset($postdata['autoRotate']) ? $postdata['autoRotate'] : -5,
432 'placeholder' => -5,
433 'have_tooltip' => true,
434 'tooltip_text' => __('Set a value to determine the speed of rotation. The higher the number, the faster it will rotate. Positive values will make it rotate clockwise and negative values will make it rotate anti clockwise','wpvr'),
435 ),
436 'auto-rotation-inactive-delay' => array(
437 'class' => 'single-settings autorotationdata',
438 'title' => __('Resume Auto-rotation after','wpvr'),
439 'type' => 'number_field',
440 'value' => isset($postdata['autoRotateInactivityDelay']) ? $postdata['autoRotateInactivityDelay'] : null,
441 'placeholder' => 2000,
442 'have_tooltip' => true,
443 'tooltip_text' => __('When someone clicks on the tour, auto-rotation stops. Here, set a time after which auto rotation will start again. Assign in milliseconds, where 1000 milliseconds = 1 second.','wpvr'),
444 ),
445 'auto-rotation-stop-delay' => array(
446 'class' => 'single-settings autorotationdata',
447 'title' => __('Stop Auto-rotation after','wpvr'),
448 'type' => 'number_field',
449 'value' => isset($postdata['autoRotateStopDelay']) ? $postdata['autoRotateStopDelay'] : null,
450 'placeholder' => 2000,
451 'have_tooltip' => true,
452 'tooltip_text' => __('Set a time after which auto rotation will stop. Assign in milliseconds, where 1000 milliseconds = 1 second.','wpvr'),
453 ),
454 );
455 }
456
457 public static function get_generic_form_associate_fields($postdata)
458 {
459 return array(
460 'genericformshortcode' => array(
461 'class' => 'single-settings genericformshortcode',
462 'title' => __('Add Form Shortcode','wpvr'),
463 'type' => 'text_field',
464 'value' => isset($postdata['genericformshortcode']) ? $postdata['genericformshortcode'] : "",
465 'placeholder' => "",
466 'have_tooltip' => true,
467 'tooltip_text' => __('Print the forms shortcode you want to show.','wpvr'),
468 ),
469 );
470 }
471
472
473 public static function get_call_to_action_associate_fields($postdata)
474 {
475 return array(
476 'buttontext' => array(
477 'class' => 'single-settings buttontext',
478 'title' => __('Button Text','wpvr'),
479 'type' => 'text_field',
480 'value' => isset($postdata['buttontext']) ? $postdata['buttontext'] : "Click Here",
481 'placeholder' => "",
482 'have_tooltip' => true,
483 'tooltip_text' => __('Call to action button text','wpvr'),
484 ),'buttonurl' => array(
485 'class' => 'single-settings buttonurl',
486 'title' => __('Button URL','wpvr'),
487 'type' => 'text_field',
488 'value' => isset($postdata['buttonurl']) ? $postdata['buttonurl'] : "",
489 'placeholder' => "",
490 'have_tooltip' => true,
491 'tooltip_text' => 'Call to action URl',
492 ),
493 'button_configuration' => array(
494 'class' => 'single-settings button_configuration',
495 'title' => __('Button Style','wpvr'),
496 'name' => 'button_configuration_field',
497 'type' => 'button_configuration_field',
498 'value' => isset($postdata['button_configuration']) ? $postdata['button_configuration'] : array(),
499 'placeholder' => "",
500 'have_tooltip' => true,
501 'tooltip_text' => __('Print the forms shortcode you want to show.','wpvr'),
502 ),
503
504 );
505 }
506
507
508 public static function get_custom_css_associate_fields($postdata)
509 {
510 return array(
511 'customcss' => array(
512 'class' => 'single-settings customcss',
513 'title' => __('Custom CSS','wpvr'),
514 'type' => 'text_area_field',
515 'code_mirror_id' => 'code-mirror-editor-custom-css',
516 'value' => isset($postdata['customcss']) ? $postdata['customcss'] : "",
517 'placeholder' => "",
518 'have_tooltip' => true,
519 )
520
521 );
522 }
523
524 /**
525 * Render generic form associate fields
526 * @param mixed $genericformshortcode
527 *
528 * @return void
529 * @since 8.0.0
530 */
531 public static function render_generic_form_associate_fields($postdata)
532 {
533 $fields = self::get_generic_form_associate_fields($postdata);
534
535 foreach($fields as $name => $val) {
536 self::{ 'render_' . $val['type'] }( $name, $val );
537 }
538 }
539
540 /**
541 * Render generic form associate fields
542 * @param mixed $genericformshortcode
543 *
544 * @return void
545 * @since 8.0.0
546 */
547 public static function render_call_to_action_associate_fields($postdata)
548 {
549 $fields = self::get_call_to_action_associate_fields($postdata);
550
551 foreach($fields as $name => $val) {
552 self::{ 'render_' . $val['type'] }( $name, $val );
553 }
554 }
555
556 /**
557 * Render generic form associate fields
558 * @param mixed $genericformshortcode
559 *
560 * @return void
561 * @since 8.0.0
562 */
563 public static function render_custom_css_associate_fields($postdata)
564 {
565 $fields = self::get_custom_css_associate_fields($postdata);
566
567 foreach($fields as $name => $val) {
568 self::{ 'render_' . $val['type'] }( $name, $val );
569 }
570 }
571
572
573 /**
574 * Render Autorotation Data Wrapper Fields
575 * @param mixed $autorotation
576 * @param mixed $autorotationinactivedelay
577 * @param mixed $autorotationstopdelay
578 *
579 * @return void
580 * @since 8.0.0
581 */
582 public static function render_autorotation_data_wrapper_fields($postdata)
583 {
584 $fields = self::get_autorotation_data_wrapper_fields($postdata);
585
586 foreach($fields as $name => $val) {
587 self::{ 'render_' . $val['type'] }( $name, $val );
588 }
589 }
590
591
592 /**
593 * Render Tab Navigation
594 * @return void
595 * @since 8.0.0
596 */
597 public static function render_pano_tab_nav($postdata) {
598 $fields = self::get_navigation_fields();
599 ob_start();
600 ?>
601
602 <nav class="rex-pano-tab-nav rex-pano-nav-menu main-nav" id="wpvr-main-nav">
603 <ul>
604 <li class="logo"><img loading="lazy" src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.svg'; ?>" alt="logo" /></li>
605
606 <?php foreach($fields as $field) { ?>
607
608 <li class="<?= $field['class']; ?> <?= $field['active']; ?>" data-screen="<?= $field['screen']; ?>">
609 <span data-href="#<?= $field['href']; ?>">
610 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . $field['r_src']; ?>" alt="icon" class="regular" />
611 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . $field['h_src']; ?>" alt="icon" class="hover" />
612 <?= __($field['title'], 'wpvr'); ?> </span>
613 </li>
614
615 <?php }
616
617 if(!is_plugin_active('wpvr-pro/wpvr-pro.php')){
618 ?>
619
620 <li class="floor-plan floor-plan-pro-tag" data-screen="floorPlan">
621 <div class="navigator-pro-tag"><?php echo __('pro', 'wpvr');?></div>
622 <span data-href="#floorPlan">
623 <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/map.svg'; ?>" alt="icon" class="regular">
624 <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/map-hover.svg'; ?>" alt="icon" class="hover">
625 <?php echo __('Floor Plan', 'wpvr');?>
626 </span>
627 </li>
628
629 <li class="background-tour background-tour-pro-tag" data-screen="backgroundTour">
630 <div class="navigator-pro-tag"><?php echo __('pro', 'wpvr');?></div>
631 <span data-href="#backgroundTour">
632 <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/bg-tour-regular.png';?>" alt="icon" class="regular">
633 <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/bg-tour-hover.png'; ?>" alt="icon" class="hover">
634 <?php echo __('Background Tour', 'wpvr');?>
635 </span>
636 </li>
637
638 <li class="streetview streetview-pro-tag " data-screen="streetview">
639 <div class="navigator-pro-tag"><?php echo __('pro', 'wpvr');?></div>
640 <span data-href="#streetview">
641 <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/street-view-regular.png';?>" alt="icon" class="regular">
642 <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/street-view-hover.png';?>" alt="icon" class="hover">
643 <?php echo __('Street View', 'wpvr');?>
644 </span>
645 </li>
646
647 <li class="export export-pro-tag" data-screen="export">
648 <div class="navigator-pro-tag"><?php echo __('pro', 'wpvr');?></div>
649 <span data-href="#import">
650 <img loading="lazy" src=" <?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/export-regular.png'; ?> " alt="icon" class="regular" />
651 <img loading="lazy" src=" <?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/export-hover.png'; ?> " alt="icon" class="hover" />
652 <?php echo __('Export', 'wpvr'); ?>
653 </span>
654 </li>
655
656 <?php
657 }
658
659 //== Render Export Tab for Tour edit ==//
660 if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) { if (isset($postdata['panoid'])) { ?>
661 <li class="export" data-screen="export">
662 <span data-href="#import">
663 <img loading="lazy" src=" <?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/export-regular.png'; ?> " alt="icon" class="regular" />
664 <img loading="lazy" src=" <?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/export-hover.png'; ?> " alt="icon" class="hover" />
665 <?php echo __('Export', 'wpvr'); ?>
666 </span>
667 </li>
668 <?php } } ?>
669
670 </ul>
671 </nav>
672
673 <?php
674 ob_end_flush();
675 }
676
677
678 /**
679 * Initialise Advanced Settings Left Fields
680 * @return array
681 * @since 8.0.0
682 */
683 public static function get_advanced_settings_left_fields($postdata)
684 {
685 $fields = array(
686 'diskeyboard' => array(
687 'class' => 'single-settings compass',
688 'title' => __('Keyboard Movement Control','wpvr'),
689 'id' => 'wpvr_diskeyboard',
690 'have_tooltip' => false,
691 'tooltip_text' => '',
692 'type' => 'checkbox'
693 ),
694 'keyboardzoom' => array(
695 'class' => 'single-settings',
696 'title' => __('Keyboard Zoom Control','wpvr'),
697 'id' => 'wpvr_keyboardzoom',
698 'have_tooltip' => false,
699 'tooltip_text' => '',
700 'type' => 'checkbox'
701 ),
702 'draggable' => array(
703 'class' => 'single-settings',
704 'title' => __('Mouse Drag Control','wpvr'),
705 'id' => 'wpvr_draggable',
706 'have_tooltip' => false,
707 'tooltip_text' => '',
708 'type' => 'checkbox'
709 ),
710 'mouseZoom' => array(
711 'class' => 'single-settings',
712 'title' => __('Mouse Zoom Control','wpvr'),
713 'id' => 'wpvr_mouseZoom',
714 'have_tooltip' => false,
715 'tooltip_text' => '',
716 'type' => 'checkbox'
717 ),
718 'gyro' => array(
719 'class' => 'single-settings gyro',
720 'title' => __('Gyroscope Control','wpvr'),
721 'id' => 'wpvr_gyro',
722 'have_tooltip' => false,
723 'tooltip_text' => '',
724 'type' => 'checkbox'
725 ),
726 'deviceorientationcontrol' => array(
727 'class' => 'single-settings orientation',
728 'title' => __('Auto Gyroscope Support','wpvr'),
729 'id' => 'wpvr_deviceorientationcontrol',
730 'have_tooltip' => true,
731 'tooltip_text' => __('If set to true, device orientation control will be used when the panorama is loaded, if the device supports it. If false, device orientation control needs to be activated by pressing a button. Defaults to false. Will work if gyroscope is enabled','wpvr'),
732 'type' => 'checkbox'
733 ),
734 'compass' => array(
735 'class' => 'single-settings compass',
736 'title' => __('Compass','wpvr'),
737 'id' => 'wpvr_compass',
738 'have_tooltip' => false,
739 'tooltip_text' => '',
740 'type' => 'checkbox'
741 ),
742 );
743 return apply_filters( 'modify_advanced_control_left_fields', $fields, $postdata );
744 }
745
746
747 /**
748 * Initialise Advanced Settings Right Fields
749 * @return array
750 * @since 8.0.0
751 */
752 public static function get_advanced_settings_right_fields($postdata)
753 {
754 $fields = array(
755 'vrgallery' => array(
756 'class' => 'single-settings gallery',
757 'title' => __('Scene Gallery','wpvr'),
758 'id' => 'wpvr_vrgallery',
759 'type' => 'checkbox',
760 'have_tooltip' => true,
761 'tooltip_text' => __('Turning it On will display a gallery with all the scenes on your tour. By double clicking on a scene thumbnail on the gallery, you can move to that specific scene. The gallery will only show up on the front end and not on the preview.','wpvr'),
762 ),
763 'vrgallery_title' => array(
764 'class' => 'single-settings',
765 'title' => __('Scene Titles on Gallery','wpvr'),
766 'id' => 'wpvr_vrgallery_title',
767 'type' => 'checkbox',
768 'have_tooltip' => true,
769 'tooltip_text' => __('Turning it on will display scene titles on each scene thumbnail inside the Scene Gallery. The Scene IDs will be used as the Scene Title.','wpvr')
770 ),
771 'vrscene_navigation' => array(
772 'class' => 'single-settings scene-navigation',
773 'title' => __('Scene Navigation Menu','wpvr'),
774 'id' => 'wpvr_scene_navigation',
775 'type' => 'checkbox',
776 'have_tooltip' => true,
777 'tooltip_text' => __('Turning it On will display a gallery with all the scenes on your tour. By double clicking on a scene thumbnail on the gallery, you can move to that specific scene. The gallery will only show up on the front end and not on the preview.','wpvr')
778 ),
779 'bg_music' => array(
780 'class' => 'single-settings',
781 'title' => __('Tour Background Music','wpvr'),
782 'id' => 'wpvr_bg_music',
783 'type' => 'checkbox',
784 'have_tooltip' => false,
785 'tooltip_text' => ''
786 ),
787 'explainerSwitch' => array(
788 'class' => 'single-settings company-info',
789 'title' => __('Enable explainer video','wpvr'),
790 'id' => 'wpvr_explainerSwitch',
791 'have_tooltip' => false,
792 'tooltip_text' => '',
793 'type' => 'checkbox',
794 ),
795 'globalzoom' => array(
796 'class' => 'single-settings',
797 'title' => __('Set Zoom Preferences','wpvr'),
798 'id' => 'wpvr_globalzoom',
799 'have_tooltip' => true,
800 'tooltip_text' => __('Zoom interval is 50 to 120 degree. You can put any value between 50 to 120. As an example, if you set 100, the scene will display with zoom in 100 degree on each load.','wpvr'),
801 'type' => 'checkbox',
802 ),
803 'cpLogoSwitch' => array(
804 'class' => 'single-settings company-info',
805 'title' => __('Add Company Information','wpvr'),
806 'id' => 'wpvr_cpLogoSwitch',
807 'type' => 'checkbox',
808 'have_tooltip' => false,
809 'tooltip_text' => ''
810 )
811
812 );
813 return apply_filters( 'modify_advanced_control_right_fields', $fields, $postdata );
814 }
815
816
817 /**
818 * Initialise Control Button Left Fields
819 * @return array
820 * @since 8.0.0
821 */
822 public static function get_control_button_left_fields($postdata) {
823 $fields = array(
824 'panupControl' => array(
825 'title' => __('Move Up','wpvr'),
826 'icon' => 'move-up.jpg',
827 'id' => 'wpvr_panupControl',
828 'type' => 'checkbox'
829 ),
830 'panDownControl' => array(
831 'title' => __('Move Down','wpvr'),
832 'icon' => 'move-down.jpg',
833 'id' => 'wpvr_panDownControl',
834 'type' => 'checkbox'
835 ),
836 'panLeftControl' => array(
837 'title' => __('Move Left','wpvr'),
838 'icon' => 'move-left.jpg',
839 'id' => 'wpvr_panLeftControl',
840 'type' => 'checkbox'
841 ),
842 'panRightControl' => array(
843 'title' => __('Move Right','wpvr'),
844 'icon' => 'move-right.jpg',
845 'id' => 'wpvr_panRightControl',
846 'type' => 'checkbox'
847 ),
848 'panZoomInControl' => array(
849 'title' => __('Zoom In','wpvr'),
850 'icon' => 'zoom-in.jpg',
851 'id' => 'wpvr_panZoomInControl',
852 'type' => 'checkbox'
853 ),
854 );
855 return apply_filters( 'modify_control_button_left_fields', $fields, $postdata );
856 }
857
858
859 /**
860 * Initialise Control Button Left Fields
861 * @return array
862 * @since 8.0.0
863 */
864 public static function get_control_button_right_fields($postdata)
865 {
866 $fields = array(
867 'panZoomOutControl' => array(
868 'title' => __('Zoom Out','wpvr'),
869 'icon' => 'zoom-out.jpg',
870 'id' => 'wpvr_panZoomOutControl',
871 'type' => 'checkbox'
872 ),
873 'panFullscreenControl' => array(
874 'title' => __('Full Screen','wpvr'),
875 'icon' => 'full-screen.jpg',
876 'id' => 'wpvr_panFullscreenControl',
877 'type' => 'checkbox'
878 ),
879 'gyroscope' => array(
880 'title' => __('Gyroscope','wpvr'),
881 'icon' => 'gryscop.jpg',
882 'id' => 'wpvr_gyroscope',
883 'type' => 'checkbox'
884 ),
885 'backToHome' => array(
886 'title' => __('Home','wpvr'),
887 'icon' => 'home.jpg',
888 'id' => 'wpvr_backToHome',
889 'type' => 'checkbox'
890 ),
891
892 'explainer' => array(
893 'title' => __('Explainer','wpvr'),
894 'icon' => 'explainer-vedio.png',
895 'id' => 'wpvr_explainer',
896 'type' => 'checkbox',
897 )
898 );
899 return apply_filters( 'modify_control_button_right_fields', $fields, $postdata );
900 }
901
902
903 /**
904 * Initialize Scene setting left fields
905 * Panodata is empty
906 * @return array
907 * @since 8.0.0
908 */
909 public static function get_scene_left_fields_empty_panodata()
910 {
911 $fields = array(
912 'scene-type' => array(
913 'label_for' => 'scene-type',
914 'title' => __('Scene Type','wpvr'),
915 'input_class' => '',
916 'type' => 'text',
917 'value' => 'equirectangular',
918 'disabled' => 'disabled',
919 ),
920 'scene-attachment-url' => array(
921 'title' => __('Scene Upload','wpvr'),
922 'type' => 'upload',
923 'value' => '',
924 'display' => 'none'
925 ),
926 'dscene' => array(
927 'class' => 'scene-setting dscene',
928 'title' => __('Set as Default','wpvr'),
929 'type' => 'select',
930 'select_class' => 'dscen',
931 'selected' => 'off'
932 ),
933 'scene-id' => array(
934 'label_for' => 'scene-id',
935 'title' => __('Scene ID','wpvr'),
936 'input_class' => 'sceneid',
937 'type' => 'text',
938 'value' => '',
939 'disabled' => 'disabled',
940 )
941 );
942
943 return apply_filters( 'modify_scene_default_left_fields', $fields );
944 }
945
946
947 /**
948 * Initilize Scene Settings left Fields
949 * Panodata is not empty
950 * @param mixed $dscene
951 * @param mixed $scene_id
952 * @param mixed $scene_photo
953 *
954 * @return array
955 * @since 8.0.0
956 */
957 public static function get_scene_left_fields_with_panodata($pano_scene)
958 {
959 $fields = array(
960 'scene-type' => array(
961 'label_for' => 'scene-type',
962 'title' => __('Scene Type','wpvr'),
963 'input_class' => '',
964 'type' => 'text',
965 'value' => 'equirectangular',
966 'disabled' => 'disabled',
967 ),
968 'scene-attachment-url' => array(
969 'title' => __('Scene Upload','wpvr'),
970 'type' => 'upload',
971 'value' => $pano_scene['scene-attachment-url'],
972 'display' => 'block'
973 ),
974 'dscene' => array(
975 'class' => 'scene-setting dscene',
976 'title' => __('Set as Default','wpvr'),
977 'type' => 'select',
978 'select_class' => 'dscen',
979 'selected' => $pano_scene['dscene']
980 ),
981 'scene-id' => array(
982 'label_for' => 'scene-id',
983 'title' => __('Scene ID','wpvr'),
984 'input_class' => 'sceneid',
985 'type' => 'text',
986 'value' => $pano_scene['scene-id'],
987 'disabled' => 'disabled',
988 ),
989 );
990
991 return apply_filters( 'modify_scene_left_fields', $fields, $pano_scene );
992 }
993
994
995 /**
996 * Initialize Hotspot Settings Left Fields
997 * @return array
998 *
999 * @since 8.0.0
1000 */
1001 public static function get_hotspot_left_fields($pano_hotspot)
1002 {
1003 $fields = array(
1004 'hotspot-title' => array(
1005 'title' => __('Hotspot ID','wpvr'),
1006 'value' => $pano_hotspot['hotspot-title'],
1007 'type' => 'text',
1008 'input_class' => '',
1009 'input_id' => 'hotspot-title'
1010 ),
1011 'hotspot-pitch' => array(
1012 'title' => __('Pitch','wpvr'),
1013 'value' => $pano_hotspot['hotspot-pitch'],
1014 'type' => 'text',
1015 'input_class' => 'hotspot-pitch',
1016 'input_id' => ''
1017 ),
1018 'hotspot-yaw' => array(
1019 'title' => __('Yaw','wpvr'),
1020 'value' => $pano_hotspot['hotspot-yaw'],
1021 'type' => 'text',
1022 'input_class' => 'hotspot-yaw',
1023 'input_id' => ''
1024 ),
1025 'hotspot-customclass' => array(
1026 'title' => __('Hotspot Custom Icon Class','wpvr'),
1027 'value' => $pano_hotspot['hotspot-customclass'],
1028 'type' => 'text',
1029 'input_class' => '',
1030 'input_id' => 'hotspot-customclass'
1031 ),
1032 );
1033 return apply_filters( 'modify_hotspot_left_fields', $fields, $pano_hotspot );
1034 }
1035
1036
1037 /**
1038 * Initialize Hotspot Setting Right Fields
1039 * @return array
1040 *
1041 * @since 8.0.0
1042 */
1043 public static function get_hotspot_right_fields()
1044 {
1045 $fields = array(
1046 'hotspot-type' => array(
1047 'title' => __('Hotspot-Type','wpvr'),
1048 'type' => 'info_type_select',
1049 ),
1050 'hotspot-url' => array(
1051 'title' => __('URL','wpvr'),
1052 'type' => 'info_url',
1053 'value' => '',
1054 'display' => 'block',
1055 ),
1056 'wpvr_url_open' => array(
1057 'title' => __('Open in same tab','wpvr'),
1058 'type' => 'same_tab_checkbox',
1059 'value' => 'off',
1060 'display' => 'flex'
1061 ),
1062 'hotspot-content' => array(
1063 'class' => 'hotspot-content',
1064 'title' => __('On Click Content','wpvr'),
1065 'type' => 'textarea',
1066 ),
1067 'hotspot-hover' => array(
1068 'class' => 'hotspot-hover',
1069 'title' => __('On Hover Content','wpvr'),
1070 'type' => 'textarea'
1071 ),
1072 'hotspot-scene-list' => array(
1073 'title' => __('Select Target Scene from List','wpvr'),
1074 'type' => 'scene_select',
1075 ),
1076 'hotspot-scene' => array(
1077 'title' => __('Target Scene ID','wpvr'),
1078 'display' => 'none',
1079 'input_class' => 'hotspotsceneinfodata',
1080 'type' => 'disabled_text',
1081 'value' => ''
1082 )
1083 );
1084 return apply_filters( 'modify_hotspot_right_fields', $fields );
1085 }
1086
1087
1088 /**
1089 * Initialize Hotspot Setting Info Fields
1090 *
1091 * @param mixed $hotspot_type
1092 * @param mixed $hotspot_url
1093 * @param mixed $hotspot_content
1094 * @param mixed $hotspot_hover
1095 *
1096 * @return array
1097 * @since 8.0.0
1098 */
1099 public static function get_hotspot_setting_info_fields($pano_hotspot)
1100 {
1101 $fields = array(
1102 'hotspot-type' => array(
1103 'title' => __('Hotspot-Type','wpvr'),
1104 'type' => 'info_type_select',
1105 ),
1106 'hotspot-url' => array(
1107 'title' => __('URL','wpvr'),
1108 'type' => 'info_url',
1109 'value' => $pano_hotspot['hotspot-url'],
1110 'display' => 'block',
1111 ),
1112 'wpvr_url_open' => array(
1113 'title' => __('Open in same tab','wpvr'),
1114 'type' => 'same_tab_checkbox',
1115 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off',
1116 'display' => 'flex',
1117 ),
1118 'hotspot-content' => array(
1119 'class' => 'hotspot-content',
1120 'title' => __('On Click Content','wpvr'),
1121 'type' => 'info_textarea',
1122 'value' => $pano_hotspot['hotspot-content'],
1123 'display' => 'block',
1124 ),
1125 'hotspot-hover' => array(
1126 'class' => 'hotspot-hover',
1127 'title' => __('On Hover Content','wpvr'),
1128 'type' => 'info_textarea',
1129 'value' => $pano_hotspot['hotspot-hover'],
1130 'display' => 'block',
1131 ),
1132 'hotspot-scene-list' => array(
1133 'title' => __('Select Target Scene from List','wpvr'),
1134 'type' => 'scene_list',
1135 'display' => 'none',
1136 ),
1137 'hotspot-scene' => array(
1138 'title' => __('Target Scene ID','wpvr'),
1139 'display' => 'none',
1140 'input_class' => 'hotspotsceneinfodata',
1141 'type' => 'disabled_text',
1142 'value' => ''
1143 )
1144 );
1145 return apply_filters( 'modify_hotspot_right_fields', $fields );
1146
1147 }
1148
1149 /**
1150 * Initialize Hotspot Setting Info Fields
1151 *
1152 * @param mixed $hotspot_type
1153 * @param mixed $hotspot_url
1154 * @param mixed $hotspot_content
1155 * @param mixed $hotspot_hover
1156 *
1157 * @return array
1158 * @since 8.0.0
1159 */
1160 public static function get_hotspot_setting_wc_product_fields($pano_hotspot)
1161 {
1162 $fields = array(
1163 'hotspot-type' => array(
1164 'title' => __('Hotspot-Type','wpvr'),
1165 'type' => 'wc_product_type',
1166 ),
1167 'hotspot-product-id' => array(
1168 'title' => __('Select your form','wpvr'),
1169 'type' => 'wc_product_select',
1170 'class' => 'wpvr-product-search',
1171 'value' => $pano_hotspot
1172 ),
1173 'hotspot-url' => array(
1174 'title' => __('URL','wpvr'),
1175 'type' => 'info_url',
1176 'value' => $pano_hotspot['hotspot-url'],
1177 'display' => 'none',
1178 ),
1179 'wpvr_url_open' => array(
1180 'title' => __('Open in same tab','wpvr'),
1181 'type' => 'same_tab_checkbox',
1182 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off',
1183 'display' => 'none',
1184 ),
1185 'hotspot-content' => array(
1186 'class' => 'hotspot-content',
1187 'title' => __('On Click Content','wpvr'),
1188 'type' => 'info_textarea',
1189 'value' => $pano_hotspot['hotspot-content'],
1190 'display' => 'none',
1191 ),
1192 'hotspot-hover' => array(
1193 'class' => 'hotspot-hover',
1194 'title' => __('On Hover Content','wpvr'),
1195 'type' => 'info_textarea',
1196 'value' => $pano_hotspot['hotspot-hover'],
1197 'display' => 'block',
1198 ),
1199 'hotspot-scene-list' => array(
1200 'title' => __('Select Target Scene from List','wpvr'),
1201 'type' => 'scene_list',
1202 'display' => 'none',
1203 ),
1204 'hotspot-scene' => array(
1205 'title' => __('Target Scene ID','wpvr'),
1206 'display' => 'none',
1207 'input_class' => 'hotspotsceneinfodata',
1208 'type' => 'disabled_text',
1209 'value' => ''
1210 )
1211 );
1212 return apply_filters( 'modify_hotspot_right_fields', $fields );
1213
1214 }
1215 /**
1216 * Initialize Hotspot Setting Fluent form field Fields
1217 *
1218 * @param mixed $hotspot_type
1219 * @param mixed $hotspot_url
1220 * @param mixed $hotspot_content
1221 * @param mixed $hotspot_hover
1222 *
1223 * @return array
1224 * @since 8.0.0
1225 */
1226 public static function get_hotspot_setting_fluent_form_fields($pano_hotspot)
1227 {
1228 $fields = array(
1229 'hotspot-type' => array(
1230 'title' => __('Hotspot-Type','wpvr'),
1231 'type' => 'fluent_form_type',
1232 ),
1233 'fluent-form-id' => array(
1234 'title' => __('Select your form','wpvr'),
1235 'type' => 'fluent_form_select',
1236 'class' => 'wpvr-fluent-forms',
1237 'value' => $pano_hotspot
1238 ),
1239 'hotspot-url' => array(
1240 'title' => __('URL','wpvr'),
1241 'type' => 'info_url',
1242 'value' => $pano_hotspot['hotspot-url'],
1243 'display' => 'none',
1244 ),
1245 'wpvr_url_open' => array(
1246 'title' => __('Open in same tab','wpvr'),
1247 'type' => 'same_tab_checkbox',
1248 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off',
1249 'display' => 'none',
1250 ),
1251 'hotspot-content' => array(
1252 'class' => 'hotspot-content',
1253 'title' => __('On Click Content','wpvr'),
1254 'type' => 'info_textarea',
1255 'value' => $pano_hotspot['hotspot-content'],
1256 'display' => 'none',
1257 ),
1258 'hotspot-hover' => array(
1259 'class' => 'hotspot-hover',
1260 'title' => __('On Hover Content','wpvr'),
1261 'type' => 'info_textarea',
1262 'value' => $pano_hotspot['hotspot-hover'],
1263 'display' => 'block',
1264 ),
1265 'hotspot-scene-list' => array(
1266 'title' => __('Select Target Scene from List','wpvr'),
1267 'type' => 'scene_list',
1268 'display' => 'none',
1269 ),
1270 'hotspot-scene' => array(
1271 'title' => __('Target Scene ID','wpvr'),
1272 'display' => 'none',
1273 'input_class' => 'hotspotsceneinfodata',
1274 'type' => 'disabled_text',
1275 'value' => ''
1276 )
1277 );
1278 return apply_filters( 'modify_hotspot_right_fields', $fields );
1279
1280 }
1281
1282
1283 /**
1284 * Initializa Hotspot Setting Scene Fields
1285 *
1286 * @param mixed $hotspot_hover
1287 * @param mixed $hotspot_target_scene
1288 *
1289 * @return array
1290 * @since 8.0.0
1291 */
1292 public static function get_hotspot_setting_scene_fields($pano_hotspot)
1293 {
1294 $fields = array(
1295 'hotspot-type' => array(
1296 'title' => __('Hotspot-Type','wpvr'),
1297 'type' => 'scene_type_select',
1298 ),
1299 'hotspot-url' => array(
1300 'title' => __('URL','wpvr'),
1301 'type' => 'info_url',
1302 'display' => 'none',
1303 'value' => '',
1304 ),
1305 'wpvr_url_open' => array(
1306 'title' => __('Open in same tab','wpvr'),
1307 'type' => 'same_tab_checkbox',
1308 'value' => 'off',
1309 'display' => 'none',
1310 ),
1311 'hotspot-content' => array(
1312 'class' => 'hotspot-content',
1313 'title' => __('On Click Content','wpvr'),
1314 'type' => 'scene_content',
1315 'display' => 'none',
1316 ),
1317 'hotspot-hover' => array(
1318 'class' => 'hotspot-hover',
1319 'title' => __('On Hover Content','wpvr'),
1320 'type' => 'info_textarea',
1321 'value' => $pano_hotspot['hotspot-hover'],
1322 'display' => 'block',
1323 ),
1324 'hotspot-scene-list' => array(
1325 'title' => __('Select Target Scene from List','wpvr'),
1326 'type' => 'scene_list',
1327 'display' => 'block',
1328 ),
1329 'hotspot-scene' => array(
1330 'title' => __('Target Scene ID','wpvr'),
1331 'display' => 'block',
1332 'input_class' => 'hotspotsceneinfodata',
1333 'type' => 'disabled_text',
1334 'value' => $pano_hotspot['hotspot-scene']
1335 ),
1336 );
1337 return apply_filters( 'modify_hotspot_setting_scene_fields', $fields, $pano_hotspot );
1338 }
1339
1340
1341 /**
1342 * Return general feature navigation meta fields
1343 *
1344 * @return array
1345 * @since 8.0.0
1346 */
1347 public static function get_general_navigation_meta_fields()
1348 {
1349 $fields = array(
1350 array(
1351 'class' => 'gen-basic',
1352 'active' => 'active',
1353 'href' => 'gen-basic',
1354 'isPro' => false,
1355 'regular_icon' => 'admin/icon/basic-settings-regular.png',
1356 'hover_icon' => 'admin/icon/basic-settings-hover.png',
1357 'title' => __('Basic Settings','wpvr')
1358 ),
1359 array(
1360 'class' => 'gen-advanced',
1361 'active' => '',
1362 'href' => 'gen-advanced',
1363 'isPro' => true,
1364 'regular_icon' => 'admin/icon/advance-control-regular.png',
1365 'hover_icon' => 'admin/icon/advance-control-hover.png',
1366 'title' => __('Advanced Controls','wpvr')
1367 ),
1368 array(
1369 'class' => 'gen-control',
1370 'active' => '',
1371 'href' => 'gen-control',
1372 'isPro' => true,
1373 'regular_icon' => 'admin/icon/control-buttons-regular.png',
1374 'hover_icon' => 'admin/icon/control-buttons-hover.png',
1375 'title' => __('Control Buttons','wpvr')
1376 )
1377 );
1378
1379 return apply_filters( 'make_is_pro_false', $fields );
1380 }
1381
1382
1383 /**
1384 * Render inner navigation bar for General tab
1385 *
1386 * @return void
1387 * @since 8.0.0
1388 */
1389 public static function render_general_inner_navigation()
1390 {
1391 ob_start();
1392 ?>
1393
1394 <ul class="inner-nav">
1395
1396 <?php
1397 $fields = WPVR_Meta_Field::get_general_navigation_meta_fields();
1398 foreach($fields as $field) { ?>
1399
1400 <li class="<?php echo $field['class']; ?> <?php echo $field['active']; ?>">
1401 <span data-href="#<?php echo $field['href']; ?>">
1402 <?php if($field['isPro'] == true) { ?>
1403 <span class="pro-tag">pro</span>
1404 <?php } ?>
1405 <img loading="lazy" src="<?php echo WPVR_PLUGIN_DIR_URL . $field['regular_icon']; ?>" alt="icon" class="regular" />
1406 <img loading="lazy" src="<?php echo WPVR_PLUGIN_DIR_URL. $field['hover_icon']; ?>" alt="icon" class="hover" />
1407 <?php echo __($field['title'], 'wpvr');?></span>
1408 </li>
1409
1410 <?php } ?>
1411
1412 <li class="vr-documentation">
1413 <a href="https://rextheme.com/docs-category/wp-vr/" target="_blank"><?php echo __('Documentation ', 'wpvr'); ?></a>
1414 </li>
1415
1416 </ul>
1417
1418 <?php
1419 ob_end_flush();
1420 }
1421
1422
1423 /**
1424 * Render Hotspot Setting Left Fields
1425 * @return void
1426 *
1427 * @since 8.0.0
1428 */
1429 public static function render_hotspot_setting_left_fields($pano_hotspot)
1430 {
1431 $fields = self::get_hotspot_left_fields($pano_hotspot);
1432 foreach($fields as $name => $val) {
1433 self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1434 }
1435 }
1436
1437
1438 /**
1439 * Render Hotspot Setting Right Fileds
1440 * @return void
1441 *
1442 * @since 8.0.0
1443 */
1444 public static function render_hotspot_setting_right_fields()
1445 {
1446 $fields = self::get_hotspot_right_fields();
1447 foreach($fields as $name => $val) {
1448 self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1449 }
1450 }
1451
1452
1453 /**
1454 * Render Hotspot Setting When Hotspot-Type is Info
1455 *
1456 * @param mixed $hotspot_url
1457 * @param mixed $hotspot_content
1458 * @param mixed $hotspot_hover
1459 *
1460 * @return void
1461 * @since 8.0.0
1462 */
1463 public static function render_hotspot_setting_info_fields($pano_hotspot)
1464 {
1465 $fields = self::get_hotspot_setting_info_fields($pano_hotspot);
1466 foreach($fields as $name => $val) {
1467 self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1468 }
1469 }
1470
1471 /**
1472 * Render Hotspot Setting When Hotspot-Type is fluent form
1473 *
1474 * @param mixed $hotspot_hover
1475 * @param mixed $hotspot_target_scene
1476 *
1477 * @return void
1478 * @since 8.0.0
1479 */
1480 public static function render_hotspot_setting_fluent_form_fields($pano_hotspot)
1481 {
1482 $fields = self::get_hotspot_setting_fluent_form_fields($pano_hotspot);
1483 foreach($fields as $name => $val) {
1484 self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1485 }
1486 }
1487 /**
1488 * Render Hotspot Setting When Hotspot-Type is Woocommerce Product
1489 *
1490 * @param mixed $hotspot_hover
1491 * @param mixed $hotspot_target_scene
1492 *
1493 * @return void
1494 * @since 8.0.0
1495 */
1496 public static function render_hotspot_setting_wc_product_fields($pano_hotspot)
1497 {
1498 $fields = self::get_hotspot_setting_wc_product_fields($pano_hotspot);
1499 foreach($fields as $name => $val) {
1500 self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1501 }
1502 }
1503
1504
1505 /**
1506 * Render Hotspot Setting When Hotspot-Type is Scene
1507 *
1508 * @param mixed $hotspot_hover
1509 * @param mixed $hotspot_target_scene
1510 *
1511 * @return void
1512 * @since 8.0.0
1513 */
1514 public static function render_hotspot_setting_scene_fields($pano_hotspot)
1515 {
1516 $fields = self::get_hotspot_setting_scene_fields($pano_hotspot);
1517 foreach($fields as $name => $val) {
1518 self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1519 }
1520 }
1521
1522
1523
1524 /**
1525 * Render Scene Setting Left fields
1526 * When Panodata is Empty
1527 * @return void
1528 * @since 8.0.0
1529 */
1530 public static function render_scene_left_fields_empty_panodata()
1531 {
1532 $fields = self::get_scene_left_fields_empty_panodata();
1533 foreach($fields as $name => $val) {
1534 self::{ 'render_scene_' . $val['type'] . '_field' }( $name, $val );
1535 }
1536
1537 }
1538
1539
1540 /**
1541 * Render Scene Setting Left Fields
1542 * When Panodata is not Empty
1543 * @param mixed $dscene
1544 * @param mixed $scene_id
1545 * @param mixed $scene_photo
1546 *
1547 * @return void
1548 * @since 8.0.0
1549 */
1550 public static function render_scene_left_fields_with_panodata($pano_scene)
1551 {
1552 $fields = self::get_scene_left_fields_with_panodata($pano_scene);
1553 foreach($fields as $name => $val) {
1554 self::{ 'render_scene_' . $val['type'] . '_field' }( $name, $val );
1555 }
1556 }
1557
1558
1559 /**
1560 * Initialize fields render method
1561 * @return void
1562 * @since 8.0.0
1563 */
1564 public static function render_advanced_settings_left_fields($postdata)
1565 {
1566 $fields = self::get_advanced_settings_left_fields($postdata);
1567 foreach($fields as $name => $val) {
1568 self::{ 'render_' . $val['type'] . '_field' }( $name, $val );
1569 }
1570 }
1571
1572
1573 /**
1574 * Initialize fields render method
1575 * @return void
1576 * @since 8.0.0
1577 */
1578 public static function render_advanced_settings_right_fields($postdata)
1579 {
1580 $fields = self::get_advanced_settings_right_fields($postdata);
1581 foreach($fields as $name => $val) {
1582 self::{ 'render_' . $val['type'] . '_field' }( $name, $val );
1583 }
1584 }
1585
1586
1587 /**
1588 * Initialize fields render method
1589 * @return void
1590 * @since 8.0.0
1591 */
1592 public static function render_control_button_left_fields($postdata)
1593 {
1594 $fields = self::get_control_button_left_fields($postdata);
1595 foreach($fields as $name => $val) {
1596 self::{ 'render_' . $val['type'] . '_with_icon' }( $name, $val );
1597 }
1598 }
1599
1600
1601 /**
1602 * Initialize fields render method
1603 * @return void
1604 * @since 8.0.0
1605 */
1606 public static function render_control_button_right_fields($postdata)
1607 {
1608 $fields = self::get_control_button_right_fields($postdata);
1609 foreach($fields as $name => $val) {
1610 self::{ 'render_' . $val['type'] . '_with_icon' }( $name, $val );
1611 }
1612 }
1613
1614
1615 /**
1616 * Initilize Video Meta Fields
1617 * @param mixed $postdata
1618 *
1619 * @return array
1620 * @since 8.0.0
1621 */
1622 public static function get__video_setting_fields($postdata)
1623 {
1624 $vidurl = '';
1625 if (isset($postdata['vidid'])) {
1626 $vidurl = $postdata['vidurl'];
1627 }
1628 $meta_fields = array(
1629 'panovideo' => array(
1630 'class' => 'single-settings videosetup',
1631 'title' => __('Enable Video','wpvr'),
1632 'type' => 'radio_button',
1633 'lists' => array(
1634 array(
1635 'input_class' => 'styled-radio video_off',
1636 'input_id' => 'styled-radio',
1637 'value' => 'off',
1638 'checked' => isset($postdata['vidid']),
1639 'label_value' => 'Off'
1640 ),
1641 array(
1642 'input_class' => 'styled-radio video_on',
1643 'input_id' => 'styled-radio-0',
1644 'value' => 'on',
1645 'checked' => isset($postdata['vidid']),
1646 'label_value' => 'On'
1647 )
1648 ),
1649
1650 ),
1651 'video-attachment-url' => array(
1652 'class' => 'video-setting',
1653 'title' => __('Upload or Add Link','wpvr'),
1654 'placeholder' => __('Paste Youtube or Vimeo link or upload','wpvr'),
1655 'input_class' => 'video-attachment-url',
1656 'type' => 'video_text_input',
1657 'value' => $vidurl
1658 )
1659 );
1660 return apply_filters( 'extend_video_meta_fields', $meta_fields, $postdata, $vidurl );
1661 }
1662
1663
1664 /**
1665 * Render Video Settings Meta Fields
1666 * @param mixed $postdata
1667 *
1668 * @return void
1669 * @since 8.0.0
1670 */
1671 public static function render_video_setting_meta_fields($postdata)
1672 {
1673 $fields = self::get__video_setting_fields($postdata);
1674
1675 foreach($fields as $name => $val) {
1676 self::{ 'render_' . $val['type'] }( $name, $val );
1677 }
1678
1679 }
1680
1681
1682 /**
1683 * Render Scene Settings Select Field
1684 * @param mixed $name input name
1685 * @param mixed $val options
1686 *
1687 * @return void
1688 * @since 8.0.0
1689 */
1690 public static function render_scene_select_field($name, $val)
1691 {
1692 extract($val);
1693 ob_start();
1694 ?>
1695 <div class="<?= $class; ?>">
1696 <label><?= __($title .': ', 'wpvr'); ?></label>
1697 <select class="<?= $select_class; ?>" name="<?= $name; ?>">
1698 <option value="on" <?php selected( $selected, 'on' ); ?> > <?php echo __('Yes','wpvr') ?> </option>
1699 <option value="off" <?php selected( $selected, 'off' ); ?> > <?php echo __('No','wpvr') ?></option>
1700 </select>
1701 </div>
1702 <?php
1703 ob_end_flush();
1704 }
1705
1706
1707 /**
1708 * Render Scene Type selection field on Scene tab content
1709 *
1710 * @param mixed $name
1711 * @param mixed $val
1712 *
1713 * @return void
1714 * @since 8.0.0
1715 */
1716 public static function render_scene_type_select_field($name, $val)
1717 {
1718 extract($val);
1719 ob_start();
1720 ?>
1721 <div class="scene-setting">
1722 <label for="scene-type"><?= __($title .': ', 'wpvr'); ?></label>
1723 <select class="wpvr-pro-select-scene-type" name="scene-type" id="">
1724 <option value="equirectangular" <?= $selected == 'equirectangular' ? 'selected' : '' ?> > <?php echo __('Equirectangular','wpvr') ?></option>
1725 <option value="cubemap" <?= $selected == 'cubemap' ? 'selected' : '' ?> > <?php echo __('Cubemap','wpvr') ?></option>
1726 <select>
1727 </div>
1728 <?php
1729 ob_end_flush();
1730 }
1731
1732
1733 /**
1734 * Render Scene Settings Text Field
1735 * @param mixed $name input name
1736 * @param mixed $val options
1737 *
1738 * @return void
1739 * @since 8.0.0
1740 */
1741 public static function render_scene_text_field($name, $val)
1742 {
1743 extract($val);
1744 ob_start();
1745 if($label_for === 'scene-type') {
1746 ?>
1747 <div class=scene-setting>
1748 <label for="<?= $label_for; ?>"><?= __($title .': ', 'wpvr'); ?></label>
1749 <select class="disable-scene-type">
1750 <option value="" selected=""> Equirectangular</option>
1751 <option value="" disabled> Cubemap (Pro)</option>
1752 </select>
1753 <input hidden type="text" class="<?= $input_class; ?>" name="<?= $name; ?>" value="<?= $value; ?>" <?= $disabled; ?> />
1754 </div>
1755 <?php
1756 ob_end_flush();
1757 }else{
1758 ?>
1759 <div class=scene-setting>
1760 <label for="<?= $label_for; ?>"><?= __($title .': ', 'wpvr'); ?></label>
1761 <input type="text" class="<?= $input_class; ?>" name="<?= $name; ?>" value="<?= $value; ?>" />
1762 </div>
1763 <?php }
1764 ob_end_flush();
1765 }
1766
1767
1768 /**
1769 * Render Scene Settings Upload Field
1770 * @param mixed $name input name
1771 * @param mixed $val options
1772 *
1773 * @return void
1774 * @since 8.0.0
1775 */
1776 public static function render_scene_upload_field($name, $val)
1777 {
1778 extract($val);
1779 ob_start();
1780 ?>
1781 <div class=scene-setting>
1782 <label for="scene-upload"><?= __($title .': ', 'wpvr'); ?></label>
1783 <div class="form-group">
1784 <img loading="lazy" src="<?= $value; ?>" style="display: <?= $display; ?>;"><br>
1785 <input type="button" class="scene-upload" data-info="" value="Upload"/>
1786 <input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="<?= $value; ?>">
1787 </div>
1788 </div>
1789 <?php
1790 ob_end_flush();
1791 }
1792
1793
1794 /**
1795 * Render Scene upload wrapper fields for pro version
1796 *
1797 * @param mixed $name
1798 * @param mixed $val
1799 *
1800 * @return void
1801 * @since 8.0.0
1802 */
1803 public static function render_scene_upload_wrapper_field($name, $val)
1804 {
1805 extract($val);
1806 ob_start();
1807 ?>
1808 <div class="scene-setting scene-upload-wrapper">
1809 <?php
1810 foreach($wrappers as $key => $val) {
1811 self::{ 'render_scene_' . $key }( $key, $val );
1812 }
1813 ?>
1814 </div>
1815 <?php
1816 ob_end_flush();
1817 }
1818
1819
1820 /**
1821 * Render equirectangular scene upload section for pro version
1822 *
1823 * @param mixed $key
1824 * @param mixed $val
1825 *
1826 * @return void
1827 * @since 8.0.0
1828 */
1829 public static function render_scene_equirectangular_upload($key, $val)
1830 {
1831 extract($val);
1832 ob_start();
1833 ?>
1834 <div class="equirectangular-upload" style="display:<?= $display?>;">
1835 <label for="scene-upload"><?= __('Scene Upload: ', 'wpvr')?></label>
1836 <div class="form-group">
1837 <img loading="lazy" src="<?= $value?>" style="display: <?= $img_display?>;"><br>
1838 <input type="button" class="scene-upload" data-info="" value="Upload"/>
1839 <input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="<?= $value?>">
1840 </div>
1841
1842 <div class="field-tooltip">
1843 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'?>" alt="icon" />
1844 <span><?= __('You can use any image size but maximum image upload size recommended to support all device is 4096x2000 px for perfect responsive view. To check 360 view, click on preview button and check tour preview metabox.', 'wpvr') ?></span>
1845 </div>
1846 </div>
1847 <?php
1848 ob_end_flush();
1849 }
1850
1851
1852 /**
1853 * Render cubemap scene upload section for pro version
1854 *
1855 * @param mixed $key
1856 * @param mixed $val
1857 *
1858 * @return void
1859 * @since 8.0.0
1860 */
1861 public static function render_scene_cubemap_upload($key, $val)
1862 {
1863 extract($val);
1864 ob_start();
1865 ?>
1866 <div class="cubemap-upload" style="display:<?= $display?>;">
1867 <?php
1868 foreach($cubemaps as $cubemap){ extract($cubemap) ?>
1869 <div class="<?= $class ?>">
1870 <label for="scene-upload"><?= __($title , 'wpvr-pro') ?></label>
1871 <div class="form-group">
1872 <img loading="lazy" src="<?= $value ?>" style="display: block;">
1873 <input type="button" class="scene-upload" data-info="" value="Upload"/>
1874 <input type="hidden" name="<?= $name ?>" class="scene-attachment-url" value="<?= $value ?>">
1875 </div>
1876
1877 <div class="field-tooltip">
1878 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
1879 <span><?= __('You can use any image size but maximum image upload size recommended to support all device is 4096x2000 px for perfect responsive view. To check 360 view, click on preview button and check tour preview metabox.', 'wpvr') ?></span>
1880 </div>
1881 </div>
1882 <?php }
1883 ?>
1884 </div>
1885 <?php
1886 ob_end_flush();
1887
1888 }
1889
1890
1891 /**
1892 * Render Radio Button Field
1893 * @param mixed $name input name
1894 * @param mixed $val options
1895 *
1896 * @return void
1897 * @since 8.0.0
1898 */
1899 public static function render_radio_button($name, $val)
1900 {
1901 extract( $val );
1902 ob_start();
1903 ?>
1904 <div class="<?= $class; ?>">
1905 <span><?= __($title .': ', 'wpvr'); ?></span>
1906 <ul>
1907
1908 <?php foreach($lists as $list) { extract( $list ); ?>
1909 <li class="radio-btn">
1910 <input class="<?= $input_class; ?>" id="<?= $input_id; ?>" type="radio" name="<?= $name; ?>" value="<?= $value; ?>" <?php if(empty($checked) && $value == 'off') { echo 'checked'; } ;?> <?php if(!empty($checked) && $value == 'on') { echo 'checked'; };?> >
1911 <label for="<?= $input_id; ?>"><?= $label_value; ?></label>
1912 </li>
1913
1914 <?php } ?>
1915
1916 </ul>
1917 </div>
1918 <?php
1919 ob_end_flush();
1920 }
1921
1922
1923 /**
1924 * Render Radio Button Field for pro version
1925 * @param mixed $name input name
1926 * @param mixed $val options
1927 *
1928 * @return void
1929 * @since 8.0.0
1930 */
1931 public static function render_pro_radio_button($name, $val)
1932 {
1933 extract( $val );
1934 ob_start();
1935 ?>
1936 <div class="<?= $class; ?>">
1937 <span><?= __($title .': ', 'wpvr'); ?></span>
1938 <ul>
1939
1940 <?php foreach($lists as $list) { extract( $list ); ?>
1941 <li class="radio-btn">
1942 <input class="<?= $input_class; ?>" id="<?= $input_id; ?>" type="radio" name="<?= $name; ?>" value="<?= $value; ?>" <?php if(($checked == 'off' || empty($checked)) && $value == 'off') { echo 'checked'; } ;?> <?php if($checked == 'on' && $value == 'on') { echo 'checked'; };?> >
1943 <label for="<?= $input_id; ?>"><?= $label_value; ?></label>
1944 </li>
1945
1946 <?php } ?>
1947
1948 </ul>
1949 </div>
1950 <?php
1951 ob_end_flush();
1952 }
1953
1954
1955 /**
1956 * Render Video Text Input Field
1957 * @param mixed $name input name
1958 * @param mixed $val options
1959 *
1960 * @return void
1961 * @since 8.0.0
1962 */
1963 public static function render_video_text_input($name, $val)
1964 {
1965 extract( $val );
1966 ob_start();
1967 ?>
1968 <div class="<?= $class; ?>" style="display:none;">
1969 <div class="single-settings">
1970 <span><?= __($title .': ', 'wpvr'); ?></span>
1971 <div class="form-group">
1972 <input type="text" placeholder="<?= $placeholder; ?>" name="<?= $name; ?>" class="<?= $input_class; ?>" value="<?= $value; ?>">
1973 <input type="button" class="video-upload" data-info="" value="Upload"/>
1974 </div>
1975 </div>
1976 </div>
1977 <?php
1978
1979 ob_end_flush();
1980
1981 }
1982
1983 /**
1984 * Render Checkbox Field
1985 *
1986 * @param string $name input name
1987 * @param string $val options
1988 *
1989 * @return void
1990 * @since 8.0.0
1991 */
1992 public static function render_checkbox_field($name, $val)
1993 {
1994 extract( $val );
1995 ob_start();
1996 ?>
1997 <div class="<?= $class;?>">
1998 <span><?= __($title.': ', 'wpvr'); ?></span>
1999
2000 <span class="wpvr-switcher">
2001 <input id="<?= $id;?>" class="vr-switcher-check" value="off" name="<?= $name;?>" type="checkbox" disabled />
2002 <label for="<?= $id;?>" title="Pro Feature"></label>
2003 </span>
2004 <?php if($have_tooltip) {?>
2005 <div class="field-tooltip">
2006 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2007 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2008 </div>
2009 <?php } ?>
2010 </div>
2011 <?php
2012 ob_end_flush();
2013 }
2014
2015
2016 /**
2017 * Render checkbox for advanced control pro version meta fields
2018 *
2019 * @param mixed $name
2020 * @param mixed $val
2021 *
2022 * @return void
2023 * @since 8.0.0
2024 */
2025 public static function render_pro_checkbox_field($name, $val)
2026 {
2027 extract($val);
2028 ob_start();
2029 ?>
2030 <div class="<?= $class; ?>">
2031 <span><?= __($title .': ', 'wpvr'); ?></span>
2032
2033 <span class="wpvr-switcher">
2034 <input id="<?= $id; ?>" class="vr-switcher-check" value="<?= $value?>" name="<?= $name; ?>" type="checkbox" <?php if($value == 'on') { echo'checked'; } ?> />
2035 <label for="<?= $id; ?>"></label>
2036 </span>
2037 <?php if($have_tooltip) { ?>
2038 <div class="field-tooltip">
2039 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2040 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2041 </div>
2042 <?php } ?>
2043 </div>
2044 <?php
2045 ob_end_flush();
2046 }
2047
2048
2049 public static function render_explainer_info_wrapper_field($name, $val)
2050 {
2051 extract($val);
2052 ob_start();
2053 ?>
2054 <div class="explainer-info-wrapper">
2055 <div class="single-settings cp-details">
2056 <span><?= __($title .': ', 'wpvr'); ?></span>
2057 <textarea rows="5" cols="40" name="explaine-content" id="explaine-content"><?= $value?></textarea>
2058 </div>
2059 </div>
2060 <?php
2061 ob_end_flush();
2062 }
2063
2064
2065 /**
2066 * Render checkbox for advanced control pro version meta fields
2067 *
2068 * @param mixed $name
2069 * @param mixed $val
2070 *
2071 * @return void
2072 * @since 8.0.0
2073 */
2074 public static function render_pro_inner_checkbox_field($name, $val)
2075 {
2076 extract($val);
2077 ob_start();
2078 ?>
2079 <div class="<?= $root_class; ?>">
2080 <div class="<?= $class; ?>">
2081 <span><?= __($title .': ', 'wpvr'); ?></span>
2082
2083 <span class="wpvr-switcher">
2084 <input id="<?= $id; ?>" class="vr-switcher-check" value="<?= $value; ?>" name="<?= $name; ?>" type="checkbox" <?php if($value == 'on') { echo 'checked'; } else { echo ''; } ?> />
2085 <label for="<?= $id; ?>"></label>
2086 </span>
2087
2088 <?php if($have_tooltip) { ?>
2089 <div class="field-tooltip">
2090 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2091 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2092 </div>
2093 <?php } ?>
2094 </div>
2095 </div>
2096 <?php
2097 ob_end_flush();
2098 }
2099
2100
2101 /**
2102 * Render background music field on Advanced Controls section
2103 *
2104 * @param mixed $name
2105 * @param mixed $val
2106 *
2107 * @return void
2108 * @since 8.0.0
2109 */
2110 public static function render_bg_music_content_field($name, $val)
2111 {
2112 extract($val);
2113 ob_start();
2114 ?>
2115 <div class="bg-music-content" style="display:none">
2116 <?php
2117 foreach($inner_fields as $name => $val) {
2118 self::{ 'render_' . $val['type'] . '_field' }( $name, $val );
2119 }
2120 ?>
2121 </div>
2122 <?php
2123 ob_end_flush();
2124 }
2125
2126
2127 /**
2128 * Render Upload or Set Audio Link field on Advanced Controls section
2129 *
2130 * @param mixed $name
2131 * @param mixed $val
2132 *
2133 * @return void
2134 * @since 8.0.0
2135 */
2136 public static function render_upload_audio_link_field($name, $val)
2137 {
2138 extract($val);
2139 ob_start();
2140 ?>
2141 <div class="single-settings audio-setting">
2142 <span><?= __($title .': ', 'wpvr'); ?></span>
2143 <img loading="lazy" class="audio-img" src="<?= $value; ?>" style="display: none;">
2144 <input type="text" name="<?= $name; ?>" class="audio-attachment-url" value="<?= $value; ?>">
2145 <button type="button" class="audio-upload" data-info=""><img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/upload.png' ?>" alt="icon" /></button>
2146 </div>
2147 <?php
2148 ob_end_flush();
2149 }
2150
2151
2152 /**
2153 * Render Add Company information field on Advanced Controls section
2154 *
2155 * @param mixed $name
2156 * @param mixed $val
2157 *
2158 * @return void
2159 * @since 8.0.0
2160 */
2161 public static function render_company_info_wrapper_field($name, $val)
2162 {
2163 extract($val);
2164 ob_start();
2165 ?>
2166 <div class="company-info-wrapper">
2167 <div class="single-settings cp-logo-area">
2168 <span class="logo-title"><?= __($title .': ', 'wpvr'); ?>
2169 <span class="hints"><?= __('You can add any logo size. But recommended size is below 100x100 px for perfect look.', 'wpvr-pro') ?></span>
2170 </span>
2171
2172 <div class="form-group">
2173 <input type="text" name="cp-logo-attachment-url" class="cp-logo-attachment-url" value="<?= $value ?>">
2174 <input type="button" class="cp-logo-upload" id="cp-logo-upload" data-info="" value="Upload"/>
2175
2176 <div class="logo-upload-frame" >
2177 <label for="cp-logo-upload">
2178 <img loading="lazy" class="cp-logo-img" src="<?= $value ?>">
2179 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/uplad-icon.png' ?>" class="placeholder-icon" alt="icon" style="display: <?php if($value != null) { echo 'none'; } ?>;" />
2180 </label>
2181 </div>
2182 </div>
2183 </div>
2184 <div class="single-settings cp-details">
2185 <span><?= __('Company Details : ', 'wpvr-pro') ?></span>
2186 <textarea rows="5" cols="40" name="cp-logo-content" id="cp-logo-content"><?= $cpLogoContent;?></textarea>
2187 </div>
2188 </div>
2189 <?php
2190 ob_end_flush();
2191 }
2192
2193
2194 /**
2195 * Render text input fields while ro version is active
2196 *
2197 * @param mixed $name
2198 * @param mixed $val
2199 *
2200 * @return void
2201 * @since 8.0.0
2202 */
2203 public static function render_pro_input_field($name, $val)
2204 {
2205 extract($val);
2206 ob_start();
2207 ?>
2208 <div class="<?= $class ?>" >
2209 <span><?= __($title .': ', 'wpvr'); ?></span>
2210 <input type="text" class="<?= $input_class ?>" name="<?= $name ?>" placeholder="<?= $placeholder ?>" value="<?= $value ?>" />
2211
2212 <div class="field-tooltip">
2213 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2214 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2215 </div>
2216 </div>
2217 <?php
2218 ob_end_flush();
2219 }
2220
2221
2222
2223 /**
2224 * Render Checkbox Field With Icon
2225 *
2226 * @param string $name input name
2227 * @param string $val options
2228 *
2229 * @return void
2230 * @since 8.0.0
2231 */
2232 public static function render_checkbox_with_icon($name, $val)
2233 {
2234 extract( $val );
2235 ob_start();
2236 ?>
2237 <div class="single-settings controls custom-data-set">
2238 <span><?= __($title . ': ', 'wpvr'); ?></span>
2239
2240 <div class="color-icon">
2241 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/'. $icon; ?>" alt="icon" />
2242 </div>
2243
2244 <span class="wpvr-switcher">
2245 <input id="<?= $id; ?>" class="vr-switcher-check" value="off" name="<?= $name; ?>" type="checkbox" disabled />
2246 <label for="<?= $id; ?>" title="Pro Feature"></label>
2247 </span>
2248
2249 </div>
2250 <?php
2251 ob_end_flush();
2252 }
2253
2254
2255 /**
2256 * Render checkbox fields on Control Buttons section while pro version is active
2257 *
2258 * @param mixed $name
2259 * @param mixed $val
2260 *
2261 * @return void
2262 * @since 8.0.0
2263 */
2264 public static function render_pro_checkbox_with_icon($name, $val)
2265 {
2266 extract( $val );
2267 ob_start();
2268 ?>
2269 <div class="single-settings controls custom-data-set">
2270 <span><?= __($title . ': ', 'wpvr'); ?></span>
2271
2272 <div class="color-icon">
2273 <div class="colors">
2274 <input type="color" class="<?= $color_name; ?>" name="<?= $color_name; ?>" value="<?= $color_value; ?>" />
2275 <input type="hidden" class="<?= $icon_name ?> icon-found-value" name="<?= $icon_name ?>" value="<?= $color_value; ?>" />
2276 </div>
2277
2278 <div class="icons">
2279 <select class="<?= $icon_select_class ?>" name="<?= $icon_select_name ?>">
2280 <?php
2281 foreach ($custom_icons as $cikey => $civalue) {
2282 if ($cikey == $icon) { ?>
2283 <option value="<?= $cikey ?>" selected> <?= $civalue ?></option>
2284 <?php } else { ?>
2285 <option value="<?= $cikey ?>"> <?= $civalue ?></option>
2286 <?php }
2287 }
2288 ?>
2289 </select>
2290 </div>
2291 </div>
2292
2293 <span class="wpvr-switcher">
2294 <input id="<?= $id; ?>" class="vr-switcher-check" value="<?= $value ?>" name="<?= $name; ?>" type="checkbox" <?php if($value == 'on') { echo 'checked'; } ?> />
2295 <label for="<?= $id; ?>"></label>
2296 </span>
2297 </div>
2298 <?php
2299 ob_end_flush();
2300 }
2301
2302
2303 /**
2304 * Render Basic Setting Preview Image
2305 * @param mixed $name input name
2306 * @param mixed $val options
2307 *
2308 * @return void
2309 * @since 8.0.0
2310 */
2311 public static function render_preview_image($name, $val)
2312 {
2313 extract( $val );
2314 ob_start();
2315 ?>
2316 <div class="<?= $class; ?>">
2317 <span><?= __($title.' : ', 'wpvr'); ?></span>
2318 <div class="form-group">
2319 <input type="text" name="<?= $name; ?>" class="preview-attachment-url" value="<?= $value;?>">
2320 <input type="button" class="preview-upload" id="vr-preview-img" data-info="" value="Upload"/>
2321 <div class="img-upload-frame <?php if(!empty($value)) { echo 'img-uploaded'; } ?>" style="background-image: url(<?= $value; ?>)">
2322 <span class="remove-attachment">x</span>
2323 <label for="vr-preview-img">
2324 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/uplad-icon.png'; ?>" alt="preview img" />
2325 <span><?= __('Click to Upload an Image ', 'wpvr'); ?></span>
2326 </label>
2327 </div>
2328 </div>
2329 <?php if(!empty($value)) { ?>
2330 <span class="hints"><?= __('This option will not work if the "Tour Autoload" is turned on.', 'wpvr'); ?></span>
2331 <?php } ?>
2332 </div>
2333 <?php
2334 ob_end_flush();
2335 }
2336
2337
2338 /**
2339 * Render Basic Setting Preview Message
2340 * @param mixed $name input name
2341 * @param mixed $val options
2342 *
2343 * @return void
2344 * @since 8.0.0
2345 */
2346 public static function render_preview_image_msg($name, $val)
2347 {
2348 extract( $val );
2349 ob_start();
2350 ?>
2351 <div class="<?= $class; ?>">
2352 <span><?= __($title.': ', 'wpvr'); ?></span>
2353 <input class="previewtext" type="text" name="<?= $name; ?>" value="<?= $value; ?>"/>
2354 </div>
2355 <?php
2356 ob_end_flush();
2357 }
2358
2359
2360 /**
2361 * Render Basc Setting Checkbox
2362 * @param mixed $name input name
2363 * @param mixed $val options
2364 *
2365 * @return void
2366 * @since 8.0.0
2367 */
2368 public static function render_basic_setting_checkbox($name, $val)
2369 {
2370 extract( $val );
2371 ob_start();
2372 ?>
2373 <div class="<?= $class; ?>">
2374 <?php if(isset($val['package']) && $val['package'] == 'pro' && !defined('WPVR_PRO_VERSION')){?>
2375 <div class="basic-setting-checkbox-pro-tag">pro</div>
2376 <?php } ?>
2377 <span><?= __($title.': ', 'wpvr'); ?></span>
2378
2379 <span class="wpvr-switcher">
2380 <input id="<?= $id;?>" class="vr-switcher-check" name="<?= $name; ?>" type="checkbox" value="1" <?php checked( $checked, 1 ); ?> />
2381 <label for="<?= $id;?>"></label>
2382 </span>
2383
2384 <?php if($have_tooltip) {?>
2385 <div class="field-tooltip">
2386 <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2387 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2388 </div>
2389 <?php } ?>
2390 </div>
2391 <?php
2392 ob_end_flush();
2393 }
2394
2395 public static function render_generic_form_checkbox($name, $val)
2396 {
2397 extract( $val );
2398 ob_start();
2399 ?>
2400 <div class="<?= $class; ?>">
2401 <span><?= __($title.': ', 'wpvr'); ?></span>
2402
2403 <span class="wpvr-switcher">
2404 <input id="<?= $id;?>" class="vr-switcher-check" name="<?= $name; ?>" type="checkbox" value="<?= $val['checked']; ?>" <?php echo $val['checked']=='on'? 'checked' : '' ?> />
2405 <label for="<?= $id;?>"></label>
2406 </span>
2407
2408 <?php if($have_tooltip) {?>
2409 <div class="field-tooltip">
2410 <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2411 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2412 </div>
2413 <?php } ?>
2414 </div>
2415 <?php
2416 ob_end_flush();
2417 }
2418
2419
2420 /**
2421 * Render Numder Input Field
2422 * @param mixed $name input name
2423 * @param mixed $val options
2424 *
2425 * @return void
2426 * @since 8.0.0
2427 */
2428 public static function render_number_field($name, $val)
2429 {
2430 extract( $val );
2431 ob_start();
2432 ?>
2433 <div class="<?= $class; ?>">
2434 <span><?= __($title.': ', 'wpvr'); ?></span>
2435 <input type="number" name="<?= $name; ?>" value="<?= $value; ?>" placeholder="<?= $placeholder;?>" />
2436
2437 <?php if($have_tooltip) {?>
2438 <div class="field-tooltip">
2439 <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'; ?>" alt="icon" />
2440 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2441 </div>
2442 <?php } ?>
2443 </div>
2444 <?php
2445 ob_end_flush();
2446 }
2447
2448 public static function render_tour_layout_select($name, $val)
2449 {
2450 extract( $val );
2451 ob_start();
2452 $preview = '';
2453 if(defined('WPVR_PRO_VERSION')){
2454 $preview = '<span class="wpvr-layout__hover-text">'. __('Preview','wpvr').'</span>';
2455 }
2456 ?>
2457 <div class="<?= $class; ?>">
2458 <?php if(!defined('WPVR_PRO_VERSION')){
2459 echo '<div class="tour-layout-pro-tag">pro</div>';
2460 }?>
2461 <div class="wpvr-layout">
2462
2463 <span class="wpvr-layout__label"><?php echo __('Choose tour layout:','wpvr')?></span>
2464
2465 <div class="wpvr-layout__container">
2466 <input type="hidden" id="layout_icon_bg_color" name="layout_icon_bg_color" value=<?php echo $value['layout_icon_bg_color'] ?> >
2467 <input type="hidden" id="layout_icon_color" name="layout_icon_color" value=<?php echo $value['layout_icon_color'] ?> >
2468
2469 <div class="wpvr-layout__radio-container">
2470 <input type="radio" id="default" name="tourLayout" value="default" <?php echo $value['layout'] =='default'? 'checked' : '' ?>>
2471 <label for="default" class="wpvr-layout__radio-label" data-layout='default' data-preview-image=<?php echo WPVR_PLUGIN_DIR_URL .'admin/icon/default-layout-preview.png' ?>>
2472 <img src="<?php echo WPVR_PLUGIN_DIR_URL .'admin/icon/default-layout.png' ?>" alt="Default" class="wpvr-layout__radio-image">
2473 <?php echo $preview; ?>
2474 <span class="layout__radio-text <?php echo $value['layout'] =='default'? 'active' : '' ?>"><?php echo __('Classic','wpvr')?></span>
2475 </div>
2476
2477 <div class="wpvr-layout__radio-container">
2478 <input type="radio" id="layout1" name="tourLayout" value="layout1" <?php echo $value['layout'] =='layout1'? 'checked' : '' ?>>
2479 <label for="layout1" class="wpvr-layout__radio-label" data-layout='layout1' data-bg-color='<?php echo $value['layout_icon_bg_color'] ?>' data-icon-color='<?php echo $value['layout_icon_color'] ?>'>
2480 <img src="<?php echo WPVR_PLUGIN_DIR_URL .'admin/icon/layout-1.png' ?>" alt="Layout 1" class="wpvr-layout__radio-image">
2481 <?php echo $preview; ?>
2482 </label>
2483
2484 <span class="layout__radio-text <?php echo $value['layout'] =='layout1'? 'active' : '' ?>"><?php echo __('Modern','wpvr')?></span>
2485 </div>
2486 <!---->
2487 <!-- <div class="wpvr-layout__radio-container">-->
2488 <!-- <input type="radio" id="comingsoon" name="tourLayout" value="comingsoon" disabled>-->
2489 <!-- <label for="comingsoon" class="wpvr-layout__radio-label">-->
2490 <!-- <img src="--><?php //echo WPVR_PLUGIN_DIR_URL .'admin/icon/coming_soon_layout.png' ?><!--" alt="Coming Soon" class="wpvr-layout__radio-image">-->
2491 <!-- </label>-->
2492 <!-- <span class="layout__radio-text">--><?php //echo __('Coming Soon','wpvr')?><!--</span>-->
2493 <!-- </div>-->
2494
2495 </div>
2496 <!-- .wpvr-layout__container end -->
2497
2498 </div>
2499
2500 </div>
2501
2502 <?php
2503 ob_end_flush();
2504 }
2505
2506 public static function render_text_field($name, $val)
2507 {
2508 extract( $val );
2509 ob_start();
2510 ?>
2511 <div class="<?= $class; ?>">
2512 <span><?= __($title.': ', 'wpvr'); ?></span>
2513 <input type="text" name="<?= $name; ?>" value='<?= $value; ?>' placeholder="<?= $placeholder;?>" />
2514
2515 <?php if($have_tooltip) {?>
2516 <div class="field-tooltip">
2517 <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'; ?>" alt="icon" />
2518 <span><?= __($tooltip_text, 'wpvr'); ?></span>
2519 </div>
2520 <?php } ?>
2521 </div>
2522 <?php
2523 ob_end_flush();
2524 }
2525
2526
2527 /**
2528 * Render Hotspot Setting Text Fields
2529 * @param mixed $name input field name
2530 * @param mixed $val options
2531 *
2532 * @return void
2533 * @since 8.0.0
2534 */
2535 public static function render_hotspot_text_field($name, $val)
2536 {
2537 extract($val);
2538 ob_start();
2539 ?>
2540
2541 <div class="hotspot-setting">
2542 <label for="<?= $input_id;?>"><?= __($title.': ', 'wpvr'); ?></label>
2543 <input type="text" id="<?= $input_id;?>" value="<?= $value;?>" class="<?= $input_class;?>" name="<?= $name;?>"/>
2544 </div>
2545
2546 <?php
2547 ob_end_flush();
2548 }
2549
2550
2551 /**
2552 * Render checkbox for same tab feature on hotspot
2553 *
2554 * @param mixed $name
2555 * @param mixed $val
2556 *
2557 * @return void
2558 * @since 8.0.0
2559 */
2560 public static function render_hotspot_same_tab_checkbox_field($name, $val)
2561 {
2562 extract($val);
2563 ob_start();
2564 ?>
2565
2566 <div class="single-settings s_tab" style="display:<?= $display ?>;">
2567 <span><?= __($title.': ', 'wpvr'); ?></span>
2568 <label class="wpvr-switcher-v2">
2569 <input type="checkbox" class="wpvr_url_open" name="<?= $name;?>" value="<?= $value;?>" <?php if($value == 'on') { echo 'checked'; } ?> >
2570 <span class="switcher-box"></span>
2571 </label>
2572 </div>
2573
2574 <?php
2575 ob_end_flush();
2576 }
2577
2578
2579 /**
2580 * Render Hotspot Setting Pro Version Text Fields
2581 * @param mixed $name input field name
2582 * @param mixed $val options
2583 *
2584 * @return void
2585 * @since 8.0.0
2586 */
2587 public static function render_hotspot_pro_text_field($name, $val)
2588 {
2589 extract($val);
2590 ob_start();
2591 ?>
2592
2593 <div class="hotspot-scene" style="display:none;" >
2594 <label for="<?= $name;?>"><?= __($title.': ', 'wpvr'); ?></label>
2595 <input class="<?= $name;?>" type="text" name="<?= $name;?>"/>
2596 </div>
2597
2598 <?php
2599 ob_end_flush();
2600 }
2601
2602
2603 /**
2604 * Render Hotspot Setting Terget Scene related text fields
2605 * @param mixed $name input field name
2606 * @param mixed $val options
2607 *
2608 * @return void
2609 * @since 8.0.0
2610 */
2611 public static function render_hotspot_terget_scene_pro_text_field($name, $val)
2612 {
2613 extract($val);
2614 ob_start();
2615 ?>
2616
2617 <div class="hotspot-scene" style="display:block;" >
2618 <label for="<?= $name;?>"><?= __($title.': ', 'wpvr'); ?></label>
2619 <input class="<?= $name;?>" type="text" name="<?= $name;?>" value="<?= $value ?>" />
2620 </div>
2621
2622 <?php
2623 ob_end_flush();
2624 }
2625
2626
2627 /**
2628 * Render Hotspot Info Type Selct Field
2629 * @param mixed $name input field name
2630 * @param mixed $val options
2631 *
2632 * @return void
2633 * @since 8.0.0
2634 */
2635 public static function render_hotspot_info_type_select_field($name, $val)
2636 {
2637 extract($val);
2638 $default_type = apply_filters('wpvr_hotspot_types', array(
2639 'info' => __('Info', 'wpvr-pro'),
2640 'scene' => __('Scene', 'wpvr-pro'),
2641 ));
2642 ob_start();
2643 ?>
2644
2645 <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
2646 <select name="<?= $name;?>">
2647 <?php
2648 $hotspot_type = 'info';
2649 foreach ($default_type as $key => $value) {
2650 echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
2651 } ?>
2652 </select>
2653
2654 <?php
2655 do_action('hotspot_info_before_hover_content', 'info', array());
2656 ob_end_flush();
2657 }
2658
2659
2660 /**
2661 * Render Hotspot Scene Type Selct Field
2662 * @param mixed $name input field name
2663 * @param mixed $val options
2664 *
2665 * @return void
2666 * @since 8.0.0
2667 */
2668 public static function render_hotspot_scene_type_select_field($name, $val)
2669 {
2670 extract($val);
2671 $default_type = apply_filters('wpvr_hotspot_types', array(
2672 'info' => __('Info', 'wpvr-pro'),
2673 'scene' => __('Scene', 'wpvr-pro'),
2674 ));
2675 ob_start();
2676 ?>
2677
2678 <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
2679 <select class="trtr" name="<?= $name;?>">
2680 <?php
2681 $hotspot_type = 'scene';
2682 foreach ($default_type as $key => $value) {
2683 echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
2684 } ?>
2685 </select>
2686
2687 <?php
2688 do_action('hotspot_info_before_hover_content', 'scene', array());
2689 ob_end_flush();
2690 }
2691
2692
2693 /**
2694 * Render Hotspot Info Type URL field
2695 * @param mixed $name input field name
2696 * @param mixed $val options
2697 *
2698 * @return void
2699 * @since 8.0.o
2700 */
2701 public static function render_hotspot_info_url_field($name, $val)
2702 {
2703 extract($val);
2704 ob_start();
2705 ?>
2706
2707 <div class="hotspot-url" style="display:<?= $display;?>;">
2708 <label for="hotspot-url"><?= __($title .': ', 'wpvr'); ?></label>
2709 <input type="url" name="<?= $name;?>" value="<?= $value;?>" />
2710 </div>
2711
2712 <?php
2713 ob_end_flush();
2714 }
2715
2716
2717 /**
2718 * Render Hotspot Textarea Field
2719 * @param mixed $name input field name
2720 * @param mixed $val options
2721 *
2722 * @return void
2723 * @since 8.0.0
2724 */
2725 public static function render_hotspot_textarea_field($name, $val)
2726 {
2727 extract($val);
2728 ob_start();
2729 ?>
2730
2731 <div class="<?= $class;?>">
2732 <label for="hotspot-content"><?= __($title .': ', 'wpvr'); ?></label>
2733 <textarea name="<?= $name;?>"></textarea>
2734 </div>
2735
2736 <?php
2737 ob_end_flush();
2738 }
2739
2740
2741 /**
2742 * Render Hotspot Info Type Textarea Field
2743 * @param mixed $name input field name
2744 * @param mixed $val options
2745 *
2746 * @return void
2747 * @since 8.0.0
2748 */
2749 public static function render_hotspot_info_textarea_field($name, $val)
2750 {
2751 extract($val);
2752 ob_start();
2753 ?>
2754
2755 <div class="<?= $class;?>" style="display:<?= $display;?>;">
2756 <label for="hotspot-content"><?= __($title .': ', 'wpvr'); ?></label>
2757 <textarea name="<?= $name;?>"><?= $value;?></textarea>
2758 </div>
2759
2760 <?php
2761 ob_end_flush();
2762 }
2763
2764
2765 /**
2766 * Render Hotspot Scene Type Textarea Field
2767 * @param mixed $name input field name
2768 * @param mixed $val options
2769 *
2770 * @return void
2771 * @since 8.0.0
2772 */
2773 public static function render_hotspot_scene_content_field($name, $val)
2774 {
2775 extract($val);
2776 ob_start();
2777 ?>
2778
2779 <div class="<?= $class;?>" style="display:<?= $display;?>;">
2780 <label for="hotspot-content"><?= __($title .': ', 'wpvr'); ?></label>
2781 <textarea name="<?= $name;?>"></textarea>
2782 </div>
2783
2784 <?php
2785 ob_end_flush();
2786 }
2787
2788
2789 /**
2790 * Render Hotspot Scene Select Field
2791 * @param mixed $name input field name
2792 * @param mixed $val options
2793 *
2794 * @return void
2795 */
2796 public static function render_hotspot_scene_select_field($name, $val)
2797 {
2798 extract($val);
2799 ob_start();
2800 ?>
2801
2802 <div class="hotspot-scene" style="display:none;" >
2803 <label for="hotspot-scene"><?= __($title .': ', 'wpvr'); ?></label>
2804 <select class="hotspotscene" name="<?= $name;?>">
2805 <option value="none" selected> None</option>
2806 </select>
2807 </div>
2808
2809 <?php
2810 ob_end_flush();
2811 }
2812
2813
2814 /**
2815 * Render Hotspot Scene List Select Field
2816 * @param mixed $name input field name
2817 * @param mixed $val options
2818 *
2819 * @return void
2820 */
2821 public static function render_hotspot_scene_list_field($name, $val)
2822 {
2823 extract($val);
2824 ob_start();
2825 ?>
2826
2827 <div class="hotspot-scene" style="display:<?= $display;?>;" >
2828 <label for="hotspot-scene"><?= __($title .': ', 'wpvr'); ?></label>
2829 <select class="hotspotscene" name="<?= $name;?>">
2830 <option value="none" selected> None</option>
2831 </select>
2832 </div>
2833
2834 <?php
2835 ob_end_flush();
2836 }
2837
2838
2839 /**
2840 * Render Hotspot Disabled Select Field
2841 * @param mixed $name input field name
2842 * @param mixed $val options
2843 *
2844 * @return void
2845 * @since 8.0.0
2846 */
2847 public static function render_hotspot_disabled_text_field($name, $val)
2848 {
2849 extract($val);
2850 ob_start();
2851 ?>
2852
2853 <div class="hotspot-scene" style="display:<?= $display;?>;" >
2854 <label for="hotspot-scene"><?= __($title .': ', 'wpvr'); ?></label>
2855 <input class="<?= $input_class;?>" type="text" value="<?= $value;?>" name="<?= $name;?>" disabled/>
2856 </div>
2857
2858 <?php
2859 ob_end_flush();
2860 }
2861
2862
2863 /**
2864 * Render Hotspot Custom Icon Field
2865 * @param mixed $name input field name
2866 * @param mixed $val options
2867 *
2868 * @return void
2869 * @since 8.0.0
2870 */
2871 public static function render_hotspot_custom_icon_field($name, $val)
2872 {
2873 extract($val);
2874 ob_start();
2875 ?>
2876
2877 <div class="hotspot-setting custom-icon">
2878 <label for="hotspot-customclass-pro"><?= __($title .': ', 'wpvr'); ?></label>
2879 <select class="hotspot-customclass-pro-select" name="<?= $name;?>">
2880 <?php
2881 foreach ($custom_icons as $cikey => $civalue) {
2882 if ($cikey == $hotspot_custom_class_pro) { ?>
2883 <option value="<?= $cikey ?>" selected> <?= $civalue ?></option>
2884 <?php } else { ?>
2885 <option value="<?= $cikey ?>"> <?= $civalue ?></option>
2886 <?php }
2887 }
2888 ?>
2889 </select>
2890 <span class="change-icon"><i class="<?= $hotspot_custom_class_pro ?>"></i></span>
2891 <div class="field-tooltip">
2892 <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2893 <span><?= __('Custom icons will only show on frontend. Hotspot custom icons only works with fontawesome 5. If you are using any different version of fontawesome under theme or any plugin, you may deactivate fontawesome from WP VR. Go to "Get Started menu" and select "Role" and check fontawesome disable switch. Now put your desired any icon class under "Hotspot custom icon class" field. It will appear on the frontend.', 'wpvr') ?></span>
2894 </div>
2895 </div>
2896
2897 <?php
2898 ob_end_flush();
2899 }
2900
2901
2902 /**
2903 * Render Hotspot Custom Icon Color Field
2904 * @param mixed $name input field name
2905 * @param mixed $val options
2906 *
2907 * @return void
2908 * @since 8.0.0
2909 */
2910 public static function render_hotspot_custom_icon_color_field($name, $val)
2911 {
2912 extract($val);
2913 ob_start();
2914 ?>
2915
2916 <div class="hotspot-setting hotspot-icon">
2917 <label for="hotspot-customclass-color"><?= __($title .': ', 'wpvr'); ?></label>
2918 <input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="<?= $value;?>" />
2919 <input type="hidden" class="hotspot-customclass-color-icon-value" name="<?= $name;?>" value="<?= $value;?>" />
2920 </div>
2921
2922 <?php
2923 ob_end_flush();
2924 }
2925 /**
2926 * Render Hotspot Custom Icon Color Field
2927 * @param mixed $name input field name
2928 * @param mixed $val options
2929 *
2930 * @return void
2931 * @since 8.0.0
2932 */
2933 public static function render_hotspot_wpvr_custom_icon_color_field($name, $val)
2934 {
2935 extract($val);
2936 ob_start();
2937 ?>
2938
2939 <div class="hotspot-setting hotspot-icon">
2940 <label for="hotspot-custom-color"><?= __($title .': ', 'wpvr'); ?></label>
2941 <input type="color" class="hotspot-custom-color" name="hotspot-customc-color" value="<?= $value;?>" />
2942 <input type="hidden" class="hotspot-custom-icon-color-value" name="<?= $name;?>" value="<?= $value;?>" />
2943 </div>
2944
2945 <?php
2946 ob_end_flush();
2947 }
2948
2949
2950 /**
2951 * Render Hotspot Animation Field
2952 * @param mixed $name input field name
2953 * @param mixed $val options
2954 *
2955 * @return void
2956 * @since 8.0.0
2957 */
2958 public static function render_hotspot_animation_field($name, $val)
2959 {
2960 extract($val);
2961 ob_start();
2962 ?>
2963
2964 <div class="hotspot-setting">
2965 <label for="hotspot-blink"><?= __($title .': ', 'wpvr'); ?></label>
2966 <select name="<?= $name;?>" class="hotspot-blink" >
2967 <option value="on" <?php if($selected == 'on') { echo 'selected'; } ?> > On</option>
2968 <option value="off" <?php if($selected == 'off') { echo 'selected'; } ?> > Off</option>
2969 </select>
2970 </div>
2971
2972 <?php
2973 ob_end_flush();
2974 }
2975
2976 /**
2977 * Render Hotspot Animation Field
2978 * @param mixed $name input field name
2979 * @param mixed $val options
2980 *
2981 * @return void
2982 * @since 8.0.0
2983 */
2984 public static function render_hotspot_border_field($name, $val)
2985 {
2986 extract($val);
2987 ob_start();
2988 ?>
2989
2990 <div class="hotspot-setting">
2991 <label for="hotspot-border"><?= __($title .': ', 'wpvr'); ?></label>
2992 <select name="<?= $name;?>" class="hotspot-border" >
2993 <option value="on" <?php if($selected == 'on') { echo 'selected'; } ?> > On</option>
2994 <option value="off" <?php if($selected == 'off') { echo 'selected'; } ?> > Off</option>
2995 </select>
2996 </div>
2997
2998 <?php
2999 ob_end_flush();
3000 }
3001 /**
3002 * Render Hotspot Animation Field
3003 * @param mixed $name input field name
3004 * @param mixed $val options
3005 *
3006 * @return void
3007 * @since 8.0.0
3008 */
3009 public static function render_hotspot_border_style_field($name, $val)
3010 {
3011 extract($val);
3012 ob_start();
3013 ?>
3014
3015 <div class='hotspot-border-style' >
3016 <label for="<?= $name; ?>"><?= __($title .': ', 'wpvr'); ?></label>
3017 <select name="<?= $name; ?>">
3018 <option value="none" <?= !$selected ? 'selected' : ''; ?>>None</option>
3019 <option value="hidden" <?= $selected == 'hidden' ? 'selected' : ''; ?>>Hidden</option>
3020 <option value="dotted" <?= $selected == 'dotted' ? 'selected' : ''; ?>>Dotted</option>
3021 <option value="dashed" <?= $selected == 'dashed' ? 'selected' : ''; ?>>Dashed</option>
3022 <option value="solid" <?= $selected == 'solid' ? 'selected' : ''; ?>>Solid</option>
3023 <option value="double" <?= $selected == 'double' ? 'selected' : ''; ?>>Double</option>
3024 <option value="groove" <?= $selected == 'groove' ? 'selected' : ''; ?>>Groove</option>
3025 <option value="ridge" <?= $selected == 'ridge' ? 'selected' : ''; ?>>Ridge</option>
3026 <option value="inset" <?= $selected == 'inset' ? 'selected' : ''; ?>>Inset</option>
3027 <option value="outset" <?= $selected == 'outset' ? 'selected' : ''; ?>>Outset</option>
3028 </select>
3029 </div>
3030
3031 <?php
3032 ob_end_flush();
3033 }
3034
3035 public static function render_hotspot_border_color_field($name, $val)
3036 {
3037 extract($val);
3038 ob_start();
3039 ?>
3040 <div class='hotspot-border-color'>
3041 <label for="hotspot-border-color"><?= __($title .': ', 'wpvr'); ?></label>
3042 <input type="color" class="hotspot-border-color-for-view" name="hotspot-border-color-for-view" value="<?= $value;?>" />
3043 <input type="hidden" class="hotspot-border-color" name="<?= $name;?>" value="<?= $value;?>" />
3044 </div>
3045 </div>
3046 <?php
3047 ob_end_flush();
3048 }
3049
3050 public static function render_hotspot_border_width_field($name, $val)
3051 {
3052 extract($val);
3053 ob_start();
3054 ?>
3055 <div class="hotspot-setting hotspot-border-setting" style='<?php echo $hotspot_border_data == 'off' ? 'display:none': '' ?>'>
3056 <div class='hotspot-setting-border-width'>
3057 <label for="hotspot-border-width"><?= __($title .': ', 'wpvr'); ?></label>
3058 <input type="text" class="hotspot-border-width" name="hotspot-border-width" value="<?= $value;?>" />
3059 </div>
3060
3061
3062 <?php
3063 ob_end_flush();
3064 }
3065
3066 /**
3067 * Render Hotspot Animation Field
3068 * @param mixed $name input field name
3069 * @param mixed $val options
3070 *
3071 * @return void
3072 * @since 8.0.0
3073 */
3074 public static function render_hotspot_shape_field($name, $val)
3075 {
3076 extract($val);
3077 ob_start();
3078 ?>
3079
3080 <div class="hotspot-setting">
3081 <label for="hotspot-shape"><?= __($title .': ', 'wpvr'); ?></label>
3082 <select name="<?= $name;?>" class="hotspot-shape" >
3083 <option value="round" <?php if($selected == 'round') { echo 'selected'; } ?> > Rounded</option>
3084 <option value="square" <?php if($selected == 'square') { echo 'selected'; } ?> > Square</option>
3085 <option value="hexagon" <?php if($selected == 'hexagon') { echo 'selected'; } ?> > Hexagon</option>
3086 </select>
3087 </div>
3088
3089 <?php
3090 ob_end_flush();
3091 }
3092
3093 /**
3094 * Render Fluent form Field
3095 * @param mixed $name input field name
3096 * @param mixed $val options
3097 *
3098 * @return void
3099 * @since 8.0.0
3100 */
3101 public static function render_hotspot_fluent_form_type_field($name , $val){
3102 extract($val);
3103 $default_type = apply_filters('wpvr_hotspot_types', array(
3104 'info' => __('Info', 'wpvr-pro'),
3105 'scene' => __('Scene', 'wpvr-pro'),
3106 ));
3107 ob_start();
3108 ?>
3109
3110 <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
3111 <select name="<?= $name;?>">
3112 <?php
3113 $hotspot_type = 'fluent_form';
3114 foreach ($default_type as $key => $value) {
3115 echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
3116 } ?>
3117 </select>
3118
3119 <?php
3120 ob_end_flush();
3121 }
3122
3123 /**
3124 * Render Hotspot Fluent form id
3125 * @param mixed $name input field name
3126 * @param mixed $val options
3127 *
3128 * @return void
3129 * @since 8.0.0
3130 */
3131 public static function render_hotspot_fluent_form_select_field($name , $val){
3132 extract($val);
3133 do_action("hotspot_info_before_hover_content","fluent_form",$value);
3134 }
3135 /**
3136 * Render woocommerce Field
3137 * @param mixed $name input field name
3138 * @param mixed $val options
3139 *
3140 * @return void
3141 * @since 8.0.0
3142 */
3143 public static function render_hotspot_wc_product_type_field($name , $val){
3144 extract($val);
3145 $default_type = apply_filters('wpvr_hotspot_types', array(
3146 'info' => __('Info', 'wpvr-pro'),
3147 'scene' => __('Scene', 'wpvr-pro'),
3148 ));
3149 ob_start();
3150 ?>
3151
3152 <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
3153 <select name="<?= $name;?>">
3154 <?php
3155 $hotspot_type = 'wc_product';
3156 foreach ($default_type as $key => $value) {
3157 echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
3158 } ?>
3159 </select>
3160
3161 <?php
3162 ob_end_flush();
3163 }
3164
3165 /**
3166 * Render Hotspot Woocommerce Product
3167 * @param mixed $name input field name
3168 * @param mixed $val options
3169 *
3170 * @return void
3171 * @since 8.0.0
3172 */
3173 public static function render_hotspot_wc_product_select_field($name , $val){
3174 extract($val);
3175 do_action("hotspot_info_before_hover_content","wc_product",$value);
3176 }
3177
3178 public static function render_call_to_form_checkbox($name, $val)
3179 {
3180 extract( $val );
3181 ob_start();
3182 ?>
3183 <div class="<?= $class; ?>">
3184 <span><?= __($title.': ', 'wpvr'); ?></span>
3185
3186 <span class="wpvr-switcher">
3187 <input id="<?= $id;?>" class="vr-switcher-check" name="<?= $name; ?>" type="checkbox" value="<?= $val['checked']; ?>" <?php echo $val['checked']=='on'? 'checked' : '' ?> />
3188 <label for="<?= $id;?>"></label>
3189 </span>
3190
3191 <?php if($have_tooltip) {?>
3192 <div class="field-tooltip">
3193 <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
3194 <span><?= __($tooltip_text, 'wpvr'); ?></span>
3195 </div>
3196 <?php } ?>
3197 </div>
3198 <?php
3199 ob_end_flush();
3200 }
3201
3202 public static function render_text_area_field($name, $val)
3203 {
3204 extract( $val );
3205 ob_start();
3206 ?>
3207 <div class="<?= $class; ?>">
3208 <div id="<?= $code_mirror_id ?>" ></div>
3209 <!-- --><?php //if($have_tooltip) {?>
3210 <!-- <div class="field-tooltip">-->
3211 <!-- <img src="--><?php //= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'; ?><!--" alt="icon" />-->
3212 <!-- <span>--><?php //= __($tooltip_text, 'wpvr'); ?><!--</span>-->
3213 <!-- </div>-->
3214 <!-- --><?php //} ?>
3215 </div>
3216 <style>
3217 /* Adjust the styling of line numbers */
3218 .CodeMirror-linenumber {
3219 padding: 0 5px; /* Adjust padding as needed */
3220 color: #999; /* Adjust color as needed */
3221 }
3222
3223 </style>
3224 <?php
3225 ob_end_flush();
3226 }
3227
3228
3229 public static function render_custom_css_form_checkbox($name, $val)
3230 {
3231 extract( $val );
3232 ob_start();
3233 ?>
3234 <div class="<?= $class; ?>">
3235 <span><?= __($title.': ', 'wpvr'); ?></span>
3236
3237 <span class="wpvr-switcher">
3238 <input id="<?= $id;?>" class="vr-switcher-check" name="<?= $name; ?>" type="checkbox" value="<?= $val['checked']; ?>" <?php echo $val['checked']=='on'? 'checked' : '' ?> />
3239 <label for="<?= $id;?>"></label>
3240 </span>
3241
3242 <?php if($have_tooltip) {?>
3243 <div class="field-tooltip">
3244 <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
3245 <span><?= __($tooltip_text, 'wpvr'); ?></span>
3246 </div>
3247 <?php } ?>
3248 </div>
3249 <?php
3250 ob_end_flush();
3251 }
3252
3253 public static function render_button_configuration_field($name, $val)
3254 {
3255 extract( $val );
3256 ob_start();
3257 $button_style =$val['value'];
3258 $selectedBgColor = isset($button_style['button_background_color']) ? $button_style['button_background_color'] : '#201cfe';
3259 $selectedColor = isset($button_style['button_font_color']) ? $button_style['button_font_color'] : '#ffffff';
3260 $selectedFontSize = isset($button_style['button_font_size']) ? $button_style['button_font_size'] : 14;
3261 $selectedFontWeight = isset($button_style['button_font_weight']) ? $button_style['button_font_weight'] : 400;
3262 $selectedLineHeight = isset($button_style['button_line_height']) ? $button_style['button_line_height'] : 1;
3263 $selectedTextDecoration = isset($button_style['button_text_decoration']) ? $button_style['button_text_decoration'] : 'none';
3264 $selectedTransform = isset($button_style['button_transform']) ? $button_style['button_transform'] : 'none';
3265 $selectedAlignment = isset($button_style['button_alignment']) ? $button_style['button_alignment'] : 'left';
3266 $selectedFontStyle = isset($button_style['button_text_style']) ? $button_style['button_text_style'] : 'normal';
3267 $selectedLetterSpacing = isset($button_style['button_letter_spacing']) ? $button_style['button_letter_spacing'] : 1;
3268 $selectedWordSpacing = isset($button_style['button_word_spacing']) ? $button_style['button_word_spacing'] : 0;
3269 $selectedBorderWidth = isset($button_style['button_border_width']) ? $button_style['button_border_width'] : 1;
3270 $selectedBorderStyle = isset($button_style['button_border_style']) ? $button_style['button_border_style'] : 'solid';
3271 $selectedBorderColor = isset($button_style['button_border_style']) ? $button_style['button_border_color'] : '#201cfe';
3272 $selectedBorderRadius = isset($button_style['button_border_radius']) ? $button_style['button_border_radius'] : 6;
3273
3274 $selectedPaddingTop = isset($button_style['button_pt']) ? $button_style['button_pt'] : 10;
3275 $selectedPaddingRight = isset($button_style['button_pr']) ? $button_style['button_pr'] : 15;
3276 $selectedPaddingBottom = isset($button_style['button_pb']) ? $button_style['button_pb'] : 10;
3277 $selectedPaddingLeft = isset($button_style['button_pl']) ? $button_style['button_pl'] : 15;
3278
3279 $selectedNewTab = isset($button_style['button_open_new_tab']) ? $button_style['button_open_new_tab'] : 'off';
3280 ?>
3281 <div class="<?= $class; ?>">
3282
3283 <span>Button Style</span>
3284 <div class="button-style-configaration">
3285 <div class="single-cta-control new-tab">
3286 <span class="wpvr-switcher">
3287 <span class="control-title"><?php echo __('Open in new tab','wpvr') ?></span>
3288 <input id="button_open_new_tab" class="vr-switcher-check" name="button_open_new_tab" type="checkbox" value="<?php echo $selectedNewTab ; ?>" <?php echo $selectedNewTab == 'on' ? 'checked' : '' ?> />
3289 <label for="button_open_new_tab"></label>
3290 </span>
3291 </div>
3292
3293 <div class="single-cta-control bg-color color-box">
3294 <label class="control-title"><?php echo __('Background Color','wpvr') ?></label>
3295 <input type="color" name="button_background_color" value="<?php echo $selectedBgColor; ?>">
3296 </div>
3297
3298 <div class="single-cta-control font-color color-box">
3299 <label class="control-title"><?php echo __('Font color','wpvr') ?></label>
3300 <input type="color" name="button_font_color" value="<?php echo $selectedColor; ?>">
3301 </div>
3302
3303 <div class="single-cta-control font-size">
3304 <label class="control-title"><?php echo __('Font Size (px)','wpvr') ?></label>
3305 <input type="number" name="button_font_size" value="<?php echo $selectedFontSize; ?>" min="0">
3306 </div>
3307
3308 <div class="single-cta-control font-weight">
3309 <label class="control-title"><?php echo __('Font Weight','wpvr') ?></label>
3310 <select name="button_font_weight" id="button_font_weight">
3311 <option value="400" <?php echo ($selectedFontWeight == '400') ? 'selected' : ''; ?>>400</option>
3312 <option value="500" <?php echo ($selectedFontWeight == '500') ? 'selected' : ''; ?>>500</option>
3313 <option value="600" <?php echo ($selectedFontWeight == '600') ? 'selected' : ''; ?>>600</option>
3314 <option value="700" <?php echo ($selectedFontWeight == '700') ? 'selected' : ''; ?>>700</option>
3315 <option value="800" <?php echo ($selectedFontWeight == '800') ? 'selected' : ''; ?>>800</option>
3316 <option value="900" <?php echo ($selectedFontWeight == '900') ? 'selected' : ''; ?>>900</option>
3317 </select>
3318 </div>
3319
3320 <div class="single-cta-control line-height">
3321 <label class="control-title"><?php echo __('Line Height','wpvr') ?></label>
3322 <input type="number" name="button_line_height" value="<?php echo $selectedLineHeight; ?>" min="0">
3323 </div>
3324
3325 <div class="single-cta-control text-decoration">
3326 <label class="control-title"><?php echo __('Text Decoration','wpvr') ?></label>
3327 <select name="button_text_decoration" id="button_text_decoration">
3328 <option value="none" <?php echo ($selectedTextDecoration == 'none') ? 'selected' : ''; ?>><?php echo __('None','wpvr') ?></option>
3329 <option value="underline" <?php echo ($selectedTextDecoration == 'underline') ? 'selected' : ''; ?>> <?php echo __('Underline','wpvr') ?></option>
3330 <option value="overline" <?php echo ($selectedTextDecoration == 'overline') ? 'selected' : ''; ?>><?php echo __('Overline','wpvr') ?></option>
3331 <option value="line-through" <?php echo ($selectedTextDecoration == 'line-through') ? 'selected' : ''; ?>><?php echo __('Line Through','wpvr') ?></option>
3332 </select>
3333 </div>
3334
3335 <div class="single-cta-control text-transform">
3336 <label class="control-title"><?php echo __('Text Transform','wpvr') ?></label>
3337 <select name="button_transform" id="button_transform">
3338 <option value="none" <?php echo ($selectedTransform == 'none') ? 'selected' : ''; ?>><?php echo __('None','wpvr') ?></option>
3339 <option value="uppercase" <?php echo ($selectedTransform == 'uppercase') ? 'selected' : ''; ?>><?php echo __('Uppercase','wpvr') ?></option>
3340 <option value="lowercase" <?php echo ($selectedTransform == 'lowercase') ? 'selected' : ''; ?>><?php echo __('Lowercase','wpvr') ?></option>
3341 <option value="capitalize" <?php echo ($selectedTransform == 'capitalize') ? 'selected' : ''; ?>><?php echo __('Capitalize','wpvr') ?></option>
3342 </select>
3343 </div>
3344
3345 <div class="single-cta-control text-align">
3346 <label class="control-title"> <?php echo __('Button Alignment','wpvr') ?></label>
3347 <select name="button_alignment" id="button_alignment">
3348 <option value="left" <?php echo ($selectedAlignment == 'left') ? 'selected' : ''; ?>> <?php echo __('Left','wpvr') ?></option>
3349 <option value="right" <?php echo ($selectedAlignment == 'right') ? 'selected' : ''; ?>> <?php echo __('Right','wpvr') ?></option>
3350 <option value="center" <?php echo ($selectedAlignment == 'center') ? 'selected' : ''; ?>> <?php echo __('Center','wpvr') ?></option>
3351 <option value="justified" <?php echo ($selectedAlignment == 'justified') ? 'selected' : ''; ?>> <?php echo __('Justified','wpvr') ?></option>
3352 </select>
3353 </div>
3354
3355 <div class="single-cta-control font-style">
3356 <label class="control-title"> <?php echo __('Font Style','wpvr') ?></label>
3357 <select name="button_text_style" id="button_text_style">
3358 <option value="normal" <?php echo ($selectedFontStyle == 'normal') ? 'selected' : ''; ?>> <?php echo __('Normal','wpvr') ?></option>
3359 <option value="italic" <?php echo ($selectedFontStyle == 'italic') ? 'selected' : ''; ?>> <?php echo __('Italic','wpvr') ?></option>
3360 <option value="oblique" <?php echo ($selectedFontStyle == 'oblique') ? 'selected' : ''; ?>> <?php echo __('Oblique','wpvr') ?></option>
3361 </select>
3362 </div>
3363
3364 <div class="single-cta-control letter-spacing">
3365 <label class="control-title"> <?php echo __('Letter Spacing (px)','wpvr') ?></label>
3366 <input type="number" name="button_letter_spacing" value="<?php echo $selectedLetterSpacing; ?>" min="0">
3367 </div>
3368
3369 <div class="single-cta-control word-spacing">
3370 <label class="control-title"> <?php echo __('Word Spacing (px)','wpvr') ?></label>
3371 <input type="number" name="button_word_spacing" value="<?php echo $selectedWordSpacing; ?>" min="0">
3372 </div>
3373
3374 <div class="single-cta-control border-radius">
3375 <label class="control-title"> <?php echo __('Border Radius (px)','wpvr') ?></label>
3376 <input type="number" name="button_border_radius" value="<?php echo $selectedBorderRadius; ?>" min="0">
3377 </div>
3378
3379 <div class="single-cta-control control-group border">
3380 <label class="control-title"> <?php echo __('Border','wpvr') ?></label>
3381
3382 <div class="border-property border-width">
3383 <label class="control-inner-title"> <?php echo __('Width (px)','wpvr') ?></label>
3384 <input type="number" name="button_border_width" value="<?php echo $selectedBorderWidth; ?>" min="0">
3385 </div>
3386
3387 <div class="border-property border-style">
3388 <label class="control-inner-title"> <?php echo __('Style','wpvr') ?></label>
3389 <select name="button_border_style" id="button_border_style">
3390 <option value="solid" <?php echo ($selectedBorderStyle == 'solid') ? 'selected' : ''; ?>> <?php echo __('','wpvr') ?>Solid</option>
3391 <option value="dashed" <?php echo ($selectedBorderStyle == 'dashed') ? 'selected' : ''; ?>> <?php echo __('','wpvr') ?>Dashed</option>
3392 <option value="dotted" <?php echo ($selectedBorderStyle == 'dotted') ? 'selected' : ''; ?>> <?php echo __('','wpvr') ?>Dotted</option>
3393 <option value="double" <?php echo ($selectedBorderStyle == 'double') ? 'selected' : ''; ?>> <?php echo __('','wpvr') ?>Double</option>
3394 <option value="none" <?php echo ($selectedBorderStyle == 'none') ? 'selected' : ''; ?>> <?php echo __('','wpvr') ?>None</option>
3395 </select>
3396 </div>
3397
3398 <div class="border-property border-color color-box">
3399 <label class="control-inner-title"> <?php echo __('Color','wpvr') ?></label>
3400 <input type="color" name="button_border_color" value="<?php echo $selectedBorderColor; ?>">
3401 </div>
3402 </div>
3403
3404 <div class="single-cta-control control-group padding">
3405 <label class="control-title"> <?php echo __('Padding (px)','wpvr') ?></label>
3406
3407 <div class="padding-property padding-top">
3408 <label class="control-inner-title"> <?php echo __('Top','wpvr') ?></label>
3409 <input type="number" name="button_pt" value="<?php echo $selectedPaddingTop; ?>" min="0">
3410 </div>
3411
3412 <div class="padding-property padding-right">
3413 <label class="control-inner-title"> <?php echo __('Right','wpvr') ?></label>
3414 <input type="number" name="button_pr" value="<?php echo $selectedPaddingRight; ?>">
3415 </div>
3416
3417 <div class="padding-property padding-bottom">
3418 <label class="control-inner-title"> <?php echo __('Bottom','wpvr') ?></label>
3419 <input type="number" name="button_pb" value="<?php echo $selectedPaddingBottom; ?>">
3420 </div>
3421
3422 <div class="padding-property padding-left">
3423 <label class="control-inner-title"> <?php echo __('Left','wpvr') ?></label>
3424 <input type="number" name="button_pl" value="<?php echo $selectedPaddingLeft; ?>">
3425 </div>
3426 </div>
3427
3428 </div>
3429 </div>
3430 <?php
3431 ob_end_flush();
3432 }
3433
3434
3435
3436 /**
3437 * Render background music field on Advanced Controls section
3438 *
3439 * @param mixed $name
3440 * @param mixed $val
3441 *
3442 * @return void
3443 * @since 8.0.0
3444 */
3445 public static function render_vrscene_navigation_option_field($name, $val)
3446 {
3447 extract($val);
3448 ob_start();
3449 ?>
3450 <div class="wpvr-scene-navigation-content" style="display:none">
3451 <?php
3452 foreach($inner_fields as $name => $val) {
3453 self::{ 'render_' . $val['type'] . '_field' }( $name, $val );
3454 }
3455 ?>
3456 </div>
3457 <?php
3458 ob_end_flush();
3459 }
3460
3461
3462 /**
3463 * Render checkbox for advanced control pro version meta fields
3464 *
3465 * @param mixed $name
3466 * @param mixed $val
3467 *
3468 * @return void
3469 * @since 8.0.0
3470 */
3471 public static function render_pro_radio_field($name, $val)
3472 {
3473 extract($val);
3474 ob_start();
3475 ?>
3476 <div class="<?= $class; ?>">
3477 <span><?= __($title .': ', 'wpvr'); ?></span>
3478
3479 <span class="wpvr-switcher">
3480 <input id="<?= $id; ?>" class="vr-switcher-radio" value="<?= $value?>" name="vr_scene_navigation_content_type" type="radio" <?php echo $checked ?> />
3481 </span>
3482 <?php if($have_tooltip) { ?>
3483 <div class="field-tooltip">
3484 <img loading="lazy" src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
3485 <span><?= __($tooltip_text, 'wpvr'); ?></span>
3486 </div>
3487 <?php } ?>
3488 </div>
3489 <?php
3490 ob_end_flush();
3491 }
3492
3493
3494 /**
3495 * Render Hotspot Scene Select Field
3496 * @param mixed $name input field name
3497 * @param mixed $val options
3498 *
3499 * @return void
3500 */
3501 public static function render_animation_name_select($name, $val)
3502 {
3503 extract($val);
3504 ob_start();
3505 $default_type = apply_filters('wpvr_scene_animation', array(
3506 'none' => __('None', 'wpvr-pro'),
3507 'circle_crop' => __('Circle Crop', 'wpvr-pro'),
3508
3509 'zoom_in' => __('Zoom In', 'wpvr-pro'),
3510 'zoom_in_up' => __('Zoom In Up', 'wpvr-pro'),
3511 'zoom_in_down' => __('Zoom In Down', 'wpvr-pro'),
3512 'zoom_in_left' => __('Zoom In Left', 'wpvr-pro'),
3513 'zoom_in_right' => __('Zoom In Right', 'wpvr-pro'),
3514
3515 'slide_in_up' => __('Slide In Up', 'wpvr-pro'),
3516 'slide_in_down' => __('Slide In Down', 'wpvr-pro'),
3517 'slide_in_left' => __('Slide In Left', 'wpvr-pro'),
3518 'slide_in_right' => __('Slide In Right', 'wpvr-pro'),
3519
3520 'fade_blur' => __('Fade With Blur', 'wpvr-pro'),
3521 'fade_in' => __('Fade In', 'wpvr-pro'),
3522 'fade_in_up' => __('Fade In Up', 'wpvr-pro'),
3523 'fade_in_down' => __('Fade In Down', 'wpvr-pro'),
3524 'fade_in_left' => __('Fade In Left', 'wpvr-pro'),
3525 'fade_in_right' => __('Fade In Right', 'wpvr-pro'),
3526 'fade_in_top_left' => __('Fade In Top Left', 'wpvr-pro'),
3527 'fade_in_top_right' => __('Fade In Top Right', 'wpvr-pro'),
3528 'fade_in_bottom_left' => __('Fade In Bottom Left', 'wpvr-pro'),
3529 'fade_in_bottom_right' => __('Fade In Bottom Right', 'wpvr-pro'),
3530
3531 'back_in_left' => __('Back In Left', 'wpvr-pro'),
3532 'back_in_right' => __('Back In Right', 'wpvr-pro'),
3533 'back_in_up' => __('Back In Up', 'wpvr-pro'),
3534 'back_in_down' => __('Back In Down', 'wpvr-pro'),
3535
3536 'bounce_in' => __('Bounce In', 'wpvr-pro'),
3537 'bounce_in_up' => __('Bounce In Up', 'wpvr-pro'),
3538 'bounce_in_down' => __('Bounce In Down', 'wpvr-pro'),
3539 'bounce_in_left' => __('Bounce In Left', 'wpvr-pro'),
3540 'bounce_in_right' => __('Bounce In Right', 'wpvr-pro'),
3541
3542 'flip' => __('Flip', 'wpvr-pro'),
3543 'flip_x' => __('Flip X', 'wpvr-pro'),
3544 'flip_y' => __('Flip Y', 'wpvr-pro'),
3545
3546 'light_speed_in_left' => __('Light Speed In Left', 'wpvr-pro'),
3547 'light_speed_in_right' => __('Light Speed In Right', 'wpvr-pro'),
3548
3549 'rotate_in' => __('Rotate In', 'wpvr-pro'),
3550 'rotate_in_up_left' => __('Rotate In Up Left', 'wpvr-pro'),
3551 'rotate_in_up_right' => __('Rotate In Up Right', 'wpvr-pro'),
3552 'rotate_in_down_left' => __('Rotate In Down Left', 'wpvr-pro'),
3553 'rotate_in_down_right' => __('Rotate In Down Right', 'wpvr-pro'),
3554
3555 ));
3556
3557 ?>
3558
3559 <div class="scene-animation-settings-wrapper" style="display:none;" >
3560 <div class='single-settings'>
3561
3562 <span for="scene-animation-name"><?= __($title .': ', 'wpvr'); ?></span>
3563 <select class='scene-animation-name' name="<?= $name;?>">
3564 <?php
3565 foreach ($default_type as $key => $type) {
3566 echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $value, true), esc_attr($key), esc_attr($type));
3567 } ?>
3568 </select>
3569 </div>
3570 </div>
3571
3572 <?php
3573 ob_end_flush();
3574 }
3575
3576 }