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

Version Description

  • Google street view embed

=

Download this release

Release Info

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

Code changes from version 3.4.6 to 3.4.7

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.6
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -109,6 +109,7 @@ For more control over creating a virtual tour, learn about the [Premium version]
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/)
@@ -288,5 +289,8 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
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.  
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.7
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
109
  * Duplicate tour on one click
110
  * Custom scene gallery
111
  * Custom control buttons
112
+ * Google street view embed
113
  * Personalized support (e-mail or forum)
114
 
115
  [Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
289
  * Custom control feature for pro version
290
  * WordPress 5.3 bug fix
291
 
292
+ = 3.4.7 =
293
+ * Google street view embed
294
+
295
  == Upgrade Notice ==
296
  Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.  
admin/class-wpvr-admin.php CHANGED
@@ -139,6 +139,11 @@ class Wpvr_Admin {
139
  if ($adscreen->id=="toplevel_page_wpvr") {
140
  wp_enqueue_script( 'materialize-js', plugin_dir_url( __FILE__ ) . 'js/materialize.min.js', array( 'jquery' ), $this->version, false );
141
  }
 
 
 
 
 
142
  }
143
 
144
  /**
139
  if ($adscreen->id=="toplevel_page_wpvr") {
140
  wp_enqueue_script( 'materialize-js', plugin_dir_url( __FILE__ ) . 'js/materialize.min.js', array( 'jquery' ), $this->version, false );
141
  }
142
+ wp_enqueue_script( 'wpvr-global', plugin_dir_url( __FILE__ ) . 'js/wpvr-global.js', array( 'jquery' ), $this->version, false );
143
+ wp_localize_script( 'wpvr-global', 'wpvr_global_obj', array(
144
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
145
+ 'ajax_nonce' => wp_create_nonce('wpvr_global'),
146
+ ) );
147
  }
148
 
149
  /**
admin/class-wpvr-ajax.php CHANGED
@@ -554,6 +554,18 @@ class Wpvr_Ajax {
554
  }
555
  $panoid = 'pano'.$postid;
556
 
 
 
 
 
 
 
 
 
 
 
 
 
557
  $pnovideo = $_POST['panovideo'];
558
  if ($pnovideo == "on") {
559
 
@@ -636,8 +648,7 @@ class Wpvr_Ajax {
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']);
@@ -1073,4 +1084,39 @@ class Wpvr_Ajax {
1073
  }
1074
  die();
1075
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1076
  }
554
  }
555
  $panoid = 'pano'.$postid;
556
 
557
+ $streetview = $_POST['streetview'];
558
+ if ($streetview == 'on') {
559
+ $streetviewurl = sanitize_url($_POST['streetviewurl']);
560
+ if ($streetviewurl) {
561
+ $html .= '<iframe src="'.$streetviewurl.'" width="600" height="400" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
562
+ }
563
+ $streetviewarray = array();
564
+ $streetviewarray = array(__( "panoid" )=>$panoid,__( "streetviewdata" )=>$html,__( "streetviewurl" )=>$streetviewurl,__( "streetview" )=>$streetview);
565
+ update_post_meta( $postid, 'panodata', $streetviewarray );
566
+ die();
567
+ }
568
+
569
  $pnovideo = $_POST['panovideo'];
570
  if ($pnovideo == "on") {
571
 
648
 
649
  //===Custom Control===//
650
  $custom_control = $_POST['customcontrol'];
651
+
 
652
  //===Custom Control End===//
653
 
654
  $vrgallery = sanitize_text_field($_POST['vrgallery']);
1084
  }
1085
  die();
1086
  }
1087
+
1088
+ /**
1089
+ * Video Preview show ajax function
1090
+ */
1091
+ function wpvrstreetview_preview() {
1092
+ $panoid ='';
1093
+ $postid = sanitize_text_field($_POST['postid']);
1094
+ $panoid = 'pano'.$postid;
1095
+ $randid = rand(1000, 1000000);
1096
+ $streetviewid = 'streetview'.$randid;
1097
+ $streetviewurl = $_POST['streetview'];
1098
+ if ($streetviewurl) {
1099
+ $html .= '<iframe src="'.$streetviewurl.'" width="600" height="400" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
1100
+ }
1101
+
1102
+ $response = array();
1103
+ $response = array(__( "panoid" )=>$panoid,__( "panodata" )=>$html,__( "streetview" )=>$streetviewid);
1104
+ wp_send_json_success( $response );
1105
+ }
1106
+
1107
+ /**
1108
+ * WPVR BF DISSMISS
1109
+ */
1110
+ function wpvr_bf_dismiss() {
1111
+ $current_time = time();
1112
+ $date_now = date("Y-m-d", $current_time);
1113
+ if( $date_now == '2019-11-28' ) {
1114
+ update_option('wpvr_bf_notice', 'close');
1115
+ }
1116
+ else {
1117
+ update_option('wpvr_bf_notice', 'off');
1118
+ }
1119
+ wp_send_json_success( 'off' );
1120
+ die();
1121
+ }
1122
  }
admin/css/wpvr-admin.css CHANGED
@@ -3,6 +3,8 @@
3
  * included in this file.
4
  */
5
 
 
 
6
  .icon-wpvrtourmake_icon:before {
7
  content: '';
8
  height: 30px;
@@ -351,6 +353,7 @@ div.custom-tooltip:hover span:after {
351
  text-transform: uppercase;
352
  color: #555555;
353
  cursor: pointer;
 
354
  font-weight: 500;
355
  font-size: 16px;
356
  -webkit-user-select: none;
@@ -368,6 +371,9 @@ div.custom-tooltip:hover span:after {
368
  position: relative;
369
  transition: all 0.25s ease-in-out;
370
  }
 
 
 
371
  .rex-pano-tabs .rex-pano-tab-nav li span:after {
372
  content: "";
373
  position: absolute;
@@ -462,6 +468,7 @@ div.custom-tooltip:hover span:after {
462
  width: 78%;
463
  border-left: 1px solid #d5e0fd;
464
  position: relative;
 
465
  }
466
  .rex-pano-tab-content .title {
467
  font-size: 18px;
@@ -487,6 +494,7 @@ div.custom-tooltip:hover span:after {
487
  .rex-pano-tab-content .title i {
488
  margin-right: 10px;
489
  }
 
490
  .rex-pano-tab-content .rex-pano-tab.video,
491
  .rex-pano-tab-content .rex-pano-tab.general {
492
  padding: 50px 40px;
@@ -641,6 +649,7 @@ div.custom-tooltip:hover span:after {
641
  .hotspot-icon input {
642
  width: 20% !important;
643
  }
 
644
  .rex-pano-tab.general .single-settings .field-tooltip {
645
  position: relative;
646
  padding-left: 10px;
@@ -651,12 +660,14 @@ div.custom-tooltip:hover span:after {
651
  right: 0;
652
  bottom: 13px;
653
  }
 
654
  .single-scene .scene-setting .field-tooltip i,
655
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip i,
656
  .rex-pano-tab.general .single-settings .field-tooltip i {
657
  font-size: 20px;
658
  cursor: help;
659
  }
 
660
  .single-scene .scene-setting .field-tooltip span,
661
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span,
662
  .rex-pano-tab.general .single-settings .field-tooltip span {
@@ -689,6 +700,7 @@ div.custom-tooltip:hover span:after {
689
  -o-transition: all 0.5s ease;
690
  transition: all 0.5s ease;
691
  }
 
692
  .single-scene .scene-setting .field-tooltip span:before,
693
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span:before,
694
  .rex-pano-tab.general .single-settings .field-tooltip span:before {
@@ -707,6 +719,7 @@ div.custom-tooltip:hover span:after {
707
  -o-transform: translateY(-50%);
708
  transform: translateY(-50%);
709
  }
 
710
  .single-scene .scene-setting .field-tooltip:hover span,
711
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip:hover span,
712
  .rex-pano-tab.general .single-settings .field-tooltip:hover span {
@@ -854,6 +867,7 @@ div.custom-tooltip:hover span:after {
854
  margin-bottom: 10px;
855
  }
856
 
 
857
  .rex-pano-tab .preview-setting input.preview-upload,
858
  .rex-pano-tab .video-setting input.video-upload,
859
  .single-hotspot .hotspot-setting select,
@@ -870,6 +884,9 @@ div.custom-tooltip:hover span:after {
870
  color: #454545;
871
  border-radius: 3px;
872
  }
 
 
 
873
  .single-settings.preview-setting .form-group img,
874
  .single-scene .scene-setting .form-group img {
875
  max-width: 400px;
@@ -893,6 +910,7 @@ div.custom-tooltip:hover span:after {
893
  .single-scene .scene-setting input.scene-upload:hover {
894
  background: #3869f3;
895
  }
 
896
  .single-scene .scene-setting input.scene-upload:focus {
897
  box-shadow: none;
898
  outline: inherit;
@@ -1008,6 +1026,7 @@ button.delete-hotspot{
1008
  padding: 55px 0px;
1009
  border-top: 1px solid #e4eafe;
1010
  }
 
1011
  .video-setting button#videopreview,
1012
  .preview-btn-area #panolenspreview {
1013
  text-transform: capitalize;
@@ -1073,7 +1092,7 @@ button.delete-hotspot{
1073
  /*-----------------responsive style------------------*/
1074
  @media (max-width: 1700px){
1075
  .rex-pano-tabs .main-nav li {
1076
- width: 170px;
1077
  }
1078
  .rex-pano-tabs .main-nav li span {
1079
  font-size: 15px;
@@ -1101,7 +1120,8 @@ button.delete-hotspot{
1101
  }
1102
  .rex-pano-tabs .main-nav li {
1103
  display: inline-block;
1104
- margin-right: 25px;
 
1105
  }
1106
  .rex-pano-tabs .main-nav li:last-child {
1107
  margin-right: 0px;
3
  * included in this file.
4
  */
5
 
6
+
7
+
8
  .icon-wpvrtourmake_icon:before {
9
  content: '';
10
  height: 30px;
353
  text-transform: uppercase;
354
  color: #555555;
355
  cursor: pointer;
356
+ white-space: nowrap;
357
  font-weight: 500;
358
  font-size: 16px;
359
  -webkit-user-select: none;
371
  position: relative;
372
  transition: all 0.25s ease-in-out;
373
  }
374
+ .rex-pano-tabs .rex-pano-tab-nav li:last-child span{
375
+ margin-bottom: 0;
376
+ }
377
  .rex-pano-tabs .rex-pano-tab-nav li span:after {
378
  content: "";
379
  position: absolute;
468
  width: 78%;
469
  border-left: 1px solid #d5e0fd;
470
  position: relative;
471
+ align-self: stretch;
472
  }
473
  .rex-pano-tab-content .title {
474
  font-size: 18px;
494
  .rex-pano-tab-content .title i {
495
  margin-right: 10px;
496
  }
497
+ .rex-pano-tab-content .rex-pano-tab.streetview,
498
  .rex-pano-tab-content .rex-pano-tab.video,
499
  .rex-pano-tab-content .rex-pano-tab.general {
500
  padding: 50px 40px;
649
  .hotspot-icon input {
650
  width: 20% !important;
651
  }
652
+ .rex-pano-tab.streetview .single-settings .field-tooltip,
653
  .rex-pano-tab.general .single-settings .field-tooltip {
654
  position: relative;
655
  padding-left: 10px;
660
  right: 0;
661
  bottom: 13px;
662
  }
663
+ .rex-pano-tab.streetview .single-settings .field-tooltip i,
664
  .single-scene .scene-setting .field-tooltip i,
665
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip i,
666
  .rex-pano-tab.general .single-settings .field-tooltip i {
667
  font-size: 20px;
668
  cursor: help;
669
  }
670
+ .rex-pano-tab.streetview .single-settings .field-tooltip span,
671
  .single-scene .scene-setting .field-tooltip span,
672
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span,
673
  .rex-pano-tab.general .single-settings .field-tooltip span {
700
  -o-transition: all 0.5s ease;
701
  transition: all 0.5s ease;
702
  }
703
+ .rex-pano-tab.streetview .single-settings .field-tooltip span:before,
704
  .single-scene .scene-setting .field-tooltip span:before,
705
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip span:before,
706
  .rex-pano-tab.general .single-settings .field-tooltip span:before {
719
  -o-transform: translateY(-50%);
720
  transform: translateY(-50%);
721
  }
722
+ .rex-pano-tab.streetview .single-settings .field-tooltip:hover span,
723
  .single-scene .scene-setting .field-tooltip:hover span,
724
  .hotspot-setup .hotspot-setting.custom-icon .field-tooltip:hover span,
725
  .rex-pano-tab.general .single-settings .field-tooltip:hover span {
867
  margin-bottom: 10px;
868
  }
869
 
870
+ .rex-pano-tab .streetview-setting .form-group input,
871
  .rex-pano-tab .preview-setting input.preview-upload,
872
  .rex-pano-tab .video-setting input.video-upload,
873
  .single-hotspot .hotspot-setting select,
884
  color: #454545;
885
  border-radius: 3px;
886
  }
887
+ .rex-pano-tab .streetview-setting .form-group input{
888
+ max-width: 100%;
889
+ }
890
  .single-settings.preview-setting .form-group img,
891
  .single-scene .scene-setting .form-group img {
892
  max-width: 400px;
910
  .single-scene .scene-setting input.scene-upload:hover {
911
  background: #3869f3;
912
  }
913
+ .rex-pano-tab .streetview-setting .form-group input:focus,
914
  .single-scene .scene-setting input.scene-upload:focus {
915
  box-shadow: none;
916
  outline: inherit;
1026
  padding: 55px 0px;
1027
  border-top: 1px solid #e4eafe;
1028
  }
1029
+ .streetview-setting #streetviewpreview,
1030
  .video-setting button#videopreview,
1031
  .preview-btn-area #panolenspreview {
1032
  text-transform: capitalize;
1092
  /*-----------------responsive style------------------*/
1093
  @media (max-width: 1700px){
1094
  .rex-pano-tabs .main-nav li {
1095
+ width: 162px;
1096
  }
1097
  .rex-pano-tabs .main-nav li span {
1098
  font-size: 15px;
1120
  }
1121
  .rex-pano-tabs .main-nav li {
1122
  display: inline-block;
1123
+ margin-right: 12px;
1124
+ margin-bottom: 12px;
1125
  }
1126
  .rex-pano-tabs .main-nav li:last-child {
1127
  margin-right: 0px;
admin/js/wpvr-admin.js CHANGED
@@ -981,4 +981,8 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
981
  }
982
  });
983
 
 
 
 
 
984
  })( jQuery );
981
  }
982
  });
983
 
984
+ $(document).on("click","#wpvr-bf-notice",function(event) {
985
+ console.log('test');
986
+ });
987
+
988
  })( jQuery );
admin/js/wpvr-global.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ ) {
2
+ 'use strict';
3
+ /**
4
+ * All of the code for your admin-facing JavaScript source
5
+ * should reside in this file.
6
+ *
7
+ * Note: It has been assumed you will write jQuery code here, so the
8
+ * $ function reference has been prepared for usage within the scope
9
+ * of this function.
10
+ *
11
+ * This enables you to define handlers, for when the DOM is ready:
12
+ *
13
+ * $(function() {
14
+ *
15
+ * });
16
+ *
17
+ * When the window is loaded:
18
+ *
19
+ * $( window ).load(function() {
20
+ *
21
+ * });
22
+ *
23
+ * ...and/or other possibilities.
24
+ *
25
+ * Ideally, it is not considered best practise to attach more than a
26
+ * single DOM-ready or window-load handler for a particular page.
27
+ * Although scripts in the WordPress core, Plugins and Themes may be
28
+ * practising this, we should strive to set a better example in our own work.
29
+ */
30
+
31
+ $(document).on("click","#wpvr-bf-notice",function(e) {
32
+ e.preventDefault();
33
+ $('div.notice.wpvr-notice').hide();
34
+ var ajaxurl = wpvr_global_obj.ajaxurl;
35
+ jQuery.ajax({
36
+ type: "POST",
37
+ url: ajaxurl,
38
+ data: {
39
+ action: "wpvr_bf_dismiss",
40
+ },
41
+ success: function( response ){
42
+
43
+ }
44
+ });
45
+ });
46
+
47
+ })( jQuery );
admin/partials/wpvr-meta-box-builder-display.php CHANGED
@@ -64,7 +64,34 @@ if (isset($postdata['vidid'])) {
64
  </div>
65
  <?php
66
  }
67
- else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  $control = false;
69
  if (isset($postdata['showControls'])) {
70
  $control = $postdata['showControls'];
64
  </div>
65
  <?php
66
  }
67
+ elseif (isset($postdata['streetviewdata'])) {
68
+ ?>
69
+ <div class="iframe-wrapper">
70
+ <i class="fa fa-times" id="cross"></i>
71
+ <div id="custom-ifram" style="display: none;">
72
+
73
+ </div>
74
+ <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
75
+ <?php
76
+ echo $postdata['streetviewdata'];
77
+ ?>
78
+ </div>
79
+ </div>
80
+
81
+ <div class="rex-add-coordinates" style="text-align: center;">
82
+ <ul>
83
+ <li>
84
+ <div id="panodata" style="text-align: center; font-weight: bold;">
85
+ </div>
86
+ </li>
87
+ <li class="rex-hide-coordinates add-pitch">
88
+ <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
89
+ <i class="fa fa-arrow-down toppitch"></i>
90
+ </li>
91
+ </ul>
92
+ </div>
93
+ <?php
94
+ }else {
95
  $control = false;
96
  if (isset($postdata['showControls'])) {
97
  $control = $postdata['showControls'];
admin/partials/wpvr_documentation.php CHANGED
@@ -162,6 +162,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
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>
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('Google street view embed','wpvr'); ?></div>
166
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
167
  </div>
168
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
images/WPVR_BF_NOTICE.png ADDED
Binary file
includes/class-wpvr.php CHANGED
@@ -218,7 +218,9 @@ class Wpvr {
218
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
219
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
220
  $this->loader->add_action( 'wp_ajax_wpvrvideo_preview', $plugin_admin_ajax, 'wpvrvideo_preview' );
 
221
  $this->loader->add_action( 'wp_ajax_wpvr_file_import', $plugin_admin_ajax, 'wpvr_file_import' );
 
222
 
223
  }
224
 
218
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
219
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
220
  $this->loader->add_action( 'wp_ajax_wpvrvideo_preview', $plugin_admin_ajax, 'wpvrvideo_preview' );
221
+ $this->loader->add_action( 'wp_ajax_wpvrstreetview_preview', $plugin_admin_ajax, 'wpvrstreetview_preview' );
222
  $this->loader->add_action( 'wp_ajax_wpvr_file_import', $plugin_admin_ajax, 'wpvr_file_import' );
223
+ $this->loader->add_action( 'wp_ajax_wpvr_bf_dismiss', $plugin_admin_ajax, 'wpvr_bf_dismiss' );
224
 
225
  }
226
 
public/class-wpvr-public.php CHANGED
@@ -146,6 +146,21 @@ class Wpvr_Public {
146
  $postdata = get_post_meta( $id, 'panodata', true );
147
  $panoid = 'pano'.$id;
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  if (isset($postdata['vidid'])) {
150
  if (empty($width)) {
151
  $width = '600px';
@@ -162,7 +177,7 @@ class Wpvr_Public {
162
  $foundid = '';
163
  $foundid = $explodeid[1];
164
  $html = '';
165
- $html .= '<div style="text-align: center; max-width:100%; height:auto; margin: 0 auto;">';
166
  $html .= '<iframe width="'.trim($width,'px').'" height="'.trim($height,'px').'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
167
  $html .= '</div>';
168
 
@@ -173,13 +188,13 @@ class Wpvr_Public {
173
  $foundid = '';
174
  $foundid = $explodeid[3];
175
  $html = '';
176
- $html .= '<div style="text-align: center; max-width:100%; height:auto; margin: 0 auto;">';
177
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
178
  $html .= '</div>';
179
 
180
  } else {
181
  $html = '';
182
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style="width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
183
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
184
  $html .= '<script>';
185
  $html .= 'videojs('.$postdata['vidid'].', {';
@@ -564,16 +579,16 @@ class Wpvr_Public {
564
  }
565
  else {
566
  if ($radius) {
567
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'; height: '.$height.'; margin: 0 auto; border-radius:'.$radius.';">';
568
  }
569
  else {
570
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
571
  }
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
 
@@ -585,9 +600,10 @@ class Wpvr_Public {
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
 
146
  $postdata = get_post_meta( $id, 'panodata', true );
147
  $panoid = 'pano'.$id;
148
 
149
+ if (isset($postdata['streetviewdata'])) {
150
+ if (empty($width)) {
151
+ $width = '600px';
152
+ }
153
+ if (empty($height)) {
154
+ $height = '400px';
155
+ }
156
+ $streetviewurl = $postdata['streetviewurl'];
157
+ $html .= '<div style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
158
+ $html .= '<iframe src="'.$streetviewurl.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
159
+ $html .= '</div>';
160
+
161
+ return $html;
162
+ }
163
+
164
  if (isset($postdata['vidid'])) {
165
  if (empty($width)) {
166
  $width = '600px';
177
  $foundid = '';
178
  $foundid = $explodeid[1];
179
  $html = '';
180
+ $html .= '<div style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
181
  $html .= '<iframe width="'.trim($width,'px').'" height="'.trim($height,'px').'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
182
  $html .= '</div>';
183
 
188
  $foundid = '';
189
  $foundid = $explodeid[3];
190
  $html = '';
191
+ $html .= '<div style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
192
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
193
  $html .= '</div>';
194
 
195
  } else {
196
  $html = '';
197
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style="max-width:100%; width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
198
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
199
  $html .= '<script>';
200
  $html .= 'videojs('.$postdata['vidid'].', {';
579
  }
580
  else {
581
  if ($radius) {
582
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; max-width:100%; width: '.$width.'; height: '.$height.'; margin: 0 auto; border-radius:'.$radius.';">';
583
  }
584
  else {
585
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; max-width:100%; width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
586
  }
587
 
588
  }
589
 
590
  //===Custom Control===//
591
+ if ( $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" ) {
592
 
593
  $html .= '<div id="zoom-in-out-controls">';
594
 
600
  $html .= '<div class="ctrl" id="zoom-out"><i class="'.$custom_control['panZoomOutIcon'].'" style="color:'.$custom_control['panZoomOutColor'].';"></i></div>';
601
  }
602
  $html .= '</div>';
603
+ }
604
  //===zoom in out Control===//
605
 
606
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on") {
607
  //===Custom Control===//
608
  $html .= '<div id="controls">';
609
 
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.6
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -177,6 +177,21 @@ function wpvr_block_render( $attributes ) {
177
  $postdata = get_post_meta( $id, 'panodata', true );
178
  $panoid = 'pano'.$id;
179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  if (isset($postdata['vidid'])) {
181
  if (empty($width)) {
182
  $width = '600';
@@ -192,7 +207,7 @@ function wpvr_block_render( $attributes ) {
192
  $foundid = '';
193
  $foundid = $explodeid[1];
194
  $html = '';
195
- $html .= '<div style="text-align:center; max-width:100%; height:auto; margin: 0 auto;">';
196
  $html .= '<iframe width="'.$width.'" height="'.$height.'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
197
  $html .='</div>';
198
  } elseif (strpos($videourl, 'vimeo') > 0) {
@@ -202,12 +217,12 @@ function wpvr_block_render( $attributes ) {
202
  $foundid = '';
203
  $foundid = $explodeid[3];
204
  $html = '';
205
- $html .= '<div style="text-align:center; max-width:100%; height:auto; margin: 0 auto;">';
206
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.$width.'" height="'.$height.'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
207
  $html .='</div>';
208
  } else {
209
  $html = '';
210
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style="width: '.$width.'px; height: '.$height.'px; margin: 0 auto;">';
211
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
212
  $html .= '<script>';
213
  $html .= 'videojs('.$postdata['vidid'].', {';
@@ -582,11 +597,11 @@ function wpvr_block_render( $attributes ) {
582
  }
583
  }
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
 
@@ -598,8 +613,10 @@ function wpvr_block_render( $attributes ) {
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">';
@@ -913,3 +930,54 @@ function wpvr_delete_temp_file() {
913
  unlink($file);
914
  }
915
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.7
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
177
  $postdata = get_post_meta( $id, 'panodata', true );
178
  $panoid = 'pano'.$id;
179
 
180
+ if (isset($postdata['streetviewdata'])) {
181
+ if (empty($width)) {
182
+ $width = '600px';
183
+ }
184
+ if (empty($height)) {
185
+ $height = '400px';
186
+ }
187
+ $streetviewurl = $postdata['streetviewurl'];
188
+ $html .= '<div style="text-align: center; max-width:100%; width:'.$width.'px; height:'.$height.'px; margin: 0 auto;">';
189
+ $html .= '<iframe src="'.$streetviewurl.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
190
+ $html .= '</div>';
191
+
192
+ return $html;
193
+ }
194
+
195
  if (isset($postdata['vidid'])) {
196
  if (empty($width)) {
197
  $width = '600';
207
  $foundid = '';
208
  $foundid = $explodeid[1];
209
  $html = '';
210
+ $html .= '<div style="text-align:center; max-width:100%; width:'.$width.'px; height:'.$height.'px; margin: 0 auto;">';
211
  $html .= '<iframe width="'.$width.'" height="'.$height.'" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
212
  $html .='</div>';
213
  } elseif (strpos($videourl, 'vimeo') > 0) {
217
  $foundid = '';
218
  $foundid = $explodeid[3];
219
  $html = '';
220
+ $html .= '<div style="text-align:center; max-width:100%; width:'.$width.'px; height:'.$height.'px; margin: 0 auto;">';
221
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="'.$width.'" height="'.$height.'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
222
  $html .='</div>';
223
  } else {
224
  $html = '';
225
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style="max-width:100%; width:'.$width.'px; height: '.$height.'px; margin: 0 auto;">';
226
  $html .= '<div style="width:100%; height:100%; ">'.$postdata['panoviddata'].'</div>';
227
  $html .= '<script>';
228
  $html .= 'videojs('.$postdata['vidid'].', {';
597
  }
598
  }
599
  else {
600
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; max-width:100%; width: '.$width.'px; height: '.$height.'px; margin: 0 auto; border-radius:'.$radius.';">';
601
  }
602
 
603
  //===Custom Control===//
604
+ if ( $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" ) {
605
 
606
  $html .= '<div id="zoom-in-out-controls">';
607
 
613
  $html .= '<div class="ctrl" id="zoom-out"><i class="'.$custom_control['panZoomOutIcon'].'" style="color:'.$custom_control['panZoomOutColor'].';"></i></div>';
614
  }
615
  $html .= '</div>';
616
+ }
617
  //===zoom in out Control===//
618
 
619
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on") {
620
 
621
  //===Custom Control===//
622
  $html .= '<div id="controls">';
930
  unlink($file);
931
  }
932
  }
933
+
934
+ /**
935
+ * Black friday notice
936
+ */
937
+ function wpvr_black_friday_notice() {
938
+ $check = get_option('wpvr_bf_notice');
939
+
940
+ if ($check != 'close') {
941
+ $current_time = time();
942
+ $date_now = date("Y-m-d", $current_time);
943
+ if( $date_now == '2019-11-28' ) {
944
+ update_option('wpvr_bf_notice', 'on');
945
+ }
946
+ }
947
+
948
+ if ($check == 'off' || $check == 'close' ) {
949
+
950
+ }
951
+ else {
952
+ ?>
953
+ <style>
954
+ .notice.wpvr-notice {
955
+ padding: 0;
956
+ margin: 0 0 15px 0;
957
+ border: none;
958
+ background-color: transparent;
959
+ position: relative;
960
+ }
961
+ .notice.wpvr-notice img{
962
+ display: block;
963
+ max-width: 100%;
964
+ }
965
+ .notice.wpvr-notice .close-notice .dashicons-dismiss {
966
+ position: absolute;
967
+ right: 8px;
968
+ top: 8px;
969
+ color: #fff;
970
+ cursor: pointer;
971
+ }
972
+ </style>
973
+
974
+ <div class="notice wpvr-notice">
975
+ <span class="close-notice"><span class="dashicons dashicons-dismiss" id="wpvr-bf-notice"></span></span>
976
+ <a href="https://rextheme.com/wpvr/" target="_blank">
977
+ <img alt="Wpvr_notice" src="<?php echo plugin_dir_url( __FILE__ ). '/images/WPVR_BF_NOTICE.png'; ?>">
978
+ </a>
979
+ </div>
980
+ <?php
981
+ }
982
+ }
983
+ add_action('admin_notices', 'wpvr_black_friday_notice');