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

Version Description

(15-06-2020) = * VR background music support

=

Download this release

Release Info

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

Code changes from version 5.5.0 to 5.6.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.4
7
- Stable tag: 5.5.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -116,6 +116,7 @@ For more control over creating a virtual tour, learn about the [Premium version]
116
  * User role support
117
  * Mouse scroll switch
118
  * 360 video autoplay and loop switch
 
119
  * Personalized support (e-mail or forum)
120
 
121
  [Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
@@ -123,7 +124,6 @@ For more control over creating a virtual tour, learn about the [Premium version]
123
  **Upcoming Features**
124
  - Ground map
125
  - Connect multiple tours
126
- - Background music
127
 
128
  **[Documentation](https://rextheme.com/docs/wp-vr/)**
129
 
@@ -385,5 +385,8 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
385
  * On click container fixed
386
  * Self hosted video pause on cross button
387
 
 
 
 
388
  == Upgrade Notice ==
389
  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.4
7
+ Stable tag: 5.6.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
116
  * User role support
117
  * Mouse scroll switch
118
  * 360 video autoplay and loop switch
119
+ * VR background music support
120
  * Personalized support (e-mail or forum)
121
 
122
  [Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
124
  **Upcoming Features**
125
  - Ground map
126
  - Connect multiple tours
 
127
 
128
  **[Documentation](https://rextheme.com/docs/wp-vr/)**
129
 
385
  * On click container fixed
386
  * Self hosted video pause on cross button
387
 
388
+ = 5.6.0 (15-06-2020) =
389
+ * VR background music support
390
+
391
  == Upgrade Notice ==
392
  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
@@ -1170,8 +1170,25 @@ class Wpvr_Ajax {
1170
  }
1171
  }
1172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1173
  $pano_array = array();
1174
- $pano_array = array(__( "panoid" )=>$panoid,__( "autoLoad" )=>$autoload,__( "showControls" )=>$control,__( "cpLogoSwitch" )=>$cpLogoSwitch,__( "cpLogoImg" )=>$cpLogoImg,__( "cpLogoContent" )=>$cpLogoContent,__( "vrgallery" )=>$vrgallery,__( "vrgallery_title" )=>$vrgallery_title,__( "customcontrol" )=>$custom_control,__( "gyro" )=>$gyro,__( "deviceorientationcontrol" )=>$deviceorientationcontrol,__( "compass" )=>$compass,__( "mouseZoom" )=>$mouseZoom,__( "draggable" )=>$draggable,__( "diskeyboard" )=>$diskeyboard,__( "keyboardzoom" )=>$keyboardzoom,__( "autoRotate" )=>$autorotation,__( "autoRotateInactivityDelay" )=>$autorotationinactivedelay,__( "autoRotateStopDelay" )=>$autorotationstopdelay,__( "preview" )=>$preview,__( "defaultscene" )=>$default_scene,__( "scenefadeduration" )=>$scene_fade_duration,__( "panodata" )=>$panodata);
1175
 
1176
  if ($rotation == 'off') {
1177
  unset($pano_array['autoRotate']);
1170
  }
1171
  }
1172
 
1173
+ //===audio===//
1174
+ $bg_music = 'off';
1175
+ $bg_music_url = '';
1176
+ $autoplay_bg_music = 'off';
1177
+ $loop_bg_music = 'off';
1178
+ $bg_music = sanitize_text_field($_POST['bg_music']);
1179
+ $bg_music_url = sanitize_url($_POST['bg_music_url']);
1180
+ $autoplay_bg_music = sanitize_text_field($_POST['autoplay_bg_music']);
1181
+ $loop_bg_music = sanitize_text_field($_POST['loop_bg_music']);
1182
+ if ($bg_music == 'on') {
1183
+ if (empty($bg_music_url)) {
1184
+ wp_send_json_error('<p><span>Warning:</span> Please add an audio file as you enabled audio for this tour </p>');
1185
+ die();
1186
+ }
1187
+ }
1188
+ //===audio===//
1189
+
1190
  $pano_array = array();
1191
+ $pano_array = array(__( "panoid" )=>$panoid,__( "autoLoad" )=>$autoload,__( "showControls" )=>$control,__( "cpLogoSwitch" )=>$cpLogoSwitch,__( "cpLogoImg" )=>$cpLogoImg,__( "cpLogoContent" )=>$cpLogoContent,__( "vrgallery" )=>$vrgallery,__( "vrgallery_title" )=>$vrgallery_title,__( "customcontrol" )=>$custom_control,__( "gyro" )=>$gyro,__( "deviceorientationcontrol" )=>$deviceorientationcontrol,__( "compass" )=>$compass,__( "mouseZoom" )=>$mouseZoom,__( "draggable" )=>$draggable,__( "diskeyboard" )=>$diskeyboard,__( "keyboardzoom" )=>$keyboardzoom,__( "autoRotate" )=>$autorotation,__( "autoRotateInactivityDelay" )=>$autorotationinactivedelay,__( "autoRotateStopDelay" )=>$autorotationstopdelay,__( "preview" )=>$preview,__( "defaultscene" )=>$default_scene,__( "scenefadeduration" )=>$scene_fade_duration,__( "bg_music" )=>$bg_music,__( "bg_music_url" )=>$bg_music_url,__( "autoplay_bg_music" )=>$autoplay_bg_music,__( "loop_bg_music" )=>$loop_bg_music,__( "panodata" )=>$panodata);
1192
 
1193
  if ($rotation == 'off') {
1194
  unset($pano_array['autoRotate']);
admin/css/wpvr-admin.css CHANGED
@@ -1,4 +1,4 @@
1
- /**
2
  * All of the CSS for your admin-specific functionality should be
3
  * included in this file.
4
  */
@@ -1094,6 +1094,7 @@ div.custom-tooltip:hover span:after {
1094
  .rex-pano-tab .cp-logo-content .form-group input.cp-logo-upload,
1095
  .rex-pano-tab .streetview-setting .form-group input,
1096
  .rex-pano-tab .preview-setting input.preview-upload,
 
1097
  .rex-pano-tab .video-setting input.video-upload,
1098
  .single-hotspot .hotspot-setting select,
1099
  .single-hotspot .hotspot-setting textarea,
@@ -1115,6 +1116,7 @@ div.custom-tooltip:hover span:after {
1115
 
1116
  .single-settings.cp-logo-content .form-group img.cp-logo-img,
1117
  .single-settings.preview-setting .form-group img,
 
1118
  .single-scene .scene-setting .form-group img {
1119
  max-width: 400px;
1120
  width: 100%;
@@ -1125,6 +1127,7 @@ div.custom-tooltip:hover span:after {
1125
 
1126
  .rex-pano-tab .cp-logo-content .form-group input.cp-logo-upload,
1127
  .rex-pano-tab .preview-setting input.preview-upload,
 
1128
  .rex-pano-tab .video-setting input.video-upload,
1129
  .single-scene .scene-setting input.scene-upload {
1130
  text-transform: uppercase;
@@ -1161,6 +1164,7 @@ div.custom-tooltip:hover span:after {
1161
 
1162
 
1163
  .rex-pano-tab .preview-setting input.preview-upload:hover,
 
1164
  .rex-pano-tab .video-setting .single-settings input.video-upload:hover,
1165
  .single-scene .scene-setting input.scene-upload:hover {
1166
  background: #3869f3;
@@ -1194,6 +1198,15 @@ div.custom-tooltip:hover span:after {
1194
  .rex-pano-tab .single-settings.preview-setting span {
1195
  margin-bottom: 10px;
1196
  }
 
 
 
 
 
 
 
 
 
1197
  .rex-pano-tab .single-settings.scene-fade-duration input {
1198
  width: 230px;
1199
  }
1
+ preview-upload/**
2
  * All of the CSS for your admin-specific functionality should be
3
  * included in this file.
4
  */
1094
  .rex-pano-tab .cp-logo-content .form-group input.cp-logo-upload,
1095
  .rex-pano-tab .streetview-setting .form-group input,
1096
  .rex-pano-tab .preview-setting input.preview-upload,
1097
+ .rex-pano-tab .audio-setting input.audio-upload,
1098
  .rex-pano-tab .video-setting input.video-upload,
1099
  .single-hotspot .hotspot-setting select,
1100
  .single-hotspot .hotspot-setting textarea,
1116
 
1117
  .single-settings.cp-logo-content .form-group img.cp-logo-img,
1118
  .single-settings.preview-setting .form-group img,
1119
+ .single-settings.audio-setting .form-group img,
1120
  .single-scene .scene-setting .form-group img {
1121
  max-width: 400px;
1122
  width: 100%;
1127
 
1128
  .rex-pano-tab .cp-logo-content .form-group input.cp-logo-upload,
1129
  .rex-pano-tab .preview-setting input.preview-upload,
1130
+ .rex-pano-tab .audio-setting input.audio-upload,
1131
  .rex-pano-tab .video-setting input.video-upload,
1132
  .single-scene .scene-setting input.scene-upload {
1133
  text-transform: uppercase;
1164
 
1165
 
1166
  .rex-pano-tab .preview-setting input.preview-upload:hover,
1167
+ .rex-pano-tab .audio-setting input.audio-upload:hover,
1168
  .rex-pano-tab .video-setting .single-settings input.video-upload:hover,
1169
  .single-scene .scene-setting input.scene-upload:hover {
1170
  background: #3869f3;
1198
  .rex-pano-tab .single-settings.preview-setting span {
1199
  margin-bottom: 10px;
1200
  }
1201
+ .rex-pano-tab .single-settings.audio-setting {
1202
+ display: block;
1203
+ }
1204
+ .single-settings.audio-setting .form-group input {
1205
+ margin-bottom: 15px;
1206
+ }
1207
+ .rex-pano-tab .single-settings.audio-setting span {
1208
+ margin-bottom: 10px;
1209
+ }
1210
  .rex-pano-tab .single-settings.scene-fade-duration input {
1211
  width: 230px;
1212
  }
admin/partials/wpvr_documentation.php CHANGED
@@ -176,6 +176,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
176
  <div class="item"><?php _e('Company logo','wpvr'); ?></div>
177
  <div class="item"><?php _e('360 video autoplay and loop switch','wpvr'); ?></div>
178
  <div class="item"><?php _e('Mouse scroll switch','wpvr'); ?></div>
 
179
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
180
  </div>
181
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
176
  <div class="item"><?php _e('Company logo','wpvr'); ?></div>
177
  <div class="item"><?php _e('360 video autoplay and loop switch','wpvr'); ?></div>
178
  <div class="item"><?php _e('Mouse scroll switch','wpvr'); ?></div>
179
+ <div class="item"><?php _e('VR background music support','wpvr'); ?></div>
180
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
181
  </div>
182
  <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
@@ -850,11 +850,34 @@ class Wpvr_Public {
850
  //===Carousal setup end===//
851
  }
852
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
853
 
854
  $html .= '<i class="fa fa-times cross"></i>';
855
  $html .= '<div class="custom-ifram" style="display: none;">';
856
  $html .= '</div>';
857
  $html .= '</div>';
 
858
  //script started
859
  $html .= '<script>';
860
  $html .= 'var response = '.$response.';';
@@ -1011,6 +1034,51 @@ class Wpvr_Public {
1011
  });
1012
  ';
1013
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1014
  $html .= '</script>';
1015
  //script end
1016
  return $html;
850
  //===Carousal setup end===//
851
  }
852
 
853
+ if (isset($postdata['bg_music'])) {
854
+ $bg_music = $postdata['bg_music'];
855
+ $bg_music_url = $postdata['bg_music_url'];
856
+ $autoplay_bg_music = $postdata['autoplay_bg_music'];
857
+ $loop_bg_music = $postdata['loop_bg_music'];
858
+ $bg_loop = '';
859
+ if ($loop_bg_music == 'on') {
860
+ $bg_loop = 'loop';
861
+ }
862
+
863
+ if ($bg_music == 'on') {
864
+ $html .= '<div id="adcontrol'.$id.'" class="adcontrol">';
865
+ $html .= '<audio id="vrAudio'.$id.'" onended="audionEnd'.$id.'()" '.$bg_loop.'>
866
+ <source src="'.$bg_music_url.'" type="audio/mpeg">
867
+ Your browser does not support the audio element.
868
+ </audio>
869
+ <button onclick="playPause'.$id.'()" class="ctrl audio_control" id="audio_control'.$id.'"><i id="vr-volume'.$id.'" class="fas fa-volume-up" style="color:#fff;"></i></button>
870
+ ';
871
+ $html .= '</div>';
872
+ }
873
+ }
874
+
875
 
876
  $html .= '<i class="fa fa-times cross"></i>';
877
  $html .= '<div class="custom-ifram" style="display: none;">';
878
  $html .= '</div>';
879
  $html .= '</div>';
880
+
881
  //script started
882
  $html .= '<script>';
883
  $html .= 'var response = '.$response.';';
1034
  });
1035
  ';
1036
 
1037
+
1038
+ if (isset($postdata['bg_music'])) {
1039
+ if ($bg_music == 'on') {
1040
+ $html .= '
1041
+ var x'.$id.' = document.getElementById("vrAudio'.$id.'");
1042
+
1043
+ var playing'.$id.' = false;
1044
+
1045
+ function playPause'.$id.'() {
1046
+
1047
+ if (playing'.$id.') {
1048
+ jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
1049
+ jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
1050
+ x'.$id.'.pause();
1051
+ playing'.$id.' = false;
1052
+
1053
+ }
1054
+ else {
1055
+ jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-mute");
1056
+ jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-up");
1057
+ x'.$id.'.play();
1058
+ playing'.$id.' = true;
1059
+ }
1060
+ }
1061
+
1062
+ function audionEnd'.$id.'() {
1063
+ playing'.$id.' = false;
1064
+ jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
1065
+ jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
1066
+ }
1067
+ ';
1068
+
1069
+ if ($autoplay_bg_music == 'on') {
1070
+ $html .= '
1071
+ document.getElementById("pano'.$id.'").addEventListener("click", musicPlay'.$id.');
1072
+ function musicPlay'.$id.'() {
1073
+ playing'.$id.' = true;
1074
+ document.getElementById("vrAudio'.$id.'").play();
1075
+ document.getElementById("pano'.$id.'").removeEventListener("click", musicPlay'.$id.');
1076
+ }
1077
+ ';
1078
+ }
1079
+ }
1080
+ }
1081
+
1082
  $html .= '</script>';
1083
  //script end
1084
  return $html;
public/css/wpvr-public.css CHANGED
@@ -20,6 +20,18 @@
20
  margin-left: auto;
21
  }
22
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  #cp-logo-controls .cp-logo-ctrl .cp-info {
24
  font-size: 15px;
25
  position: relative;
20
  margin-left: auto;
21
  }
22
 
23
+ .adcontrol {
24
+ position: absolute;
25
+ bottom: 5px;
26
+ right: 5px;
27
+ z-index: 2;
28
+ }
29
+
30
+ .audio_control {
31
+ background: none !important;
32
+ padding: unset;
33
+ }
34
+
35
  #cp-logo-controls .cp-logo-ctrl .cp-info {
36
  font-size: 15px;
37
  position: relative;
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: 5.5.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -814,6 +814,28 @@ function wpvr_block_render( $attributes ) {
814
  //===Carousal setup end===//
815
  }
816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817
  $html .= '<i class="fa fa-times cross"></i>';
818
  $html .= '<div class="custom-ifram" style="display: none;">';
819
  $html .= '</div>';
@@ -975,6 +997,50 @@ function wpvr_block_render( $attributes ) {
975
  });
976
  ';
977
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
978
  $html .= '</script>';
979
  //script end
980
  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: 5.6.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
814
  //===Carousal setup end===//
815
  }
816
 
817
+ if (isset($postdata['bg_music'])) {
818
+ $bg_music = $postdata['bg_music'];
819
+ $bg_music_url = $postdata['bg_music_url'];
820
+ $autoplay_bg_music = $postdata['autoplay_bg_music'];
821
+ $loop_bg_music = $postdata['loop_bg_music'];
822
+ $bg_loop = '';
823
+ if ($loop_bg_music == 'on') {
824
+ $bg_loop = 'loop';
825
+ }
826
+
827
+ if ($bg_music == 'on') {
828
+ $html .= '<div id="adcontrol'.$id.'" class="adcontrol">';
829
+ $html .= '<audio id="vrAudio'.$id.'" onended="audionEnd'.$id.'()" '.$bg_loop.'>
830
+ <source src="'.$bg_music_url.'" type="audio/mpeg">
831
+ Your browser does not support the audio element.
832
+ </audio>
833
+ <button onclick="playPause'.$id.'()" class="ctrl audio_control" id="audio_control'.$id.'"><i id="vr-volume'.$id.'" class="fas fa-volume-up" style="color:#fff;"></i></button>
834
+ ';
835
+ $html .= '</div>';
836
+ }
837
+ }
838
+
839
  $html .= '<i class="fa fa-times cross"></i>';
840
  $html .= '<div class="custom-ifram" style="display: none;">';
841
  $html .= '</div>';
997
  });
998
  ';
999
 
1000
+ if (isset($postdata['bg_music'])) {
1001
+ if ($bg_music == 'on') {
1002
+ $html .= '
1003
+ var x'.$id.' = document.getElementById("vrAudio'.$id.'");
1004
+
1005
+ var playing'.$id.' = false;
1006
+
1007
+ function playPause'.$id.'() {
1008
+
1009
+ if (playing'.$id.') {
1010
+ jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
1011
+ jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
1012
+ x'.$id.'.pause();
1013
+ playing'.$id.' = false;
1014
+
1015
+ }
1016
+ else {
1017
+ jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-mute");
1018
+ jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-up");
1019
+ x'.$id.'.play();
1020
+ playing'.$id.' = true;
1021
+ }
1022
+ }
1023
+
1024
+ function audionEnd'.$id.'() {
1025
+ playing'.$id.' = false;
1026
+ jQuery("#vr-volume'.$id.'").removeClass("fas fa-volume-up");
1027
+ jQuery("#vr-volume'.$id.'").addClass("fas fa-volume-mute");
1028
+ }
1029
+ ';
1030
+
1031
+ if ($autoplay_bg_music == 'on') {
1032
+ $html .= '
1033
+ document.getElementById("pano'.$id.'").addEventListener("click", musicPlay'.$id.');
1034
+ function musicPlay'.$id.'() {
1035
+ playing'.$id.' = true;
1036
+ document.getElementById("vrAudio'.$id.'").play();
1037
+ document.getElementById("pano'.$id.'").removeEventListener("click", musicPlay'.$id.');
1038
+ }
1039
+ ';
1040
+ }
1041
+ }
1042
+ }
1043
+
1044
  $html .= '</script>';
1045
  //script end
1046
  return $html;