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

Version Description

(09-11-2022) = * Update: Checked compatibility with WordPress 6.1 * Fix: Hotspot Image Content Conflict with WP 6.1

Download this release

Release Info

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

Code changes from version 8.2.3 to 8.2.4

Files changed (3) hide show
  1. README.txt +6 -2
  2. admin/classes/class-wpvr-scene.php +13 -2
  3. wpvr.php +12 -23
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.2.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -309,7 +309,11 @@ Admins can remove the access from Authors and Editors at any time.
309
 
310
  == Changelog ==
311
 
312
- = 8.2.3 (01-11-2022) =
 
 
 
 
313
  * New: Multiple Tour Support Inside Elementor Tabs.
314
  * Fix: Summernote Image Upload Issue.
315
  * Fix: Hotspot IDs hovering over Scene-type hotspots on Preview mode.
5
  Requires at least: 5.0
6
  Tested up to: 6.0
7
  Requires PHP: 7.0.0
8
+ Stable tag: 8.2.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
309
 
310
  == Changelog ==
311
 
312
+ = 8.2.4 (09-11-2022) =
313
+ * Update: Checked compatibility with WordPress 6.1
314
+ * Fix: Hotspot Image Content Conflict with WP 6.1
315
+
316
+ = 8.2.3 (02-11-2022) =
317
  * New: Multiple Tour Support Inside Elementor Tabs.
318
  * Fix: Summernote Image Upload Issue.
319
  * Fix: Hotspot IDs hovering over Scene-type hotspots on Preview mode.
admin/classes/class-wpvr-scene.php CHANGED
@@ -909,6 +909,8 @@ class WPVR_Scene {
909
  } else {
910
  $wpvr_url_open = "off";
911
  }
 
 
912
 
913
  $hotspot_info = array(
914
  "text" => $hotspot_data["hotspot-title"],
@@ -918,8 +920,10 @@ class WPVR_Scene {
918
  "cssClass" => $hotspot_data["hotspot-customclass"],
919
  "URL" => $hotspot_data["hotspot-url"],
920
  "wpvr_url_open" => $wpvr_url_open,
921
- "clickHandlerArgs" => $hotspot_content,
922
- "createTooltipArgs" => $hotspot_data["hotspot-hover"],
 
 
923
  "sceneId" => $hotspot_data["hotspot-scene"],
924
  "targetPitch" => (float)$hotspot_scene_pitch,
925
  "targetYaw" => (float)$hotspot_scene_yaw,
@@ -2445,4 +2449,11 @@ class WPVR_Scene {
2445
 
2446
  return $html;
2447
  }
 
 
 
 
 
 
 
2448
  }
909
  } else {
910
  $wpvr_url_open = "off";
911
  }
912
+ $on_hover_content = preg_replace_callback('/<img[^>]*>/', "replace_callback", $hotspot_data['hotspot-hover']);
913
+ $on_click_content = preg_replace_callback('/<img[^>]*>/', "replace_callback", $hotspot_content);
914
 
915
  $hotspot_info = array(
916
  "text" => $hotspot_data["hotspot-title"],
920
  "cssClass" => $hotspot_data["hotspot-customclass"],
921
  "URL" => $hotspot_data["hotspot-url"],
922
  "wpvr_url_open" => $wpvr_url_open,
923
+ "clickHandlerArgs" => $on_click_content,
924
+ // "clickHandlerArgs" => $hotspot_content,
925
+ // 'createTooltipArgs' => $hotspot_data['hotspot-hover'],
926
+ 'createTooltipArgs' => $on_hover_content,
927
  "sceneId" => $hotspot_data["hotspot-scene"],
928
  "targetPitch" => (float)$hotspot_scene_pitch,
929
  "targetYaw" => (float)$hotspot_scene_yaw,
2449
 
2450
  return $html;
2451
  }
2452
+
2453
+ function replace_callback($matches){
2454
+ foreach ($matches as $match){
2455
+ return str_replace('<img','<img decoding="async"',$match);
2456
+ }
2457
+
2458
+ }
2459
  }
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.2.3
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.2.3');
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__));
@@ -729,6 +729,8 @@ function wpvr_block_render($attributes)
729
  } else {
730
  $wpvr_url_open = "off";
731
  }
 
 
732
  $hotspot_info = array(
733
  'text' => $hotspot_data['hotspot-title'],
734
  'pitch' => $hotspot_data['hotspot-pitch'],
@@ -737,8 +739,10 @@ function wpvr_block_render($attributes)
737
  'cssClass' => $hotspot_data['hotspot-customclass'],
738
  'URL' => $hotspot_data['hotspot-url'],
739
  "wpvr_url_open" => $wpvr_url_open,
740
- "clickHandlerArgs" => $hotspot_content,
741
- 'createTooltipArgs' => $hotspot_data['hotspot-hover'],
 
 
742
  "sceneId" => $hotspot_data["hotspot-scene"],
743
  "targetPitch" => (float)$hotspot_scene_pitch,
744
  "targetYaw" => (float)$hotspot_scene_yaw,
@@ -2452,24 +2456,9 @@ function wpvr_redirect_after_activation($plugin)
2452
  }
2453
  add_action('activated_plugin', 'wpvr_redirect_after_activation');
2454
 
2455
- function general_admin_notice(){
2456
- global $post_type;
2457
- $get_notice = get_option("wpvr_warning");
2458
- if($get_notice != true){
2459
- if(is_plugin_active('wpvr-pro/wpvr-pro.php')){
2460
- echo '<div class="notice notice-success is-dismissible wpvr-halloween-notice">
2461
- <div style="display: flex; align-items:center">
2462
- <p>Upgrade your WPVR Premium plan & Save a flat 20% this Halloween. Coupon code: Treat20.</p> <a href="https://rextheme.com/login/" target="_blank">Click here to upgrade your plan</a>
2463
- </div>
2464
- </div>';
2465
- }else{
2466
- echo '<div class="notice notice-success is-dismissible wpvr-halloween-notice">
2467
- <div style="display: flex; align-items:center">
2468
- <p>This Halloween, upgrade to WPVR Pro & save Up To $130 using the Coupon Code: Treat20.</p> <a href="https://rextheme.com/wpvr/#pricing" target="_blank">Click here to get your treat</a>
2469
- </div>
2470
- </div>';
2471
- }
2472
- }
2473
 
2474
  }
2475
- add_action('admin_notices', 'general_admin_notice');
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.2.4
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.2.4');
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__));
729
  } else {
730
  $wpvr_url_open = "off";
731
  }
732
+ $on_hover_content = preg_replace_callback('/<img[^>]*>/', "replace_callback", $hotspot_data['hotspot-hover']);
733
+ $on_click_content = preg_replace_callback('/<img[^>]*>/', "replace_callback", $hotspot_content);
734
  $hotspot_info = array(
735
  'text' => $hotspot_data['hotspot-title'],
736
  'pitch' => $hotspot_data['hotspot-pitch'],
739
  'cssClass' => $hotspot_data['hotspot-customclass'],
740
  'URL' => $hotspot_data['hotspot-url'],
741
  "wpvr_url_open" => $wpvr_url_open,
742
+ "clickHandlerArgs" => $on_click_content,
743
+ // "clickHandlerArgs" => $hotspot_content,
744
+ // 'createTooltipArgs' => $hotspot_data['hotspot-hover'],
745
+ 'createTooltipArgs' => $on_hover_content,
746
  "sceneId" => $hotspot_data["hotspot-scene"],
747
  "targetPitch" => (float)$hotspot_scene_pitch,
748
  "targetYaw" => (float)$hotspot_scene_yaw,
2456
  }
2457
  add_action('activated_plugin', 'wpvr_redirect_after_activation');
2458
 
2459
+ function replace_callback($matches){
2460
+ foreach ($matches as $match){
2461
+ return str_replace('<img','<img decoding="async"',$match);
2462
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2463
 
2464
  }