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

Version Description

(14-08-2020) = * Mobile media resizer added * WordPress 5.5 compatible * Street View responsive issue fixed

=

Download this release

Release Info

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

Code changes from version 6.2.0 to 6.3.0

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: rextheme, coderexco
3
  Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
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.2
7
- Stable tag: 6.2.0
8
  Requires PHP: 7.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -187,21 +187,18 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
187
 
188
 
189
  == Screenshots ==
190
- 1. Demo view
191
- 2. Demo view
192
- 3. Demo view
193
- 4. Demo view
194
- 5. Demo view
195
- 6. Demo view
196
- 7. Demo view
197
- 8. Demo view
198
- 9. Demo view
199
- 10. Demo view
200
- 11. Demo view
201
- 12. Demo view
202
- 13. Demo view
203
- 14. Demo view
204
- 15. Demo view
205
 
206
  == Changelog ==
207
 
@@ -429,5 +426,10 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
429
  * Multi-site support added
430
  * Dynamic front-end notice added
431
 
 
 
 
 
 
432
  == Upgrade Notice ==
433
  Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.  
3
  Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
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.5.0
7
+ Stable tag: 6.3.0
8
  Requires PHP: 7.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
187
 
188
 
189
  == Screenshots ==
190
+ 1. Gutenberg Block
191
+ 2. Block ID selection
192
+ 3. General settings window
193
+ 4. Scene setting
194
+ 5. Hotspot setting
195
+ 6. Hotspot setting
196
+ 7. Preview window
197
+ 8. Preview window
198
+ 9. Elementor setup
199
+ 10. Front view
200
+ 11. Front view with customized hotspot icon
201
+ 12. Front view with gallery
 
 
 
202
 
203
  == Changelog ==
204
 
426
  * Multi-site support added
427
  * Dynamic front-end notice added
428
 
429
+ = 6.3.0 (14-08-2020) =
430
+ * Mobile media resizer added
431
+ * WordPress 5.5 compatible
432
+ * Street View responsive issue fixed
433
+
434
  == Upgrade Notice ==
435
  Please do update the WP VR to the latest version. Each update makes it sure your plugin is supporting all tour features.  
admin/partials/wpvr_documentation.php CHANGED
@@ -613,7 +613,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
613
  <span class="icon">
614
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
615
  </span>
616
- <p><?php echo __( "WordPress's default large image handler for images larger than 2560px will be disabled for WP VR. So can create virtual tours with extremely high-quality images.", 'wpvr' ); ?></p>
617
  </span>
618
  </li>
619
 
613
  <span class="icon">
614
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/question-icon.png'?>" alt="check">
615
  </span>
616
+ <p><?php echo __( "WordPress's default large image handler for images larger than 2560px will be disabled for WP VR. So can create virtual tours with extremely high-quality images. Enabling it will also show high res image on mobile devices. Many devices may not support that resolution.", 'wpvr' ); ?></p>
617
  </span>
618
  </li>
619
 
includes/class-wpvr.php CHANGED
@@ -232,9 +232,9 @@ class Wpvr {
232
  $high_res_image = get_option('high_res_image');
233
  if ($high_res_image == 'true') {
234
  add_filter( 'big_image_size_threshold', '__return_false' );
235
- }
236
 
237
- $this->loader->add_action( 'admin_init', $plugin_admin, 'trigger_rollback' );
238
  }
239
 
240
  /**
232
  $high_res_image = get_option('high_res_image');
233
  if ($high_res_image == 'true') {
234
  add_filter( 'big_image_size_threshold', '__return_false' );
235
+ }
236
 
237
+ $this->loader->add_action( 'admin_init', $plugin_admin, 'trigger_rollback' );
238
  }
239
 
240
  /**
public/class-wpvr-public.php CHANGED
@@ -230,11 +230,12 @@ class Wpvr_Public {
230
  }
231
  $streetviewurl = $postdata['streetviewurl'];
232
  $html = '';
233
- $html .= '<div style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
234
- $html .= '<iframe src="'.$streetviewurl.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
235
  $html .= '</div>';
236
 
237
  return $html;
 
238
  }
239
 
240
  if (isset($postdata['vidid'])) {
@@ -602,9 +603,30 @@ class Wpvr_Public {
602
  array_push($hotspots, $hotspot_info);
603
  }
604
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
605
 
606
  $scene_info = array();
607
- $scene_info = array("type"=>$panoscenes["scene-type"],"panorama"=>$panoscenes["scene-attachment-url"],"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
608
 
609
  if (isset($panoscenes["ptyscene"])) {
610
  if ($panoscenes["ptyscene"] == "off") {
230
  }
231
  $streetviewurl = $postdata['streetviewurl'];
232
  $html = '';
233
+ $html .= '<div class="vr-streetview" style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
234
+ $html .= '<iframe src="'.$streetviewurl.'" frameborder="0" style="border:0; width:100px; height:100%;" allowfullscreen=""></iframe>';
235
  $html .= '</div>';
236
 
237
  return $html;
238
+
239
  }
240
 
241
  if (isset($postdata['vidid'])) {
603
  array_push($hotspots, $hotspot_info);
604
  }
605
 
606
+ $device_scene = $panoscenes['scene-attachment-url'];
607
+ $src_to_id_for_mobile = '';
608
+ $src_to_id_for_desktop = '';
609
+ if (wpvr_isMobileDevice()) {
610
+ $src_to_id_for_mobile = attachment_url_to_postid($panoscenes['scene-attachment-url']);
611
+ if ($src_to_id_for_mobile) {
612
+ $mobile_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'large');
613
+ if ($mobile_scene[0]) {
614
+ $device_scene = $mobile_scene[0];
615
+ }
616
+ }
617
+ }
618
+ else {
619
+ $src_to_id_for_desktop = attachment_url_to_postid($panoscenes['scene-attachment-url']);
620
+ if ($src_to_id_for_desktop) {
621
+ $desktop_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'full');
622
+ if ($desktop_scene[0]) {
623
+ $device_scene = $desktop_scene[0];
624
+ }
625
+ }
626
+ }
627
 
628
  $scene_info = array();
629
+ $scene_info = array("type"=>$panoscenes["scene-type"],"panorama"=>$device_scene,"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
630
 
631
  if (isset($panoscenes["ptyscene"])) {
632
  if ($panoscenes["ptyscene"] == "off") {
public/css/wpvr-public.css CHANGED
@@ -532,6 +532,13 @@ div.custom-ifram {
532
  }
533
 
534
 
 
 
 
 
 
 
 
535
  /* ---------responsive style--------- */
536
  @media (max-width: 1199px){
537
  .pnlm-container {
@@ -550,6 +557,12 @@ div.custom-ifram {
550
  .custom-tooltip p {
551
  width: 430px;
552
  }
 
 
 
 
 
 
553
  }
554
 
555
  @media (max-width: 768px){
@@ -640,6 +653,13 @@ div.custom-ifram {
640
  font-size: 11px!important;
641
  }
642
 
 
 
 
 
 
 
 
643
 
644
  /* ----woocommerce product---- */
645
  .wpvr-product-container {
532
  }
533
 
534
 
535
+ /*-------streetview--------*/
536
+ .vr-streetview iframe {
537
+ width: 100%!important;
538
+ height: 100%!important;
539
+ }
540
+
541
+
542
  /* ---------responsive style--------- */
543
  @media (max-width: 1199px){
544
  .pnlm-container {
557
  .custom-tooltip p {
558
  width: 430px;
559
  }
560
+
561
+ /*-------streetview--------*/
562
+ .vr-streetview {
563
+ width: 100%!important;
564
+ height: 500px!important;
565
+ }
566
  }
567
 
568
  @media (max-width: 768px){
653
  font-size: 11px!important;
654
  }
655
 
656
+ /*-------streetview--------*/
657
+ .vr-streetview {
658
+ width: 100%!important;
659
+ height: 300px!important;
660
+ }
661
+
662
+
663
 
664
  /* ----woocommerce product---- */
665
  .wpvr-product-container {
public/js/wpvr-public.js CHANGED
@@ -68,17 +68,17 @@ jQuery(document).ready(function($){
68
  });
69
 
70
  jQuery(document).ready(function($){
71
- var notice_active = wpvr_public.notice_active;
72
- var notice = wpvr_public.notice;
73
- if (notice_active) {
74
- if (!$.cookie("wpvr_mobile_notice")) {
75
- if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
76
- if ($(".pano-wrap")[0]){
77
- $('body').append("<div class='wpvr-mobile-notice'><p>"+notice+"</p> <span class='notice-close'><i class='fa fa-times'></i></span></div>");
 
78
  }
79
  }
80
  }
81
- }
82
 
83
  $('.wpvr-mobile-notice .notice-close').on('click', function(){
84
  $('.wpvr-mobile-notice').fadeOut();
68
  });
69
 
70
  jQuery(document).ready(function($){
71
+ var notice_active = wpvr_public.notice_active;
72
+ var notice = wpvr_public.notice;
73
+ if (notice_active) {
74
+ if (!$.cookie("wpvr_mobile_notice")) {
75
+ if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
76
+ if ($(".pano-wrap")[0]){
77
+ $('body').append("<div class='wpvr-mobile-notice'><p>"+notice+"</p> <span class='notice-close'><i class='fa fa-times'></i></span></div>");
78
+ }
79
  }
80
  }
81
  }
 
82
 
83
  $('.wpvr-mobile-notice .notice-close').on('click', function(){
84
  $('.wpvr-mobile-notice').fadeOut();
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: 6.2.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -190,9 +190,10 @@ function wpvr_block_render( $attributes ) {
190
  }
191
  $streetviewurl = $postdata['streetviewurl'];
192
  $html = '';
193
- $html .= '<div style="text-align: center; max-width:100%; width:'.$width.'px; height:'.$height.'px; margin: 0 auto;">';
194
- $html .= '<iframe src="'.$streetviewurl.'" width="'.trim($width,'px').'" height="'.trim($height,'px').'" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
195
  $html .= '</div>';
 
196
 
197
  return $html;
198
  }
@@ -557,8 +558,36 @@ function wpvr_block_render( $attributes ) {
557
  array_push($hotspots, $hotspot_info);
558
  }
559
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  $scene_info = array();
561
- $scene_info = array('type'=>$panoscenes['scene-type'],'panorama'=>$panoscenes['scene-attachment-url'],"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, 'hotSpots'=>$hotspots);
562
 
563
  if (isset($panoscenes["ptyscene"])) {
564
  if ($panoscenes["ptyscene"] == "off") {
@@ -1213,8 +1242,14 @@ function wpvr_rest_data_route() {
1213
  register_rest_route( 'wpvr/v1', '/panodata/', array(
1214
  'methods' => 'GET',
1215
  'callback' => 'wpvr_rest_data_set',
 
1216
  ) );
1217
  }
 
 
 
 
 
1218
  function wpvr_rest_data_set() {
1219
  $query = new WP_Query(array(
1220
  'post_type' => 'wpvr_item',
@@ -1384,6 +1419,11 @@ add_action('plugins_loaded', function () {
1384
  require_once __DIR__ . '/oxygen/oxy-manager.php';
1385
  });
1386
 
 
 
 
 
 
1387
  /**
1388
  * Redirect to the edit.php on post save or publish.
1389
  */
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: 6.3.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
190
  }
191
  $streetviewurl = $postdata['streetviewurl'];
192
  $html = '';
193
+ $html .= '<div class="vr-streetview" style="text-align: center; max-width:100%; width:'.$width.'px; height:'.$height.'px; margin: 0 auto;">';
194
+ $html .= '<iframe src="'.$streetviewurl.'" frameborder="0" style="border:0; width:100px; height:100%;" allowfullscreen=""></iframe>';
195
  $html .= '</div>';
196
+
197
 
198
  return $html;
199
  }
558
  array_push($hotspots, $hotspot_info);
559
  }
560
 
561
+ $device_scene = $panoscenes['scene-attachment-url'];
562
+ $src_to_id_for_mobile = '';
563
+ $src_to_id_for_desktop = '';
564
+ if (wpvr_isMobileDevice()) {
565
+ $src_to_id_for_mobile = attachment_url_to_postid($panoscenes['scene-attachment-url']);
566
+ if ($src_to_id_for_mobile) {
567
+ $mobile_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'wpvr_mobile');
568
+ if ($mobile_scene[3]) {
569
+ $device_scene = $mobile_scene[0];
570
+ }
571
+ else {
572
+ $mobile_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'large');
573
+ if ($mobile_scene[3]) {
574
+ $device_scene = $mobile_scene[0];
575
+ }
576
+ }
577
+ }
578
+ }
579
+ else {
580
+ $src_to_id_for_desktop = attachment_url_to_postid($panoscenes['scene-attachment-url']);
581
+ if ($src_to_id_for_desktop) {
582
+ $desktop_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'full');
583
+ if ($desktop_scene[0]) {
584
+ $device_scene = $desktop_scene[0];
585
+ }
586
+ }
587
+ }
588
+
589
  $scene_info = array();
590
+ $scene_info = array('type'=>$panoscenes['scene-type'],'panorama'=>$device_scene,"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "authorURL"=>$scene_author_url, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, 'hotSpots'=>$hotspots);
591
 
592
  if (isset($panoscenes["ptyscene"])) {
593
  if ($panoscenes["ptyscene"] == "off") {
1242
  register_rest_route( 'wpvr/v1', '/panodata/', array(
1243
  'methods' => 'GET',
1244
  'callback' => 'wpvr_rest_data_set',
1245
+ 'permission_callback' => 'wpvr_rest_route_permission'
1246
  ) );
1247
  }
1248
+
1249
+ function wpvr_rest_route_permission() {
1250
+ return true;
1251
+ }
1252
+
1253
  function wpvr_rest_data_set() {
1254
  $query = new WP_Query(array(
1255
  'post_type' => 'wpvr_item',
1419
  require_once __DIR__ . '/oxygen/oxy-manager.php';
1420
  });
1421
 
1422
+ add_action( 'init', 'wpvr_mobile_media_handle' );
1423
+ function wpvr_mobile_media_handle() {
1424
+ add_image_size( 'wpvr_mobile', 4096, 2048 ); //mobile
1425
+ }
1426
+
1427
  /**
1428
  * Redirect to the edit.php on post save or publish.
1429
  */