WP VR – 360 Panorama and virtual tour creator for WordPress - Version 2.2.0

Version Description

  • Scene title and author tag support.
  • Elementor widget support.

=

Download this release

Release Info

Developer rextheme
Plugin Icon 128x128 WP VR – 360 Panorama and virtual tour creator for WordPress
Version 2.2.0
Comparing to
See all releases

Code changes from version 2.1.1 to 2.2.0

README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-fo
4
  Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
5
  Requires at least: 4.0
6
  Tested up to: 5.1
7
- Stable tag: 2.1.1
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -24,6 +24,18 @@ With the WPVR, set up a virtual tour for site visitors where they can navigate a
24
 
25
  >Panorama Compass and Customized Hotspot Icon with Dynamic Color support on Premium version.
26
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  **Easy and simple interface** 
29
  Simple, easy and straight forward options to add your panorama images and create a tour.
@@ -44,7 +56,6 @@ For Gutenberg block editor, you will find a block type “WPVR” under the comm
44
  = Free Version =
45
  * Responsive default design
46
  * Preview tour on back-end
47
- * Default Zoom Control
48
  * Option to set scene fade animation duration
49
  * Customization freedom of hotspot contents
50
  * Supports Equiretangular Panaromic Image type
@@ -64,18 +75,23 @@ For Gutenberg block editor, you will find a block type “WPVR” under the comm
64
  * Unlimited hotspots
65
  * Customized premium icons
66
  * Color picker for hotspot custom icons background.
67
- * Custom panorama compass support.
 
 
 
 
 
 
68
  * Personalized support on both support forum and our support e-mail.
69
 
70
-
71
  **Upcoming Features**
72
  - Panoramic image type support: Cubemap, Multiresolution
73
- - Target scene angle of view.
74
- - Target scene default zoom level.
75
- - Horizontal and vertical grab control.
76
  - On screen control button.
77
 
78
 
 
 
79
  == Frequently Asked Questions ==
80
  = 1. Why should I use WPVR? =
81
  You can easily create a Virtual Tour for your place using WPVR. You simply need to provide a 360 degree panoramic photo, and this plugin will create a virtual tour which visitors can navigate easily. You can further add hotspots to include information or add more scenes to navigate to.
@@ -93,18 +109,14 @@ Yes, you can include image source or video embed link on the section On Click Co
93
  Yes. You can create a custom class on your theme, stating whatever style you want. Then you can input the class name on the Hotspot Custom Class section in a hotspot, and the content displayed will be customized according to the style you set.
94
 
95
  = 6. How can I embed a virtual tour using Gutenberg Block Editor?? =
96
- Under common blocks, you will find a block called WPVR. Add WPVR block. Select the block and on the dynamic toolbar on the right, you will get the options to add ID, Height and Width. Collect the ID from the shortcode generated when you published a tour. Assign height and width according to your convenience.
97
 
98
  = 7. What do I do if I get “THE FILE (image link) COULD NOT BE ACCESSED” error? =
99
  Sometimes when you add a tour on your site, you might face this issue that rather than loading the tour it will give the error “THE FILE (…) COULD NOT BE ACCESSED.”
100
 
101
  This error shows up when you are running a website under “HTTPS” (secured with SSL certificate) whereas your image link is under “HTTP” (unsecured).
102
 
103
- To solve this issue, go to your WordPress Dashboard > Settings > General. Here make sure you have “https” added to both “WordPress Address (URL)” and “Site Address (URL)”. That’s it. Your virtual tour will load with no issues.
104
-
105
-
106
-
107
- **[Documentation](https://rextheme.com/docs/wp-vr/)** 
108
 
109
 
110
 
@@ -141,6 +153,14 @@ To solve this issue, go to your WordPress Dashboard > Settings > General. Here m
141
  * Dynamic Font-Awesome icon added for hotspot.
142
  * Dynamic color picker added for hotspot color.
143
  * Custom panorama compass support.
 
 
 
 
 
 
 
 
144
 
145
  == Upgrade Notice ==
146
  Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.  
4
  Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour
5
  Requires at least: 4.0
6
  Tested up to: 5.1
7
+ Stable tag: 2.2.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
24
 
25
  >Panorama Compass and Customized Hotspot Icon with Dynamic Color support on Premium version.
26
 
27
+ >Default zoom level support on Premium version.
28
+
29
+ >Maximum and minimum zoom range support on Premium version.
30
+
31
+ >Customize each scene's default face on load for Premium version.
32
+
33
+ >Scene grab control and custom boundary for each scene on Premium version.
34
+
35
+ >Scene title and author tag support on Premium version.
36
+
37
+ >Elementor widget support for premium version.
38
+
39
 
40
  **Easy and simple interface** 
41
  Simple, easy and straight forward options to add your panorama images and create a tour.
56
  = Free Version =
57
  * Responsive default design
58
  * Preview tour on back-end
 
59
  * Option to set scene fade animation duration
60
  * Customization freedom of hotspot contents
61
  * Supports Equiretangular Panaromic Image type
75
  * Unlimited hotspots
76
  * Customized premium icons
77
  * Color picker for hotspot custom icons background.
78
+ * Custom panorama compass support
79
+ * Default zoom level
80
+ * Maximum and minimum zoom range
81
+ * Customize each scene's default face on load
82
+ * Scene grab control and custom boundary for each scene
83
+ * Scene title and author tag support
84
+ * Elementor widget support
85
  * Personalized support on both support forum and our support e-mail.
86
 
 
87
  **Upcoming Features**
88
  - Panoramic image type support: Cubemap, Multiresolution
89
+ - Google cardboard support
 
 
90
  - On screen control button.
91
 
92
 
93
+ **[Documentation](https://rextheme.com/docs/wp-vr/)**
94
+
95
  == Frequently Asked Questions ==
96
  = 1. Why should I use WPVR? =
97
  You can easily create a Virtual Tour for your place using WPVR. You simply need to provide a 360 degree panoramic photo, and this plugin will create a virtual tour which visitors can navigate easily. You can further add hotspots to include information or add more scenes to navigate to.
109
  Yes. You can create a custom class on your theme, stating whatever style you want. Then you can input the class name on the Hotspot Custom Class section in a hotspot, and the content displayed will be customized according to the style you set.
110
 
111
  = 6. How can I embed a virtual tour using Gutenberg Block Editor?? =
112
+ Under common blocks, you will find a block called WPVR. Add WPVR block. Select the block and on the dynamic toolbar on the right, you will get the options to add ID, Height and Width. Collect the ID from the virtual tour you created. Assign height and width according to your convenience.
113
 
114
  = 7. What do I do if I get “THE FILE (image link) COULD NOT BE ACCESSED” error? =
115
  Sometimes when you add a tour on your site, you might face this issue that rather than loading the tour it will give the error “THE FILE (…) COULD NOT BE ACCESSED.”
116
 
117
  This error shows up when you are running a website under “HTTPS” (secured with SSL certificate) whereas your image link is under “HTTP” (unsecured).
118
 
119
+ To solve this issue, go to your WordPress Dashboard > Settings > General. Here make sure you have “https” added to both “WordPress Address (URL)” and “Site Address (URL)”. That’s it. Your virtual tour will load with no issues. 
 
 
 
 
120
 
121
 
122
 
153
  * Dynamic Font-Awesome icon added for hotspot.
154
  * Dynamic color picker added for hotspot color.
155
  * Custom panorama compass support.
156
+ * Default zoom level.
157
+ * Maximum and minimum zoom range.
158
+ * Customize each scene's default face on load.
159
+ * Scene grab control and custom boundary for each scene.
160
+
161
+ = 2.2.0 =
162
+ * Scene title and author tag support.
163
+ * Elementor widget support.
164
 
165
  == Upgrade Notice ==
166
  Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.  
admin/class-wpvr-admin-pages.php CHANGED
@@ -24,9 +24,6 @@ class Wpvr_Admin_Pages {
24
  add_submenu_page( 'wpvr', 'Wpvr', 'Tours','manage_options', 'edit.php?post_type=wpvr_item', NULL);
25
 
26
  add_submenu_page( 'wpvr', 'Wpvr', 'Add New Tour','manage_options', 'post-new.php?post_type=wpvr_item', NULL);
27
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
28
- add_submenu_page( 'wpvr', 'wpvrpro', 'WPVR License','manage_options', 'wpvrpro', array( $this, 'wpvr_pro_admin_doc'));
29
- }
30
 
31
  }
32
 
24
  add_submenu_page( 'wpvr', 'Wpvr', 'Tours','manage_options', 'edit.php?post_type=wpvr_item', NULL);
25
 
26
  add_submenu_page( 'wpvr', 'Wpvr', 'Add New Tour','manage_options', 'post-new.php?post_type=wpvr_item', NULL);
 
 
 
27
 
28
  }
29
 
admin/class-wpvr-admin.php CHANGED
@@ -79,7 +79,7 @@ class Wpvr_Admin {
79
  * between the defined hooks and the functions defined in this
80
  * class.
81
  */
82
- // wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), $this->version, 'all' );
83
  wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
84
  wp_enqueue_style( 'materialize-icons', 'https://fonts.googleapis.com/icon?family=Material+Icons', array(), $this->version, 'all' );
85
 
@@ -121,7 +121,6 @@ class Wpvr_Admin {
121
 
122
  wp_enqueue_media();
123
  if ($adscreen->id=="wpvr_item") {
124
- // wp_enqueue_script('icon-picker-jquery', plugin_dir_url( __FILE__ ) . 'lib/jquery-1.7.1.min.js', array(), true);
125
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
126
  }
127
  wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
@@ -135,7 +134,6 @@ class Wpvr_Admin {
135
  }
136
  wp_enqueue_script( 'jquery-repeater', plugin_dir_url( __FILE__ ) .'js/jquery.repeater.min.js', array('jquery'), true);
137
  if ($adscreen->id=="wpvr_item") {
138
- // wp_enqueue_script('icon-picker-jquery', plugin_dir_url( __FILE__ ) . 'lib/jquery-1.7.1.min.js', array(), true);
139
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
140
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-admin.js', array( 'jquery' ), $this->version, false );
141
  }
@@ -285,18 +283,8 @@ class Wpvr_Admin {
285
  public function wpvr_setup($post) {
286
 
287
 
288
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
289
- $status = get_option( 'wpvr_edd_license_status' );
290
- if( $status !== false && $status == 'valid' ) {
291
- $data_limit = 999999999;
292
- }
293
- else {
294
- $data_limit = 5;
295
- }
296
- }
297
- else {
298
- $data_limit = 5;
299
- }
300
  $scene_limit = $data_limit + 1;
301
  $postdata = get_post_meta( $post->ID, 'panodata', true );
302
 
@@ -310,11 +298,6 @@ class Wpvr_Admin {
310
  if (isset($postdata["showControls"])) {
311
  $control = $postdata["showControls"];
312
  }
313
-
314
- $compass = false;
315
- if (isset($postdata["compass"])) {
316
- $compass = $postdata["compass"];
317
- }
318
 
319
  $default_scene = '';
320
  if (isset($postdata["defaultscene"])) {
@@ -337,16 +320,11 @@ class Wpvr_Admin {
337
  if (isset($postdata["autoRotateInactivityDelay"])) {
338
  $autorotationinactivedelay = $postdata["autoRotateInactivityDelay"];
339
  }
340
- else {
341
- $autorotationinactivedelay = 2000;
342
- }
343
  $autorotationstopdelay = '';
344
  if (isset($postdata["autoRotateStopDelay"])) {
345
  $autorotationstopdelay = $postdata["autoRotateStopDelay"];
346
  }
347
- else {
348
- $autorotationstopdelay = 2000;
349
- }
350
 
351
  $scene_fade_duration = '';
352
  if (isset($postdata["scenefadeduration"])) {
@@ -357,7 +335,6 @@ class Wpvr_Admin {
357
  if (isset($postdata["panodata"])) {
358
  $pano_data = $postdata["panodata"];
359
  }
360
- // $custom_icon = array("None"=>"none","Icon1"=>"custom-icon icon1","Icon2"=>"custom-icon icon2","Icon3"=>"custom-icon icon3","Icon4"=>"custom-icon icon4","Icon5"=>"custom-icon icon5");
361
 
362
  $custom_icon_array = new Wpvr_fontawesome_icons();
363
  $custom_icon = $custom_icon_array->icon;
@@ -421,54 +398,10 @@ class Wpvr_Admin {
421
  }
422
  //=Control setup End=//
423
 
424
- //=Compass Setup=//
425
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
426
- $status = get_option( 'wpvr_edd_license_status' );
427
- if( $status !== false && $status == 'valid' ) {
428
- if ($compass == true) {
429
- $html .= '<div class="single-settings compass">';
430
- $html .= '<span>'.__('Show Compass: ','wpvr').'</span>';
431
- $html .= '<ul>';
432
- $html .= '<li class="radio-btn">';
433
- $html .= '<input class="styled-radio" id="styled-radio-13" type="radio" name="compass" value="off" >';
434
- $html .= '<label for="styled-radio-13">Off</label>';
435
- $html .= '</li>';
436
-
437
- $html .= '<li class="radio-btn">';
438
- $html .= '<input class="styled-radio" id="styled-radio-14" type="radio" name="compass" value="on" checked >';
439
- $html .= '<label for="styled-radio-14">On</label>';
440
- $html .= '</li>';
441
- $html .= '</ul>';
442
- $html .= '</div>';
443
- }
444
- else {
445
- $html .= '<div class="single-settings compass">';
446
- $html .= '<span>'.__('Show Compass: ','wpvr').'</span>';
447
- $html .= '<ul>';
448
- $html .= '<li class="radio-btn">';
449
- $html .= '<input class="styled-radio" id="styled-radio-13" type="radio" name="compass" value="off" checked >';
450
- $html .= '<label for="styled-radio-13">Off</label>';
451
- $html .= '</li>';
452
-
453
- $html .= '<li class="radio-btn">';
454
- $html .= '<input class="styled-radio" id="styled-radio-14" type="radio" name="compass" value="on" >';
455
- $html .= '<label for="styled-radio-14">On</label>';
456
- $html .= '</li>';
457
- $html .= '</ul>';
458
- $html .= '</div>';
459
- }
460
- }
461
- }
462
- //=Compass setup End=//
463
-
464
  //=scene fade duration=//
465
  $html .= '<div class="single-settings scene-fade-duration">';
466
  $html .= '<span>'.__('Scene Fade Duration: ','wpvr').'</span>';
467
  $html .= '<input type="number" name="scene-fade-duration" value="'.$scene_fade_duration.'" />';
468
- // $html .= '<div class="field-tooltip">';
469
- // $html .= '<i class="fa fa-question-circle"></i>';
470
- // $html .= '<span>'.__('This is Scene fade duration tooltip','wpvr').'</span>';
471
- // $html .= '</div>';
472
  $html .= '</div>';
473
  //=scene fade duration End=//
474
 
@@ -568,7 +501,7 @@ class Wpvr_Admin {
568
  //=Auto Rotation=//
569
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
570
  $html .= '<span>'.__('Auto Rotation: ','wpvr').'</span>';
571
- $html .= '<input type="number" name="auto-rotation" value="'.$autorotation.'" />';
572
  $html .= '<div class="field-tooltip">';
573
  $html .= '<i class="fa fa-question-circle"></i>';
574
  $html .= '<span>'.__('Will automatically rotate the panorama for each page load. You can define rotation speed with number values. Positive number for counter-clockwise and negative number for clockwise. As an example "-5" will rotate the panorama clockwise.','wpvr').'</span>';
@@ -579,7 +512,7 @@ class Wpvr_Admin {
579
  //=Auto rotation inactive delay=//
580
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
581
  $html .= '<span>'.__('Auto Rotation Inactive Delay: ','wpvr').'</span>';
582
- $html .= '<input type="number" name="auto-rotation-inactive-delay" value="'.$autorotationinactivedelay.'" />';
583
  $html .= '<div class="field-tooltip">';
584
  $html .= '<i class="fa fa-question-circle"></i>';
585
  $html .= '<span>'.__('Will pause the rotation for few times. You can put the time value in miliseconds. As an example "2000" will pause the rotation for 2 seconds.','wpvr').'</span>';
@@ -590,7 +523,7 @@ class Wpvr_Admin {
590
  //=Auto rotation stop delay=//
591
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
592
  $html .= '<span>'.__('Auto Rotation Stop Delay: ','wpvr').'</span>';
593
- $html .= '<input type="number" name="auto-rotation-stop-delay" value="'.$autorotationstopdelay.'" />';
594
  $html .= '<div class="field-tooltip">';
595
  $html .= '<i class="fa fa-question-circle"></i>';
596
  $html .= '<span>'.__('Will stop the auto rotation after given time value. As an example for "2000" the roation will stop after 2 seconds on each page load.','wpvr').'</span>';
@@ -681,40 +614,10 @@ class Wpvr_Admin {
681
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
682
  $html .= '</div>';
683
 
684
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
685
- $status = get_option( 'wpvr_edd_license_status' );
686
- if( $status !== false && $status == 'valid' ) {
687
- $html .= '<div class="hotspot-setting custom-icon">';
688
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
689
- $html .= '<select class="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
690
- foreach ($custom_icon as $cikey => $civalue) {
691
- if ($cikey == 'none') {
692
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
693
- }
694
- else {
695
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
696
- }
697
- }
698
- $html .= '</select>';
699
- $html .= '<span class="change-icon"></span>';
700
- $html .= '<div class="field-tooltip">';
701
- $html .= '<i class="fa fa-question-circle"></i>';
702
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
703
- $html .= '</div>';
704
- $html .= '</div>';
705
- $html .= '<div class="hotspot-setting hotspot-icon">';
706
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
707
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="#00b4ff" />';
708
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value" name="hotspot-customclass-color-icon-value" value="#00b4ff" />';
709
- $html .= '</div>';
710
- }
711
- }
712
- // else {
713
- $html .= '<div class="hotspot-setting">';
714
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
715
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
716
- $html .= '</div>';
717
- // }
718
 
719
  $html .= '</div>';
720
 
@@ -786,7 +689,7 @@ class Wpvr_Admin {
786
  $html .= '<div class=scene-setting>';
787
  $html .= '<label for="scene-type">'.__('Scene Type : ','wpvr').'</label>';
788
  $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
789
- $html .= '</div>';
790
 
791
  $html .= '<div class=scene-setting>';
792
  $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
@@ -829,40 +732,10 @@ class Wpvr_Admin {
829
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
830
  $html .= '</div>';
831
 
832
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
833
- $status = get_option( 'wpvr_edd_license_status' );
834
- if( $status !== false && $status == 'valid' ) {
835
- $html .= '<div class="hotspot-setting custom-icon">';
836
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
837
- $html .= '<select class="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
838
- foreach ($custom_icon as $cikey => $civalue) {
839
- if ($cikey == 'none') {
840
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
841
- }
842
- else {
843
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
844
- }
845
- }
846
- $html .= '</select>';
847
- $html .= '<span class="change-icon"></span>';
848
- $html .= '<div class="field-tooltip">';
849
- $html .= '<i class="fa fa-question-circle"></i>';
850
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
851
- $html .= '</div>';
852
- $html .= '</div>';
853
- $html .= '<div class="hotspot-setting hotspot-icon">';
854
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
855
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="#00b4ff" />';
856
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value" name="hotspot-customclass-color-icon-value" value="#00b4ff" />';
857
- $html .= '</div>';
858
- }
859
- }
860
- // else {
861
- $html .= '<div class="hotspot-setting">';
862
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
863
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
864
- $html .= '</div>';
865
- // }
866
 
867
  $html .= '</div>';
868
 
@@ -916,7 +789,6 @@ class Wpvr_Admin {
916
 
917
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
918
  $html .= '<ul>';
919
- // $html .= '<li><span data-index="0" data-href="#scene-0">Scene 0</span></li>';
920
  $i = 1;
921
  $firstvalue = reset($pano_data["scene-list"]);
922
  foreach ($pano_data["scene-list"] as $pano_scenes) {
@@ -935,7 +807,7 @@ class Wpvr_Admin {
935
 
936
  $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
937
 
938
- //test
939
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
940
 
941
  $html .= '<div class="scene-content">';
@@ -970,7 +842,7 @@ class Wpvr_Admin {
970
  $html .= '</div>';
971
  $html .= '</div>';
972
 
973
- //--hotspot setup--
974
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
975
 
976
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
@@ -1001,40 +873,10 @@ class Wpvr_Admin {
1001
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
1002
  $html .= '</div>';
1003
 
1004
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
1005
- $status = get_option( 'wpvr_edd_license_status' );
1006
- if( $status !== false && $status == 'valid' ) {
1007
- $html .= '<div class="hotspot-setting custom-icon">';
1008
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
1009
- $html .= '<select class="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
1010
- foreach ($custom_icon as $cikey => $civalue) {
1011
- if ($cikey == 'none') {
1012
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
1013
- }
1014
- else {
1015
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
1016
- }
1017
- }
1018
- $html .= '</select>';
1019
- $html .= '<span class="change-icon"></span>';
1020
- $html .= '<div class="field-tooltip">';
1021
- $html .= '<i class="fa fa-question-circle"></i>';
1022
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
1023
- $html .= '</div>';
1024
- $html .= '</div>';
1025
- $html .= '<div class="hotspot-setting hotspot-icon">';
1026
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
1027
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="#00b4ff" />';
1028
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value" name="hotspot-customclass-color-icon-value" value="#00b4ff" />';
1029
- $html .= '</div>';
1030
- }
1031
- }
1032
- // else {
1033
- $html .= '<div class="hotspot-setting">';
1034
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1035
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1036
- $html .= '</div>';
1037
- // }
1038
 
1039
  $html .= '</div>';
1040
 
@@ -1081,7 +923,7 @@ class Wpvr_Admin {
1081
  $html .= '</div>';
1082
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
1083
  $html .= '</div>';
1084
- //test
1085
 
1086
  $s = 1;
1087
  foreach ($pano_data["scene-list"] as $pano_scenes) {
@@ -1095,6 +937,7 @@ class Wpvr_Admin {
1095
  $scene_type = $pano_scenes["scene-type"];
1096
  $scene_photo = '';
1097
  $scene_photo = $pano_scenes["scene-attachment-url"];
 
1098
  $pano_hotspots = array();
1099
  if (isset($pano_scenes["hotspot-list"])) {
1100
  $pano_hotspots = $pano_scenes["hotspot-list"];
@@ -1193,17 +1036,7 @@ class Wpvr_Admin {
1193
  if (isset($pano_hotspot['hotspot-customclass'])) {
1194
  $hotspot_custom_class = $pano_hotspot['hotspot-customclass'];
1195
  }
1196
-
1197
- $hotspot_custom_class_pro = '';
1198
- if (isset($pano_hotspot['hotspot-customclass-pro'])) {
1199
- $hotspot_custom_class_pro = $pano_hotspot['hotspot-customclass-pro'];
1200
- }
1201
 
1202
- $hotspot_custom_class_pro_color = '';
1203
- if (isset($pano_hotspot['hotspot-customclass-color-icon-value'])) {
1204
- $hotspot_custom_class_pro_color = $pano_hotspot['hotspot-customclass-color-icon-value'];
1205
- }
1206
- // var_dump($hotspot_custom_class_pro_color);
1207
  if ($pano_hotspot['hotspot-title'] == $firstvaluehotspotset['hotspot-title']) {
1208
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1209
 
@@ -1226,41 +1059,10 @@ class Wpvr_Admin {
1226
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1227
  $html .= '</div>';
1228
 
1229
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
1230
- $status = get_option( 'wpvr_edd_license_status' );
1231
- if( $status !== false && $status == 'valid' ) {
1232
- $html .= '<div class="hotspot-setting custom-icon">';
1233
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
1234
- $html .= '<select class="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
1235
- foreach ($custom_icon as $cikey => $civalue) {
1236
- if ($cikey == $hotspot_custom_class_pro) {
1237
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
1238
- }
1239
- else {
1240
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
1241
- }
1242
- }
1243
- $html .= '</select>';
1244
- $html .= '<span class="change-icon"><i class="'.$hotspot_custom_class_pro.'"></i></span>';
1245
- $html .= '<div class="field-tooltip">';
1246
- $html .= '<i class="fa fa-question-circle"></i>';
1247
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
1248
- $html .= '</div>';
1249
- $html .= '</div>';
1250
- $html .= '<div class="hotspot-setting hotspot-icon">';
1251
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
1252
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="'.$hotspot_custom_class_pro_color.'" />';
1253
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value icon-found-value" name="hotspot-customclass-color-icon-value" value="'.$hotspot_custom_class_pro_color.'" />';
1254
-
1255
- $html .= '</div>';
1256
- }
1257
- }
1258
- // else {
1259
- $html .= '<div class="hotspot-setting">';
1260
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1261
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1262
- $html .= '</div>';
1263
- // }
1264
 
1265
  $html .= '</div>';
1266
 
@@ -1368,41 +1170,10 @@ class Wpvr_Admin {
1368
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1369
  $html .= '</div>';
1370
 
1371
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
1372
- $status = get_option( 'wpvr_edd_license_status' );
1373
- if( $status !== false && $status == 'valid' ) {
1374
- $html .= '<div class="hotspot-setting custom-icon">';
1375
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
1376
- $html .= '<select class="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
1377
- foreach ($custom_icon as $cikey => $civalue) {
1378
- if ($cikey == $hotspot_custom_class_pro) {
1379
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
1380
- }
1381
- else {
1382
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
1383
- }
1384
- }
1385
- $html .= '</select>';
1386
- $html .= '<span class="change-icon"><i class="'.$hotspot_custom_class_pro.'"></i></span>';
1387
- $html .= '<div class="field-tooltip">';
1388
- $html .= '<i class="fa fa-question-circle"></i>';
1389
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
1390
- $html .= '</div>';
1391
- $html .= '</div>';
1392
- $html .= '<div class="hotspot-setting hotspot-icon">';
1393
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
1394
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="'.$hotspot_custom_class_pro_color.'" />';
1395
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value icon-found-value" name="hotspot-customclass-color-icon-value" value="'.$hotspot_custom_class_pro_color.'" />';
1396
-
1397
- $html .= '</div>';
1398
- }
1399
- }
1400
- // else {
1401
- $html .= '<div class="hotspot-setting">';
1402
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1403
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1404
- $html .= '</div>';
1405
- // }
1406
 
1407
  $html .= '</div>';
1408
 
@@ -1525,40 +1296,10 @@ class Wpvr_Admin {
1525
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
1526
  $html .= '</div>';
1527
 
1528
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
1529
- $status = get_option( 'wpvr_edd_license_status' );
1530
- if( $status !== false && $status == 'valid' ) {
1531
- $html .= '<div class="hotspot-setting custom-icon">';
1532
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
1533
- $html .= '<select class="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
1534
- foreach ($custom_icon as $cikey => $civalue) {
1535
- if ($cikey == 'none') {
1536
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
1537
- }
1538
- else {
1539
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
1540
- }
1541
- }
1542
- $html .= '</select>';
1543
- $html .= '<span class="change-icon"></span>';
1544
- $html .= '<div class="field-tooltip">';
1545
- $html .= '<i class="fa fa-question-circle"></i>';
1546
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
1547
- $html .= '</div>';
1548
- $html .= '</div>';
1549
- $html .= '<div class="hotspot-setting hotspot-icon">';
1550
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
1551
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="#00b4ff" />';
1552
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value" name="hotspot-customclass-color-icon-value" value="#00b4ff" />';
1553
- $html .= '</div>';
1554
- }
1555
- }
1556
- // else {
1557
- $html .= '<div class="hotspot-setting">';
1558
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1559
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1560
- $html .= '</div>';
1561
- // }
1562
 
1563
  $html .= '</div>';
1564
 
@@ -1696,14 +1437,7 @@ class Wpvr_Admin {
1696
  if (isset($pano_hotspot['hotspot-customclass'])) {
1697
  $hotspot_custom_class = $pano_hotspot['hotspot-customclass'];
1698
  }
1699
- $hotspot_custom_class_pro = '';
1700
- if (isset($pano_hotspot['hotspot-customclass-pro'])) {
1701
- $hotspot_custom_class_pro = $pano_hotspot['hotspot-customclass-pro'];
1702
- }
1703
- $hotspot_custom_class_pro_color = '';
1704
- if (isset($pano_hotspot['hotspot-customclass-color-icon-value'])) {
1705
- $hotspot_custom_class_pro_color = $pano_hotspot['hotspot-customclass-color-icon-value'];
1706
- }
1707
  if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
1708
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1709
 
@@ -1725,40 +1459,10 @@ class Wpvr_Admin {
1725
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1726
  $html .= '</div>';
1727
 
1728
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
1729
- $status = get_option( 'wpvr_edd_license_status' );
1730
- if( $status !== false && $status == 'valid' ) {
1731
- $html .= '<div class="hotspot-setting custom-icon">';
1732
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
1733
- $html .= '<select class ="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
1734
- foreach ($custom_icon as $cikey => $civalue) {
1735
- if ($cikey == $hotspot_custom_class_pro) {
1736
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
1737
- }
1738
- else {
1739
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
1740
- }
1741
- }
1742
- $html .= '</select>';
1743
- $html .= '<span class="change-icon"><i class="'.$hotspot_custom_class_pro.'"></i></span>';
1744
- $html .= '<div class="field-tooltip">';
1745
- $html .= '<i class="fa fa-question-circle"></i>';
1746
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
1747
- $html .= '</div>';
1748
- $html .= '</div>';
1749
- $html .= '<div class="hotspot-setting hotspot-icon">';
1750
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
1751
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="'.$hotspot_custom_class_pro_color.'" />';
1752
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value icon-found-value" name="hotspot-customclass-color-icon-value" value="'.$hotspot_custom_class_pro_color.'" />';
1753
- $html .= '</div>';
1754
- }
1755
- }
1756
- // else {
1757
- $html .= '<div class="hotspot-setting">';
1758
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1759
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1760
- $html .= '</div>';
1761
- // }
1762
 
1763
  $html .= '</div>';
1764
 
@@ -1866,40 +1570,10 @@ class Wpvr_Admin {
1866
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1867
  $html .= '</div>';
1868
 
1869
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
1870
- $status = get_option( 'wpvr_edd_license_status' );
1871
- if( $status !== false && $status == 'valid' ) {
1872
- $html .= '<div class="hotspot-setting custom-icon">';
1873
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
1874
- $html .= '<select class ="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
1875
- foreach ($custom_icon as $cikey => $civalue) {
1876
- if ($cikey == $hotspot_custom_class_pro) {
1877
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
1878
- }
1879
- else {
1880
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
1881
- }
1882
- }
1883
- $html .= '</select>';
1884
- $html .= '<span class="change-icon"><i class="'.$hotspot_custom_class_pro.'"></i></span>';
1885
- $html .= '<div class="field-tooltip">';
1886
- $html .= '<i class="fa fa-question-circle"></i>';
1887
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
1888
- $html .= '</div>';
1889
- $html .= '</div>';
1890
- $html .= '<div class="hotspot-setting hotspot-icon">';
1891
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
1892
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="'.$hotspot_custom_class_pro_color.'" />';
1893
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value" name="hotspot-customclass-color-icon-value" value="'.$hotspot_custom_class_pro_color.'" />';
1894
- $html .= '</div>';
1895
- }
1896
- }
1897
- // else {
1898
- $html .= '<div class="hotspot-setting">';
1899
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1900
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1901
- $html .= '</div>';
1902
- // }
1903
 
1904
  $html .= '</div>';
1905
 
@@ -2022,40 +1696,10 @@ class Wpvr_Admin {
2022
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
2023
  $html .= '</div>';
2024
 
2025
- if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
2026
- $status = get_option( 'wpvr_edd_license_status' );
2027
- if( $status !== false && $status == 'valid' ) {
2028
- $html .= '<div class="hotspot-setting custom-icon">';
2029
- $html .= '<label for="hotspot-customclass-pro">'.__('Hotspot custom icon: ','wpvr').'</label>';
2030
- $html .= '<select class="hotspot-customclass-pro-select" name="hotspot-customclass-pro">';
2031
- foreach ($custom_icon as $cikey => $civalue) {
2032
- if ($cikey == 'none') {
2033
- $html .= '<option value="'.$cikey.'" selected> '.$civalue.'</option>';
2034
- }
2035
- else {
2036
- $html .= '<option value="'.$cikey.'"> '.$civalue.'</option>';
2037
- }
2038
- }
2039
- $html .= '</select>';
2040
- $html .= '<span class="change-icon"></span>';
2041
- $html .= '<div class="field-tooltip">';
2042
- $html .= '<i class="fa fa-question-circle"></i>';
2043
- $html .= '<span>'.__('Custom icons will only show on frontend.','wpvr').'</span>';
2044
- $html .= '</div>';
2045
- $html .= '</div>';
2046
- $html .= '<div class="hotspot-setting hotspot-icon">';
2047
- $html .= '<label for="hotspot-customclass-color">'.__('Hotspot custom icon color: ','wpvr').'</label>';
2048
- $html .= '<input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="#00b4ff" />';
2049
- $html .= '<input type="hidden" class="hotspot-customclass-color-icon-value" name="hotspot-customclass-color-icon-value" value="#00b4ff" />';
2050
- $html .= '</div>';
2051
- }
2052
- }
2053
- // else {
2054
- $html .= '<div class="hotspot-setting">';
2055
- $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
2056
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
2057
- $html .= '</div>';
2058
- // }
2059
 
2060
  $html .= '</div>';
2061
 
@@ -2121,98 +1765,93 @@ class Wpvr_Admin {
2121
  //----start video tab content---------
2122
  $html .='<div class="rex-pano-tab video" id="video">';
2123
  $html .= '<h6 class="title"> '.__('Video Settings : ','wpvr').'</h6>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2124
 
2125
- //==Video Setup==//
2126
- // if( $status !== false && $status == 'valid' ) {
2127
- if (isset($postdata['vidid'])) {
2128
- $vidautoplay = $postdata['vidautoplay'];
2129
- $vidautoplay_on = '';
2130
- $vidautoplay_off = '';
2131
- if (!empty($vidautoplay)) {
2132
- $vidautoplay_on = 'checked';
2133
- }
2134
- else {
2135
- $vidautoplay_off = 'checked';
2136
- }
2137
-
2138
- $vidcontrol = $postdata['vidcontrol'];
2139
- $vidcontrol_on = '';
2140
- $vidcontrol_off = '';
2141
- if (!empty($vidcontrol)) {
2142
- $vidcontrol_on = 'checked';
2143
- }
2144
- else {
2145
- $vidcontrol_off = 'checked';
2146
- }
2147
- $html .= '<div class="single-settings videosetup">';
2148
- $html .= '<span>Enable Video: </span>';
2149
- $html .= '<ul>';
2150
- $html .= '<li class="radio-btn">';
2151
- $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" >';
2152
- $html .= '<label for="styled-radio">Off</label>';
2153
- $html .= '</li>';
2154
-
2155
- $html .= '<li class="radio-btn">';
2156
- $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" checked>';
2157
- $html .= '<label for="styled-radio-0">On</label>';
2158
- $html .= '</li>';
2159
- $html .= '</ul>';
2160
- $html .= '</div>';
2161
-
2162
-
2163
- $html .= '<div class="video-setting" style="display:none;">';
2164
- $html .= '<div class="single-settings">';
2165
- $html .= '<span>Upload or add link: </span>';
2166
- $html .= '<div class="form-group">';
2167
- $html .= '<input type="text" name="video-attachment-url" placeholder="Paste Youtube or Vimeo link or upload" class="video-attachment-url" value="'.$postdata['vidurl'].'">';
2168
- $html .= '<input type="button" class="video-upload" data-info="" value="Upload" />';
2169
- $html .= '</div>';
2170
- $html .= '</div>';
2171
- $html .= '<button id="videopreview">Preview</button>';
2172
- $html .= '</div>';
2173
- }
2174
- else {
2175
- $html .= '<div class="single-settings videosetup">';
2176
- $html .= '<span>Enable Video: </span>';
2177
- $html .= '<ul>';
2178
- $html .= '<li class="radio-btn">';
2179
- $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" checked >';
2180
- $html .= '<label for="styled-radio">Off</label>';
2181
- $html .= '</li>';
2182
-
2183
- $html .= '<li class="radio-btn">';
2184
- $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" >';
2185
- $html .= '<label for="styled-radio-0">On</label>';
2186
- $html .= '</li>';
2187
- $html .= '</ul>';
2188
- $html .= '</div>';
2189
-
2190
- //==Video setup end==//
2191
-
2192
- //==Video Setting==/
2193
- $html .= '<div class="video-setting" style="display:none;">';
2194
- $html .= '<div class="single-settings">';
2195
- $html .= '<span>Upload or add link: </span>';
2196
- $html .= '<div class="form-group">';
2197
- $html .= '<input type="text" placeholder="Paste Youtube or Vimeo link or upload" name="video-attachment-url" class="video-attachment-url" value="">';
2198
- $html .= '<input type="button" class="video-upload" data-info="" value="Upload"/>';
2199
- $html .= '</div>';
2200
- $html .= '</div>';
2201
- $html .= '<button id="videopreview">Preview</button>';
2202
- $html .= '</div>';
2203
- }
2204
- // }
2205
- //==Video Setting End==//
2206
  $html .='</div>';
2207
  //---end video tab----
2208
-
2209
  $html .='</div>';
2210
- //---end rex-pano-tab-content----
2211
-
2212
  $html .='</div>';
2213
  //---end rex-pano-tabs---
2214
- $html .= '</div>';
2215
- echo $html;
2216
  }
2217
 
2218
  }
79
  * between the defined hooks and the functions defined in this
80
  * class.
81
  */
82
+
83
  wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
84
  wp_enqueue_style( 'materialize-icons', 'https://fonts.googleapis.com/icon?family=Material+Icons', array(), $this->version, 'all' );
85
 
121
 
122
  wp_enqueue_media();
123
  if ($adscreen->id=="wpvr_item") {
 
124
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
125
  }
126
  wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
134
  }
135
  wp_enqueue_script( 'jquery-repeater', plugin_dir_url( __FILE__ ) .'js/jquery.repeater.min.js', array('jquery'), true);
136
  if ($adscreen->id=="wpvr_item") {
 
137
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
138
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-admin.js', array( 'jquery' ), $this->version, false );
139
  }
283
  public function wpvr_setup($post) {
284
 
285
 
286
+ $data_limit = 5;
287
+
 
 
 
 
 
 
 
 
 
 
288
  $scene_limit = $data_limit + 1;
289
  $postdata = get_post_meta( $post->ID, 'panodata', true );
290
 
298
  if (isset($postdata["showControls"])) {
299
  $control = $postdata["showControls"];
300
  }
 
 
 
 
 
301
 
302
  $default_scene = '';
303
  if (isset($postdata["defaultscene"])) {
320
  if (isset($postdata["autoRotateInactivityDelay"])) {
321
  $autorotationinactivedelay = $postdata["autoRotateInactivityDelay"];
322
  }
323
+
 
 
324
  $autorotationstopdelay = '';
325
  if (isset($postdata["autoRotateStopDelay"])) {
326
  $autorotationstopdelay = $postdata["autoRotateStopDelay"];
327
  }
 
 
 
328
 
329
  $scene_fade_duration = '';
330
  if (isset($postdata["scenefadeduration"])) {
335
  if (isset($postdata["panodata"])) {
336
  $pano_data = $postdata["panodata"];
337
  }
 
338
 
339
  $custom_icon_array = new Wpvr_fontawesome_icons();
340
  $custom_icon = $custom_icon_array->icon;
398
  }
399
  //=Control setup End=//
400
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
401
  //=scene fade duration=//
402
  $html .= '<div class="single-settings scene-fade-duration">';
403
  $html .= '<span>'.__('Scene Fade Duration: ','wpvr').'</span>';
404
  $html .= '<input type="number" name="scene-fade-duration" value="'.$scene_fade_duration.'" />';
 
 
 
 
405
  $html .= '</div>';
406
  //=scene fade duration End=//
407
 
501
  //=Auto Rotation=//
502
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
503
  $html .= '<span>'.__('Auto Rotation: ','wpvr').'</span>';
504
+ $html .= '<input type="number" name="auto-rotation" value="'.$autorotation.'" placeholder="-5" />';
505
  $html .= '<div class="field-tooltip">';
506
  $html .= '<i class="fa fa-question-circle"></i>';
507
  $html .= '<span>'.__('Will automatically rotate the panorama for each page load. You can define rotation speed with number values. Positive number for counter-clockwise and negative number for clockwise. As an example "-5" will rotate the panorama clockwise.','wpvr').'</span>';
512
  //=Auto rotation inactive delay=//
513
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
514
  $html .= '<span>'.__('Auto Rotation Inactive Delay: ','wpvr').'</span>';
515
+ $html .= '<input type="number" name="auto-rotation-inactive-delay" value="'.$autorotationinactivedelay.'" placeholder="2000" />';
516
  $html .= '<div class="field-tooltip">';
517
  $html .= '<i class="fa fa-question-circle"></i>';
518
  $html .= '<span>'.__('Will pause the rotation for few times. You can put the time value in miliseconds. As an example "2000" will pause the rotation for 2 seconds.','wpvr').'</span>';
523
  //=Auto rotation stop delay=//
524
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
525
  $html .= '<span>'.__('Auto Rotation Stop Delay: ','wpvr').'</span>';
526
+ $html .= '<input type="number" name="auto-rotation-stop-delay" value="'.$autorotationstopdelay.'" placeholder="2000" />';
527
  $html .= '<div class="field-tooltip">';
528
  $html .= '<i class="fa fa-question-circle"></i>';
529
  $html .= '<span>'.__('Will stop the auto rotation after given time value. As an example for "2000" the roation will stop after 2 seconds on each page load.','wpvr').'</span>';
614
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
615
  $html .= '</div>';
616
 
617
+ $html .= '<div class="hotspot-setting">';
618
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
619
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
620
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
 
622
  $html .= '</div>';
623
 
689
  $html .= '<div class=scene-setting>';
690
  $html .= '<label for="scene-type">'.__('Scene Type : ','wpvr').'</label>';
691
  $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
692
+ $html .= '</div>';
693
 
694
  $html .= '<div class=scene-setting>';
695
  $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
732
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
733
  $html .= '</div>';
734
 
735
+ $html .= '<div class="hotspot-setting">';
736
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
737
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
738
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739
 
740
  $html .= '</div>';
741
 
789
 
790
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
791
  $html .= '<ul>';
 
792
  $i = 1;
793
  $firstvalue = reset($pano_data["scene-list"]);
794
  foreach ($pano_data["scene-list"] as $pano_scenes) {
807
 
808
  $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
809
 
810
+ //===Default empty repeater declared by nazmus sakib===//
811
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
812
 
813
  $html .= '<div class="scene-content">';
842
  $html .= '</div>';
843
  $html .= '</div>';
844
 
845
+ //--hotspot setup--//
846
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
847
 
848
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
873
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
874
  $html .= '</div>';
875
 
876
+ $html .= '<div class="hotspot-setting">';
877
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
878
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
879
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
880
 
881
  $html .= '</div>';
882
 
923
  $html .= '</div>';
924
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
925
  $html .= '</div>';
926
+ //==Empty repeater end==//
927
 
928
  $s = 1;
929
  foreach ($pano_data["scene-list"] as $pano_scenes) {
937
  $scene_type = $pano_scenes["scene-type"];
938
  $scene_photo = '';
939
  $scene_photo = $pano_scenes["scene-attachment-url"];
940
+
941
  $pano_hotspots = array();
942
  if (isset($pano_scenes["hotspot-list"])) {
943
  $pano_hotspots = $pano_scenes["hotspot-list"];
1036
  if (isset($pano_hotspot['hotspot-customclass'])) {
1037
  $hotspot_custom_class = $pano_hotspot['hotspot-customclass'];
1038
  }
 
 
 
 
 
1039
 
 
 
 
 
 
1040
  if ($pano_hotspot['hotspot-title'] == $firstvaluehotspotset['hotspot-title']) {
1041
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1042
 
1059
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1060
  $html .= '</div>';
1061
 
1062
+ $html .= '<div class="hotspot-setting">';
1063
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1064
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1065
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1066
 
1067
  $html .= '</div>';
1068
 
1170
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1171
  $html .= '</div>';
1172
 
1173
+ $html .= '<div class="hotspot-setting">';
1174
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1175
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1176
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1177
 
1178
  $html .= '</div>';
1179
 
1296
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
1297
  $html .= '</div>';
1298
 
1299
+ $html .= '<div class="hotspot-setting">';
1300
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1301
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1302
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1303
 
1304
  $html .= '</div>';
1305
 
1437
  if (isset($pano_hotspot['hotspot-customclass'])) {
1438
  $hotspot_custom_class = $pano_hotspot['hotspot-customclass'];
1439
  }
1440
+
 
 
 
 
 
 
 
1441
  if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
1442
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1443
 
1459
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1460
  $html .= '</div>';
1461
 
1462
+ $html .= '<div class="hotspot-setting">';
1463
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1464
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1465
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1466
 
1467
  $html .= '</div>';
1468
 
1570
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1571
  $html .= '</div>';
1572
 
1573
+ $html .= '<div class="hotspot-setting">';
1574
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1575
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1576
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1577
 
1578
  $html .= '</div>';
1579
 
1696
  $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
1697
  $html .= '</div>';
1698
 
1699
+ $html .= '<div class="hotspot-setting">';
1700
+ $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1701
+ $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1702
+ $html .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1703
 
1704
  $html .= '</div>';
1705
 
1765
  //----start video tab content---------
1766
  $html .='<div class="rex-pano-tab video" id="video">';
1767
  $html .= '<h6 class="title"> '.__('Video Settings : ','wpvr').'</h6>';
1768
+ //==Video Setup==//
1769
+ if (isset($postdata['vidid'])) {
1770
+ $vidautoplay = $postdata['vidautoplay'];
1771
+ $vidautoplay_on = '';
1772
+ $vidautoplay_off = '';
1773
+ if (!empty($vidautoplay)) {
1774
+ $vidautoplay_on = 'checked';
1775
+ }
1776
+ else {
1777
+ $vidautoplay_off = 'checked';
1778
+ }
1779
+
1780
+ $vidcontrol = $postdata['vidcontrol'];
1781
+ $vidcontrol_on = '';
1782
+ $vidcontrol_off = '';
1783
+ if (!empty($vidcontrol)) {
1784
+ $vidcontrol_on = 'checked';
1785
+ }
1786
+ else {
1787
+ $vidcontrol_off = 'checked';
1788
+ }
1789
+ $html .= '<div class="single-settings videosetup">';
1790
+ $html .= '<span>Enable Video: </span>';
1791
+ $html .= '<ul>';
1792
+ $html .= '<li class="radio-btn">';
1793
+ $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" >';
1794
+ $html .= '<label for="styled-radio">Off</label>';
1795
+ $html .= '</li>';
1796
+
1797
+ $html .= '<li class="radio-btn">';
1798
+ $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" checked>';
1799
+ $html .= '<label for="styled-radio-0">On</label>';
1800
+ $html .= '</li>';
1801
+ $html .= '</ul>';
1802
+ $html .= '</div>';
1803
+
1804
 
1805
+ $html .= '<div class="video-setting" style="display:none;">';
1806
+ $html .= '<div class="single-settings">';
1807
+ $html .= '<span>Upload or add link: </span>';
1808
+ $html .= '<div class="form-group">';
1809
+ $html .= '<input type="text" name="video-attachment-url" placeholder="Paste Youtube or Vimeo link or upload" class="video-attachment-url" value="'.$postdata['vidurl'].'">';
1810
+ $html .= '<input type="button" class="video-upload" data-info="" value="Upload" />';
1811
+ $html .= '</div>';
1812
+ $html .= '</div>';
1813
+ $html .= '<button id="videopreview">Preview</button>';
1814
+ $html .= '</div>';
1815
+ }
1816
+ else {
1817
+ $html .= '<div class="single-settings videosetup">';
1818
+ $html .= '<span>Enable Video: </span>';
1819
+ $html .= '<ul>';
1820
+ $html .= '<li class="radio-btn">';
1821
+ $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" checked >';
1822
+ $html .= '<label for="styled-radio">Off</label>';
1823
+ $html .= '</li>';
1824
+
1825
+ $html .= '<li class="radio-btn">';
1826
+ $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" >';
1827
+ $html .= '<label for="styled-radio-0">On</label>';
1828
+ $html .= '</li>';
1829
+ $html .= '</ul>';
1830
+ $html .= '</div>';
1831
+
1832
+ //==Video setup end==//
1833
+
1834
+ //==Video Setting==/
1835
+ $html .= '<div class="video-setting" style="display:none;">';
1836
+ $html .= '<div class="single-settings">';
1837
+ $html .= '<span>Upload or add link: </span>';
1838
+ $html .= '<div class="form-group">';
1839
+ $html .= '<input type="text" placeholder="Paste Youtube or Vimeo link or upload" name="video-attachment-url" class="video-attachment-url" value="">';
1840
+ $html .= '<input type="button" class="video-upload" data-info="" value="Upload"/>';
1841
+ $html .= '</div>';
1842
+ $html .= '</div>';
1843
+ $html .= '<button id="videopreview">Preview</button>';
1844
+ $html .= '</div>';
1845
+ }
1846
+ //==Video Setting End==//
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1847
  $html .='</div>';
1848
  //---end video tab----
 
1849
  $html .='</div>';
1850
+ //---end rex-pano-tab-content----
 
1851
  $html .='</div>';
1852
  //---end rex-pano-tabs---
1853
+ $html .= '</div>';
1854
+ echo $html;
1855
  }
1856
 
1857
  }
admin/class-wpvr-ajax.php CHANGED
@@ -84,6 +84,66 @@ class Wpvr_Ajax {
84
  die();
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  if ($scenes_val["hotspot-list"] != "") {
88
  foreach ($scenes_val["hotspot-list"] as $hotspot_val) {
89
  $hotspot_title_validate = $hotspot_val["hotspot-title"];
@@ -177,11 +237,62 @@ class Wpvr_Ajax {
177
  $default_data = array();
178
  $default_data = array(__( "firstScene" )=>$default_scene,__( "sceneFadeDuration" )=>$scene_fade_duration);
179
  $scene_data = array();
180
- // var_dump($panodata["scene-list"]);
181
- // die();
182
  foreach ($panodata["scene-list"] as $panoscenes) {
183
 
184
  if (!empty($panoscenes['scene-id'])) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  $hotspot_datas = $panoscenes["hotspot-list"];
186
  $hotspots = array();
187
  foreach ($hotspot_datas as $hotspot_data) {
@@ -193,22 +304,72 @@ class Wpvr_Ajax {
193
  __( "yaw" )=>$hotspot_data["hotspot-yaw"],
194
  __( "type" )=>$hotspot_data["hotspot-type"],
195
  __( "URL" )=>$hotspot_data["hotspot-url"],
196
- // __( "cssClass" )=>$hotspot_data["hotspot-customclass"],
197
  __( "clickHandlerArgs" )=>$hotspot_data["hotspot-content"],
198
  __( "createTooltipArgs" )=>$hotspot_data["hotspot-hover"],
199
- __( "sceneId" )=>$hotspot_data["hotspot-scene"]);
 
 
200
  array_push($hotspots, $hotspot_info);
 
 
 
201
  }
 
202
  }
203
 
204
  $scene_info = array();
205
- $scene_info = array(__( "type" )=>$panoscenes["scene-type"],__( "panorama" )=>$panoscenes["scene-attachment-url"],__( "hotSpots" )=>$hotspots);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  $scene_array = array();
207
  $scene_array = array(
208
  __($panoscenes["scene-id"])=>$scene_info
209
  );
210
  $scene_data[$panoscenes["scene-id"]] = $scene_info;
211
  }
 
212
  }
213
 
214
  $pano_id_array = array();
@@ -454,13 +615,69 @@ class Wpvr_Ajax {
454
  die();
455
  }
456
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
  if ($scenes_val["hotspot-list"] != "") {
458
  foreach ($scenes_val["hotspot-list"] as $hotspot_val) {
459
  $hotspot_title_validate = $hotspot_val["hotspot-title"];
460
- // if (empty($hotspot_title_validate)) {
461
- // wp_send_json_error('<p><span>Warning:</span> Hotspot title is required for every hotspot.</p>');
462
- // die();
463
- // }
464
 
465
  if (!empty($hotspot_title_validate)) {
466
  $hotspot_title_validated = preg_replace('/[^0-9a-zA-Z_]/',"",$hotspot_title_validate);
@@ -568,9 +785,7 @@ class Wpvr_Ajax {
568
  }
569
  }
570
  }
571
- // echo "<pre>";
572
- // var_dump($panodata);
573
- // die();
574
  $pano_array = array();
575
  $pano_array = array(__( "panoid" )=>$panoid,__( "autoLoad" )=>$autoload,__( "showControls" )=>$control,__( "compass" )=>$compass,__( "autoRotate" )=>$autorotation,__( "autoRotateInactivityDelay" )=>$autorotationinactivedelay,__( "autoRotateStopDelay" )=>$autorotationstopdelay,__( "preview" )=>$preview,__( "defaultscene" )=>$default_scene,__( "scenefadeduration" )=>$scene_fade_duration,__( "panodata" )=>$panodata);
576
 
84
  die();
85
  }
86
 
87
+ if (!empty($scenes_val["scene-pitch"])) {
88
+ $validate_scene_pitch = $scenes_val["scene-pitch"];
89
+ $validated_scene_pitch = preg_replace('/[^0-9.-]/','',$validate_scene_pitch);
90
+ if ($validated_scene_pitch != $validate_scene_pitch) {
91
+ wp_send_json_error('<p><span>Warning:</span> Default pitch value can only contain float numbers</p>');
92
+ die();
93
+ }
94
+ }
95
+
96
+ if (!empty($scenes_val["scene-yaw"])) {
97
+ $validate_scene_yaw = $scenes_val["scene-yaw"];
98
+ $validated_scene_yaw = preg_replace('/[^0-9.-]/','',$validate_scene_yaw);
99
+ if ($validated_scene_yaw != $validate_scene_yaw) {
100
+ wp_send_json_error('<p><span>Warning:</span> Default yaw value can only contain float numbers</p>');
101
+ die();
102
+ }
103
+ }
104
+
105
+ if (!empty($scenes_val["scene-zoom"])) {
106
+ $validate_default_zoom = $scenes_val["scene-zoom"];
107
+ $validated_default_zoom = preg_replace('/[^0-9-]/','',$validate_default_zoom);
108
+ if ($validated_default_zoom != $validate_default_zoom) {
109
+ wp_send_json_error('<p><span>Warning:</span> Default zoom value can only contain number in degree from 50 to 120</p>');
110
+ die();
111
+ }
112
+ $default_zoom_value = (int)$scenes_val["scene-zoom"];
113
+ if ($default_zoom_value > 120 || $default_zoom_value < 50) {
114
+ wp_send_json_error('<p><span>Warning:</span> Default zoom value can only contain number in degree from 50 to 120</p>');
115
+ die();
116
+ }
117
+ }
118
+
119
+ if (!empty($scenes_val["scene-maxzoom"])) {
120
+ $validate_max_zoom = $scenes_val["scene-maxzoom"];
121
+ $validated_max_zoom = preg_replace('/[^0-9-]/','',$validate_max_zoom);
122
+ if ($validated_max_zoom != $validate_max_zoom) {
123
+ wp_send_json_error('<p><span>Warning:</span> Max zoom out value can only contain number in degree.</p>');
124
+ die();
125
+ }
126
+ $max_zoom_value = (int)$scenes_val["scene-maxzoom"];
127
+ if ($max_zoom_value > 120 ) {
128
+ wp_send_json_error('<p><span>Warning:</span> Max zoom out value can only contain number in degree below 120.</p>');
129
+ die();
130
+ }
131
+ }
132
+
133
+ if (!empty($scenes_val["scene-minzoom"])) {
134
+ $validate_min_zoom = $scenes_val["scene-minzoom"];
135
+ $validated_min_zoom = preg_replace('/[^0-9-]/','',$validate_min_zoom);
136
+ if ($validated_min_zoom != $validate_min_zoom) {
137
+ wp_send_json_error('<p><span>Warning:</span> Max zoom in value can only contain number in degree.</p>');
138
+ die();
139
+ }
140
+ $min_zoom_value = (int)$scenes_val["scene-minzoom"];
141
+ if ($min_zoom_value < 50 ) {
142
+ wp_send_json_error('<p><span>Warning:</span> Max zoom in value can only contain number in degree above 50.</p>');
143
+ die();
144
+ }
145
+ }
146
+
147
  if ($scenes_val["hotspot-list"] != "") {
148
  foreach ($scenes_val["hotspot-list"] as $hotspot_val) {
149
  $hotspot_title_validate = $hotspot_val["hotspot-title"];
237
  $default_data = array();
238
  $default_data = array(__( "firstScene" )=>$default_scene,__( "sceneFadeDuration" )=>$scene_fade_duration);
239
  $scene_data = array();
240
+
 
241
  foreach ($panodata["scene-list"] as $panoscenes) {
242
 
243
  if (!empty($panoscenes['scene-id'])) {
244
+
245
+ $scene_ititle = '';
246
+ $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
247
+
248
+ $scene_author = '';
249
+ $scene_author = sanitize_text_field($panoscenes["scene-author"]);
250
+
251
+ $default_scene_pitch = '';
252
+ $default_scene_pitch = $panoscenes["scene-pitch"];
253
+
254
+ $default_scene_yaw = '';
255
+ $default_scene_yaw = $panoscenes["scene-yaw"];
256
+
257
+ $scene_max_pitch = '';
258
+ $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
259
+
260
+ $scene_min_pitch = '';
261
+ $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
262
+
263
+ $scene_max_yaw = '';
264
+ $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
265
+
266
+ $scene_min_yaw = '';
267
+ $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
268
+
269
+ $default_zoom = 100;
270
+ $default_zoom = $panoscenes["scene-zoom"];
271
+ if (!empty($default_zoom)) {
272
+ $default_zoom = (int)$panoscenes["scene-zoom"];
273
+ }
274
+ else {
275
+ $default_zoom = 100;
276
+ }
277
+
278
+ $max_zoom = 120;
279
+ $max_zoom = $panoscenes["scene-maxzoom"];
280
+ if (!empty($max_zoom)) {
281
+ $max_zoom = (int)$panoscenes["scene-maxzoom"];
282
+ }
283
+ else {
284
+ $max_zoom = 120;
285
+ }
286
+
287
+ $min_zoom = 50;
288
+ $min_zoom = $panoscenes["scene-minzoom"];
289
+ if (!empty($min_zoom)) {
290
+ $min_zoom = (int)$panoscenes["scene-minzoom"];
291
+ }
292
+ else {
293
+ $min_zoom = 50;
294
+ }
295
+
296
  $hotspot_datas = $panoscenes["hotspot-list"];
297
  $hotspots = array();
298
  foreach ($hotspot_datas as $hotspot_data) {
304
  __( "yaw" )=>$hotspot_data["hotspot-yaw"],
305
  __( "type" )=>$hotspot_data["hotspot-type"],
306
  __( "URL" )=>$hotspot_data["hotspot-url"],
 
307
  __( "clickHandlerArgs" )=>$hotspot_data["hotspot-content"],
308
  __( "createTooltipArgs" )=>$hotspot_data["hotspot-hover"],
309
+ __( "sceneId" )=>$hotspot_data["hotspot-scene"],
310
+ __( "targetPitch" )=>(float)$hotspot_data["hotspot-scene-pitch"],
311
+ __( "targetYaw" )=>(float)$hotspot_data["hotspot-scene-yaw"]);
312
  array_push($hotspots, $hotspot_info);
313
+ if (empty($hotspot_data["hotspot-scene"])) {
314
+ unset($hotspot_info['targetPitch']);
315
+ unset($hotspot_info['targetYaw']);
316
  }
317
+ }
318
  }
319
 
320
  $scene_info = array();
321
+ $scene_info = array(__( "type" )=>$panoscenes["scene-type"],__( "panorama" )=>$panoscenes["scene-attachment-url"],__( "pitch" )=>$default_scene_pitch,__( "maxPitch" )=>$scene_max_pitch,__( "minPitch" )=>$scene_min_pitch,__( "maxYaw" )=>$scene_max_yaw,__( "minYaw" )=>$scene_min_yaw,__( "yaw" )=>$default_scene_yaw,__( "hfov" )=>$default_zoom,__( "maxHfov" )=>$max_zoom,__( "minHfov" )=>$min_zoom,__( "title" )=>$scene_ititle,__( "author" )=>$scene_author,__( "hotSpots" )=>$hotspots);
322
+
323
+ if ($panoscenes["ptyscene"] == "off") {
324
+ unset($scene_info['pitch']);
325
+ unset($scene_info['yaw']);
326
+ }
327
+
328
+ if (empty($panoscenes["scene-ititle"])) {
329
+ unset($scene_info['title']);
330
+ }
331
+ if (empty($panoscenes["scene-author"])) {
332
+ unset($scene_info['author']);
333
+ }
334
+
335
+ if ($panoscenes["cvgscene"] == "off") {
336
+ unset($scene_info['maxPitch']);
337
+ unset($scene_info['minPitch']);
338
+ }
339
+ if (empty($panoscenes["scene-maxpitch"])) {
340
+ unset($scene_info['maxPitch']);
341
+ }
342
+
343
+ if (empty($panoscenes["scene-minpitch"])) {
344
+ unset($scene_info['minPitch']);
345
+ }
346
+
347
+ if ($panoscenes["chgscene"] == "off") {
348
+ unset($scene_info['maxYaw']);
349
+ unset($scene_info['minYaw']);
350
+
351
+ }
352
+ if (empty($panoscenes["scene-maxyaw"])) {
353
+ unset($scene_info['maxYaw']);
354
+ }
355
+
356
+ if (empty($panoscenes["scene-minyaw"])) {
357
+ unset($scene_info['minYaw']);
358
+ }
359
+
360
+ if ($panoscenes["czscene"] == "off") {
361
+ unset($scene_info['hfov']);
362
+ unset($scene_info['maxHfov']);
363
+ unset($scene_info['minHfov']);
364
+ }
365
+
366
  $scene_array = array();
367
  $scene_array = array(
368
  __($panoscenes["scene-id"])=>$scene_info
369
  );
370
  $scene_data[$panoscenes["scene-id"]] = $scene_info;
371
  }
372
+
373
  }
374
 
375
  $pano_id_array = array();
615
  die();
616
  }
617
 
618
+ if (!empty($scenes_val["scene-pitch"])) {
619
+ $validate_scene_pitch = $scenes_val["scene-pitch"];
620
+ $validated_scene_pitch = preg_replace('/[^0-9.-]/','',$validate_scene_pitch);
621
+ if ($validated_scene_pitch != $validate_scene_pitch) {
622
+ wp_send_json_error('<p><span>Warning:</span> Default pitch value can only contain float numbers</p>');
623
+ die();
624
+ }
625
+ }
626
+
627
+ if (!empty($scenes_val["scene-yaw"])) {
628
+ $validate_scene_yaw = $scenes_val["scene-yaw"];
629
+ $validated_scene_yaw = preg_replace('/[^0-9.-]/','',$validate_scene_yaw);
630
+ if ($validated_scene_yaw != $validate_scene_yaw) {
631
+ wp_send_json_error('<p><span>Warning:</span> Default yaw value can only contain float numbers</p>');
632
+ die();
633
+ }
634
+ }
635
+
636
+ if (!empty($scenes_val["scene-zoom"])) {
637
+ $validate_default_zoom = $scenes_val["scene-zoom"];
638
+ $validated_default_zoom = preg_replace('/[^0-9-]/','',$validate_default_zoom);
639
+ if ($validated_default_zoom != $validate_default_zoom) {
640
+ wp_send_json_error('<p><span>Warning:</span> Default zoom value can only contain number in degree from 50 to 120</p>');
641
+ die();
642
+ }
643
+ $default_zoom_value = (int)$scenes_val["scene-zoom"];
644
+ if ($default_zoom_value > 120 || $default_zoom_value < 50) {
645
+ wp_send_json_error('<p><span>Warning:</span> Default zoom value can only contain number in degree from 50 to 120</p>');
646
+ die();
647
+ }
648
+ }
649
+
650
+ if (!empty($scenes_val["scene-maxzoom"])) {
651
+ $validate_max_zoom = $scenes_val["scene-maxzoom"];
652
+ $validated_max_zoom = preg_replace('/[^0-9-]/','',$validate_max_zoom);
653
+ if ($validated_max_zoom != $validate_max_zoom) {
654
+ wp_send_json_error('<p><span>Warning:</span> Max zoom out value can only contain number in degree.</p>');
655
+ die();
656
+ }
657
+ $max_zoom_value = (int)$scenes_val["scene-maxzoom"];
658
+ if ($max_zoom_value > 120 ) {
659
+ wp_send_json_error('<p><span>Warning:</span> Max zoom out value can only contain number in degree below 120.</p>');
660
+ die();
661
+ }
662
+ }
663
+
664
+ if (!empty($scenes_val["scene-minzoom"])) {
665
+ $validate_min_zoom = $scenes_val["scene-minzoom"];
666
+ $validated_min_zoom = preg_replace('/[^0-9-]/','',$validate_min_zoom);
667
+ if ($validated_min_zoom != $validate_min_zoom) {
668
+ wp_send_json_error('<p><span>Warning:</span> Max zoom in value can only contain number in degree.</p>');
669
+ die();
670
+ }
671
+ $min_zoom_value = (int)$scenes_val["scene-minzoom"];
672
+ if ($min_zoom_value < 50 ) {
673
+ wp_send_json_error('<p><span>Warning:</span> Max zoom in value can only contain number in degree above 50.</p>');
674
+ die();
675
+ }
676
+ }
677
+
678
  if ($scenes_val["hotspot-list"] != "") {
679
  foreach ($scenes_val["hotspot-list"] as $hotspot_val) {
680
  $hotspot_title_validate = $hotspot_val["hotspot-title"];
 
 
 
 
681
 
682
  if (!empty($hotspot_title_validate)) {
683
  $hotspot_title_validated = preg_replace('/[^0-9a-zA-Z_]/',"",$hotspot_title_validate);
785
  }
786
  }
787
  }
788
+
 
 
789
  $pano_array = array();
790
  $pano_array = array(__( "panoid" )=>$panoid,__( "autoLoad" )=>$autoload,__( "showControls" )=>$control,__( "compass" )=>$compass,__( "autoRotate" )=>$autorotation,__( "autoRotateInactivityDelay" )=>$autorotationinactivedelay,__( "autoRotateStopDelay" )=>$autorotationstopdelay,__( "preview" )=>$preview,__( "defaultscene" )=>$default_scene,__( "scenefadeduration" )=>$scene_fade_duration,__( "panodata" )=>$panodata);
791
 
admin/class-wpvr-icon.php CHANGED
File without changes
admin/css/wpvr-admin.css CHANGED
@@ -4,7 +4,12 @@
4
  */
5
 
6
  @import url('https://fonts.googleapis.com/css?family=Roboto:300,300i,400,500,700,900');
7
-
 
 
 
 
 
8
  div.custom-tooltip span {
9
  visibility: hidden;
10
  position: absolute;
@@ -17,6 +22,9 @@ div.custom-tooltip span {
17
  margin: 0 0px 0px 12px !important;
18
  bottom: 40px;
19
  transform: translateX(-50%);
 
 
 
20
  }
21
  div.custom-tooltip:hover span{
22
  visibility: visible;
@@ -119,6 +127,9 @@ div.custom-tooltip:hover span:after {
119
  padding: 10px;
120
  margin: auto;
121
  border-radius: 5px;
 
 
 
122
  }
123
 
124
  .custom-tooltip p {
@@ -522,7 +533,7 @@ div.custom-tooltip:hover span:after {
522
  font-size: 16px;
523
  display: block;
524
  color: #555555;
525
- /*font-weight: 600;*/
526
  }
527
  .rex-pano-tab.general .single-settings span {
528
  min-width: 240px;
@@ -550,6 +561,10 @@ div.custom-tooltip:hover span:after {
550
  border-radius: 3px;
551
  }
552
 
 
 
 
 
553
  /*------------input field tooltip-----------*/
554
  .hotspot-icon input {
555
  width: 20% !important;
@@ -558,16 +573,19 @@ div.custom-tooltip:hover span:after {
558
  position: relative;
559
  padding-left: 10px;
560
  }
 
561
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip {
562
  position: absolute;
563
  right: 0;
564
  bottom: 13px;
565
  }
 
566
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip i,
567
  .rex-pano-tab.general .single-settings .field-tooltip i {
568
  font-size: 20px;
569
  cursor: help;
570
  }
 
571
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span,
572
  .rex-pano-tab.general .single-settings .field-tooltip span {
573
  position: absolute;
@@ -599,6 +617,7 @@ div.custom-tooltip:hover span:after {
599
  -o-transition: all 0.5s ease;
600
  transition: all 0.5s ease;
601
  }
 
602
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span:before,
603
  .rex-pano-tab.general .single-settings .field-tooltip span:before {
604
  content: "";
@@ -616,6 +635,7 @@ div.custom-tooltip:hover span:after {
616
  -o-transform: translateY(-50%);
617
  transform: translateY(-50%);
618
  }
 
619
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip:hover span,
620
  .rex-pano-tab.general .single-settings .field-tooltip:hover span {
621
  opacity: 1;
@@ -623,9 +643,6 @@ div.custom-tooltip:hover span:after {
623
  }
624
 
625
  /*------------sub tab style----------*/
626
- .rex-pano-sub-tabs {
627
-
628
- }
629
  .rex-pano-sub-tabs .rex-pano-tab-nav {
630
  width: auto;
631
  padding: 50px 40px 30px;
@@ -721,8 +738,6 @@ div.custom-tooltip:hover span:after {
721
  .single-hotspot .hotspot-setting,
722
  .single-scene .scene-setting {
723
  margin-bottom: 21px;
724
- }
725
- .single-hotspot .hotspot-setting{
726
  position: relative;
727
  }
728
  .single-hotspot .hotspot-setting .change-icon {
@@ -761,8 +776,8 @@ div.custom-tooltip:hover span:after {
761
  .single-hotspot .hotspot-setting label,
762
  .single-scene .scene-setting label {
763
  color: #494b51;
764
- font-size: 18px;
765
- /*font-weight: 500;*/
766
  display: block;
767
  margin-bottom: 10px;
768
  }
@@ -1253,17 +1268,6 @@ button.delete-hotspot{
1253
  padding: 0 !important
1254
  }
1255
 
1256
-
1257
-
1258
-
1259
-
1260
- .rex-onboarding .block-wrapper{
1261
- /*display: flex;
1262
- flex-flow: row;
1263
- justify-content: space-between;
1264
- align-items: flex-start;*/
1265
- }
1266
-
1267
  .rex-onboarding .wrapper {
1268
  padding-right: 30px;
1269
  }
4
  */
5
 
6
  @import url('https://fonts.googleapis.com/css?family=Roboto:300,300i,400,500,700,900');
7
+ .icon-wpvrtourmake_icon:before {
8
+ content: '';
9
+ height: 30px;
10
+ width: 30px;
11
+ background: url('../images/icon.png') no-repeat center center / 100% 100%;
12
+ }
13
  div.custom-tooltip span {
14
  visibility: hidden;
15
  position: absolute;
22
  margin: 0 0px 0px 12px !important;
23
  bottom: 40px;
24
  transform: translateX(-50%);
25
+ min-width: 300px;
26
+ font-size: 15px;
27
+ line-height: 24px;
28
  }
29
  div.custom-tooltip:hover span{
30
  visibility: visible;
127
  padding: 10px;
128
  margin: auto;
129
  border-radius: 5px;
130
+ text-align: center;
131
+ font-size: 15px;
132
+ line-height: 24px;
133
  }
134
 
135
  .custom-tooltip p {
533
  font-size: 16px;
534
  display: block;
535
  color: #555555;
536
+ font-weight: 400;
537
  }
538
  .rex-pano-tab.general .single-settings span {
539
  min-width: 240px;
561
  border-radius: 3px;
562
  }
563
 
564
+ .single-scene .scene-content .scene-setting {
565
+ max-width: 440px;
566
+ }
567
+
568
  /*------------input field tooltip-----------*/
569
  .hotspot-icon input {
570
  width: 20% !important;
573
  position: relative;
574
  padding-left: 10px;
575
  }
576
+ .single-scene .scene-setting .field-tooltip,
577
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip {
578
  position: absolute;
579
  right: 0;
580
  bottom: 13px;
581
  }
582
+ .single-scene .scene-setting .field-tooltip i,
583
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip i,
584
  .rex-pano-tab.general .single-settings .field-tooltip i {
585
  font-size: 20px;
586
  cursor: help;
587
  }
588
+ .single-scene .scene-setting .field-tooltip span,
589
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span,
590
  .rex-pano-tab.general .single-settings .field-tooltip span {
591
  position: absolute;
617
  -o-transition: all 0.5s ease;
618
  transition: all 0.5s ease;
619
  }
620
+ .single-scene .scene-setting .field-tooltip span:before,
621
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span:before,
622
  .rex-pano-tab.general .single-settings .field-tooltip span:before {
623
  content: "";
635
  -o-transform: translateY(-50%);
636
  transform: translateY(-50%);
637
  }
638
+ .single-scene .scene-setting .field-tooltip:hover span,
639
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip:hover span,
640
  .rex-pano-tab.general .single-settings .field-tooltip:hover span {
641
  opacity: 1;
643
  }
644
 
645
  /*------------sub tab style----------*/
 
 
 
646
  .rex-pano-sub-tabs .rex-pano-tab-nav {
647
  width: auto;
648
  padding: 50px 40px 30px;
738
  .single-hotspot .hotspot-setting,
739
  .single-scene .scene-setting {
740
  margin-bottom: 21px;
 
 
741
  position: relative;
742
  }
743
  .single-hotspot .hotspot-setting .change-icon {
776
  .single-hotspot .hotspot-setting label,
777
  .single-scene .scene-setting label {
778
  color: #494b51;
779
+ font-size: 16px;
780
+ font-weight: 400;
781
  display: block;
782
  margin-bottom: 10px;
783
  }
1268
  padding: 0 !important
1269
  }
1270
 
 
 
 
 
 
 
 
 
 
 
 
1271
  .rex-onboarding .wrapper {
1272
  padding-right: 30px;
1273
  }
admin/js/wpvr-admin.js CHANGED
@@ -151,71 +151,69 @@
151
  var flag_ok = false;
152
  $('#publish').on('click', function(e){
153
  var x = $(this).val();
154
- // if(x=='Publish' || x== 'Update') {
155
- if ( ! flag_ok ) {
156
- e.preventDefault();
157
- var postid = $("#post_ID").val();
158
- var panovideo = $("input[name='panovideo']:checked").val();
159
- var videourl = $("input[name='video-attachment-url']").val();
160
- var autoload = $("input[name='autoload']:checked").val();
161
- var control = $("input[name='controls']:checked").val();
162
- var compass = $("input[name='compass']:checked").val();
163
- var defaultscene = $("input[name='default-scene-id']").val();
164
- var preview = $("input[name='preview-attachment-url']").val();
165
- var rotation = $("input[name='autorotation']:checked").val();
166
- var autorotation = $("input[name='auto-rotation']").val();
167
- var autorotationinactivedelay = $("input[name='auto-rotation-inactive-delay']").val();
168
- var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
169
-
170
- var scenefadeduration = $("input[name='scene-fade-duration']").val();
171
-
172
- if ($('.scene-setup')[0]) {
173
- var panodata = $('.scene-setup').repeaterVal();
174
- } else {
175
- var panodata = '';
176
- }
177
- jQuery.ajax({
178
-
179
- type: "POST",
180
- url: ajaxurl,
181
- data: {
182
- action: "wpvr_save",
183
- postid: postid,
184
- panovideo: panovideo,
185
- videourl: videourl,
186
- control: control,
187
- compass: compass,
188
- autoload: autoload,
189
- panodata: panodata,
190
- defaultscene: defaultscene,
191
- preview: preview,
192
- rotation: rotation,
193
- autorotation: autorotation,
194
- autorotationinactivedelay: autorotationinactivedelay,
195
- autorotationstopdelay: autorotationstopdelay,
196
- scenefadeduration: scenefadeduration,
197
- },
198
-
199
- success: function( response ){
200
- if (response.success == false) {
201
- $('#error_occured').show();
202
- $('#error_occured').html(response.data);
203
- $('#error_occuredpub').show();
204
- $('#error_occuredpub').html(response.data);
205
-
206
- $('body').addClass('error-overlay');
207
- $('html, body').animate({
208
- scrollTop: $("#error_occured").offset().top
209
- }, 500);
210
- }
211
- else {
212
- flag_ok = true;
213
- $('#publish').trigger('click');
214
- }
215
  }
216
- });
217
- }
218
- // }
219
  });
220
  });
221
 
@@ -235,71 +233,69 @@
235
  var flag_ok = false;
236
  $('#save-post').on('click', function(e){
237
  var x = $(this).val();
238
- // if(x=='Publish' || x== 'Update') {
239
- if ( ! flag_ok ) {
240
- e.preventDefault();
241
- var postid = $("#post_ID").val();
242
- var panovideo = $("input[name='panovideo']:checked").val();
243
- var videourl = $("input[name='video-attachment-url']").val();
244
- var autoload = $("input[name='autoload']:checked").val();
245
- var control = $("input[name='controls']:checked").val();
246
- var compass = $("input[name='compass']:checked").val();
247
- var defaultscene = $("input[name='default-scene-id']").val();
248
- var preview = $("input[name='preview-attachment-url']").val();
249
- var rotation = $("input[name='autorotation']").val();
250
- var autorotation = $("input[name='auto-rotation']").val();
251
- var autorotationinactivedelay = $("input[name='auto-rotation-inactive-delay']").val();
252
- var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
253
-
254
- var scenefadeduration = $("input[name='scene-fade-duration']").val();
255
-
256
- if ($('.scene-setup')[0]) {
257
- var panodata = $('.scene-setup').repeaterVal();
258
- } else {
259
- var panodata = '';
260
- }
261
- jQuery.ajax({
262
-
263
- type: "POST",
264
- url: ajaxurl,
265
- data: {
266
- action: "wpvr_save",
267
- postid: postid,
268
- panovideo: panovideo,
269
- videourl: videourl,
270
- control: control,
271
- compass: compass,
272
- autoload: autoload,
273
- panodata: panodata,
274
- defaultscene: defaultscene,
275
- preview: preview,
276
- rotation: rotation,
277
- autorotation: autorotation,
278
- autorotationinactivedelay: autorotationinactivedelay,
279
- autorotationstopdelay: autorotationstopdelay,
280
- scenefadeduration: scenefadeduration,
281
- },
282
-
283
- success: function( response ){
284
- if (response.success == false) {
285
- $('#error_occured').show();
286
- $('#error_occured').html(response.data);
287
- $('#error_occuredpub').show();
288
- $('#error_occuredpub').html(response.data);
289
-
290
- $('body').addClass('error-overlay');
291
- $('html, body').animate({
292
- scrollTop: $("#error_occured").offset().top
293
- }, 500);
294
- }
295
- else {
296
- flag_ok = true;
297
- $('#save-post').trigger('click');
298
- }
299
  }
300
- });
301
- }
302
- // }
303
  });
304
  });
305
 
@@ -316,7 +312,6 @@
316
  args = args.replace(/\\/g, "");
317
  span.innerHTML = args;
318
  hotSpotDiv.appendChild(span);
319
- // span.style.width = span.scrollWidth - 20 + 'px';
320
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
321
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
322
  }
@@ -340,6 +335,10 @@
340
  defaultValues: {
341
  'scene-type': 'equirectangular',
342
  'dscene': 'off',
 
 
 
 
343
  },
344
  show: function () {
345
 
@@ -741,7 +740,7 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
741
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
742
  });
743
 
744
- //----------alert dismiss--------
745
  $(document).on("click","body",function() {
746
  $('.pano-alert').hide();
747
  });
@@ -881,4 +880,44 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
881
  }
882
  });
883
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
884
  })( jQuery );
151
  var flag_ok = false;
152
  $('#publish').on('click', function(e){
153
  var x = $(this).val();
154
+ if ( ! flag_ok ) {
155
+ e.preventDefault();
156
+ var postid = $("#post_ID").val();
157
+ var panovideo = $("input[name='panovideo']:checked").val();
158
+ var videourl = $("input[name='video-attachment-url']").val();
159
+ var autoload = $("input[name='autoload']:checked").val();
160
+ var control = $("input[name='controls']:checked").val();
161
+ var compass = $("input[name='compass']:checked").val();
162
+ var defaultscene = $("input[name='default-scene-id']").val();
163
+ var preview = $("input[name='preview-attachment-url']").val();
164
+ var rotation = $("input[name='autorotation']:checked").val();
165
+ var autorotation = $("input[name='auto-rotation']").val();
166
+ var autorotationinactivedelay = $("input[name='auto-rotation-inactive-delay']").val();
167
+ var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
168
+
169
+ var scenefadeduration = $("input[name='scene-fade-duration']").val();
170
+
171
+ if ($('.scene-setup')[0]) {
172
+ var panodata = $('.scene-setup').repeaterVal();
173
+ } else {
174
+ var panodata = '';
175
+ }
176
+ jQuery.ajax({
177
+
178
+ type: "POST",
179
+ url: ajaxurl,
180
+ data: {
181
+ action: "wpvr_save",
182
+ postid: postid,
183
+ panovideo: panovideo,
184
+ videourl: videourl,
185
+ control: control,
186
+ compass: compass,
187
+ autoload: autoload,
188
+ panodata: panodata,
189
+ defaultscene: defaultscene,
190
+ preview: preview,
191
+ rotation: rotation,
192
+ autorotation: autorotation,
193
+ autorotationinactivedelay: autorotationinactivedelay,
194
+ autorotationstopdelay: autorotationstopdelay,
195
+ scenefadeduration: scenefadeduration,
196
+ },
197
+
198
+ success: function( response ){
199
+ if (response.success == false) {
200
+ $('#error_occured').show();
201
+ $('#error_occured').html(response.data);
202
+ $('#error_occuredpub').show();
203
+ $('#error_occuredpub').html(response.data);
204
+
205
+ $('body').addClass('error-overlay');
206
+ $('html, body').animate({
207
+ scrollTop: $("#error_occured").offset().top
208
+ }, 500);
209
+ }
210
+ else {
211
+ flag_ok = true;
212
+ $('#publish').trigger('click');
 
 
213
  }
214
+ }
215
+ });
216
+ }
217
  });
218
  });
219
 
233
  var flag_ok = false;
234
  $('#save-post').on('click', function(e){
235
  var x = $(this).val();
236
+ if ( ! flag_ok ) {
237
+ e.preventDefault();
238
+ var postid = $("#post_ID").val();
239
+ var panovideo = $("input[name='panovideo']:checked").val();
240
+ var videourl = $("input[name='video-attachment-url']").val();
241
+ var autoload = $("input[name='autoload']:checked").val();
242
+ var control = $("input[name='controls']:checked").val();
243
+ var compass = $("input[name='compass']:checked").val();
244
+ var defaultscene = $("input[name='default-scene-id']").val();
245
+ var preview = $("input[name='preview-attachment-url']").val();
246
+ var rotation = $("input[name='autorotation']").val();
247
+ var autorotation = $("input[name='auto-rotation']").val();
248
+ var autorotationinactivedelay = $("input[name='auto-rotation-inactive-delay']").val();
249
+ var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
250
+
251
+ var scenefadeduration = $("input[name='scene-fade-duration']").val();
252
+
253
+ if ($('.scene-setup')[0]) {
254
+ var panodata = $('.scene-setup').repeaterVal();
255
+ } else {
256
+ var panodata = '';
257
+ }
258
+ jQuery.ajax({
259
+
260
+ type: "POST",
261
+ url: ajaxurl,
262
+ data: {
263
+ action: "wpvr_save",
264
+ postid: postid,
265
+ panovideo: panovideo,
266
+ videourl: videourl,
267
+ control: control,
268
+ compass: compass,
269
+ autoload: autoload,
270
+ panodata: panodata,
271
+ defaultscene: defaultscene,
272
+ preview: preview,
273
+ rotation: rotation,
274
+ autorotation: autorotation,
275
+ autorotationinactivedelay: autorotationinactivedelay,
276
+ autorotationstopdelay: autorotationstopdelay,
277
+ scenefadeduration: scenefadeduration,
278
+ },
279
+
280
+ success: function( response ){
281
+ if (response.success == false) {
282
+ $('#error_occured').show();
283
+ $('#error_occured').html(response.data);
284
+ $('#error_occuredpub').show();
285
+ $('#error_occuredpub').html(response.data);
286
+
287
+ $('body').addClass('error-overlay');
288
+ $('html, body').animate({
289
+ scrollTop: $("#error_occured").offset().top
290
+ }, 500);
291
+ }
292
+ else {
293
+ flag_ok = true;
294
+ $('#save-post').trigger('click');
 
 
295
  }
296
+ }
297
+ });
298
+ }
299
  });
300
  });
301
 
312
  args = args.replace(/\\/g, "");
313
  span.innerHTML = args;
314
  hotSpotDiv.appendChild(span);
 
315
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
316
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
317
  }
335
  defaultValues: {
336
  'scene-type': 'equirectangular',
337
  'dscene': 'off',
338
+ 'ptyscene': 'off',
339
+ 'cvgscene': 'off',
340
+ 'chgscene': 'off',
341
+ 'czscene': 'off',
342
  },
343
  show: function () {
344
 
740
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
741
  });
742
 
743
+ //----------alert dismiss--------//
744
  $(document).on("click","body",function() {
745
  $('.pano-alert').hide();
746
  });
880
  }
881
  });
882
 
883
+ $(document).on("change",".ptyscene",function(event) {
884
+ var ptyscene = $(this).val();
885
+ if (ptyscene == 'off') {
886
+ $(this).parent('.single-settings').siblings('.ptyscenedata').hide();
887
+ }
888
+ else {
889
+ $(this).parent('.single-settings').siblings('.ptyscenedata').show();
890
+ }
891
+ });
892
+
893
+ $(document).on("change",".cvgscene",function(event) {
894
+ var cvgscene = $(this).val();
895
+ if (cvgscene == 'off') {
896
+ $(this).parent('.single-settings').siblings('.cvgscenedata').hide();
897
+ }
898
+ else {
899
+ $(this).parent('.single-settings').siblings('.cvgscenedata').show();
900
+ }
901
+ });
902
+
903
+ $(document).on("change",".chgscene",function(event) {
904
+ var chgscenedata = $(this).val();
905
+ if (chgscenedata == 'off') {
906
+ $(this).parent('.single-settings').siblings('.chgscenedata').hide();
907
+ }
908
+ else {
909
+ $(this).parent('.single-settings').siblings('.chgscenedata').show();
910
+ }
911
+ });
912
+
913
+ $(document).on("change",".czscene",function(event) {
914
+ var czscene = $(this).val();
915
+ if (czscene == 'off') {
916
+ $(this).parent('.single-settings').siblings('.czscenedata').hide();
917
+ }
918
+ else {
919
+ $(this).parent('.single-settings').siblings('.czscenedata').show();
920
+ }
921
+ });
922
+
923
  })( jQuery );
admin/partials/wpvr-meta-box-builder-display.php CHANGED
@@ -115,6 +115,87 @@ if (isset($postdata['panodata'])) {
115
 
116
  if (!empty($panodata)) {
117
  foreach ($panodata["scene-list"] as $panoscenes) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  $hotspot_datas = array();
119
  if (isset($panoscenes["hotspot-list"])) {
120
  $hotspot_datas = $panoscenes["hotspot-list"];
@@ -123,6 +204,15 @@ if (isset($postdata['panodata'])) {
123
  $hotspots = array();
124
  foreach ($hotspot_datas as $hotspot_data) {
125
 
 
 
 
 
 
 
 
 
 
126
  $hotspot_info = array(
127
  __( "text" )=>$hotspot_data["hotspot-title"],
128
  __( "pitch" )=>$hotspot_data["hotspot-pitch"],
@@ -131,12 +221,70 @@ if (isset($postdata['panodata'])) {
131
  __( "URL" )=>$hotspot_data["hotspot-url"],
132
  __( "clickHandlerArgs" )=>$hotspot_data["hotspot-content"],
133
  __( "createTooltipArgs" )=>$hotspot_data["hotspot-hover"],
134
- __( "sceneId" )=>$hotspot_data["hotspot-scene"]);
 
 
135
  array_push($hotspots, $hotspot_info);
 
 
 
 
136
  }
137
 
138
  $scene_info = array();
139
- $scene_info = array(__( "type" )=>$panoscenes["scene-type"],__( "panorama" )=>$panoscenes["scene-attachment-url"],__( "hotSpots" )=>$hotspots);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  $scene_array = array();
141
  $scene_array = array(
142
  __($panoscenes["scene-id"])=>$scene_info
@@ -225,13 +373,11 @@ if (isset($postdata['panodata'])) {
225
  function wpvrtooltip(hotSpotDiv, args) {
226
  hotSpotDiv.classList.add('custom-tooltip');
227
  var span = document.createElement('span');
228
- console.log(args);
229
  if (args != null) {
230
  args = args.replace(/\\/g, "");
231
  }
232
  span.innerHTML = args;
233
  hotSpotDiv.appendChild(span);
234
- // span.style.width = span.scrollWidth - 20 + 'px';
235
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
236
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
237
  }
115
 
116
  if (!empty($panodata)) {
117
  foreach ($panodata["scene-list"] as $panoscenes) {
118
+
119
+ $scene_ititle = '';
120
+ if (isset($panoscenes["scene-ititle"])) {
121
+ $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
122
+ }
123
+
124
+ $scene_author = '';
125
+ if (isset($panoscenes["scene-author"])) {
126
+ $scene_author = sanitize_text_field($panoscenes["scene-author"]);
127
+ }
128
+
129
+ $default_scene_pitch = '';
130
+ if (isset($panoscenes["scene-pitch"])) {
131
+ $default_scene_pitch = $panoscenes["scene-pitch"];
132
+ }
133
+
134
+ $default_scene_yaw = '';
135
+ if (isset($panoscenes["scene-yaw"])) {
136
+ $default_scene_yaw = $panoscenes["scene-yaw"];
137
+ }
138
+
139
+ $scene_max_pitch = '';
140
+ if (isset($panoscenes["scene-maxpitch"])) {
141
+ $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
142
+ }
143
+
144
+
145
+ $scene_min_pitch = '';
146
+ if (isset($panoscenes["scene-minpitch"])) {
147
+ $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
148
+ }
149
+
150
+
151
+ $scene_max_yaw = '';
152
+ if (isset($panoscenes["scene-maxyaw"])) {
153
+ $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
154
+ }
155
+
156
+
157
+ $scene_min_yaw = '';
158
+ if (isset($panoscenes["scene-minyaw"])) {
159
+ $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
160
+ }
161
+
162
+
163
+ $default_zoom = 100;
164
+ if (isset($panoscenes["scene-zoom"])) {
165
+ $default_zoom = $panoscenes["scene-zoom"];
166
+ }
167
+
168
+ if (!empty($default_zoom)) {
169
+ $default_zoom = (int)$default_zoom;
170
+ }
171
+ else {
172
+ $default_zoom = 100;
173
+ }
174
+
175
+ $max_zoom = 120;
176
+ if (isset($panoscenes["scene-maxzoom"])) {
177
+ $max_zoom = $panoscenes["scene-maxzoom"];
178
+ }
179
+
180
+ if (!empty($max_zoom)) {
181
+ $max_zoom = (int)$max_zoom;
182
+ }
183
+ else {
184
+ $max_zoom = 120;
185
+ }
186
+
187
+ $min_zoom = 50;
188
+ if (isset($panoscenes["scene-minzoom"])) {
189
+ $min_zoom = $panoscenes["scene-minzoom"];
190
+ }
191
+
192
+ if (!empty($min_zoom)) {
193
+ $min_zoom = (int)$min_zoom;
194
+ }
195
+ else {
196
+ $min_zoom = 50;
197
+ }
198
+
199
  $hotspot_datas = array();
200
  if (isset($panoscenes["hotspot-list"])) {
201
  $hotspot_datas = $panoscenes["hotspot-list"];
204
  $hotspots = array();
205
  foreach ($hotspot_datas as $hotspot_data) {
206
 
207
+ $hotspot_scene_pitch = '';
208
+ if (isset($hotspot_data["hotspot-scene-pitch"])) {
209
+ $hotspot_scene_pitch = $hotspot_data["hotspot-scene-pitch"];
210
+ }
211
+ $hotspot_scene_yaw = '';
212
+ if (isset($hotspot_data["hotspot-scene-yaw"])) {
213
+ $hotspot_scene_yaw = $hotspot_data["hotspot-scene-yaw"];
214
+ }
215
+
216
  $hotspot_info = array(
217
  __( "text" )=>$hotspot_data["hotspot-title"],
218
  __( "pitch" )=>$hotspot_data["hotspot-pitch"],
221
  __( "URL" )=>$hotspot_data["hotspot-url"],
222
  __( "clickHandlerArgs" )=>$hotspot_data["hotspot-content"],
223
  __( "createTooltipArgs" )=>$hotspot_data["hotspot-hover"],
224
+ __( "sceneId" )=>$hotspot_data["hotspot-scene"],
225
+ __( "targetPitch" )=>(float)$hotspot_scene_pitch,
226
+ __( "targetYaw" )=>(float)$hotspot_scene_yaw);
227
  array_push($hotspots, $hotspot_info);
228
+ if (empty($hotspot_data["hotspot-scene"])) {
229
+ unset($hotspot_info['targetPitch']);
230
+ unset($hotspot_info['targetYaw']);
231
+ }
232
  }
233
 
234
  $scene_info = array();
235
+ $scene_info = array(__( "type" )=>$panoscenes["scene-type"],__( "panorama" )=>$panoscenes["scene-attachment-url"],__( "pitch" )=>$default_scene_pitch,__( "maxPitch" )=>$scene_max_pitch,__( "minPitch" )=>$scene_min_pitch,__( "maxYaw" )=>$scene_max_yaw,__( "minYaw" )=>$scene_min_yaw,__( "yaw" )=>$default_scene_yaw,__( "hfov" )=>$default_zoom,__( "maxHfov" )=>$max_zoom,__( "minHfov" )=>$min_zoom,__( "title" )=>$scene_ititle,__( "author" )=>$scene_author,__( "hotSpots" )=>$hotspots);
236
+
237
+ if (isset($panoscenes["ptyscene"])) {
238
+ if ($panoscenes["ptyscene"] == "off") {
239
+ unset($scene_info['pitch']);
240
+ unset($scene_info['yaw']);
241
+ }
242
+ }
243
+
244
+ if (empty($panoscenes["scene-ititle"])) {
245
+ unset($scene_info['title']);
246
+ }
247
+ if (empty($panoscenes["scene-author"])) {
248
+ unset($scene_info['author']);
249
+ }
250
+
251
+ if (isset($panoscenes["cvgscene"])) {
252
+ if ($panoscenes["cvgscene"] == "off") {
253
+ unset($scene_info['maxPitch']);
254
+ unset($scene_info['minPitch']);
255
+ }
256
+ }
257
+
258
+ if (empty($panoscenes["scene-maxpitch"])) {
259
+ unset($scene_info['maxPitch']);
260
+ }
261
+
262
+ if (empty($panoscenes["scene-minpitch"])) {
263
+ unset($scene_info['minPitch']);
264
+ }
265
+
266
+ if (isset($panoscenes["chgscene"])) {
267
+ if ($panoscenes["chgscene"] == "off") {
268
+ unset($scene_info['maxYaw']);
269
+ unset($scene_info['minYaw']);
270
+ }
271
+ }
272
+ if (empty($panoscenes["scene-maxyaw"])) {
273
+ unset($scene_info['maxYaw']);
274
+ }
275
+
276
+ if (empty($panoscenes["scene-minyaw"])) {
277
+ unset($scene_info['minYaw']);
278
+ }
279
+
280
+ if (isset($panoscenes["czscene"])) {
281
+ if ($panoscenes["czscene"] == "off") {
282
+ unset($scene_info['hfov']);
283
+ unset($scene_info['maxHfov']);
284
+ unset($scene_info['minHfov']);
285
+ }
286
+ }
287
+
288
  $scene_array = array();
289
  $scene_array = array(
290
  __($panoscenes["scene-id"])=>$scene_info
373
  function wpvrtooltip(hotSpotDiv, args) {
374
  hotSpotDiv.classList.add('custom-tooltip');
375
  var span = document.createElement('span');
 
376
  if (args != null) {
377
  args = args.replace(/\\/g, "");
378
  }
379
  span.innerHTML = args;
380
  hotSpotDiv.appendChild(span);
 
381
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
382
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
383
  }
admin/partials/wpvr-meta-box-shortcode-display.php CHANGED
@@ -24,4 +24,4 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
24
  <p><?php echo __('For gutenberg:', 'wpvr'); ?></p>
25
  <p>use id:<code><?php echo $id; ?></code>on wpvr block setting</p>
26
  <p><?php echo __('Check how to use:', 'wpvr'); ?><a href="https://rextheme.com/docs/wp-vr/gutenberg-block/" target="blank">wpvr block</a></p>
27
- <!-- <div id="error_occuredpub" style="color: red;"></div> -->
24
  <p><?php echo __('For gutenberg:', 'wpvr'); ?></p>
25
  <p>use id:<code><?php echo $id; ?></code>on wpvr block setting</p>
26
  <p><?php echo __('Check how to use:', 'wpvr'); ?><a href="https://rextheme.com/docs/wp-vr/gutenberg-block/" target="blank">wpvr block</a></p>
27
+
admin/partials/wpvr_documentation.php CHANGED
@@ -141,8 +141,15 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
141
  <div class="parent">
142
  <div class="item"><?php _e('Unlimited scenes','wpvr'); ?></div>
143
  <div class="item"><?php _e('Unlimited hotspots','wpvr'); ?></div>
144
- <div class="item"><?php _e('Customized Hotspot Icon','wpvr'); ?></div>
145
- <div class="item"><?php _e('Dynamic Icon background color hotspot','wpvr'); ?></div>
 
 
 
 
 
 
 
146
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
147
  </div>
148
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
141
  <div class="parent">
142
  <div class="item"><?php _e('Unlimited scenes','wpvr'); ?></div>
143
  <div class="item"><?php _e('Unlimited hotspots','wpvr'); ?></div>
144
+ <div class="item"><?php _e('Customized hotspot icon','wpvr'); ?></div>
145
+ <div class="item"><?php _e('Dynamic Icon background color on hotspot','wpvr'); ?></div>
146
+ <div class="item"><?php _e('Compass Switch','wpvr'); ?></div>
147
+ <div class="item"><?php _e('Default zoom level','wpvr'); ?></div>
148
+ <div class="item"><?php _e('Maximum and minimum zoom range','wpvr'); ?></div>
149
+ <div class="item"><?php _e('Customize each scene\'s default face on load','wpvr'); ?></div>
150
+ <div class="item"><?php _e('Scene grab control and custom boundary for each scene','wpvr'); ?></div>
151
+ <div class="item"><?php _e('Scene title and author tag support','wpvr'); ?></div>
152
+ <div class="item"><?php _e('Elementor widget support','wpvr'); ?></div>
153
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
154
  </div>
155
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
includes/class-wpvr-deactivator.php CHANGED
@@ -32,7 +32,6 @@ class Wpvr_Deactivator {
32
  public static function deactivate() {
33
  if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
34
  deactivate_plugins( 'wpvr-pro/wpvr-pro.php' );
35
- // deactivate_plugins( plugin_basename( __FILE__ ) );
36
  wp_die( __( 'WPVR Pro will auto deactivate for deactivating WPVR. <br><a href="' . admin_url( 'plugins.php' ) . '">&laquo; Return to Plugins and deactivate WPVR again please.</a>' ) );
37
  }
38
  }
32
  public static function deactivate() {
33
  if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )){
34
  deactivate_plugins( 'wpvr-pro/wpvr-pro.php' );
 
35
  wp_die( __( 'WPVR Pro will auto deactivate for deactivating WPVR. <br><a href="' . admin_url( 'plugins.php' ) . '">&laquo; Return to Plugins and deactivate WPVR again please.</a>' ) );
36
  }
37
  }
includes/class-wpvr.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
3
  /**
4
  * The file that defines the core plugin class
5
  *
@@ -27,6 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
27
  * @subpackage Wpvr/includes
28
  * @author Rextheme <sakib@coderex.co>
29
  */
 
30
  class Wpvr {
31
 
32
  /**
@@ -74,6 +76,7 @@ class Wpvr {
74
  * @since 1.0.0
75
  */
76
  public function __construct() {
 
77
  if ( defined( 'WPVR' ) ) {
78
  $this->version = WPVR;
79
  } else {
@@ -133,6 +136,7 @@ class Wpvr {
133
  * The class responsible for defining all JQuery Ajax.
134
  */
135
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpvr-ajax.php';
 
136
  /**
137
  * The class responsible for defining all JQuery Ajax.
138
  */
@@ -174,8 +178,41 @@ class Wpvr {
174
  */
175
  private function define_admin_hooks() {
176
 
177
- $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
178
- $plugin_admin_page = new Wpvr_Admin_Pages();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  $plugin_admin_ajax = new Wpvr_Ajax();
180
 
181
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
  /**
5
  * The file that defines the core plugin class
6
  *
28
  * @subpackage Wpvr/includes
29
  * @author Rextheme <sakib@coderex.co>
30
  */
31
+
32
  class Wpvr {
33
 
34
  /**
76
  * @since 1.0.0
77
  */
78
  public function __construct() {
79
+
80
  if ( defined( 'WPVR' ) ) {
81
  $this->version = WPVR;
82
  } else {
136
  * The class responsible for defining all JQuery Ajax.
137
  */
138
  require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpvr-ajax.php';
139
+
140
  /**
141
  * The class responsible for defining all JQuery Ajax.
142
  */
178
  */
179
  private function define_admin_hooks() {
180
 
181
+ include_once(ABSPATH.'wp-admin/includes/plugin.php');
182
+ if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
183
+ if (file_exists(ABSPATH . '/wp-content/plugins/wpvr-pro/wpvr-pro.php')) {
184
+ if (class_exists('Wpvrpro')) {
185
+ $plugin_admin = new Wpvrpro( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
186
+ }
187
+ else {
188
+ $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
189
+ }
190
+
191
+ }
192
+ else {
193
+ $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
194
+ }
195
+ }else {
196
+ $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
197
+ }
198
+
199
+ if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
200
+ if (file_exists(ABSPATH . '/wp-content/plugins/wpvr-pro/wpvr-pro.php')) {
201
+ if (class_exists('Wpvr_Admin_Pages_pro')) {
202
+ $plugin_admin_page = new Wpvr_Admin_Pages_pro();
203
+ }
204
+ else {
205
+ $plugin_admin_page = new Wpvr_Admin_Pages();
206
+ }
207
+
208
+ }
209
+ else {
210
+ $plugin_admin_page = new Wpvr_Admin_Pages();
211
+ }
212
+ }else {
213
+ $plugin_admin_page = new Wpvr_Admin_Pages();
214
+ }
215
+
216
  $plugin_admin_ajax = new Wpvr_Ajax();
217
 
218
  $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
public/class-wpvr-public.php CHANGED
@@ -73,7 +73,6 @@ class Wpvr_Public {
73
  * class.
74
  */
75
  $plugin_url = plugin_dir_url( dirname(__FILE__) );
76
- // wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), $this->version, 'all' );
77
  wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
78
  wp_enqueue_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
79
  wp_enqueue_style('videojs-css', 'https://vjs.zencdn.net/7.1.0/video-js.css', array(), true);
@@ -122,7 +121,7 @@ class Wpvr_Public {
122
  * @since 1.0.0
123
  */
124
  public function wpvr_shortcode( $atts ) {
125
- ob_start();
126
  extract(
127
  shortcode_atts(
128
  array(
@@ -162,7 +161,9 @@ class Wpvr_Public {
162
  $foundid = '';
163
  $foundid = $explodeid[1];
164
  $html = '';
165
- $html .= '<iframe width="'.trim($width,'px').'" height="'.trim($height,'px').'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
 
 
166
 
167
  } elseif (strpos($videourl, 'vimeo') > 0) {
168
 
@@ -171,11 +172,13 @@ class Wpvr_Public {
171
  $foundid = '';
172
  $foundid = $explodeid[3];
173
  $html = '';
174
- $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
 
 
175
 
176
  } else {
177
  $html = '';
178
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align: center; max-width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
179
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
180
  $html .= '<script>';
181
  $html .= 'videojs('.$postdata['vidid'].', {';
@@ -246,6 +249,85 @@ class Wpvr_Public {
246
 
247
  if (!empty($panodata["scene-list"])) {
248
  foreach ($panodata["scene-list"] as $panoscenes) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  $hotspot_datas = array();
250
  if (isset($panoscenes["hotspot-list"])) {
251
  $hotspot_datas = $panoscenes["hotspot-list"];
@@ -260,7 +342,15 @@ class Wpvr_Public {
260
  $hotspot_data["hotspot-customclass"] = $hotspot_data["hotspot-customclass-pro"];
261
  $hotspoticoncolor = $hotspot_data["hotspot-customclass-color-icon-value"];
262
  }
263
- }
 
 
 
 
 
 
 
 
264
 
265
  $hotspot_info = array(
266
  __( "text" )=>$hotspot_data["hotspot-title"],
@@ -271,15 +361,72 @@ class Wpvr_Public {
271
  __( "URL" )=>$hotspot_data["hotspot-url"],
272
  __( "clickHandlerArgs" )=>$hotspot_data["hotspot-content"],
273
  __( "createTooltipArgs" )=>$hotspot_data["hotspot-hover"],
274
- __( "sceneId" )=>$hotspot_data["hotspot-scene"]);
 
 
275
  if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
276
  unset($hotspot_info["cssClass"]);
277
  }
 
 
 
 
278
  array_push($hotspots, $hotspot_info);
279
  }
280
 
281
  $scene_info = array();
282
- $scene_info = array(__( "type" )=>$panoscenes["scene-type"],__( "panorama" )=>$panoscenes["scene-attachment-url"],__( "hotSpots" )=>$hotspots);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  $scene_array = array();
284
  $scene_array = array(
285
  __($panoscenes["scene-id"])=>$scene_info
@@ -356,10 +503,9 @@ class Wpvr_Public {
356
  }
357
  }';
358
  $html .= '</style>';
359
-
360
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align: center; max-width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
361
- $html .= '<i class="fa fa-times" id="cross"></i>';
362
- $html .= '<div id="custom-ifram" style="display: none;">';
363
  $html .= '</div>';
364
  $html .= '</div>';
365
  //script started
@@ -383,6 +529,7 @@ class Wpvr_Public {
383
  $html .= 'pannellum.viewer(response[0]["panoid"], scenes);';
384
  $html .= '</script>';
385
  //script end
 
386
  return $html;
387
  }
388
 
73
  * class.
74
  */
75
  $plugin_url = plugin_dir_url( dirname(__FILE__) );
 
76
  wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
77
  wp_enqueue_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
78
  wp_enqueue_style('videojs-css', 'https://vjs.zencdn.net/7.1.0/video-js.css', array(), true);
121
  * @since 1.0.0
122
  */
123
  public function wpvr_shortcode( $atts ) {
124
+
125
  extract(
126
  shortcode_atts(
127
  array(
161
  $foundid = '';
162
  $foundid = $explodeid[1];
163
  $html = '';
164
+ $html .= '<div style="text-align: center; max-width:100%; height:auto; margin: 0 auto;">';
165
+ $html .= '<iframe width="'.trim($width,'px').'" height="'.trim($height,'px').'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
166
+ $html .= '</div>';
167
 
168
  } elseif (strpos($videourl, 'vimeo') > 0) {
169
 
172
  $foundid = '';
173
  $foundid = $explodeid[3];
174
  $html = '';
175
+ $html .= '<div style="text-align: center; max-width:100%; height:auto; margin: 0 auto;">';
176
+ $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
177
+ $html .= '</div>';
178
 
179
  } else {
180
  $html = '';
181
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style="width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
182
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
183
  $html .= '<script>';
184
  $html .= 'videojs('.$postdata['vidid'].', {';
249
 
250
  if (!empty($panodata["scene-list"])) {
251
  foreach ($panodata["scene-list"] as $panoscenes) {
252
+
253
+ $scene_ititle = '';
254
+ if (isset($panoscenes["scene-ititle"])) {
255
+ $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
256
+ }
257
+
258
+ $scene_author = '';
259
+ if (isset($panoscenes["scene-author"])) {
260
+ $scene_author = sanitize_text_field($panoscenes["scene-author"]);
261
+ }
262
+
263
+ $default_scene_pitch = '';
264
+ if (isset($panoscenes["scene-pitch"])) {
265
+ $default_scene_pitch = $panoscenes["scene-pitch"];
266
+ }
267
+
268
+ $default_scene_yaw = '';
269
+ if (isset($panoscenes["scene-yaw"])) {
270
+ $default_scene_yaw = $panoscenes["scene-yaw"];
271
+ }
272
+
273
+ $scene_max_pitch = '';
274
+ if (isset($panoscenes["scene-maxpitch"])) {
275
+ $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
276
+ }
277
+
278
+
279
+ $scene_min_pitch = '';
280
+ if (isset($panoscenes["scene-minpitch"])) {
281
+ $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
282
+ }
283
+
284
+
285
+ $scene_max_yaw = '';
286
+ if (isset($panoscenes["scene-maxyaw"])) {
287
+ $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
288
+ }
289
+
290
+
291
+ $scene_min_yaw = '';
292
+ if (isset($panoscenes["scene-minyaw"])) {
293
+ $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
294
+ }
295
+
296
+ $default_zoom = 100;
297
+ if (isset($panoscenes["scene-zoom"])) {
298
+ $default_zoom = $panoscenes["scene-zoom"];
299
+ }
300
+
301
+ if (!empty($default_zoom)) {
302
+ $default_zoom = (int)$default_zoom;
303
+ }
304
+ else {
305
+ $default_zoom = 100;
306
+ }
307
+
308
+ $max_zoom = 120;
309
+ if (isset($panoscenes["scene-maxzoom"])) {
310
+ $max_zoom = $panoscenes["scene-maxzoom"];
311
+ }
312
+
313
+ if (!empty($max_zoom)) {
314
+ $max_zoom = (int)$max_zoom;
315
+ }
316
+ else {
317
+ $max_zoom = 120;
318
+ }
319
+
320
+ $min_zoom = 50;
321
+ if (isset($panoscenes["scene-minzoom"])) {
322
+ $min_zoom = $panoscenes["scene-minzoom"];
323
+ }
324
+
325
+ if (!empty($min_zoom)) {
326
+ $min_zoom = (int)$min_zoom;
327
+ }
328
+ else {
329
+ $min_zoom = 50;
330
+ }
331
  $hotspot_datas = array();
332
  if (isset($panoscenes["hotspot-list"])) {
333
  $hotspot_datas = $panoscenes["hotspot-list"];
342
  $hotspot_data["hotspot-customclass"] = $hotspot_data["hotspot-customclass-pro"];
343
  $hotspoticoncolor = $hotspot_data["hotspot-customclass-color-icon-value"];
344
  }
345
+ }
346
+ $hotspot_scene_pitch = '';
347
+ if (isset($hotspot_data["hotspot-scene-pitch"])) {
348
+ $hotspot_scene_pitch = $hotspot_data["hotspot-scene-pitch"];
349
+ }
350
+ $hotspot_scene_yaw = '';
351
+ if (isset($hotspot_data["hotspot-scene-yaw"])) {
352
+ $hotspot_scene_yaw = $hotspot_data["hotspot-scene-yaw"];
353
+ }
354
 
355
  $hotspot_info = array(
356
  __( "text" )=>$hotspot_data["hotspot-title"],
361
  __( "URL" )=>$hotspot_data["hotspot-url"],
362
  __( "clickHandlerArgs" )=>$hotspot_data["hotspot-content"],
363
  __( "createTooltipArgs" )=>$hotspot_data["hotspot-hover"],
364
+ __( "sceneId" )=>$hotspot_data["hotspot-scene"],
365
+ __( "targetPitch" )=>(float)$hotspot_scene_pitch,
366
+ __( "targetYaw" )=>(float)$hotspot_scene_yaw);
367
  if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
368
  unset($hotspot_info["cssClass"]);
369
  }
370
+ if (empty($hotspot_data["hotspot-scene"])) {
371
+ unset($hotspot_info['targetPitch']);
372
+ unset($hotspot_info['targetYaw']);
373
+ }
374
  array_push($hotspots, $hotspot_info);
375
  }
376
 
377
  $scene_info = array();
378
+ $scene_info = array(__( "type" )=>$panoscenes["scene-type"],__( "panorama" )=>$panoscenes["scene-attachment-url"],__( "pitch" )=>$default_scene_pitch,__( "maxPitch" )=>$scene_max_pitch,__( "minPitch" )=>$scene_min_pitch,__( "maxYaw" )=>$scene_max_yaw,__( "minYaw" )=>$scene_min_yaw,__( "yaw" )=>$default_scene_yaw,__( "hfov" )=>$default_zoom,__( "maxHfov" )=>$max_zoom,__( "minHfov" )=>$min_zoom,__( "title" )=>$scene_ititle,__( "author" )=>$scene_author,__( "hotSpots" )=>$hotspots);
379
+
380
+ if (isset($panoscenes["ptyscene"])) {
381
+ if ($panoscenes["ptyscene"] == "off") {
382
+ unset($scene_info['pitch']);
383
+ unset($scene_info['yaw']);
384
+ }
385
+ }
386
+
387
+ if (empty($panoscenes["scene-ititle"])) {
388
+ unset($scene_info['title']);
389
+ }
390
+ if (empty($panoscenes["scene-author"])) {
391
+ unset($scene_info['author']);
392
+ }
393
+
394
+ if (isset($panoscenes["cvgscene"])) {
395
+ if ($panoscenes["cvgscene"] == "off") {
396
+ unset($scene_info['maxPitch']);
397
+ unset($scene_info['minPitch']);
398
+ }
399
+ }
400
+ if (empty($panoscenes["scene-maxpitch"])) {
401
+ unset($scene_info['maxPitch']);
402
+ }
403
+
404
+ if (empty($panoscenes["scene-minpitch"])) {
405
+ unset($scene_info['minPitch']);
406
+ }
407
+
408
+ if (isset($panoscenes["chgscene"])) {
409
+ if ($panoscenes["chgscene"] == "off") {
410
+ unset($scene_info['maxYaw']);
411
+ unset($scene_info['minYaw']);
412
+ }
413
+ }
414
+ if (empty($panoscenes["scene-maxyaw"])) {
415
+ unset($scene_info['maxYaw']);
416
+ }
417
+
418
+ if (empty($panoscenes["scene-minyaw"])) {
419
+ unset($scene_info['minYaw']);
420
+ }
421
+
422
+ if (isset($panoscenes["czscene"])) {
423
+ if ($panoscenes["czscene"] == "off") {
424
+ unset($scene_info['hfov']);
425
+ unset($scene_info['maxHfov']);
426
+ unset($scene_info['minHfov']);
427
+ }
428
+ }
429
+
430
  $scene_array = array();
431
  $scene_array = array(
432
  __($panoscenes["scene-id"])=>$scene_info
503
  }
504
  }';
505
  $html .= '</style>';
506
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
507
+ $html .= '<i class="fa fa-times cross"></i>';
508
+ $html .= '<div class="custom-ifram" style="display: none;">';
 
509
  $html .= '</div>';
510
  $html .= '</div>';
511
  //script started
529
  $html .= 'pannellum.viewer(response[0]["panoid"], scenes);';
530
  $html .= '</script>';
531
  //script end
532
+
533
  return $html;
534
  }
535
 
public/css/wpvr-public.css CHANGED
@@ -2,30 +2,6 @@
2
  * All of the CSS for your public-facing functionality should be
3
  * included in this file.
4
  */
5
- /*div.pnlm-hotspot-base.fas {
6
- background-color: #00b4ff;
7
- color: #fff;
8
- }
9
- div.pnlm-hotspot-base.fab {
10
- background-color: #00b4ff;
11
- color: #fff;
12
- }
13
- div.pnlm-hotspot-base.far{
14
- background-color: #00b4ff;
15
- color: #fff;
16
- }*/
17
-
18
- /*div.pnlm-hotspot-base.fas,
19
- div.pnlm-hotspot-base.fab,
20
- div.pnlm-hotspot-base.far {
21
- display: block !important;
22
- background-color: #00b4ff;
23
- color: #fff;
24
- border-radius: 100%;
25
- width: 30px;
26
- height: 30px;
27
- animation: icon-pulse 2.5s infinite cubic-bezier(.25, 0, 0, 1);
28
- }*/
29
  div.pnlm-hotspot-base.fas:before,
30
  div.pnlm-hotspot-base.fab:before,
31
  div.pnlm-hotspot-base.far:before{
@@ -52,27 +28,6 @@ div.pnlm-hotspot-base.far:before{
52
  z-index: 9;
53
  }
54
 
55
-
56
- /*-------icon pulse-------*/
57
- /*@-webkit-keyframes icon-pulse {
58
- 0% {
59
- box-shadow: 0 0 0 0px rgba(0, 180, 255, 1);
60
- }
61
- 100% {
62
- box-shadow: 0 0 0 10px rgba(0, 180, 255, 0);
63
- }
64
- }
65
- @keyframes icon-pulse {
66
- 0% {
67
- box-shadow: 0 0 0 0px rgba(0, 180, 255, 1);
68
- }
69
- 100% {
70
- box-shadow: 0 0 0 10px rgba(0, 180, 255, 0);
71
- }
72
- }*/
73
-
74
-
75
-
76
  div.custom-tooltip span {
77
  visibility: hidden;
78
  position: absolute;
@@ -111,7 +66,7 @@ div.custom-tooltip:hover span:after {
111
  margin: 0 50%;
112
  }
113
 
114
- div#custom-ifram {
115
  position: absolute;
116
  top: 12%;
117
  left: 50%;
@@ -138,7 +93,7 @@ div#custom-ifram {
138
  visibility: visible;
139
  }
140
 
141
- .pano-wrap #cross {
142
  background: #fff;
143
  width: 30px;
144
  height: 30px;
@@ -154,29 +109,32 @@ div#custom-ifram {
154
  visibility: hidden;
155
  transition: all 0.4s linear;
156
  }
157
- .pano-wrap.show-modal #cross {
158
  opacity: 1;
159
  visibility: visible;
160
  }
161
 
162
- #custom-ifram p,
163
  .custom-tooltip p {
164
  background-color: #fff;
165
  padding: 10px 0;
166
  margin: auto;
167
  border-radius: 5px;
168
- font-size: 16px;
169
- line-height: 1.4;
170
  font-family: Helvetica, "Nimbus Sans L", "Liberation Sans", Arial, sans-serif;
171
  }
 
 
 
172
 
173
- #custom-ifram img {
174
  max-width: 100%;
175
  margin: 0 auto;
176
  display: block;
177
  }
178
 
179
- #custom-ifram iframe {
180
  max-width: 100%;
181
  margin: 0 auto;
182
  display: block;
@@ -187,10 +145,10 @@ div#custom-ifram {
187
  width: 100%!important;
188
  height: 400px!important;
189
  }
190
- #custom-ifram iframe {
191
  height: 300px;
192
  }
193
- div#custom-ifram {
194
  width: 90%;
195
  }
196
  .custom-tooltip p {
@@ -206,7 +164,7 @@ div#custom-ifram {
206
  width: 340px;
207
  }
208
 
209
- #custom-ifram iframe {
210
  height: 194px;
211
  width: 350px;
212
  }
@@ -221,7 +179,7 @@ div#custom-ifram {
221
  height: 240px;
222
  width: 420px;
223
  }
224
- #custom-ifram iframe {
225
  height: 320px;
226
  width: 100%;
227
  }
@@ -236,7 +194,7 @@ div#custom-ifram {
236
  height: 150px;
237
  width: 220px;
238
  }
239
- #custom-ifram iframe {
240
  height: 250px;
241
  width: 100%;
242
  }
2
  * All of the CSS for your public-facing functionality should be
3
  * included in this file.
4
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  div.pnlm-hotspot-base.fas:before,
6
  div.pnlm-hotspot-base.fab:before,
7
  div.pnlm-hotspot-base.far:before{
28
  z-index: 9;
29
  }
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  div.custom-tooltip span {
32
  visibility: hidden;
33
  position: absolute;
66
  margin: 0 50%;
67
  }
68
 
69
+ div.custom-ifram {
70
  position: absolute;
71
  top: 12%;
72
  left: 50%;
93
  visibility: visible;
94
  }
95
 
96
+ .pano-wrap .cross {
97
  background: #fff;
98
  width: 30px;
99
  height: 30px;
109
  visibility: hidden;
110
  transition: all 0.4s linear;
111
  }
112
+ .pano-wrap.show-modal .cross {
113
  opacity: 1;
114
  visibility: visible;
115
  }
116
 
117
+ .custom-ifram p,
118
  .custom-tooltip p {
119
  background-color: #fff;
120
  padding: 10px 0;
121
  margin: auto;
122
  border-radius: 5px;
123
+ font-size: 15px;
124
+ line-height: 24px;
125
  font-family: Helvetica, "Nimbus Sans L", "Liberation Sans", Arial, sans-serif;
126
  }
127
+ .custom-ifram p{
128
+ padding: 10px;
129
+ }
130
 
131
+ .custom-ifram img {
132
  max-width: 100%;
133
  margin: 0 auto;
134
  display: block;
135
  }
136
 
137
+ .custom-ifram iframe {
138
  max-width: 100%;
139
  margin: 0 auto;
140
  display: block;
145
  width: 100%!important;
146
  height: 400px!important;
147
  }
148
+ .custom-ifram iframe {
149
  height: 300px;
150
  }
151
+ div.custom-ifram {
152
  width: 90%;
153
  }
154
  .custom-tooltip p {
164
  width: 340px;
165
  }
166
 
167
+ .custom-ifram iframe {
168
  height: 194px;
169
  width: 350px;
170
  }
179
  height: 240px;
180
  width: 420px;
181
  }
182
+ .custom-ifram iframe {
183
  height: 320px;
184
  width: 100%;
185
  }
194
  height: 150px;
195
  width: 220px;
196
  }
197
+ .custom-ifram iframe {
198
  height: 250px;
199
  width: 100%;
200
  }
public/js/wpvr-public.js CHANGED
@@ -34,27 +34,31 @@
34
  function wpvrhotspot(hotSpotDiv, args) {
35
  var argst = args.replace(/\\/g, '');
36
  jQuery(document).ready(function($){
37
- $("#custom-ifram").html(argst);
38
- $("#custom-ifram").fadeToggle();
39
- $(".pano-wrap").toggleClass("show-modal");
 
40
  });
 
41
  }
 
42
  function wpvrtooltip(hotSpotDiv, args) {
43
  hotSpotDiv.classList.add('custom-tooltip');
44
  var span = document.createElement('span');
45
  args = args.replace(/\\/g, "");
46
  span.innerHTML = args;
47
  hotSpotDiv.appendChild(span);
48
- // span.style.width = span.scrollWidth - 20 + 'px';
49
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
50
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
51
  }
52
 
 
53
  jQuery(document).ready(function($){
54
- $("#cross").on("click", function(e){
 
55
  e.preventDefault();
56
- $("#custom-ifram").fadeOut();
57
- $(".pano-wrap").removeClass("show-modal");
58
  $('iframe').attr('src', $('iframe').attr('src'));
59
  });
60
  });
34
  function wpvrhotspot(hotSpotDiv, args) {
35
  var argst = args.replace(/\\/g, '');
36
  jQuery(document).ready(function($){
37
+ $(hotSpotDiv.toElement).parent().siblings(".custom-ifram").html(argst);
38
+ $(hotSpotDiv.toElement).parent().siblings(".custom-ifram").fadeToggle();
39
+ $(hotSpotDiv.toElement).parent().parent(".pano-wrap").toggleClass("show-modal");
40
+
41
  });
42
+ console.log(hotSpotDiv.toElement);
43
  }
44
+
45
  function wpvrtooltip(hotSpotDiv, args) {
46
  hotSpotDiv.classList.add('custom-tooltip');
47
  var span = document.createElement('span');
48
  args = args.replace(/\\/g, "");
49
  span.innerHTML = args;
50
  hotSpotDiv.appendChild(span);
 
51
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
52
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
53
  }
54
 
55
+
56
  jQuery(document).ready(function($){
57
+
58
+ $(".cross").on("click", function(e){
59
  e.preventDefault();
60
+ $(this).siblings(".custom-ifram").fadeOut();
61
+ $(this).parent(".pano-wrap").removeClass("show-modal");
62
  $('iframe').attr('src', $('iframe').attr('src'));
63
  });
64
  });
wpvr.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: WP VR
17
  * Plugin URI: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
18
  * Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
19
- * Version: 2.1.1
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -102,29 +102,7 @@ function wpvr_activation_redirect( $plugin )
102
  }
103
 
104
  add_action( 'activated_plugin', 'wpvr_activation_redirect' );
105
-
106
- register_activation_hook( __FILE__, 'fx_admin_notice_example_activation_hook' );
107
-
108
- function fx_admin_notice_example_activation_hook() {
109
- set_transient( 'wpvr-admin-notice-example', true, 5 );
110
- }
111
- set_transient( 'wpvr-admin-notice-example', true, 5 );
112
- add_action( 'admin_notices', 'wpvr_admin_notice_example_notice' );
113
- function wpvr_admin_notice_example_notice(){
114
-
115
- if( get_transient( 'wpvr-admin-notice-example' ) ){
116
- $screen = get_current_screen();
117
- if ($screen->id=="toplevel_page_wpvr") {
118
- ?>
119
- <div class="notice notice-warning ">
120
- <p>Celebrating 1k active installations of WP Vr. Use coupon code wpvr1k to get 20% off from the Pro version until March 7th.<a href="https://rextheme.com/wpvr/?discount=wpvr1k"> Click Here</a></p>
121
- </div>
122
- <?php
123
- }
124
-
125
- delete_transient( 'wpvr-admin-notice-example' );
126
- }
127
- }
128
 
129
  /**
130
  * Initialize the plugin tracker
@@ -210,8 +188,9 @@ function wpvr_block_render( $attributes ) {
210
  $foundid = '';
211
  $foundid = $explodeid[1];
212
  $html = '';
213
- $html .= '<iframe width="'.$width.'" height="'.$height.'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
214
-
 
215
  } elseif (strpos($videourl, 'vimeo') > 0) {
216
 
217
  $explodeid = '';
@@ -219,11 +198,12 @@ function wpvr_block_render( $attributes ) {
219
  $foundid = '';
220
  $foundid = $explodeid[3];
221
  $html = '';
222
- $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.$width.'" height="'.$height.'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
223
-
 
224
  } else {
225
  $html = '';
226
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align: center; max-width: '.$width.'px; height: '.$height.'px; margin: 0 auto;">';
227
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
228
  $html .= '<script>';
229
  $html .= 'videojs('.$postdata['vidid'].', {';
@@ -293,6 +273,87 @@ function wpvr_block_render( $attributes ) {
293
 
294
  if (!empty($panodata['scene-list'])) {
295
  foreach ($panodata['scene-list'] as $panoscenes) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
296
  $hotspot_datas = array();
297
  if (isset($panoscenes['hotspot-list'])) {
298
  $hotspot_datas = $panoscenes['hotspot-list'];
@@ -301,12 +362,20 @@ function wpvr_block_render( $attributes ) {
301
  $hotspots = array();
302
  foreach ($hotspot_datas as $hotspot_data) {
303
  $status = get_option( 'wpvr_edd_license_status' );
304
- if( $status !== false && $status == 'valid' ) {
305
- if (isset($hotspot_data["hotspot-customclass-pro"]) && $hotspot_data["hotspot-customclass-pro"] != 'none') {
306
- $hotspot_data["hotspot-customclass"] = $hotspot_data["hotspot-customclass-pro"];
307
- $hotspoticoncolor = $hotspot_data["hotspot-customclass-color-icon-value"];
308
- }
309
  }
 
 
 
 
 
 
 
 
 
310
  $hotspot_info = array(
311
  __( 'text' )=>$hotspot_data['hotspot-title'],
312
  __( 'pitch' )=>$hotspot_data['hotspot-pitch'],
@@ -316,15 +385,71 @@ function wpvr_block_render( $attributes ) {
316
  __( 'URL' )=>$hotspot_data['hotspot-url'],
317
  __( 'clickHandlerArgs' )=>$hotspot_data['hotspot-content'],
318
  __( 'createTooltipArgs' )=>$hotspot_data['hotspot-hover'],
319
- __( 'sceneId' )=>$hotspot_data['hotspot-scene']);
 
 
320
  if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
321
  unset($hotspot_info["cssClass"]);
322
  }
 
 
 
 
323
  array_push($hotspots, $hotspot_info);
324
  }
325
 
326
  $scene_info = array();
327
- $scene_info = array(__( 'type' )=>$panoscenes['scene-type'],__( 'panorama' )=>$panoscenes['scene-attachment-url'],__( 'hotSpots' )=>$hotspots);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  $scene_array = array();
329
  $scene_array = array(
330
  __($panoscenes['scene-id'])=>$scene_info
@@ -405,11 +530,12 @@ function wpvr_block_render( $attributes ) {
405
  }';
406
  $html .= '</style>';
407
 
408
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align: center; max-width: '.$width.'px; height: '.$height.'px; margin: 0 auto;">';
409
- $html .= '<i class="fa fa-times" id="cross"></i>';
410
- $html .= '<div id="custom-ifram" style="display: none;">';
411
  $html .= '</div>';
412
  $html .= '</div>';
 
413
  //script started
414
  $html .= '<script>';
415
  $html .= 'var response = '.$response.';';
@@ -434,107 +560,6 @@ function wpvr_block_render( $attributes ) {
434
  return $html;
435
  }
436
 
437
- /**
438
- * Add REST API support to an already registered post type.
439
- */
440
- add_action( 'init', 'my_custom_post_type_rest_support', 25 );
441
- function my_custom_post_type_rest_support() {
442
- global $wp_post_types;
443
-
444
- //be sure to set this to the name of your post type!
445
- $post_type_name = 'wpvr_item';
446
- if( isset( $wp_post_types[ $post_type_name ] ) ) {
447
- $wp_post_types[$post_type_name]->show_in_rest = true;
448
- $wp_post_types[$post_type_name]->rest_base = $post_type_name;
449
- $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';
450
- }
451
-
452
- }
453
-
454
- add_action('rest_api_init', 'wpvr_rest_data_route');
455
- function wpvr_rest_data_route() {
456
- register_rest_route( 'wpvr/v1', '/panodata/(?P<id>\d+)', array(
457
- 'methods' => 'GET',
458
- 'callback' => 'wpvr_rest_data_set',
459
- ) );
460
- }
461
- function wpvr_rest_data_set($data) {
462
- $id = $data['id'];
463
- $postdata = get_post_meta( $id, 'panodata', true );
464
- $panoid = 'pano'.$id;
465
- $control = false;
466
- if (isset($postdata['showControls'])) {
467
- $control = $postdata['showControls'];
468
- }
469
-
470
- $autoload = false;
471
-
472
- if (isset($postdata['autoLoad'])) {
473
- $autoload = $postdata['autoLoad'];
474
- }
475
-
476
- $default_scene = '';
477
- if (isset($postdata['defaultscene'])) {
478
- $default_scene = $postdata['defaultscene'];
479
- }
480
-
481
- $scene_fade_duration = '';
482
- if (isset($postdata['scenefadeduration'])) {
483
- $scene_fade_duration = $postdata['scenefadeduration'];
484
- }
485
-
486
- $panodata = '';
487
- if (isset($postdata['panodata'])) {
488
- $panodata = $postdata['panodata'];
489
- }
490
-
491
-
492
- $default_data = array();
493
- $default_data = array(__( "firstScene" )=>$default_scene,__( "sceneFadeDuration" )=>$scene_fade_duration);
494
- $scene_data = array();
495
-
496
- if (!empty($panodata["scene-list"])) {
497
- foreach ($panodata["scene-list"] as $panoscenes) {
498
-
499
- $hotspot_datas = $panoscenes["hotspot-list"];
500
- $hotspots = array();
501
- foreach ($hotspot_datas as $hotspot_data) {
502
-
503
- $hotspot_info = array(
504
- __( "text" )=>$hotspot_data["hotspot-title"],
505
- __( "pitch" )=>$hotspot_data["hotspot-pitch"],
506
- __( "yaw" )=>$hotspot_data["hotspot-yaw"],
507
- __( "type" )=>$hotspot_data["hotspot-type"],
508
- __( "cssClass" )=>$hotspot_data["hotspot-customclass"],
509
- __( "URL" )=>$hotspot_data["hotspot-url"],
510
- __( "clickHandlerArgs" )=>$hotspot_data["hotspot-content"],
511
- __( "createTooltipArgs" )=>$hotspot_data["hotspot-hover"],
512
- __( "sceneId" )=>$hotspot_data["hotspot-scene"]);
513
- array_push($hotspots, $hotspot_info);
514
- }
515
-
516
- $scene_info = array();
517
- $scene_info = array(__( "type" )=>$panoscenes["scene-type"],__( "panorama" )=>$panoscenes["scene-attachment-url"],__( "hotSpots" )=>$hotspots);
518
- $scene_array = array();
519
- $scene_array = array(
520
- __($panoscenes["scene-id"])=>$scene_info
521
- );
522
- $scene_data[$panoscenes["scene-id"]] = $scene_info;
523
- }
524
- }
525
-
526
- $pano_id_array = array();
527
- $pano_id_array = array(__( "panoid" )=>$panoid);
528
- $pano_response = array();
529
- $pano_response = array(__( "autoLoad" )=>$autoload,__( "showControls" )=>$control,__( "default" )=>$default_data,__( "scenes" )=>$scene_data);
530
- $response = array();
531
- $response = array($pano_id_array,$pano_response);
532
- if (!empty($response)) {
533
- $response = json_encode($response);
534
- }
535
- return $response;
536
- }
537
-
538
  function wpvr_upgrade_to_pro_link( $links ) {
539
  $links = array_merge( array(
540
  '<a href="' . esc_url( 'https://rextheme.com/wpvr/' ) . '">' . __( 'Upgrade to pro', 'wpvr' ) . '</a>'
16
  * Plugin Name: WP VR
17
  * Plugin URI: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
18
  * Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
19
+ * Version: 2.2.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
102
  }
103
 
104
  add_action( 'activated_plugin', 'wpvr_activation_redirect' );
105
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
 
107
  /**
108
  * Initialize the plugin tracker
188
  $foundid = '';
189
  $foundid = $explodeid[1];
190
  $html = '';
191
+ $html .= '<div style="text-align:center; max-width:100%; height:auto; margin: 0 auto;">';
192
+ $html .= '<iframe width="'.$width.'" height="'.$height.'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
193
+ $html .='</div>';
194
  } elseif (strpos($videourl, 'vimeo') > 0) {
195
 
196
  $explodeid = '';
198
  $foundid = '';
199
  $foundid = $explodeid[3];
200
  $html = '';
201
+ $html .= '<div style="text-align:center; max-width:100%; height:auto; margin: 0 auto;">';
202
+ $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.$width.'" height="'.$height.'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
203
+ $html .='</div>';
204
  } else {
205
  $html = '';
206
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style="width: '.$width.'px; height: '.$height.'px; margin: 0 auto;">';
207
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
208
  $html .= '<script>';
209
  $html .= 'videojs('.$postdata['vidid'].', {';
273
 
274
  if (!empty($panodata['scene-list'])) {
275
  foreach ($panodata['scene-list'] as $panoscenes) {
276
+
277
+
278
+ $scene_ititle = '';
279
+ if (isset($panoscenes["scene-ititle"])) {
280
+ $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
281
+ }
282
+
283
+ $scene_author = '';
284
+ if (isset($panoscenes["scene-author"])) {
285
+ $scene_author = sanitize_text_field($panoscenes["scene-author"]);
286
+ }
287
+
288
+ $default_scene_pitch = '';
289
+ if (isset($panoscenes["scene-pitch"])) {
290
+ $default_scene_pitch = $panoscenes["scene-pitch"];
291
+ }
292
+
293
+ $default_scene_yaw = '';
294
+ if (isset($panoscenes["scene-yaw"])) {
295
+ $default_scene_yaw = $panoscenes["scene-yaw"];
296
+ }
297
+
298
+ $scene_max_pitch = '';
299
+ if (isset($panoscenes["scene-maxpitch"])) {
300
+ $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
301
+ }
302
+
303
+
304
+ $scene_min_pitch = '';
305
+ if (isset($panoscenes["scene-minpitch"])) {
306
+ $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
307
+ }
308
+
309
+
310
+ $scene_max_yaw = '';
311
+ if (isset($panoscenes["scene-maxyaw"])) {
312
+ $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
313
+ }
314
+
315
+
316
+ $scene_min_yaw = '';
317
+ if (isset($panoscenes["scene-minyaw"])) {
318
+ $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
319
+ }
320
+
321
+ $default_zoom = 100;
322
+ if (isset($panoscenes["scene-zoom"])) {
323
+ $default_zoom = $panoscenes["scene-zoom"];
324
+ }
325
+
326
+ if (!empty($default_zoom)) {
327
+ $default_zoom = (int)$default_zoom;
328
+ }
329
+ else {
330
+ $default_zoom = 100;
331
+ }
332
+
333
+ $max_zoom = 120;
334
+ if (isset($panoscenes["scene-maxzoom"])) {
335
+ $max_zoom = $panoscenes["scene-maxzoom"];
336
+ }
337
+
338
+ if (!empty($max_zoom)) {
339
+ $max_zoom = (int)$max_zoom;
340
+ }
341
+ else {
342
+ $max_zoom = 120;
343
+ }
344
+
345
+ $min_zoom = 50;
346
+ if (isset($panoscenes["scene-minzoom"])) {
347
+ $min_zoom = $panoscenes["scene-minzoom"];
348
+ }
349
+
350
+ if (!empty($min_zoom)) {
351
+ $min_zoom = (int)$min_zoom;
352
+ }
353
+ else {
354
+ $min_zoom = 50;
355
+ }
356
+
357
  $hotspot_datas = array();
358
  if (isset($panoscenes['hotspot-list'])) {
359
  $hotspot_datas = $panoscenes['hotspot-list'];
362
  $hotspots = array();
363
  foreach ($hotspot_datas as $hotspot_data) {
364
  $status = get_option( 'wpvr_edd_license_status' );
365
+ if( $status !== false && $status == 'valid' ) {
366
+ if (isset($hotspot_data["hotspot-customclass-pro"]) && $hotspot_data["hotspot-customclass-pro"] != 'none') {
367
+ $hotspot_data["hotspot-customclass"] = $hotspot_data["hotspot-customclass-pro"];
368
+ $hotspoticoncolor = $hotspot_data["hotspot-customclass-color-icon-value"];
 
369
  }
370
+ }
371
+ $hotspot_scene_pitch = '';
372
+ if (isset($hotspot_data["hotspot-scene-pitch"])) {
373
+ $hotspot_scene_pitch = $hotspot_data["hotspot-scene-pitch"];
374
+ }
375
+ $hotspot_scene_yaw = '';
376
+ if (isset($hotspot_data["hotspot-scene-yaw"])) {
377
+ $hotspot_scene_yaw = $hotspot_data["hotspot-scene-yaw"];
378
+ }
379
  $hotspot_info = array(
380
  __( 'text' )=>$hotspot_data['hotspot-title'],
381
  __( 'pitch' )=>$hotspot_data['hotspot-pitch'],
385
  __( 'URL' )=>$hotspot_data['hotspot-url'],
386
  __( 'clickHandlerArgs' )=>$hotspot_data['hotspot-content'],
387
  __( 'createTooltipArgs' )=>$hotspot_data['hotspot-hover'],
388
+ __( "sceneId" )=>$hotspot_data["hotspot-scene"],
389
+ __( "targetPitch" )=>(float)$hotspot_scene_pitch,
390
+ __( "targetYaw" )=>(float)$hotspot_scene_yaw);
391
  if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
392
  unset($hotspot_info["cssClass"]);
393
  }
394
+ if (empty($hotspot_data["hotspot-scene"])) {
395
+ unset($hotspot_info['targetPitch']);
396
+ unset($hotspot_info['targetYaw']);
397
+ }
398
  array_push($hotspots, $hotspot_info);
399
  }
400
 
401
  $scene_info = array();
402
+ $scene_info = array(__( 'type' )=>$panoscenes['scene-type'],__( 'panorama' )=>$panoscenes['scene-attachment-url'],__( "pitch" )=>$default_scene_pitch,__( "maxPitch" )=>$scene_max_pitch,__( "minPitch" )=>$scene_min_pitch,__( "maxYaw" )=>$scene_max_yaw,__( "minYaw" )=>$scene_min_yaw,__( "yaw" )=>$default_scene_yaw,__( "hfov" )=>$default_zoom,__( "maxHfov" )=>$max_zoom,__( "minHfov" )=>$min_zoom,__( "title" )=>$scene_ititle,__( "author" )=>$scene_author,__( 'hotSpots' )=>$hotspots);
403
+
404
+ if (isset($panoscenes["ptyscene"])) {
405
+ if ($panoscenes["ptyscene"] == "off") {
406
+ unset($scene_info['pitch']);
407
+ unset($scene_info['yaw']);
408
+ }
409
+ }
410
+ if (empty($panoscenes["scene-ititle"])) {
411
+ unset($scene_info['title']);
412
+ }
413
+ if (empty($panoscenes["scene-author"])) {
414
+ unset($scene_info['author']);
415
+ }
416
+
417
+ if (isset($panoscenes["cvgscene"])) {
418
+ if ($panoscenes["cvgscene"] == "off") {
419
+ unset($scene_info['maxPitch']);
420
+ unset($scene_info['minPitch']);
421
+ }
422
+ }
423
+ if (empty($panoscenes["scene-maxpitch"])) {
424
+ unset($scene_info['maxPitch']);
425
+ }
426
+
427
+ if (empty($panoscenes["scene-minpitch"])) {
428
+ unset($scene_info['minPitch']);
429
+ }
430
+
431
+ if (isset($panoscenes["chgscene"])) {
432
+ if ($panoscenes["chgscene"] == "off") {
433
+ unset($scene_info['maxYaw']);
434
+ unset($scene_info['minYaw']);
435
+ }
436
+ }
437
+ if (empty($panoscenes["scene-maxyaw"])) {
438
+ unset($scene_info['maxYaw']);
439
+ }
440
+
441
+ if (empty($panoscenes["scene-minyaw"])) {
442
+ unset($scene_info['minYaw']);
443
+ }
444
+
445
+ if (isset($panoscenes["czscene"])) {
446
+ if ($panoscenes["czscene"] == "off") {
447
+ unset($scene_info['hfov']);
448
+ unset($scene_info['maxHfov']);
449
+ unset($scene_info['minHfov']);
450
+ }
451
+ }
452
+
453
  $scene_array = array();
454
  $scene_array = array(
455
  __($panoscenes['scene-id'])=>$scene_info
530
  }';
531
  $html .= '</style>';
532
 
533
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'px; height: '.$height.'px; margin: 0 auto;">';
534
+ $html .= '<i class="fa fa-times cross"></i>';
535
+ $html .= '<div class="custom-ifram" style="display: none;">';
536
  $html .= '</div>';
537
  $html .= '</div>';
538
+
539
  //script started
540
  $html .= '<script>';
541
  $html .= 'var response = '.$response.';';
560
  return $html;
561
  }
562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
  function wpvr_upgrade_to_pro_link( $links ) {
564
  $links = array_merge( array(
565
  '<a href="' . esc_url( 'https://rextheme.com/wpvr/' ) . '">' . __( 'Upgrade to pro', 'wpvr' ) . '</a>'