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

Version Description

(03-08-2022) = * New: Custom Color Support for Individual Hotspots. * Fix: Custom Hotspot Icon Class is not working. * Tweak: Explainer Video & Global Zoom Settings not shown.

Download this release

Release Info

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

Code changes from version 8.1.0 to 8.1.1

README.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-fo
5
  Requires at least: 5.0
6
  Tested up to: 6.0
7
  Requires PHP: 7.0.0
8
- Stable tag: 8.1.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -309,7 +309,12 @@ Admins can remove the access from Authors and Editors at any time.
309
 
310
  == Changelog ==
311
 
312
- = 8.1.0 (26-07-2022) =
 
 
 
 
 
313
  * New: VR Glass Support for virtual tours.
314
 
315
 
5
  Requires at least: 5.0
6
  Tested up to: 6.0
7
  Requires PHP: 7.0.0
8
+ Stable tag: 8.1.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
309
 
310
  == Changelog ==
311
 
312
+ = 8.1.1 (03-08-2022) =
313
+ * New: Custom Color Support for Individual Hotspots.
314
+ * Fix: Custom Hotspot Icon Class is not working.
315
+ * Tweak: Explainer Video & Global Zoom Settings not shown.
316
+
317
+ = 8.1.0 (25-07-2022) =
318
  * New: VR Glass Support for virtual tours.
319
 
320
 
admin/classes/class-wpvr-meta-field.php CHANGED
@@ -450,6 +450,22 @@ class WPVR_Meta_Field {
450
  'have_tooltip' => false,
451
  'tooltip_text' => ''
452
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
453
  'cpLogoSwitch' => array(
454
  'class' => 'single-settings company-info',
455
  'title' => 'Add Company Information',
@@ -458,6 +474,7 @@ class WPVR_Meta_Field {
458
  'have_tooltip' => false,
459
  'tooltip_text' => ''
460
  )
 
461
  );
462
  return apply_filters( 'modify_advanced_control_right_fields', $fields, $postdata );
463
  }
@@ -536,6 +553,13 @@ class WPVR_Meta_Field {
536
  'icon' => 'home.jpg',
537
  'id' => 'wpvr_backToHome',
538
  'type' => 'checkbox'
 
 
 
 
 
 
 
539
  )
540
  );
541
  return apply_filters( 'modify_control_button_right_fields', $fields, $postdata );
450
  'have_tooltip' => false,
451
  'tooltip_text' => ''
452
  ),
453
+ 'explainerSwitch' => array(
454
+ 'class' => 'single-settings company-info',
455
+ 'title' => 'Enable explainer video',
456
+ 'id' => 'wpvr_explainerSwitch',
457
+ 'have_tooltip' => false,
458
+ 'tooltip_text' => '',
459
+ 'type' => 'checkbox',
460
+ ),
461
+ 'globalzoom' => array(
462
+ 'class' => 'single-settings',
463
+ 'title' => 'Set Zoom Preferences',
464
+ 'id' => 'wpvr_globalzoom',
465
+ 'have_tooltip' => true,
466
+ 'tooltip_text' => 'Zoom interval is 50 to 120 degree. You can put any value between 50 to 120. As an example, if you set 100, the scene will display with zoom in 100 degree on each load.',
467
+ 'type' => 'checkbox',
468
+ ),
469
  'cpLogoSwitch' => array(
470
  'class' => 'single-settings company-info',
471
  'title' => 'Add Company Information',
474
  'have_tooltip' => false,
475
  'tooltip_text' => ''
476
  )
477
+
478
  );
479
  return apply_filters( 'modify_advanced_control_right_fields', $fields, $postdata );
480
  }
553
  'icon' => 'home.jpg',
554
  'id' => 'wpvr_backToHome',
555
  'type' => 'checkbox'
556
+ ),
557
+
558
+ 'explainer' => array(
559
+ 'title' => 'Explainer',
560
+ 'icon' => 'explainer-vedio.png',
561
+ 'id' => 'wpvr_explainer',
562
+ 'type' => 'checkbox',
563
  )
564
  );
565
  return apply_filters( 'modify_control_button_right_fields', $fields, $postdata );
admin/classes/class-wpvr-scene.php CHANGED
@@ -820,8 +820,7 @@ class WPVR_Scene {
820
  $status = get_option('wpvr_edd_license_status');
821
  if ($status !== false && $status == 'valid') {
822
  if (isset($hotspot_data["hotspot-customclass-pro"]) && $hotspot_data["hotspot-customclass-pro"] != 'none') {
823
- $hotspot_data["hotspot-customclass"] = $hotspot_data["hotspot-customclass-pro"];
824
- $hotspoticoncolor = $hotspot_data["hotspot-customclass-color-icon-value"];
825
  }
826
  if (isset($hotspot_data['hotspot-blink'])) {
827
  $hotspotblink = $hotspot_data['hotspot-blink'];
@@ -1049,49 +1048,90 @@ class WPVR_Scene {
1049
  overflow: hidden;
1050
  }';
1051
  }
1052
-
1053
- $html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas,
1054
- #' . $panoid . ' div.pnlm-hotspot-base.fab,
1055
- #' . $panoid . ' div.pnlm-hotspot-base.fa,
1056
- #' . $panoid . ' div.pnlm-hotspot-base.far {
1057
- display: block !important;
1058
- background-color: ' . $hotspoticoncolor . ';
1059
- color: ' . $foreground_color . ';
1060
- border-radius: 100%;
1061
- width: 30px;
1062
- height: 30px;
1063
- animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
1064
- }';
1065
  $panoid2 = 'pano2'.$id;
1066
- $html .= '#' . $panoid2 . ' div.pnlm-hotspot-base.fas,
1067
- #' . $panoid2 . ' div.pnlm-hotspot-base.fab,
1068
- #' . $panoid2 . ' div.pnlm-hotspot-base.fa,
1069
- #' . $panoid2 . ' div.pnlm-hotspot-base.far {
1070
- display: block !important;
1071
- background-color: ' . $hotspoticoncolor . ';
1072
- color: ' . $foreground_color . ';
1073
- border-radius: 100%;
1074
- width: 30px;
1075
- height: 30px;
1076
- animation: icon-pulse' . $panoid2 . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
1077
- }';
1078
- if ($hotspotblink == 'on') {
1079
- $html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
1080
- 0% {
1081
- box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1082
- }
1083
- 100% {
1084
- box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1085
- }
1086
- }
1087
- @keyframes icon-pulse' . $panoid . ' {
1088
- 0% {
1089
- box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1090
- }
1091
- 100% {
1092
- box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1093
- }
1094
- }';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1095
  }
1096
 
1097
  $status = get_option('wpvr_edd_license_status');
@@ -1134,7 +1174,6 @@ class WPVR_Scene {
1134
  <input type="checkbox" class="vr_mode_change' . $id . '" name="vr_mode_change" value="off">
1135
  <span class="switcher-box">
1136
  <span class="normal-mode-tooltip">Normal VR Mode</span>
1137
- <span class="cardbord-mode-tooltip">Cardboard VR Mode</span>
1138
  <svg width="78" height="60" viewBox="0 0 78 60" fill="none" xmlns="http://www.w3.org/2000/svg">
1139
  <path d="M42.25 21.4286C42.25 22.2811 41.9076 23.0986 41.2981 23.7014C40.6886 24.3042 39.862 24.6429 39 24.6429C38.138 24.6429 37.3114 24.3042 36.7019 23.7014C36.0924 23.0986 35.75 22.2811 35.75 21.4286C35.75 20.5761 36.0924 19.7585 36.7019 19.1557C37.3114 18.5529 38.138 18.2143 39 18.2143C39.862 18.2143 40.6886 18.5529 41.2981 19.1557C41.9076 19.7585 42.25 20.5761 42.25 21.4286ZM19.5 30C18.9254 30 18.3743 30.2258 17.9679 30.6276C17.5616 31.0295 17.3333 31.5745 17.3333 32.1429C17.3333 32.7112 17.5616 33.2562 17.9679 33.6581C18.3743 34.06 18.9254 34.2857 19.5 34.2857H28.1667C28.7413 34.2857 29.2924 34.06 29.6987 33.6581C30.1051 33.2562 30.3333 32.7112 30.3333 32.1429C30.3333 31.5745 30.1051 31.0295 29.6987 30.6276C29.2924 30.2258 28.7413 30 28.1667 30H19.5ZM47.6667 32.1429C47.6667 31.5745 47.8949 31.0295 48.3013 30.6276C48.7076 30.2258 49.2587 30 49.8333 30H58.5C59.0746 30 59.6257 30.2258 60.0321 30.6276C60.4384 31.0295 60.6667 31.5745 60.6667 32.1429C60.6667 32.7112 60.4384 33.2562 60.0321 33.6581C59.6257 34.06 59.0746 34.2857 58.5 34.2857H49.8333C49.2587 34.2857 48.7076 34.06 48.3013 33.6581C47.8949 33.2562 47.6667 32.7112 47.6667 32.1429ZM32.5 0C31.9254 0 31.3743 0.225765 30.9679 0.627629C30.5616 1.02949 30.3333 1.57454 30.3333 2.14286V8.57143H18.4167C14.8693 8.57183 11.4528 9.89617 8.84994 12.2798C6.24706 14.6634 4.64954 17.9306 4.37667 21.4286H2.16667C1.59203 21.4286 1.04093 21.6543 0.634602 22.0562C0.228273 22.4581 0 23.0031 0 23.5714V36.4286C0 36.9969 0.228273 37.5419 0.634602 37.9438C1.04093 38.3457 1.59203 38.5714 2.16667 38.5714H4.33333V46.0714C4.33333 49.7655 5.81711 53.3083 8.45825 55.9204C11.0994 58.5325 14.6815 60 18.4167 60H25.3933C29.1269 59.9986 32.7071 58.5311 35.347 55.92L37.921 53.3786C38.0618 53.2393 38.229 53.1288 38.4131 53.0534C38.5971 52.978 38.7943 52.9392 38.9935 52.9392C39.1927 52.9392 39.3899 52.978 39.5739 53.0534C39.758 53.1288 39.9252 53.2393 40.066 53.3786L42.6357 55.92C45.2766 58.5322 48.8586 59.9998 52.5937 60H59.5833C63.3185 60 66.9006 58.5325 69.5418 55.9204C72.1829 53.3083 73.6667 49.7655 73.6667 46.0714V38.5714H75.8333C76.408 38.5714 76.9591 38.3457 77.3654 37.9438C77.7717 37.5419 78 36.9969 78 36.4286V23.5714C78 23.0031 77.7717 22.4581 77.3654 22.0562C76.9591 21.6543 76.408 21.4286 75.8333 21.4286H73.6233C73.3505 17.9306 71.753 14.6634 69.1501 12.2798C66.5472 9.89617 63.1307 8.57183 59.5833 8.57143H47.6667V2.14286C47.6667 1.57454 47.4384 1.02949 47.0321 0.627629C46.6257 0.225765 46.0746 0 45.5 0H32.5ZM69.3333 22.5V46.0714C69.3333 48.6289 68.3061 51.0816 66.4776 52.89C64.6491 54.6983 62.1692 55.7143 59.5833 55.7143H52.5937C50.0093 55.7132 47.5311 54.6973 45.7037 52.89L43.1297 50.3486C42.5864 49.8108 41.9413 49.3842 41.2312 49.0931C40.5211 48.8021 39.76 48.6522 38.9913 48.6522C38.2227 48.6522 37.4616 48.8021 36.7515 49.0931C36.0414 49.3842 35.3963 49.8108 34.853 50.3486L32.2833 52.89C30.4559 54.6973 27.9777 55.7132 25.3933 55.7143H18.4167C15.8308 55.7143 13.3509 54.6983 11.5224 52.89C9.6939 51.0816 8.66667 48.6289 8.66667 46.0714V22.5C8.66667 19.9426 9.6939 17.4899 11.5224 15.6815C13.3509 13.8731 15.8308 12.8571 18.4167 12.8571H59.5833C62.1692 12.8571 64.6491 13.8731 66.4776 15.6815C68.3061 17.4899 69.3333 19.9426 69.3333 22.5Z" fill="#216DF0"/>
1140
  </svg>
@@ -1583,6 +1622,15 @@ class WPVR_Scene {
1583
  }
1584
  }
1585
  };
 
 
 
 
 
 
 
 
 
1586
  ';
1587
 
1588
  $html .= '
@@ -1660,6 +1708,11 @@ class WPVR_Scene {
1660
  });
1661
  panoshow' . $id . '.startOrientation();
1662
  panoshow2' . $id . '.startOrientation();
 
 
 
 
 
1663
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").hide();
1664
  getParent.find("#pano' .$id. ' #controls'.$id.'").hide();
1665
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").hide();
@@ -1682,13 +1735,7 @@ class WPVR_Scene {
1682
  getParent.find(".fullscreen-button").hide();
1683
 
1684
  if (window.DeviceOrientationEvent) {
1685
- window.addEventListener("deviceorientation", function () {
1686
- var data = {
1687
- pitch: panoshow' . $id . '.getPitch(),
1688
- yaw: panoshow' . $id . '.getYaw(),
1689
- };
1690
- panoShowCardBoardOnTrigger(data);
1691
- });
1692
  }
1693
 
1694
  panoshow' . $id . '.on("zoomchange", function (data){
@@ -1754,6 +1801,8 @@ class WPVR_Scene {
1754
  "visibility": "hidden",
1755
  "position": "absolute",
1756
  });
 
 
1757
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").show();
1758
  getParent.find("#pano' .$id. ' #controls'.$id.'").show();
1759
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").show();
@@ -1778,7 +1827,12 @@ class WPVR_Scene {
1778
  getParent.find("#center-pointer' . $id . '").hide();
1779
  getParent.find(".fullscreen-button").hide();
1780
  panoshow' . $id . '.off("mousemove");
 
1781
  panoshow2' . $id . '.off("mousemove");
 
 
 
 
1782
  }
1783
  });';
1784
 
820
  $status = get_option('wpvr_edd_license_status');
821
  if ($status !== false && $status == 'valid') {
822
  if (isset($hotspot_data["hotspot-customclass-pro"]) && $hotspot_data["hotspot-customclass-pro"] != 'none') {
823
+ $hotspot_data['hotspot-customclass'] = $hotspot_data["hotspot-customclass-pro"] . ' custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot_data['hotspot-title'];
 
824
  }
825
  if (isset($hotspot_data['hotspot-blink'])) {
826
  $hotspotblink = $hotspot_data['hotspot-blink'];
1048
  overflow: hidden;
1049
  }';
1050
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
1051
  $panoid2 = 'pano2'.$id;
1052
+ $status = get_option('wpvr_edd_license_status');
1053
+ if ($status !== false && $status == 'valid') {
1054
+ foreach ($panodata['scene-list'] as $panoscenes){
1055
+
1056
+ foreach($panoscenes['hotspot-list'] as $hotspot){
1057
+ if (isset($hotspot['hotspot-customclass-color-icon-value']) && !empty($hotspot['hotspot-customclass-color-icon-value'])){
1058
+ $hotspoticoncolor = $hotspot['hotspot-customclass-color-icon-value'];
1059
+ }else{
1060
+ $hotspoticoncolor = "#00b4ff";
1061
+ }
1062
+ $pulse_color = wpvr_hex2rgb($hotspoticoncolor);
1063
+ if (isset($hotspot["hotspot-customclass-pro"]) && $hotspot["hotspot-customclass-pro"] != 'none') {
1064
+ $html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
1065
+ #' . $panoid . ' div.pnlm-hotspot-base.fab.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
1066
+ #' . $panoid . ' div.pnlm-hotspot-base.fa.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
1067
+ #' . $panoid . ' div.pnlm-hotspot-base.far.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].' {
1068
+ display: block !important;
1069
+ background-color: ' .$hotspoticoncolor.';
1070
+ color: ' . $foreground_color . ';
1071
+ border-radius: 100%;
1072
+ width: 30px;
1073
+ height: 30px;
1074
+ font-size: 16px;
1075
+ line-height: 30px;
1076
+ animation: icon-pulse' . $panoid .'-'. $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
1077
+ }';
1078
+ $html .= '#' . $panoid2 . ' div.pnlm-hotspot-base.fas.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
1079
+ #' . $panoid2 . ' div.pnlm-hotspot-base.fab.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
1080
+ #' . $panoid2 . ' div.pnlm-hotspot-base.fa.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
1081
+ #' . $panoid2 . ' div.pnlm-hotspot-base.far.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].' {
1082
+ display: block !important;
1083
+ background-color: ' . $hotspoticoncolor. ';
1084
+ color: ' . $foreground_color . ';
1085
+ border-radius: 100%;
1086
+ width: 30px;
1087
+ height: 30px;
1088
+ font-size: 16px;
1089
+ line-height: 30px;
1090
+ animation: icon-pulse' . $panoid2 .'-'. $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title']. ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
1091
+ }';
1092
+ }
1093
+ if (isset($hotspot['hotspot-blink'])) {
1094
+ $hotspotblink = $hotspot['hotspot-blink'];
1095
+ if ($hotspotblink == 'on') {
1096
+ $html .= '@-webkit-keyframes icon-pulse' .$panoid .'-'. $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'] .' {
1097
+ 0% {
1098
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1099
+ }
1100
+ 100% {
1101
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1102
+ }
1103
+ }
1104
+ @keyframes icon-pulse' . $panoid . ' {
1105
+ 0% {
1106
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1107
+ }
1108
+ 100% {
1109
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1110
+ }
1111
+ }';
1112
+ $html .= '@-webkit-keyframes icon-pulse' .$panoid2 .'-'. $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'] .' {
1113
+ 0% {
1114
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1115
+ }
1116
+ 100% {
1117
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1118
+ }
1119
+ }
1120
+ @keyframes icon-pulse' . $panoid . ' {
1121
+ 0% {
1122
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1123
+ }
1124
+ 100% {
1125
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1126
+ }
1127
+ }';
1128
+ }
1129
+ }
1130
+
1131
+ }
1132
+
1133
+ }
1134
+
1135
  }
1136
 
1137
  $status = get_option('wpvr_edd_license_status');
1174
  <input type="checkbox" class="vr_mode_change' . $id . '" name="vr_mode_change" value="off">
1175
  <span class="switcher-box">
1176
  <span class="normal-mode-tooltip">Normal VR Mode</span>
 
1177
  <svg width="78" height="60" viewBox="0 0 78 60" fill="none" xmlns="http://www.w3.org/2000/svg">
1178
  <path d="M42.25 21.4286C42.25 22.2811 41.9076 23.0986 41.2981 23.7014C40.6886 24.3042 39.862 24.6429 39 24.6429C38.138 24.6429 37.3114 24.3042 36.7019 23.7014C36.0924 23.0986 35.75 22.2811 35.75 21.4286C35.75 20.5761 36.0924 19.7585 36.7019 19.1557C37.3114 18.5529 38.138 18.2143 39 18.2143C39.862 18.2143 40.6886 18.5529 41.2981 19.1557C41.9076 19.7585 42.25 20.5761 42.25 21.4286ZM19.5 30C18.9254 30 18.3743 30.2258 17.9679 30.6276C17.5616 31.0295 17.3333 31.5745 17.3333 32.1429C17.3333 32.7112 17.5616 33.2562 17.9679 33.6581C18.3743 34.06 18.9254 34.2857 19.5 34.2857H28.1667C28.7413 34.2857 29.2924 34.06 29.6987 33.6581C30.1051 33.2562 30.3333 32.7112 30.3333 32.1429C30.3333 31.5745 30.1051 31.0295 29.6987 30.6276C29.2924 30.2258 28.7413 30 28.1667 30H19.5ZM47.6667 32.1429C47.6667 31.5745 47.8949 31.0295 48.3013 30.6276C48.7076 30.2258 49.2587 30 49.8333 30H58.5C59.0746 30 59.6257 30.2258 60.0321 30.6276C60.4384 31.0295 60.6667 31.5745 60.6667 32.1429C60.6667 32.7112 60.4384 33.2562 60.0321 33.6581C59.6257 34.06 59.0746 34.2857 58.5 34.2857H49.8333C49.2587 34.2857 48.7076 34.06 48.3013 33.6581C47.8949 33.2562 47.6667 32.7112 47.6667 32.1429ZM32.5 0C31.9254 0 31.3743 0.225765 30.9679 0.627629C30.5616 1.02949 30.3333 1.57454 30.3333 2.14286V8.57143H18.4167C14.8693 8.57183 11.4528 9.89617 8.84994 12.2798C6.24706 14.6634 4.64954 17.9306 4.37667 21.4286H2.16667C1.59203 21.4286 1.04093 21.6543 0.634602 22.0562C0.228273 22.4581 0 23.0031 0 23.5714V36.4286C0 36.9969 0.228273 37.5419 0.634602 37.9438C1.04093 38.3457 1.59203 38.5714 2.16667 38.5714H4.33333V46.0714C4.33333 49.7655 5.81711 53.3083 8.45825 55.9204C11.0994 58.5325 14.6815 60 18.4167 60H25.3933C29.1269 59.9986 32.7071 58.5311 35.347 55.92L37.921 53.3786C38.0618 53.2393 38.229 53.1288 38.4131 53.0534C38.5971 52.978 38.7943 52.9392 38.9935 52.9392C39.1927 52.9392 39.3899 52.978 39.5739 53.0534C39.758 53.1288 39.9252 53.2393 40.066 53.3786L42.6357 55.92C45.2766 58.5322 48.8586 59.9998 52.5937 60H59.5833C63.3185 60 66.9006 58.5325 69.5418 55.9204C72.1829 53.3083 73.6667 49.7655 73.6667 46.0714V38.5714H75.8333C76.408 38.5714 76.9591 38.3457 77.3654 37.9438C77.7717 37.5419 78 36.9969 78 36.4286V23.5714C78 23.0031 77.7717 22.4581 77.3654 22.0562C76.9591 21.6543 76.408 21.4286 75.8333 21.4286H73.6233C73.3505 17.9306 71.753 14.6634 69.1501 12.2798C66.5472 9.89617 63.1307 8.57183 59.5833 8.57143H47.6667V2.14286C47.6667 1.57454 47.4384 1.02949 47.0321 0.627629C46.6257 0.225765 46.0746 0 45.5 0H32.5ZM69.3333 22.5V46.0714C69.3333 48.6289 68.3061 51.0816 66.4776 52.89C64.6491 54.6983 62.1692 55.7143 59.5833 55.7143H52.5937C50.0093 55.7132 47.5311 54.6973 45.7037 52.89L43.1297 50.3486C42.5864 49.8108 41.9413 49.3842 41.2312 49.0931C40.5211 48.8021 39.76 48.6522 38.9913 48.6522C38.2227 48.6522 37.4616 48.8021 36.7515 49.0931C36.0414 49.3842 35.3963 49.8108 34.853 50.3486L32.2833 52.89C30.4559 54.6973 27.9777 55.7132 25.3933 55.7143H18.4167C15.8308 55.7143 13.3509 54.6983 11.5224 52.89C9.6939 51.0816 8.66667 48.6289 8.66667 46.0714V22.5C8.66667 19.9426 9.6939 17.4899 11.5224 15.6815C13.3509 13.8731 15.8308 12.8571 18.4167 12.8571H59.5833C62.1692 12.8571 64.6491 13.8731 66.4776 15.6815C68.3061 17.4899 69.3333 19.9426 69.3333 22.5Z" fill="#216DF0"/>
1179
  </svg>
1622
  }
1623
  }
1624
  };
1625
+
1626
+ function vrDeviseOrientation(){
1627
+ var data = {
1628
+ pitch: panoshow' . $id . '.getPitch(),
1629
+ yaw: panoshow' . $id . '.getYaw(),
1630
+ };
1631
+ console.log("click orientation")
1632
+ panoShowCardBoardOnTrigger(data);
1633
+ }
1634
  ';
1635
 
1636
  $html .= '
1708
  });
1709
  panoshow' . $id . '.startOrientation();
1710
  panoshow2' . $id . '.startOrientation();
1711
+
1712
+ panoshow2' . $id . '.setPitch(panoshow' . $id . '.getPitch(), 0);
1713
+ panoshow2' . $id . '.setYaw(panoshow' . $id . '.getYaw(), 0);
1714
+
1715
+ getParent.find(".pano-wrap").addClass("wpvr-cardboard-disable-event");
1716
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").hide();
1717
  getParent.find("#pano' .$id. ' #controls'.$id.'").hide();
1718
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").hide();
1735
  getParent.find(".fullscreen-button").hide();
1736
 
1737
  if (window.DeviceOrientationEvent) {
1738
+ window.addEventListener("deviceorientation", vrDeviseOrientation);
 
 
 
 
 
 
1739
  }
1740
 
1741
  panoshow' . $id . '.on("zoomchange", function (data){
1801
  "visibility": "hidden",
1802
  "position": "absolute",
1803
  });
1804
+ getParent.find(".pano-wrap").removeClass("wpvr-cardboard-disable-event");
1805
+
1806
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").show();
1807
  getParent.find("#pano' .$id. ' #controls'.$id.'").show();
1808
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").show();
1827
  getParent.find("#center-pointer' . $id . '").hide();
1828
  getParent.find(".fullscreen-button").hide();
1829
  panoshow' . $id . '.off("mousemove");
1830
+ panoshow' . $id . '.off("touchmove");
1831
  panoshow2' . $id . '.off("mousemove");
1832
+ panoshow2' . $id . '.off("touchmove");
1833
+ if (window.DeviceOrientationEvent) {
1834
+ window.removeEventListener("deviceorientation", vrDeviseOrientation);
1835
+ }
1836
  }
1837
  });';
1838
 
admin/icon/explainer-vedio.png ADDED
Binary file
public/css/wpvr-public.css CHANGED
@@ -1016,6 +1016,11 @@ div.custom-ifram {
1016
  transform: rotate(90deg);
1017
  }
1018
 
 
 
 
 
 
1019
  /* ---------responsive style--------- */
1020
  @media only screen and (min-width: 1921px) {
1021
  .wpvr-home-title {
1016
  transform: rotate(90deg);
1017
  }
1018
 
1019
+ .wpvr-cardboard-disable-event {
1020
+ cursor: not-allowed;
1021
+ pointer-events: none;
1022
+ }
1023
+
1024
  /* ---------responsive style--------- */
1025
  @media only screen and (min-width: 1921px) {
1026
  .wpvr-home-title {
uninstall.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Fired when the plugin is uninstalled.
5
+ *
6
+ * When populating this file, consider the following flow
7
+ * of control:
8
+ *
9
+ * - This method should be static
10
+ * - Check if the $_REQUEST content actually is the plugin name
11
+ * - Run an admin referrer check to make sure it goes through authentication
12
+ * - Verify the output of $_GET makes sense
13
+ * - Repeat with other user roles. Best directly by using the links/query string parameters.
14
+ * - Repeat things for multisite. Once for a single site in the network, once sitewide.
15
+ *
16
+ * This file may be updated more in future version of the Boilerplate; however, this is the
17
+ * general skeleton and outline for how the file should work.
18
+ *
19
+ * For more information, see the following discussion:
20
+ * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
21
+ *
22
+ * @link http://rextheme.com/
23
+ * @since 1.0.0
24
+ *
25
+ * @package Wpvr
26
+ */
27
+
28
+ // If uninstall not called from WordPress, then exit.
29
+ if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
30
+ exit;
31
+ }
vendor/composer/autoload_classmap.php CHANGED
@@ -8,8 +8,6 @@ $baseDir = dirname($vendorDir);
8
  return array(
9
  'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  'Singleton' => $baseDir . '/admin/views/class-wpvr-singleton.php',
11
- 'WPVR\\Builder\\DIVI\\Modules\\WPVR_Modules' => $baseDir . '/includes/wpvr-divi-modules/includes/DiviModules.php',
12
- 'WPVR\\Builder\\DIVI\\WPVR_Divi_modules' => $baseDir . '/includes/wpvr-divi-modules/wpvr_divi_modules.php',
13
  'WPVR_Admin_Page' => $baseDir . '/admin/classes/class-wpvr-admin-pages.php',
14
  'WPVR_Advanced_Control' => $baseDir . '/admin/classes/class-wpvr-advanced-control.php',
15
  'WPVR_Basic_Setting' => $baseDir . '/admin/classes/class-wpvr-basic-setting.php',
8
  return array(
9
  'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
10
  'Singleton' => $baseDir . '/admin/views/class-wpvr-singleton.php',
 
 
11
  'WPVR_Admin_Page' => $baseDir . '/admin/classes/class-wpvr-admin-pages.php',
12
  'WPVR_Advanced_Control' => $baseDir . '/admin/classes/class-wpvr-advanced-control.php',
13
  'WPVR_Basic_Setting' => $baseDir . '/admin/classes/class-wpvr-basic-setting.php',
vendor/composer/autoload_static.php CHANGED
@@ -9,8 +9,6 @@ class ComposerStaticInit10da27e89b9ceb921ca7de55a4e562d6
9
  public static $classMap = array (
10
  'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
11
  'Singleton' => __DIR__ . '/../..' . '/admin/views/class-wpvr-singleton.php',
12
- 'WPVR\\Builder\\DIVI\\Modules\\WPVR_Modules' => __DIR__ . '/../..' . '/includes/wpvr-divi-modules/includes/DiviModules.php',
13
- 'WPVR\\Builder\\DIVI\\WPVR_Divi_modules' => __DIR__ . '/../..' . '/includes/wpvr-divi-modules/wpvr_divi_modules.php',
14
  'WPVR_Admin_Page' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-admin-pages.php',
15
  'WPVR_Advanced_Control' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-advanced-control.php',
16
  'WPVR_Basic_Setting' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-basic-setting.php',
9
  public static $classMap = array (
10
  'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
11
  'Singleton' => __DIR__ . '/../..' . '/admin/views/class-wpvr-singleton.php',
 
 
12
  'WPVR_Admin_Page' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-admin-pages.php',
13
  'WPVR_Advanced_Control' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-advanced-control.php',
14
  'WPVR_Basic_Setting' => __DIR__ . '/../..' . '/admin/classes/class-wpvr-basic-setting.php',
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: 8.1.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -37,7 +37,7 @@ require plugin_dir_path(__FILE__) . 'elementor/elementor.php';
37
  * Start at version 1.0.0 and use SemVer - https://semver.org
38
  * Rename this for your plugin and update it as you release new versions.
39
  */
40
- define('WPVR_VERSION', '8.1.0');
41
  define('WPVR_FILE', __FILE__);
42
  define("WPVR_PLUGIN_DIR_URL", plugin_dir_url(__FILE__));
43
  define("WPVR_PLUGIN_DIR_PATH", plugin_dir_path(__FILE__));
@@ -93,11 +93,11 @@ run_wpvr();
93
 
94
  /**
95
  * Array information checker
96
- *
97
  * @param mixed $needle
98
  * @param mixed $haystack
99
  * @param bool $strict
100
- *
101
  * @return bool
102
  * @since 7.3.6
103
  */
@@ -607,9 +607,10 @@ function wpvr_block_render($attributes)
607
  foreach ($hotspot_datas as $hotspot_data) {
608
  $status = get_option('wpvr_edd_license_status');
609
  if ($status !== false && $status == 'valid') {
 
610
  if (isset($hotspot_data["hotspot-customclass-pro"]) && $hotspot_data["hotspot-customclass-pro"] != 'none') {
611
- $hotspot_data["hotspot-customclass"] = $hotspot_data["hotspot-customclass-pro"];
612
- $hotspoticoncolor = $hotspot_data["hotspot-customclass-color-icon-value"];
613
  }
614
  if (isset($hotspot_data['hotspot-blink'])) {
615
  $hotspotblink = $hotspot_data['hotspot-blink'];
@@ -640,7 +641,6 @@ function wpvr_block_render($attributes)
640
  } else {
641
  $wpvr_url_open = "off";
642
  }
643
-
644
  $hotspot_info = array(
645
  'text' => $hotspot_data['hotspot-title'],
646
  'pitch' => $hotspot_data['hotspot-pitch'],
@@ -840,36 +840,51 @@ function wpvr_block_render($attributes)
840
  overflow: hidden;
841
  }';
842
  }
843
- $html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas,
844
- #' . $panoid . ' div.pnlm-hotspot-base.fab,
845
- #' . $panoid . ' div.pnlm-hotspot-base.fa,
846
- #' . $panoid . ' div.pnlm-hotspot-base.far {
847
- display: block !important;
848
- background-color: ' . $hotspoticoncolor . ';
849
- color: ' . $foreground_color . ';
850
- border-radius: 100%;
851
- width: 30px;
852
- height: 30px;
853
- font-size: 16px;
854
- line-height: 30px;
855
- animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
856
- }';
857
- $html .= '#' . $panoid2 . ' div.pnlm-hotspot-base.fas,
858
- #' . $panoid2 . ' div.pnlm-hotspot-base.fab,
859
- #' . $panoid2 . ' div.pnlm-hotspot-base.fa,
860
- #' . $panoid2 . ' div.pnlm-hotspot-base.far {
861
- display: block !important;
862
- background-color: ' . $hotspoticoncolor . ';
863
- color: ' . $foreground_color . ';
864
- border-radius: 100%;
865
- width: 30px;
866
- height: 30px;
867
- font-size: 16px;
868
- line-height: 30px;
869
- animation: icon-pulse' . $panoid2 . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
 
 
 
 
 
 
 
 
 
 
 
 
870
  }';
871
- if ($hotspotblink == 'on') {
872
- $html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
 
 
 
873
  0% {
874
  box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
875
  }
@@ -885,8 +900,18 @@ function wpvr_block_render($attributes)
885
  box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
886
  }
887
  }';
 
 
 
 
 
 
 
888
  }
889
 
 
 
 
890
  $status = get_option('wpvr_edd_license_status');
891
  if ($status !== false && $status == 'valid') {
892
  if (!$gyro) {
@@ -913,19 +938,18 @@ function wpvr_block_render($attributes)
913
  $is_cardboard = get_option('wpvr_cardboard_disable');
914
  if ($status !== false && 'valid' == $status && $is_pro && wpvr_isMobileDevice() && $is_cardboard == 'true' ) {
915
  $html .= '<button class="fullscreen-button">';
916
- $html .= '<span class="expand">';
917
- $html .= '<i class="fa fa-expand" aria-hidden="true"></i>';
918
- $html .= '</span>';
919
 
920
- $html .= '<span class="compress">';
921
- $html .= '<i class="fa fa-compress" aria-hidden="true"></i>';
922
- $html .= '</span>';
923
  $html .= '</button>';
924
  $html .= '<label class="wpvr-cardboard-switcher">
925
  <input type="checkbox" class="vr_mode_change' . $id . '" name="vr_mode_change" value="off">
926
  <span class="switcher-box">
927
  <span class="normal-mode-tooltip">Normal VR Mode</span>
928
- <span class="cardbord-mode-tooltip">Cardboard VR Mode</span>
929
  <svg width="78" height="60" viewBox="0 0 78 60" fill="none" xmlns="http://www.w3.org/2000/svg">
930
  <path d="M42.25 21.4286C42.25 22.2811 41.9076 23.0986 41.2981 23.7014C40.6886 24.3042 39.862 24.6429 39 24.6429C38.138 24.6429 37.3114 24.3042 36.7019 23.7014C36.0924 23.0986 35.75 22.2811 35.75 21.4286C35.75 20.5761 36.0924 19.7585 36.7019 19.1557C37.3114 18.5529 38.138 18.2143 39 18.2143C39.862 18.2143 40.6886 18.5529 41.2981 19.1557C41.9076 19.7585 42.25 20.5761 42.25 21.4286ZM19.5 30C18.9254 30 18.3743 30.2258 17.9679 30.6276C17.5616 31.0295 17.3333 31.5745 17.3333 32.1429C17.3333 32.7112 17.5616 33.2562 17.9679 33.6581C18.3743 34.06 18.9254 34.2857 19.5 34.2857H28.1667C28.7413 34.2857 29.2924 34.06 29.6987 33.6581C30.1051 33.2562 30.3333 32.7112 30.3333 32.1429C30.3333 31.5745 30.1051 31.0295 29.6987 30.6276C29.2924 30.2258 28.7413 30 28.1667 30H19.5ZM47.6667 32.1429C47.6667 31.5745 47.8949 31.0295 48.3013 30.6276C48.7076 30.2258 49.2587 30 49.8333 30H58.5C59.0746 30 59.6257 30.2258 60.0321 30.6276C60.4384 31.0295 60.6667 31.5745 60.6667 32.1429C60.6667 32.7112 60.4384 33.2562 60.0321 33.6581C59.6257 34.06 59.0746 34.2857 58.5 34.2857H49.8333C49.2587 34.2857 48.7076 34.06 48.3013 33.6581C47.8949 33.2562 47.6667 32.7112 47.6667 32.1429ZM32.5 0C31.9254 0 31.3743 0.225765 30.9679 0.627629C30.5616 1.02949 30.3333 1.57454 30.3333 2.14286V8.57143H18.4167C14.8693 8.57183 11.4528 9.89617 8.84994 12.2798C6.24706 14.6634 4.64954 17.9306 4.37667 21.4286H2.16667C1.59203 21.4286 1.04093 21.6543 0.634602 22.0562C0.228273 22.4581 0 23.0031 0 23.5714V36.4286C0 36.9969 0.228273 37.5419 0.634602 37.9438C1.04093 38.3457 1.59203 38.5714 2.16667 38.5714H4.33333V46.0714C4.33333 49.7655 5.81711 53.3083 8.45825 55.9204C11.0994 58.5325 14.6815 60 18.4167 60H25.3933C29.1269 59.9986 32.7071 58.5311 35.347 55.92L37.921 53.3786C38.0618 53.2393 38.229 53.1288 38.4131 53.0534C38.5971 52.978 38.7943 52.9392 38.9935 52.9392C39.1927 52.9392 39.3899 52.978 39.5739 53.0534C39.758 53.1288 39.9252 53.2393 40.066 53.3786L42.6357 55.92C45.2766 58.5322 48.8586 59.9998 52.5937 60H59.5833C63.3185 60 66.9006 58.5325 69.5418 55.9204C72.1829 53.3083 73.6667 49.7655 73.6667 46.0714V38.5714H75.8333C76.408 38.5714 76.9591 38.3457 77.3654 37.9438C77.7717 37.5419 78 36.9969 78 36.4286V23.5714C78 23.0031 77.7717 22.4581 77.3654 22.0562C76.9591 21.6543 76.408 21.4286 75.8333 21.4286H73.6233C73.3505 17.9306 71.753 14.6634 69.1501 12.2798C66.5472 9.89617 63.1307 8.57183 59.5833 8.57143H47.6667V2.14286C47.6667 1.57454 47.4384 1.02949 47.0321 0.627629C46.6257 0.225765 46.0746 0 45.5 0H32.5ZM69.3333 22.5V46.0714C69.3333 48.6289 68.3061 51.0816 66.4776 52.89C64.6491 54.6983 62.1692 55.7143 59.5833 55.7143H52.5937C50.0093 55.7132 47.5311 54.6973 45.7037 52.89L43.1297 50.3486C42.5864 49.8108 41.9413 49.3842 41.2312 49.0931C40.5211 48.8021 39.76 48.6522 38.9913 48.6522C38.2227 48.6522 37.4616 48.8021 36.7515 49.0931C36.0414 49.3842 35.3963 49.8108 34.853 50.3486L32.2833 52.89C30.4559 54.6973 27.9777 55.7132 25.3933 55.7143H18.4167C15.8308 55.7143 13.3509 54.6983 11.5224 52.89C9.6939 51.0816 8.66667 48.6289 8.66667 46.0714V22.5C8.66667 19.9426 9.6939 17.4899 11.5224 15.6815C13.3509 13.8731 15.8308 12.8571 18.4167 12.8571H59.5833C62.1692 12.8571 64.6491 13.8731 66.4776 15.6815C68.3061 17.4899 69.3333 19.9426 69.3333 22.5Z" fill="#216DF0"/>
931
  </svg>
@@ -960,7 +984,7 @@ function wpvr_block_render($attributes)
960
  }
961
  }
962
  // Vr mode transction scene to scene
963
- if ($status !== false && 'valid' == $status && $is_pro) {
964
  $html .= '<div id="center-pointer' . $id . '" class="vr-pointer-container" style="display:none"><span class="center-pointer"></span></div>';
965
  }
966
 
@@ -1356,6 +1380,15 @@ function wpvr_block_render($attributes)
1356
  }
1357
  }
1358
  };
 
 
 
 
 
 
 
 
 
1359
  ';
1360
  $html .= '
1361
 
@@ -1420,7 +1453,6 @@ function wpvr_block_render($attributes)
1420
  if(panoInfo == "block"){
1421
  infoBlock = "block";
1422
  }
1423
-
1424
  if (getValue == "off") {
1425
  requestFullScreen()
1426
  screen.orientation.lock("landscape-primary")
@@ -1429,10 +1461,8 @@ function wpvr_block_render($attributes)
1429
  .catch(function(error) {
1430
  alert("VR Glass Mode not supported in this device");
1431
  });
1432
-
1433
  localStorage.setItem("vr_mode", "on");
1434
- localStorage.setItem("vr_mode_compass", "off");
1435
- localStorage.setItem("vr_mode_pano_info", "off");
1436
  jQuery(".vr-mode-title").show();
1437
  jQuery(this).val("on");
1438
  getParent.find("#pano2' . $id . '").css({
@@ -1442,6 +1472,8 @@ function wpvr_block_render($attributes)
1442
  });
1443
  panoshow' . $id . '.startOrientation();
1444
  panoshow2' . $id . '.startOrientation();
 
 
1445
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").hide();
1446
  getParent.find("#pano' .$id. ' #controls'.$id.'").hide();
1447
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").hide();
@@ -1466,26 +1498,9 @@ function wpvr_block_render($attributes)
1466
 
1467
 
1468
  if (window.DeviceOrientationEvent) {
1469
- window.addEventListener("deviceorientation", function () {
1470
- var data = {
1471
- pitch: panoshow' . $id . '.getPitch(),
1472
- yaw: panoshow' . $id . '.getYaw(),
1473
- };
1474
- panoShowCardBoardOnTrigger(data);
1475
- });
1476
  }
1477
-
1478
- jQuery(document).on("click","#pano2' . $id . '",function(event) {
1479
- panoshow' . $id . '.startOrientation();
1480
- panoshow2' . $id . '.startOrientation();
1481
-
1482
- });
1483
-
1484
- jQuery(document).on("click","#pano' . $id . '",function(event) {
1485
- panoshow' . $id . '.startOrientation();
1486
- panoshow2' . $id . '.startOrientation();
1487
- });
1488
-
1489
  panoshow' . $id . '.on("mousemove", function (data){
1490
  panoshow2' . $id . '.setPitch(data.pitch, 0);
1491
  panoshow2' . $id . '.setYaw(data.yaw, 0);
@@ -1530,8 +1545,6 @@ function wpvr_block_render($attributes)
1530
  screen.orientation.unlock();
1531
  requestExitFullscreen();
1532
  localStorage.setItem("vr_mode", "off");
1533
- localStorage.setItem("vr_mode_compass", "on");
1534
- localStorage.setItem("vr_mode_pano_info", "on");
1535
  jQuery(".vr-mode-title").hide();
1536
  jQuery(this).val("off");
1537
  getParent.find("#pano2' . $id . '").css({
@@ -1539,6 +1552,9 @@ function wpvr_block_render($attributes)
1539
  "visibility": "hidden",
1540
  "position": "absolute",
1541
  });
 
 
 
1542
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").show();
1543
  getParent.find("#pano' .$id. ' #controls'.$id.'").show();
1544
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").show();
@@ -1560,11 +1576,16 @@ function wpvr_block_render($attributes)
1560
  getParent.find("#pano' . $id . ' .pnlm-panorama-info").show();
1561
  }
1562
 
1563
- getParent.find("#pano' . $id . '").removeClass("cardboard-half");
1564
  getParent.find("#center-pointer' . $id . '").hide();
1565
  getParent.find(".fullscreen-button").hide();
1566
  panoshow' . $id . '.off("mousemove");
 
1567
  panoshow2' . $id . '.off("mousemove");
 
 
 
 
1568
  }
1569
  });';
1570
 
@@ -1579,7 +1600,7 @@ function wpvr_block_render($attributes)
1579
  jQuery("#pano' . $id . ' .pnlm-panorama-info").hide();
1580
  jQuery(".vr-mode-title").show();
1581
  }
1582
- });';
1583
  }
1584
 
1585
 
@@ -2121,12 +2142,12 @@ function wpvr_cache_admin_notice()
2121
  {
2122
  $option = get_option('wpvr_warning');
2123
  if (!$option) {
2124
- ?>
2125
  <div class="notice notice-warning" id="wpvr-warning" style="position: relative;">
2126
  <p><?php _e('Since you have updated the plugin, please clear the browser cache for smooth functioning. Follow these steps if you are using <a href="https://support.google.com/accounts/answer/32050?co=GENIE.Platform%3DDesktop&hl=en" target="_blank">Google Chrome</a>, <a href="https://support.mozilla.org/en-US/kb/how-clear-firefox-cache" target="_blank">Mozilla Firefox</a>, <a href="https://clear-my-cache.com/en/apple-mac-os/safari.html" target="_blank">Safai</a> or <a href="https://support.microsoft.com/en-us/help/10607/microsoft-edge-view-delete-browser-history" target="_blank">Microsoft Edge</a>', 'wpvr'); ?></p>
2127
  <button type="button" id="wpvr-dismissible" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
2128
  </div>
2129
- <?php
2130
  }
2131
  }
2132
  // add_action('admin_notices', 'wpvr_cache_admin_notice');
@@ -2147,9 +2168,9 @@ function wpvr_mobile_media_handle()
2147
 
2148
 
2149
  add_action(
2150
- /**
2151
- * @param $api \VisualComposer\Modules\Api\Factory
2152
- */
2153
  'vcv:api',
2154
  function ($api) {
2155
  $elementsToRegister = [
@@ -2174,4 +2195,4 @@ function wpvr_redirect_after_activation($plugin)
2174
  exit(wp_safe_redirect($url));
2175
  }
2176
  }
2177
- add_action('activated_plugin', 'wpvr_redirect_after_activation');
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: 8.1.1
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
37
  * Start at version 1.0.0 and use SemVer - https://semver.org
38
  * Rename this for your plugin and update it as you release new versions.
39
  */
40
+ define('WPVR_VERSION', '8.1.1');
41
  define('WPVR_FILE', __FILE__);
42
  define("WPVR_PLUGIN_DIR_URL", plugin_dir_url(__FILE__));
43
  define("WPVR_PLUGIN_DIR_PATH", plugin_dir_path(__FILE__));
93
 
94
  /**
95
  * Array information checker
96
+ *
97
  * @param mixed $needle
98
  * @param mixed $haystack
99
  * @param bool $strict
100
+ *
101
  * @return bool
102
  * @since 7.3.6
103
  */
607
  foreach ($hotspot_datas as $hotspot_data) {
608
  $status = get_option('wpvr_edd_license_status');
609
  if ($status !== false && $status == 'valid') {
610
+
611
  if (isset($hotspot_data["hotspot-customclass-pro"]) && $hotspot_data["hotspot-customclass-pro"] != 'none') {
612
+ $hotspot_data['hotspot-customclass'] = $hotspot_data["hotspot-customclass-pro"] . ' custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot_data['hotspot-title'];
613
+
614
  }
615
  if (isset($hotspot_data['hotspot-blink'])) {
616
  $hotspotblink = $hotspot_data['hotspot-blink'];
641
  } else {
642
  $wpvr_url_open = "off";
643
  }
 
644
  $hotspot_info = array(
645
  'text' => $hotspot_data['hotspot-title'],
646
  'pitch' => $hotspot_data['hotspot-pitch'],
840
  overflow: hidden;
841
  }';
842
  }
843
+ $status = get_option('wpvr_edd_license_status');
844
+ if ($status !== false && $status == 'valid') {
845
+ foreach ($panodata['scene-list'] as $panoscenes){
846
+
847
+ foreach($panoscenes['hotspot-list'] as $hotspot){
848
+ if (isset($hotspot['hotspot-customclass-color-icon-value']) && !empty($hotspot['hotspot-customclass-color-icon-value'])){
849
+ $hotspoticoncolor = $hotspot['hotspot-customclass-color-icon-value'];
850
+ }else{
851
+ $hotspoticoncolor = "#00b4ff";
852
+ }
853
+ $pulse_color = wpvr_hex2rgb($hotspoticoncolor);
854
+ if (isset($hotspot["hotspot-customclass-pro"]) && $hotspot["hotspot-customclass-pro"] != 'none') {
855
+ $html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
856
+ #' . $panoid . ' div.pnlm-hotspot-base.fab.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
857
+ #' . $panoid . ' div.pnlm-hotspot-base.fa.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
858
+ #' . $panoid . ' div.pnlm-hotspot-base.far.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].' {
859
+ display: block !important;
860
+ background-color: ' .$hotspoticoncolor.';
861
+ color: ' . $foreground_color . ';
862
+ border-radius: 100%;
863
+ width: 30px;
864
+ height: 30px;
865
+ font-size: 16px;
866
+ line-height: 30px;
867
+ animation: icon-pulse' . $panoid .'-'. $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
868
+ }';
869
+ $html .= '#' . $panoid2 . ' div.pnlm-hotspot-base.fas.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
870
+ #' . $panoid2 . ' div.pnlm-hotspot-base.fab.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
871
+ #' . $panoid2 . ' div.pnlm-hotspot-base.fa.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].',
872
+ #' . $panoid2 . ' div.pnlm-hotspot-base.far.custom-' . $id.'-' . $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'].' {
873
+ display: block !important;
874
+ background-color: ' . $hotspoticoncolor. ';
875
+ color: ' . $foreground_color . ';
876
+ border-radius: 100%;
877
+ width: 30px;
878
+ height: 30px;
879
+ font-size: 16px;
880
+ line-height: 30px;
881
+ animation: icon-pulse' . $panoid2 . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
882
  }';
883
+ }
884
+ if (isset($hotspot['hotspot-blink'])) {
885
+ $hotspotblink = $hotspot['hotspot-blink'];
886
+ if ($hotspotblink == 'on') {
887
+ $html .= '@-webkit-keyframes icon-pulse' .$panoid .'-'. $panoscenes['scene-id'] .'-'. $hotspot['hotspot-title'] .' {
888
  0% {
889
  box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
890
  }
900
  box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
901
  }
902
  }';
903
+ }
904
+ }
905
+
906
+ }
907
+
908
+ }
909
+
910
  }
911
 
912
+
913
+
914
+
915
  $status = get_option('wpvr_edd_license_status');
916
  if ($status !== false && $status == 'valid') {
917
  if (!$gyro) {
938
  $is_cardboard = get_option('wpvr_cardboard_disable');
939
  if ($status !== false && 'valid' == $status && $is_pro && wpvr_isMobileDevice() && $is_cardboard == 'true' ) {
940
  $html .= '<button class="fullscreen-button">';
941
+ $html .= '<span class="expand">';
942
+ $html .= '<i class="fa fa-expand" aria-hidden="true"></i>';
943
+ $html .= '</span>';
944
 
945
+ $html .= '<span class="compress">';
946
+ $html .= '<i class="fa fa-compress" aria-hidden="true"></i>';
947
+ $html .= '</span>';
948
  $html .= '</button>';
949
  $html .= '<label class="wpvr-cardboard-switcher">
950
  <input type="checkbox" class="vr_mode_change' . $id . '" name="vr_mode_change" value="off">
951
  <span class="switcher-box">
952
  <span class="normal-mode-tooltip">Normal VR Mode</span>
 
953
  <svg width="78" height="60" viewBox="0 0 78 60" fill="none" xmlns="http://www.w3.org/2000/svg">
954
  <path d="M42.25 21.4286C42.25 22.2811 41.9076 23.0986 41.2981 23.7014C40.6886 24.3042 39.862 24.6429 39 24.6429C38.138 24.6429 37.3114 24.3042 36.7019 23.7014C36.0924 23.0986 35.75 22.2811 35.75 21.4286C35.75 20.5761 36.0924 19.7585 36.7019 19.1557C37.3114 18.5529 38.138 18.2143 39 18.2143C39.862 18.2143 40.6886 18.5529 41.2981 19.1557C41.9076 19.7585 42.25 20.5761 42.25 21.4286ZM19.5 30C18.9254 30 18.3743 30.2258 17.9679 30.6276C17.5616 31.0295 17.3333 31.5745 17.3333 32.1429C17.3333 32.7112 17.5616 33.2562 17.9679 33.6581C18.3743 34.06 18.9254 34.2857 19.5 34.2857H28.1667C28.7413 34.2857 29.2924 34.06 29.6987 33.6581C30.1051 33.2562 30.3333 32.7112 30.3333 32.1429C30.3333 31.5745 30.1051 31.0295 29.6987 30.6276C29.2924 30.2258 28.7413 30 28.1667 30H19.5ZM47.6667 32.1429C47.6667 31.5745 47.8949 31.0295 48.3013 30.6276C48.7076 30.2258 49.2587 30 49.8333 30H58.5C59.0746 30 59.6257 30.2258 60.0321 30.6276C60.4384 31.0295 60.6667 31.5745 60.6667 32.1429C60.6667 32.7112 60.4384 33.2562 60.0321 33.6581C59.6257 34.06 59.0746 34.2857 58.5 34.2857H49.8333C49.2587 34.2857 48.7076 34.06 48.3013 33.6581C47.8949 33.2562 47.6667 32.7112 47.6667 32.1429ZM32.5 0C31.9254 0 31.3743 0.225765 30.9679 0.627629C30.5616 1.02949 30.3333 1.57454 30.3333 2.14286V8.57143H18.4167C14.8693 8.57183 11.4528 9.89617 8.84994 12.2798C6.24706 14.6634 4.64954 17.9306 4.37667 21.4286H2.16667C1.59203 21.4286 1.04093 21.6543 0.634602 22.0562C0.228273 22.4581 0 23.0031 0 23.5714V36.4286C0 36.9969 0.228273 37.5419 0.634602 37.9438C1.04093 38.3457 1.59203 38.5714 2.16667 38.5714H4.33333V46.0714C4.33333 49.7655 5.81711 53.3083 8.45825 55.9204C11.0994 58.5325 14.6815 60 18.4167 60H25.3933C29.1269 59.9986 32.7071 58.5311 35.347 55.92L37.921 53.3786C38.0618 53.2393 38.229 53.1288 38.4131 53.0534C38.5971 52.978 38.7943 52.9392 38.9935 52.9392C39.1927 52.9392 39.3899 52.978 39.5739 53.0534C39.758 53.1288 39.9252 53.2393 40.066 53.3786L42.6357 55.92C45.2766 58.5322 48.8586 59.9998 52.5937 60H59.5833C63.3185 60 66.9006 58.5325 69.5418 55.9204C72.1829 53.3083 73.6667 49.7655 73.6667 46.0714V38.5714H75.8333C76.408 38.5714 76.9591 38.3457 77.3654 37.9438C77.7717 37.5419 78 36.9969 78 36.4286V23.5714C78 23.0031 77.7717 22.4581 77.3654 22.0562C76.9591 21.6543 76.408 21.4286 75.8333 21.4286H73.6233C73.3505 17.9306 71.753 14.6634 69.1501 12.2798C66.5472 9.89617 63.1307 8.57183 59.5833 8.57143H47.6667V2.14286C47.6667 1.57454 47.4384 1.02949 47.0321 0.627629C46.6257 0.225765 46.0746 0 45.5 0H32.5ZM69.3333 22.5V46.0714C69.3333 48.6289 68.3061 51.0816 66.4776 52.89C64.6491 54.6983 62.1692 55.7143 59.5833 55.7143H52.5937C50.0093 55.7132 47.5311 54.6973 45.7037 52.89L43.1297 50.3486C42.5864 49.8108 41.9413 49.3842 41.2312 49.0931C40.5211 48.8021 39.76 48.6522 38.9913 48.6522C38.2227 48.6522 37.4616 48.8021 36.7515 49.0931C36.0414 49.3842 35.3963 49.8108 34.853 50.3486L32.2833 52.89C30.4559 54.6973 27.9777 55.7132 25.3933 55.7143H18.4167C15.8308 55.7143 13.3509 54.6983 11.5224 52.89C9.6939 51.0816 8.66667 48.6289 8.66667 46.0714V22.5C8.66667 19.9426 9.6939 17.4899 11.5224 15.6815C13.3509 13.8731 15.8308 12.8571 18.4167 12.8571H59.5833C62.1692 12.8571 64.6491 13.8731 66.4776 15.6815C68.3061 17.4899 69.3333 19.9426 69.3333 22.5Z" fill="#216DF0"/>
955
  </svg>
984
  }
985
  }
986
  // Vr mode transction scene to scene
987
+ if ($status !== false && 'valid' == $status && $is_pro && wpvr_isMobileDevice() && $is_cardboard == 'true') {
988
  $html .= '<div id="center-pointer' . $id . '" class="vr-pointer-container" style="display:none"><span class="center-pointer"></span></div>';
989
  }
990
 
1380
  }
1381
  }
1382
  };
1383
+
1384
+ function vrDeviseOrientation(){
1385
+ var data = {
1386
+ pitch: panoshow' . $id . '.getPitch(),
1387
+ yaw: panoshow' . $id . '.getYaw(),
1388
+ };
1389
+ console.log("click orientation")
1390
+ panoShowCardBoardOnTrigger(data);
1391
+ }
1392
  ';
1393
  $html .= '
1394
 
1453
  if(panoInfo == "block"){
1454
  infoBlock = "block";
1455
  }
 
1456
  if (getValue == "off") {
1457
  requestFullScreen()
1458
  screen.orientation.lock("landscape-primary")
1461
  .catch(function(error) {
1462
  alert("VR Glass Mode not supported in this device");
1463
  });
1464
+ getParent.find(".pano-wrap").addClass("wpvr-cardboard-disable-event");
1465
  localStorage.setItem("vr_mode", "on");
 
 
1466
  jQuery(".vr-mode-title").show();
1467
  jQuery(this).val("on");
1468
  getParent.find("#pano2' . $id . '").css({
1472
  });
1473
  panoshow' . $id . '.startOrientation();
1474
  panoshow2' . $id . '.startOrientation();
1475
+ panoshow2' . $id . '.setPitch(panoshow' . $id . '.getPitch(), 0);
1476
+ panoshow2' . $id . '.setYaw(panoshow' . $id . '.getYaw(), 0);
1477
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").hide();
1478
  getParent.find("#pano' .$id. ' #controls'.$id.'").hide();
1479
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").hide();
1498
 
1499
 
1500
  if (window.DeviceOrientationEvent) {
1501
+ window.addEventListener("deviceorientation", vrDeviseOrientation);
 
 
 
 
 
 
1502
  }
1503
+
 
 
 
 
 
 
 
 
 
 
 
1504
  panoshow' . $id . '.on("mousemove", function (data){
1505
  panoshow2' . $id . '.setPitch(data.pitch, 0);
1506
  panoshow2' . $id . '.setYaw(data.yaw, 0);
1545
  screen.orientation.unlock();
1546
  requestExitFullscreen();
1547
  localStorage.setItem("vr_mode", "off");
 
 
1548
  jQuery(".vr-mode-title").hide();
1549
  jQuery(this).val("off");
1550
  getParent.find("#pano2' . $id . '").css({
1552
  "visibility": "hidden",
1553
  "position": "absolute",
1554
  });
1555
+ panoshow' . $id . '.stopOrientation();
1556
+ panoshow2' . $id . '.stopOrientation();
1557
+ getParent.find(".pano-wrap").removeClass("wpvr-cardboard-disable-event");
1558
  getParent.find("#pano' .$id. ' #zoom-in-out-controls'.$id.'").show();
1559
  getParent.find("#pano' .$id. ' #controls'.$id.'").show();
1560
  getParent.find("#pano' .$id. ' #explainer_button_'.$id.'").show();
1576
  getParent.find("#pano' . $id . ' .pnlm-panorama-info").show();
1577
  }
1578
 
1579
+ getParent.find("#pano' . $id . '").removeClass("cardboard-half");
1580
  getParent.find("#center-pointer' . $id . '").hide();
1581
  getParent.find(".fullscreen-button").hide();
1582
  panoshow' . $id . '.off("mousemove");
1583
+ panoshow' . $id . '.off("touchmove");
1584
  panoshow2' . $id . '.off("mousemove");
1585
+ panoshow2' . $id . '.off("touchmove");
1586
+ if (window.DeviceOrientationEvent) {
1587
+ window.removeEventListener("deviceorientation", vrDeviseOrientation);
1588
+ }
1589
  }
1590
  });';
1591
 
1600
  jQuery("#pano' . $id . ' .pnlm-panorama-info").hide();
1601
  jQuery(".vr-mode-title").show();
1602
  }
1603
+ });';
1604
  }
1605
 
1606
 
2142
  {
2143
  $option = get_option('wpvr_warning');
2144
  if (!$option) {
2145
+ ?>
2146
  <div class="notice notice-warning" id="wpvr-warning" style="position: relative;">
2147
  <p><?php _e('Since you have updated the plugin, please clear the browser cache for smooth functioning. Follow these steps if you are using <a href="https://support.google.com/accounts/answer/32050?co=GENIE.Platform%3DDesktop&hl=en" target="_blank">Google Chrome</a>, <a href="https://support.mozilla.org/en-US/kb/how-clear-firefox-cache" target="_blank">Mozilla Firefox</a>, <a href="https://clear-my-cache.com/en/apple-mac-os/safari.html" target="_blank">Safai</a> or <a href="https://support.microsoft.com/en-us/help/10607/microsoft-edge-view-delete-browser-history" target="_blank">Microsoft Edge</a>', 'wpvr'); ?></p>
2148
  <button type="button" id="wpvr-dismissible" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button>
2149
  </div>
2150
+ <?php
2151
  }
2152
  }
2153
  // add_action('admin_notices', 'wpvr_cache_admin_notice');
2168
 
2169
 
2170
  add_action(
2171
+ /**
2172
+ * @param $api \VisualComposer\Modules\Api\Factory
2173
+ */
2174
  'vcv:api',
2175
  function ($api) {
2176
  $elementsToRegister = [
2195
  exit(wp_safe_redirect($url));
2196
  }
2197
  }
2198
+ add_action('activated_plugin', 'wpvr_redirect_after_activation');