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

Version Description

  • Draggable error fix
  • Control plugin scripts and styles to load them on specific pages only.

=

Download this release

Release Info

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

Code changes from version 4.3.0 to 4.4.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.3
7
- Stable tag: 4.3.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -91,6 +91,7 @@ For more control over creating a virtual tour, learn about the [Premium version]
91
  * Full width tour tag
92
  * 360 Video embed support
93
  * Radius tag for VR border radius
 
94
  * Support from support forum
95
 
96
 
@@ -341,5 +342,9 @@ Simply add "/plugins/wpvr" to exclusion field (or use the location where you sto
341
  * Draggable switch added
342
  * Setting title capitalized
343
 
 
 
 
 
344
  == Upgrade Notice ==
345
  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: 4.4.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
91
  * Full width tour tag
92
  * 360 Video embed support
93
  * Radius tag for VR border radius
94
+ * Control plugin scripts and styles to load them on specific pages only.
95
  * Support from support forum
96
 
97
 
342
  * Draggable switch added
343
  * Setting title capitalized
344
 
345
+ = 4.4.0 =
346
+ * Draggable error fix
347
+ * Control plugin scripts and styles to load them on specific pages only.
348
+
349
  == Upgrade Notice ==
350
  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
@@ -120,7 +120,7 @@ class Wpvr_Admin {
120
  wp_enqueue_script( 'wp-api' );
121
  $adscreen = get_current_screen();
122
  wp_enqueue_media();
123
- if ($adscreen->id=="wpvr_item") {
124
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
125
  wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
126
  wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
120
  wp_enqueue_script( 'wp-api' );
121
  $adscreen = get_current_screen();
122
  wp_enqueue_media();
123
+ if ($adscreen->id=="wpvr_item" || $adscreen->id=="toplevel_page_wpvr") {
124
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
125
  wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
126
  wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
admin/class-wpvr-ajax.php CHANGED
@@ -47,11 +47,11 @@ class Wpvr_Ajax {
47
  }
48
 
49
  $draggable = sanitize_text_field($_POST['draggable']);
50
- if ($draggable == 'on') {
51
- $draggable = true;
52
  }
53
  else {
54
- $draggable = false;
55
  }
56
 
57
  $diskeyboard = sanitize_text_field($_POST['diskeyboard']);
@@ -822,11 +822,11 @@ class Wpvr_Ajax {
822
  }
823
 
824
  $draggable = sanitize_text_field($_POST['draggable']);
825
- if ($draggable == 'on') {
826
- $draggable = true;
827
  }
828
  else {
829
- $draggable = false;
830
  }
831
 
832
  $diskeyboard = sanitize_text_field($_POST['diskeyboard']);
@@ -1282,9 +1282,13 @@ class Wpvr_Ajax {
1282
  $editor = sanitize_text_field($_POST['editor']);
1283
  $author = sanitize_text_field($_POST['author']);
1284
  $fontawesome = sanitize_text_field($_POST['fontawesome']);
 
 
1285
  update_option('wpvr_editor_active', $editor);
1286
  update_option('wpvr_author_active', $author);
1287
  update_option('wpvr_fontawesome_disable', $fontawesome);
 
 
1288
  $response = array(
1289
  'status' => 'success',
1290
  'message' => 'Successfully saved',
47
  }
48
 
49
  $draggable = sanitize_text_field($_POST['draggable']);
50
+ if ($draggable == 'off') {
51
+ $draggable = false;
52
  }
53
  else {
54
+ $draggable = true;
55
  }
56
 
57
  $diskeyboard = sanitize_text_field($_POST['diskeyboard']);
822
  }
823
 
824
  $draggable = sanitize_text_field($_POST['draggable']);
825
+ if ($draggable == 'off') {
826
+ $draggable = false;
827
  }
828
  else {
829
+ $draggable = true;
830
  }
831
 
832
  $diskeyboard = sanitize_text_field($_POST['diskeyboard']);
1282
  $editor = sanitize_text_field($_POST['editor']);
1283
  $author = sanitize_text_field($_POST['author']);
1284
  $fontawesome = sanitize_text_field($_POST['fontawesome']);
1285
+ $wpvr_script_control = sanitize_text_field($_POST['wpvr_script_control']);
1286
+ $wpvr_script_list = sanitize_text_field($_POST['wpvr_script_list']);
1287
  update_option('wpvr_editor_active', $editor);
1288
  update_option('wpvr_author_active', $author);
1289
  update_option('wpvr_fontawesome_disable', $fontawesome);
1290
+ update_option('wpvr_script_control', $wpvr_script_control);
1291
+ update_option('wpvr_script_list', $wpvr_script_list);
1292
  $response = array(
1293
  'status' => 'success',
1294
  'message' => 'Successfully saved',
admin/js/wpvr-admin.js CHANGED
@@ -995,8 +995,36 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
995
  }
996
  });
997
 
998
- $(document).on("click","#wpvr-bf-notice",function(event) {
999
- console.log('test');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1000
  });
1001
 
1002
  })( jQuery );
995
  }
996
  });
997
 
998
+ $(document).on("click","#wpvr_role_submit",function(e) {
999
+ e.preventDefault();
1000
+ var ajaxurl = wpvr_obj.ajaxurl;
1001
+ $('#wpvr_role_progress').show();
1002
+ $('#wpvr_role_submit').attr('disabled' , true);
1003
+ var editor = $('#wpvr_editor_active').is(':checked');
1004
+ var author = $('#wpvr_author_active').is(':checked');
1005
+ var fontawesome = $('#wpvr_fontawesome_disable').is(':checked');
1006
+ var wpvr_script_control = $('#wpvr_script_control').is(':checked');
1007
+ var wpvr_script_list = $('#wpvr_script_list').val();
1008
+
1009
+ jQuery.ajax({
1010
+ type: "POST",
1011
+ url: ajaxurl,
1012
+ data: {
1013
+ action: "wpvr_role_management",
1014
+ editor: editor,
1015
+ author: author,
1016
+ fontawesome: fontawesome,
1017
+ wpvr_script_control: wpvr_script_control,
1018
+ wpvr_script_list: wpvr_script_list,
1019
+ },
1020
+ success: function( response ){
1021
+ $('#wpvr_role_progress').hide();
1022
+ $('#wpvr_role_submit').attr('disabled' , false);
1023
+ if (response.status == 'success') {
1024
+ Materialize.toast(response.message, 2000);
1025
+ }
1026
+ }
1027
+ });
1028
  });
1029
 
1030
  })( jQuery );
admin/partials/wpvr_documentation.php CHANGED
@@ -20,17 +20,23 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
20
  <div class="wrapper">
21
  <div class="col s12 no-pd">
22
  <ul class="tabs tabs-icon rex-tabs">
23
- <li class="tab col s3 wpvr_tabs_row"><a href="#tab1"><i class="material-icons">settings</i><?php _e('General','wpvr'); ?></a></li>
24
  <li class="tab col s3 wpvr_tabs_row"><a href="#tab2"><i class="material-icons">perm_media</i><?php _e('Video Tutorials','wpvr'); ?></a></li>
25
- <li class="tab col s3 wpvr_tabs_row"><a href="#tab3"><i class="material-icons">thumb_up_alt</i><?php _e('Go Premium','wpvr'); ?></a></li>
 
 
 
 
 
 
26
  <?php
27
  if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
28
  ?>
29
  <li class="tab col s3 wpvr_tabs_row"><a href="#tab4"><i class="material-icons">add</i><?php _e('Import','wpvr'); ?></a></li>
30
- <li class="tab col s3 wpvr_tabs_row"><a href="#tab5"><i class="material-icons">people_outline</i><?php _e('Role','wpvr'); ?></a></li>
31
  <?php
32
  }
33
  ?>
 
34
  </ul>
35
  </div>
36
 
@@ -143,35 +149,42 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
143
  <iframe src="https://www.youtube.com/embed/videoseries?list=PLelDqLncNWcVNqy7zoqtt8N-pyqy0-93z" width="640" height="360" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
144
  </div>
145
  </div>
146
- <div id="tab3" class="block-wrapper">
147
- <div class="rex-upgrade">
148
- <h4><?php _e('Why upgrade to Premium Version?','wpvr'); ?></h4>
149
- <div class="parent">
150
- <div class="item"><?php _e('Unlimited scenes','wpvr'); ?></div>
151
- <div class="item"><?php _e('Unlimited hotspots','wpvr'); ?></div>
152
- <div class="item"><?php _e('Customized hotspot icon','wpvr'); ?></div>
153
- <div class="item"><?php _e('Dynamic Icon background color on hotspot','wpvr'); ?></div>
154
- <div class="item"><?php _e('Compass Switch','wpvr'); ?></div>
155
- <div class="item"><?php _e('Default zoom level','wpvr'); ?></div>
156
- <div class="item"><?php _e('Maximum and minimum zoom range','wpvr'); ?></div>
157
- <div class="item"><?php _e('Customize each scene\'s default face on load','wpvr'); ?></div>
158
- <div class="item"><?php _e('Scene grab control and custom boundary for each scene','wpvr'); ?></div>
159
- <div class="item"><?php _e('Scene title and author tag support','wpvr'); ?></div>
160
- <div class="item"><?php _e('Hotspot based scene face support','wpvr'); ?></div>
161
- <div class="item"><?php _e('Gyroscope support','wpvr'); ?></div>
162
- <div class="item"><?php _e('Duplicate tour support','wpvr'); ?></div>
163
- <div class="item"><?php _e('File import & export system','wpvr'); ?></div>
164
- <div class="item"><?php _e('Custom scene gallery','wpvr'); ?></div>
165
- <div class="item"><?php _e('Custom control buttons','wpvr'); ?></div>
166
- <div class="item"><?php _e('Google street view embed','wpvr'); ?></div>
167
- <div class="item"><?php _e('Company logo','wpvr'); ?></div>
168
- <div class="item"><?php _e('360 video autoplay and loop switch','wpvr'); ?></div>
169
- <div class="item"><?php _e('Mouse scroll switch','wpvr'); ?></div>
170
- <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
 
 
 
 
 
171
  </div>
172
- <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
173
  </div>
174
- </div>
 
 
 
175
  <?php
176
  if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
177
  ?>
@@ -195,98 +208,129 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
195
  </div>
196
  </div>
197
  </div>
198
- <div id="tab5" class="block-wrapper">
199
- <div class="rex-upgrade">
200
- <h4><?php _e('Enable user roles to apply their behavior','wpvr'); ?></h4>
201
- <div class="parent" style="width:100%;">
202
- <div class="wpvr_role-container">
203
- <ul>
204
- <?php
205
- $editor_active = get_option('wpvr_editor_active');
206
- $author_active = get_option('wpvr_author_active');
207
- $fontawesome_disable = get_option('wpvr_fontawesome_disable');
208
- ?>
209
- <li>
210
- <div class="switch">
211
- <h6>Select Editors to manage WP VR tours. They can edit, delete and update their own and other user's tours:</h6>
212
- <label>
213
- Off
214
- <?php
215
- if ($editor_active == "true") {
216
- ?>
217
- <input id="wpvr_editor_active" type="checkbox" checked>
218
- <?php
219
- }
220
- else {
221
- ?>
222
- <input id="wpvr_editor_active" type="checkbox">
223
- <?php
224
- }
225
- ?>
 
 
 
 
 
226
 
227
- <span class="lever"></span>
228
- On
229
- </label>
230
- </div>
231
- </li>
232
- <li>
233
- <div class="switch">
234
- <h6>Select Authors to manage WP VR tours. They can edit, delete and update their own tours only:</h6>
235
- <label>
236
- Off
237
- <?php
238
- if ($author_active == "true") {
239
- ?>
240
- <input id="wpvr_author_active" type="checkbox" checked>
241
- <?php
242
- }
243
- else {
244
- ?>
245
- <input id="wpvr_author_active" type="checkbox">
246
- <?php
247
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  ?>
249
- <span class="lever"></span>
250
- On
251
- </label>
252
- </div>
253
- </li>
254
- <li>
255
- <div class="switch">
256
- <h6>Disable Fontawesome from WP VR: </h6>
257
- <label>
258
- Off
259
  <?php
260
- if ($fontawesome_disable == "true") {
261
- ?>
262
- <input id="wpvr_fontawesome_disable" type="checkbox" checked>
263
- <?php
264
- }
265
- else {
266
- ?>
267
- <input id="wpvr_fontawesome_disable" type="checkbox">
268
- <?php
269
- }
270
  ?>
271
- <span class="lever"></span>
272
- On
273
- </label>
274
- </div>
275
- </li>
276
- </ul>
277
- <div id="wpvr_role_progress" class="progress" style="display:none;">
278
- <div class="indeterminate"></div>
279
- </div>
280
- <button class="btn waves-effect waves-light" type="submit" id="wpvr_role_submit" >Save
281
- <i class="material-icons right">send</i>
282
- </button>
283
- </div>
 
 
 
 
 
284
  </div>
 
 
 
 
285
  </div>
286
  </div>
287
- <?php
288
- }
289
- ?>
290
  </div>
291
  </div>
292
 
20
  <div class="wrapper">
21
  <div class="col s12 no-pd">
22
  <ul class="tabs tabs-icon rex-tabs">
23
+ <li class="tab col s3 wpvr_tabs_row"><a href="#tab1"><i class="material-icons">info</i><?php _e('Info','wpvr'); ?></a></li>
24
  <li class="tab col s3 wpvr_tabs_row"><a href="#tab2"><i class="material-icons">perm_media</i><?php _e('Video Tutorials','wpvr'); ?></a></li>
25
+ <?php
26
+ if (!is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
27
+ ?>
28
+ <li class="tab col s3 wpvr_tabs_row"><a href="#tab3"><i class="material-icons">thumb_up_alt</i><?php _e('Go Premium','wpvr'); ?></a></li>
29
+ <?php
30
+ }
31
+ ?>
32
  <?php
33
  if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
34
  ?>
35
  <li class="tab col s3 wpvr_tabs_row"><a href="#tab4"><i class="material-icons">add</i><?php _e('Import','wpvr'); ?></a></li>
 
36
  <?php
37
  }
38
  ?>
39
+ <li class="tab col s3 wpvr_tabs_row"><a href="#tab5"><i class="material-icons">settings</i><?php _e('Settings','wpvr'); ?></a></li>
40
  </ul>
41
  </div>
42
 
149
  <iframe src="https://www.youtube.com/embed/videoseries?list=PLelDqLncNWcVNqy7zoqtt8N-pyqy0-93z" width="640" height="360" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
150
  </div>
151
  </div>
152
+ <?php
153
+ if (!is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
154
+ ?>
155
+ <div id="tab3" class="block-wrapper">
156
+ <div class="rex-upgrade">
157
+ <h4><?php _e('Why upgrade to Premium Version?','wpvr'); ?></h4>
158
+ <div class="parent">
159
+ <div class="item"><?php _e('Unlimited scenes','wpvr'); ?></div>
160
+ <div class="item"><?php _e('Unlimited hotspots','wpvr'); ?></div>
161
+ <div class="item"><?php _e('Customized hotspot icon','wpvr'); ?></div>
162
+ <div class="item"><?php _e('Dynamic Icon background color on hotspot','wpvr'); ?></div>
163
+ <div class="item"><?php _e('Compass Switch','wpvr'); ?></div>
164
+ <div class="item"><?php _e('Default zoom level','wpvr'); ?></div>
165
+ <div class="item"><?php _e('Maximum and minimum zoom range','wpvr'); ?></div>
166
+ <div class="item"><?php _e('Customize each scene\'s default face on load','wpvr'); ?></div>
167
+ <div class="item"><?php _e('Scene grab control and custom boundary for each scene','wpvr'); ?></div>
168
+ <div class="item"><?php _e('Scene title and author tag support','wpvr'); ?></div>
169
+ <div class="item"><?php _e('Hotspot based scene face support','wpvr'); ?></div>
170
+ <div class="item"><?php _e('Gyroscope support','wpvr'); ?></div>
171
+ <div class="item"><?php _e('Duplicate tour support','wpvr'); ?></div>
172
+ <div class="item"><?php _e('File import & export system','wpvr'); ?></div>
173
+ <div class="item"><?php _e('Custom scene gallery','wpvr'); ?></div>
174
+ <div class="item"><?php _e('Custom control buttons','wpvr'); ?></div>
175
+ <div class="item"><?php _e('Google street view embed','wpvr'); ?></div>
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>
182
  </div>
 
183
  </div>
184
+ <?php
185
+ }
186
+ ?>
187
+
188
  <?php
189
  if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
190
  ?>
208
  </div>
209
  </div>
210
  </div>
211
+ <?php
212
+ }
213
+ ?>
214
+ <div id="tab5" class="block-wrapper">
215
+ <div class="rex-upgrade">
216
+ <h4><?php _e('General Setup Options','wpvr'); ?></h4>
217
+ <div class="parent" style="width:100%;">
218
+ <div class="wpvr_role-container">
219
+ <ul>
220
+ <?php
221
+ $editor_active = get_option('wpvr_editor_active');
222
+ $author_active = get_option('wpvr_author_active');
223
+ $fontawesome_disable = get_option('wpvr_fontawesome_disable');
224
+ $wpvr_script_control = get_option('wpvr_script_control');
225
+ $wpvr_script_list = get_option('wpvr_script_list');
226
+ ?>
227
+ <li>
228
+ <div class="switch">
229
+ <h6>Select Editors to manage WP VR tours. They can edit, delete and update their own and other user's tours:</h6>
230
+ <label>
231
+ Off
232
+ <?php
233
+ if ($editor_active == "true") {
234
+ ?>
235
+ <input id="wpvr_editor_active" type="checkbox" checked>
236
+ <?php
237
+ }
238
+ else {
239
+ ?>
240
+ <input id="wpvr_editor_active" type="checkbox">
241
+ <?php
242
+ }
243
+ ?>
244
 
245
+ <span class="lever"></span>
246
+ On
247
+ </label>
248
+ </div>
249
+ </li>
250
+ <li>
251
+ <div class="switch">
252
+ <h6>Select Authors to manage WP VR tours. They can edit, delete and update their own tours only:</h6>
253
+ <label>
254
+ Off
255
+ <?php
256
+ if ($author_active == "true") {
257
+ ?>
258
+ <input id="wpvr_author_active" type="checkbox" checked>
259
+ <?php
260
+ }
261
+ else {
262
+ ?>
263
+ <input id="wpvr_author_active" type="checkbox">
264
+ <?php
265
+ }
266
+ ?>
267
+ <span class="lever"></span>
268
+ On
269
+ </label>
270
+ </div>
271
+ </li>
272
+ <li>
273
+ <div class="switch">
274
+ <h6>Disable Fontawesome from WP VR: </h6>
275
+ <label>
276
+ Off
277
+ <?php
278
+ if ($fontawesome_disable == "true") {
279
+ ?>
280
+ <input id="wpvr_fontawesome_disable" type="checkbox" checked>
281
+ <?php
282
+ }
283
+ else {
284
+ ?>
285
+ <input id="wpvr_fontawesome_disable" type="checkbox">
286
+ <?php
287
+ }
288
+ ?>
289
+ <span class="lever"></span>
290
+ On
291
+ </label>
292
+ </div>
293
+ </li>
294
+
295
+ <li>
296
+ <div class="switch">
297
+ <h6>Enable script control to load WP VR scripts on listed pages only:</h6>
298
+ <label>
299
+ Off
300
+ <?php
301
+ if ($wpvr_script_control == "true") {
302
  ?>
303
+ <input id="wpvr_script_control" type="checkbox" checked>
 
 
 
 
 
 
 
 
 
304
  <?php
305
+ }
306
+ else {
 
 
 
 
 
 
 
 
307
  ?>
308
+ <input id="wpvr_script_control" type="checkbox">
309
+ <?php
310
+ }
311
+ ?>
312
+ <span class="lever"></span>
313
+ On
314
+ </label>
315
+ </div>
316
+ </li>
317
+ <li style="margin-top: 1.5%;">
318
+ <div class="">
319
+ <h6 for="wpvr_script_list">Allowed pages to enqueue WP VR Scripts (e.g. https://example.com/tour1/,https://example.com/tour2/): </h6>
320
+ <textarea id="wpvr_script_list" class="materialize-textarea" placeholder="https://example.com/tour1/,https://example.com/tour2/"><?php echo $wpvr_script_list; ?></textarea>
321
+ </div>
322
+ </li>
323
+ </ul>
324
+ <div id="wpvr_role_progress" class="progress" style="display:none;">
325
+ <div class="indeterminate"></div>
326
  </div>
327
+ <button class="btn waves-effect waves-light" type="submit" id="wpvr_role_submit" >Save
328
+ <i class="material-icons right">send</i>
329
+ </button>
330
+ </div>
331
  </div>
332
  </div>
333
+ </div>
 
 
334
  </div>
335
  </div>
336
 
public/class-wpvr-public.php CHANGED
@@ -73,16 +73,42 @@ class Wpvr_Public {
73
  * class.
74
  */
75
 
76
- $fontawesome_disable = get_option('wpvr_fontawesome_disable');
77
- if ($fontawesome_disable == 'true') {
78
- }
79
- else {
80
- wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
81
- }
82
- wp_enqueue_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
83
- wp_enqueue_style('videojs-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/video-js.css', array(), true);
84
- wp_enqueue_style( 'owl-css', plugin_dir_url( __FILE__ ) . 'css/owl.carousel.css', array(), $this->version, 'all' );
85
- wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-public.css', array(), $this->version, 'all' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  }
87
 
88
  /**
@@ -103,13 +129,35 @@ class Wpvr_Public {
103
  * between the defined hooks and the functions defined in this
104
  * class.
105
  */
106
- wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
107
- wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
108
- wp_enqueue_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
109
- wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
110
- wp_enqueue_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
111
- wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-public.js', array( 'jquery' ), $this->version, false );
112
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  }
114
 
115
  /**
73
  * class.
74
  */
75
 
76
+ global $wp;
77
+ $wpvr_script_control = get_option('wpvr_script_control');
78
+ $wpvr_script_list = get_option('wpvr_script_list');
79
+ $allowed_pages_modified = array();
80
+ $allowed_pages = explode(",",$wpvr_script_list);
81
+ foreach ($allowed_pages as $value) {
82
+ $allowed_pages_modified[] = untrailingslashit($value);
83
+ }
84
+ $current_url = home_url(add_query_arg(array($_GET), $wp->request));
85
+
86
+ if ($wpvr_script_control == 'true') {
87
+ if (in_array($current_url, $allowed_pages_modified)) {
88
+ $fontawesome_disable = get_option('wpvr_fontawesome_disable');
89
+ if ($fontawesome_disable == 'true') {
90
+ }
91
+ else {
92
+ wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
93
+ }
94
+ wp_enqueue_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
95
+ wp_enqueue_style('videojs-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/video-js.css', array(), true);
96
+ wp_enqueue_style( 'owl-css', plugin_dir_url( __FILE__ ) . 'css/owl.carousel.css', array(), $this->version, 'all' );
97
+ wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-public.css', array(), $this->version, 'all' );
98
+ }
99
+ }
100
+ else {
101
+ $fontawesome_disable = get_option('wpvr_fontawesome_disable');
102
+ if ($fontawesome_disable == 'true') {
103
+ }
104
+ else {
105
+ wp_enqueue_style( $this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all' );
106
+ }
107
+ wp_enqueue_style('panellium-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/pannellum.css', array(), true);
108
+ wp_enqueue_style('videojs-css', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/css/video-js.css', array(), true);
109
+ wp_enqueue_style( 'owl-css', plugin_dir_url( __FILE__ ) . 'css/owl.carousel.css', array(), $this->version, 'all' );
110
+ wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-public.css', array(), $this->version, 'all' );
111
+ }
112
  }
113
 
114
  /**
129
  * between the defined hooks and the functions defined in this
130
  * class.
131
  */
 
 
 
 
 
 
132
 
133
+ global $wp;
134
+ $wpvr_script_control = get_option('wpvr_script_control');
135
+ $wpvr_script_list = get_option('wpvr_script_list');
136
+ $allowed_pages_modified = array();
137
+ $allowed_pages = explode(",",$wpvr_script_list);
138
+ foreach ($allowed_pages as $value) {
139
+ $allowed_pages_modified[] = untrailingslashit($value);
140
+ }
141
+ $current_url = home_url(add_query_arg(array($_GET), $wp->request));
142
+
143
+ if ($wpvr_script_control == 'true') {
144
+ if (in_array($current_url, $allowed_pages_modified)) {
145
+ wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
146
+ wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
147
+ wp_enqueue_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
148
+ wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
149
+ wp_enqueue_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
150
+ wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-public.js', array( 'jquery' ), $this->version, false );
151
+ }
152
+ }
153
+ else {
154
+ wp_enqueue_script('panellium-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/pannellum.js', array(), true);
155
+ wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
156
+ wp_enqueue_script('videojs-js', plugin_dir_url( __FILE__ ) . 'js/video.js', array(), true);
157
+ wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
158
+ wp_enqueue_script( 'owl-js', plugin_dir_url( __FILE__ ) . 'js/owl.carousel.js', array( 'jquery' ), false );
159
+ wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-public.js', array( 'jquery' ), $this->version, false );
160
+ }
161
  }
162
 
163
  /**
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: 4.3.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
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: 4.4.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+