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

Version Description

  • Custom control feature for pro version
  • WordPress 5.3 bug fix

=

Download this release

Release Info

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

Code changes from version 3.4.5 to 3.4.6

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.3
7
- Stable tag: 3.4.5
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -108,6 +108,7 @@ For more control over creating a virtual tour, learn about the [Premium version]
108
  * File export and import (for WPVR only)
109
  * Duplicate tour on one click
110
  * Custom scene gallery
 
111
  * Personalized support (e-mail or forum)
112
 
113
  [Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
@@ -283,5 +284,9 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
283
  = 3.4.5 =
284
  * Wordpress.com hosting support fixed
285
 
 
 
 
 
286
  == Upgrade Notice ==
287
  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.3
7
+ Stable tag: 3.4.6
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
108
  * File export and import (for WPVR only)
109
  * Duplicate tour on one click
110
  * Custom scene gallery
111
+ * Custom control buttons
112
  * Personalized support (e-mail or forum)
113
 
114
  [Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
284
  = 3.4.5 =
285
  * Wordpress.com hosting support fixed
286
 
287
+ = 3.4.6 =
288
+ * Custom control feature for pro version
289
+ * WordPress 5.3 bug fix
290
+
291
  == Upgrade Notice ==
292
  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-ajax.php CHANGED
@@ -634,6 +634,12 @@ class Wpvr_Ajax {
634
  $control = false;
635
  }
636
 
 
 
 
 
 
 
637
  $vrgallery = sanitize_text_field($_POST['vrgallery']);
638
  if ($vrgallery == 'on') {
639
  $vrgallery = true;
@@ -950,7 +956,7 @@ class Wpvr_Ajax {
950
  }
951
 
952
  $pano_array = array();
953
- $pano_array = array(__( "panoid" )=>$panoid,__( "autoLoad" )=>$autoload,__( "showControls" )=>$control,__( "vrgallery" )=>$vrgallery,__( "gyro" )=>$gyro,__( "compass" )=>$compass,__( "autoRotate" )=>$autorotation,__( "autoRotateInactivityDelay" )=>$autorotationinactivedelay,__( "autoRotateStopDelay" )=>$autorotationstopdelay,__( "preview" )=>$preview,__( "defaultscene" )=>$default_scene,__( "scenefadeduration" )=>$scene_fade_duration,__( "panodata" )=>$panodata);
954
 
955
  if ($rotation == 'off') {
956
  unset($pano_array['autoRotate']);
634
  $control = false;
635
  }
636
 
637
+ //===Custom Control===//
638
+ $custom_control = $_POST['customcontrol'];
639
+ // var_dump($custom_control);
640
+ // die();
641
+ //===Custom Control End===//
642
+
643
  $vrgallery = sanitize_text_field($_POST['vrgallery']);
644
  if ($vrgallery == 'on') {
645
  $vrgallery = true;
956
  }
957
 
958
  $pano_array = array();
959
+ $pano_array = array(__( "panoid" )=>$panoid,__( "autoLoad" )=>$autoload,__( "showControls" )=>$control,__( "vrgallery" )=>$vrgallery,__( "customcontrol" )=>$custom_control,__( "gyro" )=>$gyro,__( "compass" )=>$compass,__( "autoRotate" )=>$autorotation,__( "autoRotateInactivityDelay" )=>$autorotationinactivedelay,__( "autoRotateStopDelay" )=>$autorotationstopdelay,__( "preview" )=>$preview,__( "defaultscene" )=>$default_scene,__( "scenefadeduration" )=>$scene_fade_duration,__( "panodata" )=>$panodata);
960
 
961
  if ($rotation == 'off') {
962
  unset($pano_array['autoRotate']);
admin/css/wpvr-admin.css CHANGED
@@ -9,7 +9,7 @@
9
  width: 30px;
10
  background: url('../images/icon.png') no-repeat center center / 100% 100%;
11
  }
12
- .scene-gallery {
13
  border-radius: 10px;
14
  max-width: 600px;
15
  margin: 0 auto;
@@ -44,7 +44,7 @@
44
  background-color: inherit;
45
  text-align: center;
46
  cursor: pointer;
47
- white-space: nowrap;
48
  }
49
  .rex-pano-tab-content ::-webkit-input-placeholder {
50
  color: #ccc;
@@ -261,7 +261,7 @@ div.custom-tooltip:hover span:after {
261
  -ms-transform: translateX(-50%);
262
  -o-transform: translateX(-50%);
263
  transform: translateX(-50%);
264
-
265
  -webkit-transition: all 0.5s ease;
266
  -moz-transition: all 0.5s ease;
267
  -ms-transition: all 0.5s ease;
@@ -296,12 +296,12 @@ div.custom-tooltip:hover span:after {
296
  .custom-tooltip p {
297
  width: 420px;
298
  }
299
-
300
  .custom-tooltip span img {
301
  height: 230px;
302
  width: 420px;
303
  }
304
-
305
  }
306
  @media (max-width: 991px){
307
  div.custom-tooltip span {
@@ -314,7 +314,7 @@ div.custom-tooltip:hover span:after {
314
  height: 310px;
315
  width: 540px;
316
  }
317
-
318
  }
319
 
320
 
@@ -385,7 +385,7 @@ div.custom-tooltip:hover span:after {
385
  -o-transform: translateY(-50%) rotate(45deg);
386
  transform: translateY(-50%) rotate(45deg);
387
  transition: all 0.2s ease-in-out;
388
-
389
  }
390
 
391
  .rex-pano-tabs .rex-pano-tab-nav li.active > span:after{
@@ -576,14 +576,14 @@ div.custom-tooltip:hover span:after {
576
  .rex-pano-tab .single-settings:last-child {
577
  margin-bottom: 0px;
578
  }
579
- .rex-pano-tab .single-settings span {
580
  min-width: 170px;
581
  font-size: 16px;
582
  display: block;
583
  color: #555555;
584
  font-weight: 400;
585
  }
586
- .rex-pano-tab.general .single-settings span {
587
  min-width: 240px;
588
  }
589
  .rex-pano-tab .single-settings ul{
@@ -613,6 +613,30 @@ div.custom-tooltip:hover span:after {
613
  max-width: 440px;
614
  }
615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616
  /*------------input field tooltip-----------*/
617
  .hotspot-icon input {
618
  width: 20% !important;
@@ -658,7 +682,7 @@ div.custom-tooltip:hover span:after {
658
  -ms-transform: translateY(-50%);
659
  -o-transform: translateY(-50%);
660
  transform: translateY(-50%);
661
-
662
  -webkit-transition: all 0.5s ease;
663
  -moz-transition: all 0.5s ease;
664
  -ms-transition: all 0.5s ease;
@@ -881,7 +905,7 @@ div.custom-tooltip:hover span:after {
881
  max-width: 160px;
882
  margin-top: 20px;
883
  }
884
- .rex-pano-tab .video-setting:before,
885
  .rex-pano-tab .video-setting:after {
886
  content: "";
887
  display: table;
@@ -902,7 +926,7 @@ div.custom-tooltip:hover span:after {
902
  }
903
 
904
  /*--------------------hotspot style-------------------*/
905
- .clearfix::before,
906
  .clearfix::after {
907
  content: " ";
908
  display: table;
@@ -914,7 +938,7 @@ div.custom-tooltip:hover span:after {
914
  .hotspot-setup .rex-pano-tab-content {
915
  padding: 30px 0px;
916
  }
917
- .hotspot-setup .single-hotspot > .wrapper,
918
  .hotspot-setup .single-hotspot .hotspot-type {
919
  float: left;
920
  width: 50%;
@@ -1064,7 +1088,7 @@ button.delete-hotspot{
1064
  width: 16px;
1065
  height: 16px;
1066
  }
1067
-
1068
  }
1069
 
1070
  @media (max-width: 1500px){
@@ -1085,7 +1109,7 @@ button.delete-hotspot{
1085
  .rex-pano-tabs .main-nav li span {
1086
  margin-bottom: 0;
1087
  }
1088
-
1089
  .rex-pano-tab-content {
1090
  width: 100%;
1091
  }
@@ -1100,7 +1124,7 @@ button.delete-hotspot{
1100
  transform: translateX(50%) rotate(45deg);
1101
  bottom: -8px;
1102
  }
1103
-
1104
  }
1105
 
1106
  @media (max-width: 1300px){
@@ -1150,8 +1174,8 @@ button.delete-hotspot{
1150
  .hotspot-setup .rex-pano-tab-content {
1151
  padding: 30px 0px 0;
1152
  }
1153
-
1154
-
1155
  .preview-btn-area {
1156
  padding: 0 0 55px 0px;
1157
  border-top: none;
@@ -1168,12 +1192,12 @@ button.delete-hotspot{
1168
  input.delete-hotspot {
1169
  right: 5px;
1170
  top: 35px;
1171
- }
1172
-
1173
  .rex-pano-tab .single-settings.scene-fade-duration input {
1174
  width: 160px;
1175
  }
1176
-
1177
  }
1178
 
1179
  /**
@@ -1276,8 +1300,8 @@ button.delete-hotspot{
1276
 
1277
  .onboarding-block .body .waves-effect:hover {
1278
  color: #fff;
1279
- box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),
1280
- 0 1px 5px 0 rgba(0,0,0,0.12),
1281
  0 3px 1px -2px rgba(0,0,0,0.2)
1282
  }
1283
  .onboarding-block .body .social li a:hover {
@@ -1481,7 +1505,7 @@ button.delete-hotspot{
1481
  .onboarding-block p {
1482
  font-size: 12px;
1483
  }
1484
-
1485
  }
1486
 
1487
  @media (max-width: 1400px) {
@@ -1568,7 +1592,7 @@ button.delete-hotspot{
1568
  .onboarding-block p {
1569
  font-size: 16px;
1570
  }
1571
-
1572
  }
1573
 
1574
  @media (max-width: 991px){
@@ -1597,5 +1621,5 @@ button.delete-hotspot{
1597
  bottom: -10px;
1598
  right: 10px;
1599
  }
1600
-
1601
- }
9
  width: 30px;
10
  background: url('../images/icon.png') no-repeat center center / 100% 100%;
11
  }
12
+ .scene-gallery {
13
  border-radius: 10px;
14
  max-width: 600px;
15
  margin: 0 auto;
44
  background-color: inherit;
45
  text-align: center;
46
  cursor: pointer;
47
+ white-space: nowrap;
48
  }
49
  .rex-pano-tab-content ::-webkit-input-placeholder {
50
  color: #ccc;
261
  -ms-transform: translateX(-50%);
262
  -o-transform: translateX(-50%);
263
  transform: translateX(-50%);
264
+
265
  -webkit-transition: all 0.5s ease;
266
  -moz-transition: all 0.5s ease;
267
  -ms-transition: all 0.5s ease;
296
  .custom-tooltip p {
297
  width: 420px;
298
  }
299
+
300
  .custom-tooltip span img {
301
  height: 230px;
302
  width: 420px;
303
  }
304
+
305
  }
306
  @media (max-width: 991px){
307
  div.custom-tooltip span {
314
  height: 310px;
315
  width: 540px;
316
  }
317
+
318
  }
319
 
320
 
385
  -o-transform: translateY(-50%) rotate(45deg);
386
  transform: translateY(-50%) rotate(45deg);
387
  transition: all 0.2s ease-in-out;
388
+
389
  }
390
 
391
  .rex-pano-tabs .rex-pano-tab-nav li.active > span:after{
576
  .rex-pano-tab .single-settings:last-child {
577
  margin-bottom: 0px;
578
  }
579
+ .rex-pano-tab .single-settings > span {
580
  min-width: 170px;
581
  font-size: 16px;
582
  display: block;
583
  color: #555555;
584
  font-weight: 400;
585
  }
586
+ .rex-pano-tab.general .single-settings > span {
587
  min-width: 240px;
588
  }
589
  .rex-pano-tab .single-settings ul{
613
  max-width: 440px;
614
  }
615
 
616
+ .rex-pano-tab .single-settings .colors label,
617
+ .rex-pano-tab .single-settings .icons label{
618
+ color: #555555;
619
+ font-size: 15px;
620
+ letter-spacing: 0;
621
+ margin-right: 10px;
622
+ }
623
+ .rex-pano-tab .single-settings .colors {
624
+ display: flex;
625
+ flex-flow: row;
626
+ align-items: center;
627
+ margin-right: 20px;
628
+ }
629
+ .rex-pano-tab .single-settings .colors input[type="color"]{
630
+ border: none;
631
+ padding: 0;
632
+ box-shadow: none;
633
+ margin: 0;
634
+ height: 36px;
635
+ }
636
+ .rex-pano-tab .single-settings .icons-selector .fip-box {
637
+ width: 59px;
638
+ }
639
+
640
  /*------------input field tooltip-----------*/
641
  .hotspot-icon input {
642
  width: 20% !important;
682
  -ms-transform: translateY(-50%);
683
  -o-transform: translateY(-50%);
684
  transform: translateY(-50%);
685
+
686
  -webkit-transition: all 0.5s ease;
687
  -moz-transition: all 0.5s ease;
688
  -ms-transition: all 0.5s ease;
905
  max-width: 160px;
906
  margin-top: 20px;
907
  }
908
+ .rex-pano-tab .video-setting:before,
909
  .rex-pano-tab .video-setting:after {
910
  content: "";
911
  display: table;
926
  }
927
 
928
  /*--------------------hotspot style-------------------*/
929
+ .clearfix::before,
930
  .clearfix::after {
931
  content: " ";
932
  display: table;
938
  .hotspot-setup .rex-pano-tab-content {
939
  padding: 30px 0px;
940
  }
941
+ .hotspot-setup .single-hotspot > .wrapper,
942
  .hotspot-setup .single-hotspot .hotspot-type {
943
  float: left;
944
  width: 50%;
1088
  width: 16px;
1089
  height: 16px;
1090
  }
1091
+
1092
  }
1093
 
1094
  @media (max-width: 1500px){
1109
  .rex-pano-tabs .main-nav li span {
1110
  margin-bottom: 0;
1111
  }
1112
+
1113
  .rex-pano-tab-content {
1114
  width: 100%;
1115
  }
1124
  transform: translateX(50%) rotate(45deg);
1125
  bottom: -8px;
1126
  }
1127
+
1128
  }
1129
 
1130
  @media (max-width: 1300px){
1174
  .hotspot-setup .rex-pano-tab-content {
1175
  padding: 30px 0px 0;
1176
  }
1177
+
1178
+
1179
  .preview-btn-area {
1180
  padding: 0 0 55px 0px;
1181
  border-top: none;
1192
  input.delete-hotspot {
1193
  right: 5px;
1194
  top: 35px;
1195
+ }
1196
+
1197
  .rex-pano-tab .single-settings.scene-fade-duration input {
1198
  width: 160px;
1199
  }
1200
+
1201
  }
1202
 
1203
  /**
1300
 
1301
  .onboarding-block .body .waves-effect:hover {
1302
  color: #fff;
1303
+ box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),
1304
+ 0 1px 5px 0 rgba(0,0,0,0.12),
1305
  0 3px 1px -2px rgba(0,0,0,0.2)
1306
  }
1307
  .onboarding-block .body .social li a:hover {
1505
  .onboarding-block p {
1506
  font-size: 12px;
1507
  }
1508
+
1509
  }
1510
 
1511
  @media (max-width: 1400px) {
1592
  .onboarding-block p {
1593
  font-size: 16px;
1594
  }
1595
+
1596
  }
1597
 
1598
  @media (max-width: 991px){
1621
  bottom: -10px;
1622
  right: 10px;
1623
  }
1624
+
1625
+ }
admin/partials/wpvr-meta-box-builder-display.php CHANGED
@@ -335,6 +335,7 @@ if (isset($postdata['panodata'])) {
335
  <ul>
336
  <li>
337
  <div id="panodata" style="text-align: center; font-weight: bold;">
 
338
  </div>
339
  </li>
340
  <li class="rex-hide-coordinates add-pitch">
@@ -346,18 +347,18 @@ if (isset($postdata['panodata'])) {
346
  <div class="scene-gallery vrowl-carousel">
347
 
348
  </div>
 
349
  </div>
350
 
351
 
352
 
353
  <script>
354
-
355
- var response = <?php echo $response; ?>;
356
- var scenes = response[1];
357
 
358
  if (scenes) {
359
- $.each(scenes.scenes, function (i) {
360
- $.each(scenes.scenes[i]['hotSpots'], function (key, val) {
361
  if (val["clickHandlerArgs"] != "") {
362
  val["clickHandlerFunc"] = wpvrhotspot;
363
  }
@@ -368,9 +369,9 @@ if (isset($postdata['panodata'])) {
368
  });
369
  }
370
  if (scenes) {
371
- $('.scene-gallery').empty();
372
- $.each(scenes.scenes, function (key, val) {
373
- $('.scene-gallery').append('<ul style="width:150px;"><li>'+key+'</li><li title="Double click to view scene"><img class="scctrl" id="'+key+'_gallery" src="'+val.panorama+'"></li></ul>');
374
  });
375
  }
376
 
@@ -387,7 +388,7 @@ if (isset($postdata['panodata'])) {
387
 
388
  var touchtime = 0;
389
  if (scenes) {
390
- $.each(scenes.scenes, function (key, val) {
391
  document.getElementById(''+key+'_gallery').addEventListener('click', function(e) {
392
  if (touchtime == 0) {
393
  touchtime = new Date().getTime();
@@ -404,13 +405,14 @@ if (isset($postdata['panodata'])) {
404
  });
405
  });
406
  }
 
407
  }
408
 
409
  function wpvrhotspot(hotSpotDiv, args) {
410
  var argst = args.replace(/\\/g, '');
411
- $("#custom-ifram").html(argst);
412
- $("#custom-ifram").fadeToggle();
413
- $(".iframe-wrapper").toggleClass("show-modal");
414
  }
415
 
416
  function wpvrtooltip(hotSpotDiv, args) {
@@ -426,16 +428,13 @@ if (isset($postdata['panodata'])) {
426
  }
427
 
428
  jQuery(document).ready(function($){
429
- $("#cross").on("click", function(e){
430
  e.preventDefault();
431
- $("#custom-ifram").fadeOut();
432
- $(".iframe-wrapper").removeClass("show-modal");
433
- $('iframe').attr('src', $('iframe').attr('src'));
434
  });
435
  });
436
-
437
-
438
-
439
  </script>
440
  <?php
441
  }
335
  <ul>
336
  <li>
337
  <div id="panodata" style="text-align: center; font-weight: bold;">
338
+
339
  </div>
340
  </li>
341
  <li class="rex-hide-coordinates add-pitch">
347
  <div class="scene-gallery vrowl-carousel">
348
 
349
  </div>
350
+
351
  </div>
352
 
353
 
354
 
355
  <script>
356
+ var response = <?php echo $response; ?>;
357
+ var scenes = response[1];
 
358
 
359
  if (scenes) {
360
+ jQuery.each(scenes.scenes, function (i) {
361
+ jQuery.each(scenes.scenes[i]['hotSpots'], function (key, val) {
362
  if (val["clickHandlerArgs"] != "") {
363
  val["clickHandlerFunc"] = wpvrhotspot;
364
  }
369
  });
370
  }
371
  if (scenes) {
372
+ jQuery('.scene-gallery').empty();
373
+ jQuery.each(scenes.scenes, function (key, val) {
374
+ jQuery('.scene-gallery').append('<ul style="width:150px;"><li>'+key+'</li><li title="Double click to view scene"><img class="scctrl" id="'+key+'_gallery" src="'+val.panorama+'"></li></ul>');
375
  });
376
  }
377
 
388
 
389
  var touchtime = 0;
390
  if (scenes) {
391
+ jQuery.each(scenes.scenes, function (key, val) {
392
  document.getElementById(''+key+'_gallery').addEventListener('click', function(e) {
393
  if (touchtime == 0) {
394
  touchtime = new Date().getTime();
405
  });
406
  });
407
  }
408
+
409
  }
410
 
411
  function wpvrhotspot(hotSpotDiv, args) {
412
  var argst = args.replace(/\\/g, '');
413
+ jQuery("#custom-ifram").html(argst);
414
+ jQuery("#custom-ifram").fadeToggle();
415
+ jQuery(".iframe-wrapper").toggleClass("show-modal");
416
  }
417
 
418
  function wpvrtooltip(hotSpotDiv, args) {
428
  }
429
 
430
  jQuery(document).ready(function($){
431
+ jQuery("#cross").on("click", function(e){
432
  e.preventDefault();
433
+ jQuery("#custom-ifram").fadeOut();
434
+ jQuery(".iframe-wrapper").removeClass("show-modal");
435
+ jQuery('iframe').attr('src', $('iframe').attr('src'));
436
  });
437
  });
 
 
 
438
  </script>
439
  <?php
440
  }
admin/partials/wpvr_documentation.php CHANGED
@@ -161,6 +161,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
161
  <div class="item"><?php _e('Duplicate tour support','wpvr'); ?></div>
162
  <div class="item"><?php _e('File import & export system','wpvr'); ?></div>
163
  <div class="item"><?php _e('Custom scene gallery','wpvr'); ?></div>
 
164
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
165
  </div>
166
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
161
  <div class="item"><?php _e('Duplicate tour support','wpvr'); ?></div>
162
  <div class="item"><?php _e('File import & export system','wpvr'); ?></div>
163
  <div class="item"><?php _e('Custom scene gallery','wpvr'); ?></div>
164
+ <div class="item"><?php _e('Custom control buttons','wpvr'); ?></div>
165
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
166
  </div>
167
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
public/class-wpvr-public.php CHANGED
@@ -199,6 +199,15 @@ class Wpvr_Public {
199
  $control = $postdata['showControls'];
200
  }
201
 
 
 
 
 
 
 
 
 
 
202
  $vrgallery = false;
203
  if (isset($postdata['vrgallery'])) {
204
  $vrgallery = $postdata['vrgallery'];
@@ -563,6 +572,48 @@ class Wpvr_Public {
563
 
564
  }
565
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  if ($vrgallery) {
567
  //===Carousal setup===//
568
  $html .= '<div id="vrgcontrols">';
@@ -591,7 +642,7 @@ class Wpvr_Public {
591
  $html .= '</div>';
592
  //script started
593
  $html .= '<script>';
594
- $html .= 'var response = '.$response.';';
595
  $html .= 'var scenes = response[1];';
596
  $html .= 'if(scenes) {';
597
  $html .= 'var scenedata = scenes.scenes;';
@@ -609,6 +660,14 @@ class Wpvr_Public {
609
  $html .= '}';
610
 
611
  $html .= 'var panoshow'.$id.' = pannellum.viewer(response[0]["panoid"], scenes);';
 
 
 
 
 
 
 
 
612
  $html .= '
613
  if (scenes.autoRotate) {
614
  panoshow'.$id.'.on("load", function (){
@@ -621,29 +680,72 @@ class Wpvr_Public {
621
  ';
622
  $html .= 'var touchtime = 0;';
623
  if ($vrgallery) {
624
- if (isset($panodata["scene-list"])) {
625
- foreach ($panodata["scene-list"] as $panoscenes) {
626
- $scene_key = $panoscenes['scene-id'];
627
- $scene_key_gallery = $panoscenes['scene-id'].'_gallery_'.$id;
628
- $img_src_url = $panoscenes['scene-attachment-url'];
629
- $html .= 'document.getElementById("'.$scene_key_gallery.'").addEventListener("click", function(e) { ';
630
- $html .= 'if (touchtime == 0) {';
631
- $html .= 'touchtime = new Date().getTime();';
632
- $html .= '} else {';
633
- $html .= 'if (((new Date().getTime()) - touchtime) < 800) {';
634
- $html .= 'panoshow'.$id.'.loadScene("'.$scene_key.'");';
635
- $html .= 'touchtime = 0;';
636
- $html .= '} else {';
637
- $html .= 'touchtime = new Date().getTime();';
638
- $html .= '}';
639
-
640
- $html .= '}';
641
-
642
- $html .= '});';
643
- }
644
- }
645
  }
646
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
647
  $html .= '</script>';
648
  //script end
649
 
199
  $control = $postdata['showControls'];
200
  }
201
 
202
+ if ($control) {
203
+ if ($postdata['customcontrol']) {
204
+ $custom_control = $postdata['customcontrol'];
205
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on") {
206
+ $control = false;
207
+ }
208
+ }
209
+ }
210
+
211
  $vrgallery = false;
212
  if (isset($postdata['vrgallery'])) {
213
  $vrgallery = $postdata['vrgallery'];
572
 
573
  }
574
 
575
+ //===Custom Control===//
576
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on") {
577
+
578
+ $html .= '<div id="zoom-in-out-controls">';
579
+
580
+ if ($custom_control['panZoomInSwitch'] == "on") {
581
+ $html .= '<div class="ctrl" id="zoom-in"><i class="'.$custom_control['panZoomInIcon'].'" style="color:'.$custom_control['panZoomInColor'].';"></i></div>';
582
+ }
583
+
584
+ if ($custom_control['panZoomOutSwitch'] == "on") {
585
+ $html .= '<div class="ctrl" id="zoom-out"><i class="'.$custom_control['panZoomOutIcon'].'" style="color:'.$custom_control['panZoomOutColor'].';"></i></div>';
586
+ }
587
+ $html .= '</div>';
588
+ //===zoom in out Control===//
589
+
590
+
591
+ //===Custom Control===//
592
+ $html .= '<div id="controls">';
593
+
594
+ if ($custom_control['panupSwitch'] == "on") {
595
+ $html .= '<div class="ctrl" id="pan-up"><i class="'.$custom_control['panupIcon'].'" style="color:'.$custom_control['panupColor'].';"></i></div>';
596
+ }
597
+
598
+ if ($custom_control['panDownSwitch'] == "on") {
599
+ $html .= '<div class="ctrl" id="pan-down"><i class="'.$custom_control['panDownIcon'].'" style="color:'.$custom_control['panDownColor'].';"></i></div>';
600
+ }
601
+
602
+ if ($custom_control['panLeftSwitch'] == "on") {
603
+ $html .= '<div class="ctrl" id="pan-left"><i class="'.$custom_control['panLeftIcon'].'" style="color:'.$custom_control['panLeftColor'].';"></i></div>';
604
+ }
605
+
606
+ if ($custom_control['panRightSwitch'] == "on") {
607
+ $html .= '<div class="ctrl" id="pan-right"><i class="'.$custom_control['panRightIcon'].'" style="color:'.$custom_control['panRightColor'].';"></i></div>';
608
+ }
609
+
610
+ if ($custom_control['panFullscreenSwitch'] == "on") {
611
+ $html .= '<div class="ctrl" id="fullscreen"><i class="'.$custom_control['panFullscreenIcon'].'" style="color:'.$custom_control['panFullscreenColor'].';"></i></div>';
612
+ }
613
+ $html .= '</div>';
614
+ }
615
+ //===Custom Control===//
616
+
617
  if ($vrgallery) {
618
  //===Carousal setup===//
619
  $html .= '<div id="vrgcontrols">';
642
  $html .= '</div>';
643
  //script started
644
  $html .= '<script>';
645
+ $html .= 'var response = '.$response.';';
646
  $html .= 'var scenes = response[1];';
647
  $html .= 'if(scenes) {';
648
  $html .= 'var scenedata = scenes.scenes;';
660
  $html .= '}';
661
 
662
  $html .= 'var panoshow'.$id.' = pannellum.viewer(response[0]["panoid"], scenes);';
663
+ $html .= 'panoshow'.$id.'.on("load", function (){
664
+ if (jQuery(".pnlm-panorama-info:visible").length > 0) {
665
+ jQuery("#controls").css("bottom", "55px");
666
+ }
667
+ else {
668
+ jQuery("#controls").css("bottom", "5px");
669
+ }
670
+ });';
671
  $html .= '
672
  if (scenes.autoRotate) {
673
  panoshow'.$id.'.on("load", function (){
680
  ';
681
  $html .= 'var touchtime = 0;';
682
  if ($vrgallery) {
683
+ if (isset($panodata["scene-list"])) {
684
+ foreach ($panodata["scene-list"] as $panoscenes) {
685
+ $scene_key = $panoscenes['scene-id'];
686
+ $scene_key_gallery = $panoscenes['scene-id'].'_gallery_'.$id;
687
+ $img_src_url = $panoscenes['scene-attachment-url'];
688
+ $html .= 'document.getElementById("'.$scene_key_gallery.'").addEventListener("click", function(e) { ';
689
+ $html .= 'if (touchtime == 0) {';
690
+ $html .= 'touchtime = new Date().getTime();';
691
+ $html .= '} else {';
692
+ $html .= 'if (((new Date().getTime()) - touchtime) < 800) {';
693
+ $html .= 'panoshow'.$id.'.loadScene("'.$scene_key.'");';
694
+ $html .= 'touchtime = 0;';
695
+ $html .= '} else {';
696
+ $html .= 'touchtime = new Date().getTime();';
697
+ $html .= '}';
698
+
699
+ $html .= '}';
700
+
701
+ $html .= '});';
702
+ }
703
+ }
704
  }
705
 
706
+ //===Custom Control===//
707
+ if ($custom_control['panupSwitch'] == "on") {
708
+ $html .= 'document.getElementById("pan-up").addEventListener("click", function(e) {';
709
+ $html .= 'panoshow'.$id.'.setPitch(panoshow'.$id.'.getPitch() + 10);';
710
+ $html .= '});';
711
+ }
712
+
713
+ if ($custom_control['panDownSwitch'] == "on") {
714
+ $html .= 'document.getElementById("pan-down").addEventListener("click", function(e) {';
715
+ $html .= 'panoshow'.$id.'.setPitch(panoshow'.$id.'.getPitch() - 10);';
716
+ $html .= '});';
717
+ }
718
+
719
+ if ($custom_control['panLeftSwitch'] == "on") {
720
+ $html .= 'document.getElementById("pan-left").addEventListener("click", function(e) {';
721
+ $html .= 'panoshow'.$id.'.setYaw(panoshow'.$id.'.getYaw() - 10);';
722
+ $html .= '});';
723
+ }
724
+
725
+ if ($custom_control['panRightSwitch'] == "on") {
726
+ $html .= 'document.getElementById("pan-right").addEventListener("click", function(e) {';
727
+ $html .= 'panoshow'.$id.'.setYaw(panoshow'.$id.'.getYaw() + 10);';
728
+ $html .= '});';
729
+ }
730
+
731
+ if ($custom_control['panZoomInSwitch'] == "on") {
732
+ $html .= 'document.getElementById("zoom-in").addEventListener("click", function(e) {';
733
+ $html .= 'panoshow'.$id.'.setHfov(panoshow'.$id.'.getHfov() - 10);';
734
+ $html .= '});';
735
+ }
736
+
737
+ if ($custom_control['panZoomOutSwitch'] == "on") {
738
+ $html .= 'document.getElementById("zoom-out").addEventListener("click", function(e) {';
739
+ $html .= 'panoshow'.$id.'.setHfov(panoshow'.$id.'.getHfov() + 10);';
740
+ $html .= '});';
741
+ }
742
+
743
+ if ($custom_control['panFullscreenSwitch'] == "on") {
744
+ $html .= 'document.getElementById("fullscreen").addEventListener("click", function(e) {';
745
+ $html .= 'panoshow'.$id.'.toggleFullscreen();';
746
+ $html .= '});';
747
+ }
748
+
749
  $html .= '</script>';
750
  //script end
751
 
public/css/wpvr-public.css CHANGED
@@ -2,6 +2,75 @@
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{
@@ -53,10 +122,12 @@ div.pnlm-hotspot-base.far:before{
53
  #vrgcontrols {
54
  position: absolute;
55
  z-index: 3;
56
- width: 100%;
57
  bottom: 0;
58
  height: 30px;
59
  cursor: pointer;
 
 
60
  }
61
  .vrgctrl {
62
  color: #fff;
2
  * All of the CSS for your public-facing functionality should be
3
  * included in this file.
4
  */
5
+
6
+ #zoom-in-out-controls {
7
+ position: absolute;
8
+ top: 5px;
9
+ left: 5px;
10
+ z-index: 2;
11
+ text-align: center;
12
+ display: flex;
13
+ flex-flow: column;
14
+ background: rgba(255, 255, 255, 0.27);
15
+ }
16
+ #zoom-in-out-controls .ctrl {
17
+ padding: 2px 0;
18
+ }
19
+
20
+ #controls {
21
+ position: absolute;
22
+ bottom: 5px;
23
+ left: 5px;
24
+ z-index: 2;
25
+ text-align: center;
26
+ width: 80px;
27
+ height: 80px;
28
+ background: rgba(255, 255, 255, 0.27);
29
+ border-radius: 100%;
30
+ }
31
+
32
+ .ctrl {
33
+ width: 30px;
34
+ text-align: center;
35
+ display: inline-block;
36
+ cursor: pointer;
37
+ }
38
+ .ctrl i {
39
+ font-size: 18px;
40
+ }
41
+ .ctrl:hover {
42
+ background: none;
43
+ }
44
+
45
+ #controls .ctrl {
46
+ position: absolute;
47
+ }
48
+ #pan-up {
49
+ left: 50%;
50
+ top: 0;
51
+ transform: translateX(-50%);
52
+ }
53
+ #pan-down {
54
+ bottom: 0;
55
+ left: 50%;
56
+ transform: translateX(-50%);
57
+ }
58
+ #pan-left {
59
+ left: 0;
60
+ top: 50%;
61
+ transform: translateY(-50%);
62
+ }
63
+ #pan-right {
64
+ right: 0;
65
+ top: 50%;
66
+ transform: translateY(-50%);
67
+ }
68
+ #fullscreen {
69
+ top: 50%;
70
+ left: 50%;
71
+ transform: translate(-50%, -50%);
72
+ }
73
+
74
  div.pnlm-hotspot-base.fas:before,
75
  div.pnlm-hotspot-base.fab:before,
76
  div.pnlm-hotspot-base.far:before{
122
  #vrgcontrols {
123
  position: absolute;
124
  z-index: 3;
125
+ width: 20px;
126
  bottom: 0;
127
  height: 30px;
128
  cursor: pointer;
129
+ left: 50%;
130
+ transform: translateX(-50%);;
131
  }
132
  .vrgctrl {
133
  color: #fff;
wpvr.php CHANGED
@@ -16,7 +16,7 @@
16
  * Plugin Name: WP VR
17
  * Plugin URI: https://rextheme.com/wpvr/
18
  * Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
19
- * Version: 3.4.5
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -226,6 +226,15 @@ function wpvr_block_render( $attributes ) {
226
  $control = $postdata['showControls'];
227
  }
228
 
 
 
 
 
 
 
 
 
 
229
  $vrgallery = false;
230
  if (isset($postdata['vrgallery'])) {
231
  $vrgallery = $postdata['vrgallery'];
@@ -575,6 +584,49 @@ function wpvr_block_render( $attributes ) {
575
  else {
576
  $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'px; height: '.$height.'px; margin: 0 auto; border-radius:'.$radius.';">';
577
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
  if ($vrgallery) {
579
  //===Carousal setup===//
580
  $html .= '<div id="vrgcontrols">';
@@ -619,6 +671,14 @@ function wpvr_block_render( $attributes ) {
619
  $html .= '}';
620
  $html .= '}';
621
  $html .= 'var panoshow'.$id.' = pannellum.viewer(response[0]["panoid"], scenes);';
 
 
 
 
 
 
 
 
622
  $html .= '
623
  if (scenes.autoRotate) {
624
  panoshow'.$id.'.on("load", function (){
@@ -651,6 +711,50 @@ function wpvr_block_render( $attributes ) {
651
  }
652
  }
653
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
654
  $html .= '</script>';
655
  //script end
656
  return $html;
16
  * Plugin Name: WP VR
17
  * Plugin URI: https://rextheme.com/wpvr/
18
  * Description: WP VR - 360 Panorama and virtual tour creator for WordPress is a customized panaroma & virtual builder tool for WordPress Website.
19
+ * Version: 3.4.6
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
226
  $control = $postdata['showControls'];
227
  }
228
 
229
+ if ($control) {
230
+ if ($postdata['customcontrol']) {
231
+ $custom_control = $postdata['customcontrol'];
232
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on") {
233
+ $control = false;
234
+ }
235
+ }
236
+ }
237
+
238
  $vrgallery = false;
239
  if (isset($postdata['vrgallery'])) {
240
  $vrgallery = $postdata['vrgallery'];
584
  else {
585
  $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'px; height: '.$height.'px; margin: 0 auto; border-radius:'.$radius.';">';
586
  }
587
+
588
+ //===Custom Control===//
589
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on") {
590
+
591
+ $html .= '<div id="zoom-in-out-controls">';
592
+
593
+ if ($custom_control['panZoomInSwitch'] == "on") {
594
+ $html .= '<div class="ctrl" id="zoom-in"><i class="'.$custom_control['panZoomInIcon'].'" style="color:'.$custom_control['panZoomInColor'].';"></i></div>';
595
+ }
596
+
597
+ if ($custom_control['panZoomOutSwitch'] == "on") {
598
+ $html .= '<div class="ctrl" id="zoom-out"><i class="'.$custom_control['panZoomOutIcon'].'" style="color:'.$custom_control['panZoomOutColor'].';"></i></div>';
599
+ }
600
+ $html .= '</div>';
601
+ //===zoom in out Control===//
602
+
603
+
604
+ //===Custom Control===//
605
+ $html .= '<div id="controls">';
606
+
607
+ if ($custom_control['panupSwitch'] == "on") {
608
+ $html .= '<div class="ctrl" id="pan-up"><i class="'.$custom_control['panupIcon'].'" style="color:'.$custom_control['panupColor'].';"></i></div>';
609
+ }
610
+
611
+ if ($custom_control['panDownSwitch'] == "on") {
612
+ $html .= '<div class="ctrl" id="pan-down"><i class="'.$custom_control['panDownIcon'].'" style="color:'.$custom_control['panDownColor'].';"></i></div>';
613
+ }
614
+
615
+ if ($custom_control['panLeftSwitch'] == "on") {
616
+ $html .= '<div class="ctrl" id="pan-left"><i class="'.$custom_control['panLeftIcon'].'" style="color:'.$custom_control['panLeftColor'].';"></i></div>';
617
+ }
618
+
619
+ if ($custom_control['panRightSwitch'] == "on") {
620
+ $html .= '<div class="ctrl" id="pan-right"><i class="'.$custom_control['panRightIcon'].'" style="color:'.$custom_control['panRightColor'].';"></i></div>';
621
+ }
622
+
623
+ if ($custom_control['panFullscreenSwitch'] == "on") {
624
+ $html .= '<div class="ctrl" id="fullscreen"><i class="'.$custom_control['panFullscreenIcon'].'" style="color:'.$custom_control['panFullscreenColor'].';"></i></div>';
625
+ }
626
+ $html .= '</div>';
627
+ }
628
+ //===Custom Control===//
629
+
630
  if ($vrgallery) {
631
  //===Carousal setup===//
632
  $html .= '<div id="vrgcontrols">';
671
  $html .= '}';
672
  $html .= '}';
673
  $html .= 'var panoshow'.$id.' = pannellum.viewer(response[0]["panoid"], scenes);';
674
+ $html .= 'panoshow'.$id.'.on("load", function (){
675
+ if (jQuery(".pnlm-panorama-info:visible").length > 0) {
676
+ jQuery("#controls").css("bottom", "55px");
677
+ }
678
+ else {
679
+ jQuery("#controls").css("bottom", "5px");
680
+ }
681
+ });';
682
  $html .= '
683
  if (scenes.autoRotate) {
684
  panoshow'.$id.'.on("load", function (){
711
  }
712
  }
713
  }
714
+
715
+ //===Custom Control===//
716
+ if ($custom_control['panupSwitch'] == "on") {
717
+ $html .= 'document.getElementById("pan-up").addEventListener("click", function(e) {';
718
+ $html .= 'panoshow'.$id.'.setPitch(panoshow'.$id.'.getPitch() + 10);';
719
+ $html .= '});';
720
+ }
721
+
722
+ if ($custom_control['panDownSwitch'] == "on") {
723
+ $html .= 'document.getElementById("pan-down").addEventListener("click", function(e) {';
724
+ $html .= 'panoshow'.$id.'.setPitch(panoshow'.$id.'.getPitch() - 10);';
725
+ $html .= '});';
726
+ }
727
+
728
+ if ($custom_control['panLeftSwitch'] == "on") {
729
+ $html .= 'document.getElementById("pan-left").addEventListener("click", function(e) {';
730
+ $html .= 'panoshow'.$id.'.setYaw(panoshow'.$id.'.getYaw() - 10);';
731
+ $html .= '});';
732
+ }
733
+
734
+ if ($custom_control['panRightSwitch'] == "on") {
735
+ $html .= 'document.getElementById("pan-right").addEventListener("click", function(e) {';
736
+ $html .= 'panoshow'.$id.'.setYaw(panoshow'.$id.'.getYaw() + 10);';
737
+ $html .= '});';
738
+ }
739
+
740
+ if ($custom_control['panZoomInSwitch'] == "on") {
741
+ $html .= 'document.getElementById("zoom-in").addEventListener("click", function(e) {';
742
+ $html .= 'panoshow'.$id.'.setHfov(panoshow'.$id.'.getHfov() - 10);';
743
+ $html .= '});';
744
+ }
745
+
746
+ if ($custom_control['panZoomOutSwitch'] == "on") {
747
+ $html .= 'document.getElementById("zoom-out").addEventListener("click", function(e) {';
748
+ $html .= 'panoshow'.$id.'.setHfov(panoshow'.$id.'.getHfov() + 10);';
749
+ $html .= '});';
750
+ }
751
+
752
+ if ($custom_control['panFullscreenSwitch'] == "on") {
753
+ $html .= 'document.getElementById("fullscreen").addEventListener("click", function(e) {';
754
+ $html .= 'panoshow'.$id.'.toggleFullscreen();';
755
+ $html .= '});';
756
+ }
757
+
758
  $html .= '</script>';
759
  //script end
760
  return $html;