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

Version Description

  • JS & CSS load optimized

=

Download this release

Release Info

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

Code changes from version 3.4.8 to 3.4.9

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.8
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -295,5 +295,8 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
295
  * Company logo on pro version
296
  * Made preview load more efficient
297
 
 
 
 
298
  == Upgrade Notice ==
299
  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.9
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
295
  * Company logo on pro version
296
  * Made preview load more efficient
297
 
298
+ = 3.4.9 =
299
+ * JS & CSS load optimized
300
+
301
  == Upgrade Notice ==
302
  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
@@ -1113,20 +1113,4 @@ class Wpvr_Ajax {
1113
  $response = array(__( "panoid" )=>$panoid,__( "panodata" )=>$html,__( "streetview" )=>$streetviewid);
1114
  wp_send_json_success( $response );
1115
  }
1116
-
1117
- /**
1118
- * WPVR BF DISSMISS
1119
- */
1120
- function wpvr_bf_dismiss() {
1121
- $current_time = time();
1122
- $date_now = date("Y-m-d", $current_time);
1123
- if( $date_now == '2019-11-28' ) {
1124
- update_option('wpvr_bf_notice', 'close');
1125
- }
1126
- else {
1127
- update_option('wpvr_bf_notice', 'off');
1128
- }
1129
- wp_send_json_success( 'off' );
1130
- die();
1131
- }
1132
  }
1113
  $response = array(__( "panoid" )=>$panoid,__( "panodata" )=>$html,__( "streetview" )=>$streetviewid);
1114
  wp_send_json_success( $response );
1115
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1116
  }
admin/js/wpvr-global.js CHANGED
@@ -28,20 +28,4 @@
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 );
28
  * practising this, we should strive to set a better example in our own work.
29
  */
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  })( jQuery );
images/WPVR_BF_NOTICE.png DELETED
Binary file
includes/class-wpvr.php CHANGED
@@ -220,7 +220,6 @@ class Wpvr {
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
 
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
 
224
  }
225
 
public/class-wpvr-public.php CHANGED
@@ -72,12 +72,50 @@ class Wpvr_Public {
72
  * between the defined hooks and the functions defined in this
73
  * class.
74
  */
75
- $plugin_url = plugin_dir_url( dirname(__FILE__) );
76
- wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
77
- wp_enqueue_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
78
- wp_enqueue_style('videojs-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/video-js.css', array(), true);
79
- wp_enqueue_style( 'owl-css', plugin_dir_url( __FILE__ ) . 'css/owl.carousel.css', array(), $this->version, 'all' );
80
- wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-public.css', array(), $this->version, 'all' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  }
82
 
83
  /**
@@ -98,12 +136,54 @@ class Wpvr_Public {
98
  * between the defined hooks and the functions defined in this
99
  * class.
100
  */
101
- wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
102
- wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
103
- wp_enqueue_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
104
- wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
105
- wp_enqueue_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
106
- wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-public.js', array( 'jquery' ), $this->version, false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  }
109
 
@@ -594,8 +674,13 @@ class Wpvr_Public {
594
  if ($postdata['cpLogoSwitch'] == 'on') {
595
  $html .= '<div id="cp-logo-controls">';
596
  $html .= '<div class="cp-logo-ctrl" id="cp-logo">';
597
- $html .= '<img src="'.$cpLogoImg.'" alt="Company Logo">';
598
- $html .= '<div class="cp-info">'.$cpLogoContent.'</div>';
 
 
 
 
 
599
  $html .= '</div>';
600
  $html .= '</div>';
601
  }
@@ -777,7 +862,6 @@ class Wpvr_Public {
777
 
778
  $html .= '</script>';
779
  //script end
780
-
781
  return $html;
782
  }
783
 
72
  * between the defined hooks and the functions defined in this
73
  * class.
74
  */
75
+
76
+ // wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
77
+ // wp_enqueue_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
78
+ // wp_enqueue_style('videojs-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/video-js.css', array(), true);
79
+ // wp_enqueue_style( 'owl-css', plugin_dir_url( __FILE__ ) . 'css/owl.carousel.css', array(), $this->version, 'all' );
80
+ // wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-public.css', array(), $this->version, 'all' );
81
+
82
+ wp_register_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
83
+ wp_register_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
84
+ wp_register_style('videojs-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/video-js.css', array(), true);
85
+ wp_register_style( 'owl-css', plugin_dir_url( __FILE__ ) . 'css/owl.carousel.css', array(), $this->version, 'all' );
86
+ wp_register_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-public.css', array(), $this->version, 'all' );
87
+
88
+ if(is_singular()){
89
+ global $wp_query;
90
+ $postid = $wp_query->get_queried_object_id();
91
+ $mypost = get_post($postid);
92
+ $unfiltered_content = $mypost->post_content;
93
+
94
+ if (strpos($unfiltered_content, 'wpvr id') !== false) {
95
+ wp_enqueue_style( $this->plugin_name . 'fontawesome');
96
+ wp_enqueue_style( 'panellium-css');
97
+ wp_enqueue_style( 'videojs-css');
98
+ wp_enqueue_style( 'owl-css');
99
+ wp_enqueue_style( $this->plugin_name);
100
+ }
101
+ elseif (has_blocks( $mypost->post_content ) ) {
102
+ $blocks = parse_blocks( $mypost->post_content );
103
+ if(array_search("wpvr/wpvr-block", array_column($blocks, 'blockName')) !== false) {
104
+ wp_enqueue_style( $this->plugin_name . 'fontawesome');
105
+ wp_enqueue_style( 'panellium-css');
106
+ wp_enqueue_style( 'videojs-css');
107
+ wp_enqueue_style( 'owl-css');
108
+ wp_enqueue_style( $this->plugin_name);
109
+ }
110
+ }
111
+ elseif (\Elementor\Plugin::$instance->db->is_built_with_elementor($postid)) {
112
+ wp_enqueue_style( $this->plugin_name . 'fontawesome');
113
+ wp_enqueue_style( 'panellium-css');
114
+ wp_enqueue_style( 'videojs-css');
115
+ wp_enqueue_style( 'owl-css');
116
+ wp_enqueue_style( $this->plugin_name);
117
+ }
118
+ }
119
  }
120
 
121
  /**
136
  * between the defined hooks and the functions defined in this
137
  * class.
138
  */
139
+ // wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
140
+ // wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
141
+ // wp_enqueue_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
142
+ // wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
143
+ // wp_enqueue_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
144
+ // wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-public.js', array( 'jquery' ), $this->version, false );
145
+
146
+ wp_register_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
147
+ wp_register_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
148
+ wp_register_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
149
+ wp_register_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
150
+ wp_register_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
151
+ wp_register_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-public.js', array( 'jquery' ), $this->version, false );
152
+
153
+ if(is_singular()){
154
+ global $wp_query;
155
+ $postid = $wp_query->get_queried_object_id();
156
+ $mypost = get_post($postid);
157
+ $unfiltered_content = $mypost->post_content;
158
+
159
+ if (strpos($unfiltered_content, 'wpvr id') !== false) {
160
+ wp_enqueue_script( 'panellium-js');
161
+ wp_enqueue_script( 'panelliumlib-js');
162
+ wp_enqueue_script( 'videojs-js');
163
+ wp_enqueue_script( 'panelliumvid-js');
164
+ wp_enqueue_script( 'owl-js');
165
+ wp_enqueue_script( $this->plugin_name);
166
+ }
167
+ elseif (has_blocks( $mypost->post_content ) ) {
168
+ $blocks = parse_blocks( $mypost->post_content );
169
+ if(array_search("wpvr/wpvr-block", array_column($blocks, 'blockName')) !== false) {
170
+ wp_enqueue_script( 'panellium-js');
171
+ wp_enqueue_script( 'panelliumlib-js');
172
+ wp_enqueue_script( 'videojs-js');
173
+ wp_enqueue_script( 'panelliumvid-js');
174
+ wp_enqueue_script( 'owl-js');
175
+ wp_enqueue_script( $this->plugin_name);
176
+ }
177
+ }
178
+ elseif (\Elementor\Plugin::$instance->db->is_built_with_elementor($postid)) {
179
+ wp_enqueue_script( 'panellium-js');
180
+ wp_enqueue_script( 'panelliumlib-js');
181
+ wp_enqueue_script( 'videojs-js');
182
+ wp_enqueue_script( 'panelliumvid-js');
183
+ wp_enqueue_script( 'owl-js');
184
+ wp_enqueue_script( $this->plugin_name);
185
+ }
186
+ }
187
 
188
  }
189
 
674
  if ($postdata['cpLogoSwitch'] == 'on') {
675
  $html .= '<div id="cp-logo-controls">';
676
  $html .= '<div class="cp-logo-ctrl" id="cp-logo">';
677
+ if ($cpLogoImg) {
678
+ $html .= '<img src="'.$cpLogoImg.'" alt="Company Logo">';
679
+ }
680
+
681
+ if ($cpLogoContent) {
682
+ $html .= '<div class="cp-info">'.$cpLogoContent.'</div>';
683
+ }
684
  $html .= '</div>';
685
  $html .= '</div>';
686
  }
862
 
863
  $html .= '</script>';
864
  //script end
 
865
  return $html;
866
  }
867
 
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.8
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -609,8 +609,13 @@ function wpvr_block_render( $attributes ) {
609
  if ($postdata['cpLogoSwitch'] == 'on') {
610
  $html .= '<div id="cp-logo-controls">';
611
  $html .= '<div class="cp-logo-ctrl" id="cp-logo">';
 
612
  $html .= '<img src="'.$cpLogoImg.'" alt="Company Logo">';
 
 
 
613
  $html .= '<div class="cp-info">'.$cpLogoContent.'</div>';
 
614
  $html .= '</div>';
615
  $html .= '</div>';
616
  }
@@ -948,54 +953,3 @@ function wpvr_delete_temp_file() {
948
  unlink($file);
949
  }
950
  }
951
-
952
- /**
953
- * Black friday notice
954
- */
955
- function wpvr_black_friday_notice() {
956
- $check = get_option('wpvr_bf_notice');
957
-
958
- if ($check != 'close') {
959
- $current_time = time();
960
- $date_now = date("Y-m-d", $current_time);
961
- if( $date_now == '2019-11-28' ) {
962
- update_option('wpvr_bf_notice', 'on');
963
- }
964
- }
965
-
966
- if ($check == 'off' || $check == 'close' ) {
967
-
968
- }
969
- else {
970
- ?>
971
- <style>
972
- .notice.wpvr-notice {
973
- padding: 0;
974
- margin: 0 0 15px 0;
975
- border: none;
976
- background-color: transparent;
977
- position: relative;
978
- }
979
- .notice.wpvr-notice img{
980
- display: block;
981
- max-width: 100%;
982
- }
983
- .notice.wpvr-notice .close-notice .dashicons-dismiss {
984
- position: absolute;
985
- right: 8px;
986
- top: 8px;
987
- color: #fff;
988
- cursor: pointer;
989
- }
990
- </style>
991
-
992
- <div class="notice wpvr-notice">
993
- <span class="close-notice"><span class="dashicons dashicons-dismiss" id="wpvr-bf-notice"></span></span>
994
- <a href="https://rextheme.com/wpvr/" target="_blank">
995
- <img alt="Wpvr_notice" src="<?php echo plugin_dir_url( __FILE__ ). '/images/WPVR_BF_NOTICE.png'; ?>">
996
- </a>
997
- </div>
998
- <?php
999
- }
1000
- }
1001
- add_action('admin_notices', 'wpvr_black_friday_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: 3.4.9
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
609
  if ($postdata['cpLogoSwitch'] == 'on') {
610
  $html .= '<div id="cp-logo-controls">';
611
  $html .= '<div class="cp-logo-ctrl" id="cp-logo">';
612
+ if ($cpLogoImg) {
613
  $html .= '<img src="'.$cpLogoImg.'" alt="Company Logo">';
614
+ }
615
+
616
+ if ($cpLogoContent) {
617
  $html .= '<div class="cp-info">'.$cpLogoContent.'</div>';
618
+ }
619
  $html .= '</div>';
620
  $html .= '</div>';
621
  }
953
  unlink($file);
954
  }
955
  }