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

Version Description

  • File import & export system added.
  • Fullwidth tag added.
  • Placeholder color changed.

=

Download this release

Release Info

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

Code changes from version 2.9.0 to 3.0.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.2
7
- Stable tag: 2.9.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -12,88 +12,108 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  Let site visitors take a virtual tour and get them excited!! Let them experience the glimpse of a live tour of your place.
13
 
14
  == Description ==
15
- With WPVR, set up a virtual tour for site visitors where they can navigate a 360 view of your location, switch between several spots (or rooms), get information on items on the location, zoom in and out to get a better view, and get an overall idea about how your place may look in reality.
16
 
17
- > Get your site visitors hooked by giving them a tour that makes them realize how amazing your place is. Check **[Documentation](https://rextheme.com/docs/wp-vr/)**. 
18
 
19
- > Gyroscope support on Premium version.
20
 
21
- > Duplicate tour on Premium version.
22
 
23
- > Complete Gutenberg block support. Check how to use **[WPVR Block](https://rextheme.com/docs/wp-vr/gutenberg-block/)**.
24
 
25
- > Elementor Widget Support. Check how to use **[Elementor WPVR Widget](https://rextheme.com/docs/wp-vr/elementor-widget/)**.
26
 
27
- > 360 Video support. Check how to add **[360 video](https://rextheme.com/docs/wp-vr/360-degree-video-support/)**.
28
 
29
- > Auto rotation and rotation pause and stop control.
30
 
31
- >Panorama Compass and Customized Hotspot Icon with Dynamic Color support on Premium version.
 
32
 
33
- >Default zoom level support on Premium version.
34
 
35
- >Maximum and minimum zoom range support on Premium version.
36
 
37
- >Customize each scene's default face on load for Premium version.
 
38
 
39
- >Scene grab control and custom boundary for each scene on Premium version.
40
 
41
- >Scene title and author tag support on Premium version.
42
 
 
43
 
44
- **Easy and simple interface** 
45
- Simple, easy and straight forward options to add your panorama images and create a tour.
46
 
47
- **Easy direction and navigation tools**
48
- Create multiple hotspots for each scene at your own will. You can add hotspot type: info to get on-click or hover information or add URL. You can use hotspot type: scene and connect it to visit other scenes.
49
 
50
- **Customize style easily**
51
- You can implement your own custom style class and, alter the design and display of content from hotspot easily.
52
 
53
- **Easy to embed your virtual tour:**
54
- Every tour you create generates a shortcode.
55
- For a classic editor, you can simply apply this shortcode on your page along with proper width and height, and your website will include the virtual tour just the way you want.
56
- For Gutenberg block editor, you will find a block type “WPVR” under the common blocks. Create a WPVR block and on the toolbar, input the ID from the short code and assign your desired height and width, and the virtual tour will be embedded on your web page.
57
- For Elementor page builder, you will find a widget called “WPVR” under the general widgets. Simply add the widget and input ID, and assign height and width (in px) and it will be embedded on your web page.
58
 
 
 
59
 
60
- = Features: =
61
- = Free Version =
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  * Responsive default design
63
  * Preview tour on back-end
64
- * Option to set scene fade animation duration
65
- * Customization freedom of hotspot contents
66
- * Supports Equiretangular Panaromic Image type
67
- * Extensive keyboard and move navigation: Use direction keys or click and drag to navigate
68
- * Mouse scroll or keyboard buttons to zoom in and out
69
- * Generates shortcodes
70
- * For Classic editor, apply short code directly on webpage to embed item
71
- * Supports full screen
 
 
 
 
 
72
  * Support from support forum
73
- * Gutenberg block support
74
- * Elementor widget support
75
- * 360 video support
76
- * Auto rotation
77
- * Rotation pause and stop control
78
 
79
- = Premium Version =
80
- * Unlimited scenes
81
- * Unlimited hotspots
82
- * Customized premium icons
83
- * Color picker for hotspot custom icons background.
84
- * Custom panorama compass support
85
- * Default zoom level
86
- * Maximum and minimum zoom range
87
- * Customize each scene's default face on load
88
- * Scene grab control and custom boundary for each scene
89
- * Scene title and author tag support
90
- * Hotspot based scene face
91
- * Gyroscope support
92
- * Duplicate tour support
93
- * Personalized support on both support forum and our support e-mail.
 
 
94
 
95
  **Upcoming Features**
96
- - Panoramic image type support: Cubemap, Multiresolution
 
 
97
  - Background music
98
  - Advanced on-screen control button.
99
 
@@ -126,6 +146,14 @@ This error shows up when you are running a website under “HTTPS” (secured wi
126
 
127
  To solve this issue, go to your WordPress Dashboard > Settings > General. Here make sure you have “https” added to both “WordPress Address (URL)” and “Site Address (URL)”. That’s it. Your virtual tour will load with no issues. 
128
 
 
 
 
 
 
 
 
 
129
 
130
 
131
  == Screenshots ==
@@ -199,7 +227,12 @@ To solve this issue, go to your WordPress Dashboard > Settings > General. Here m
199
  * Dynamic error reporting added.
200
 
201
  = 2.9.0 =
202
- * Tour selector updated on vr block
 
 
 
 
 
203
 
204
  == Upgrade Notice ==
205
  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.2
7
+ Stable tag: 3.0.0
8
  Requires PHP: 5.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  Let site visitors take a virtual tour and get them excited!! Let them experience the glimpse of a live tour of your place.
13
 
14
  == Description ==
15
+ Create amazing virtual tours on your own easily using WPVR. Let visitors take a tour of your place remotely, and get them more excited.
16
 
17
+ With WPVR, you can create a tour where visitors can navigate a 360 view of your location, switch between several scenes, get information on items on the location, zoom in and out to get a better view and get an overall idea about how your place may look in reality.
18
 
19
+ Simply provide a 360 panoramic image, and this plugin will transform it into a realistic tour.
20
 
 
21
 
22
+ >WPVR is fully compatible with Gutenberg Block Editor and Elementor Page Builder.
23
 
 
24
 
25
+ [Demo Virtual Tour (Pro)](https://rextheme.com/docs/wp-vr/demo-tours/pro-demo-virtual-tour/) | [Demo Tour (Free)](https://rextheme.com/docs/wp-vr/demo-tours/demo-tour-wpvr-free/) | [Documentation](https://rextheme.com/docs/wp-vr/) | [Premium Version](https://rextheme.com/wpvr/)
26
 
 
27
 
28
+ = Why Use WPVR? =
29
+ WPVR gives all the features needed to create a quality virtual tour without any hassle.
30
 
31
+ https://www.youtube.com/watch?v=vG411d1qX3c
32
 
33
+ Get several exclusive features, such as:
34
 
35
+ **Simple interface optimized to create virtual tours easily** 
36
+ Simple, easy, and straight forward options to add your 360 panoramic images and create a virtual tour.
37
 
38
+ You can also add an auto rotation effect, scene fade animation when transmitting between scenes and many more to create an attractive virtual tour.
39
 
40
+ Plus, it includes the feature to preview the tour at the backened for proper inspection and tour creation.
41
 
42
+ >Read detailed [documentation](https://rextheme.com/docs/wp-vr/) and [video tutorials](https://www.youtube.com/watch?v=vG411d1qX3c&list=PLelDqLncNWcVNqy7zoqtt8N-pyqy0-93z) for assistance.
43
 
44
+ **Create an interactive realistic tour with multiple scenes**
45
+ Add several scenes and add hotspots to connect them into a tour. Create multiple hotspots for every scene at your own will, to connect to different scenes and generate a realistic tour experience.
46
 
47
+ >Gyrosope support for mobile devices on WPVR Pro.
 
48
 
49
+ Plus, hotspots can be used to provide information on click or hover, which will act as a guide to viewers.
 
50
 
 
 
 
 
 
51
 
52
+ **Customize hotspots to create more attraction**
53
+ WPVR comes with over 900+ custom icons to choose from, to use as hotspots. It features to change colors and add blinking animation to the custom icons to make the hotspots more catchy.
54
 
55
+ Also, WPVR allows you to add custom icons on your own using custom CSS. 
56
+
57
+ >Get a reliable support team to help you out at all times.
58
+
59
+ Get more features for full control of the tour such as scene boundary control, zoom level control, default scene face, and many more.
60
+
61
+ **Embed virtual tour without hassle**
62
+ Once a tour is created, it will generate a tour ID which is used to embed the tour on the website either through Gutenberg block or Elementor widget.
63
+
64
+ The tour will also generate a shortcode. For classic editor or visual composer, use the shortcode to embed the tour. (Use the Raw HTML block on visual composer.)
65
+
66
+ **Gutenberg Block Support**
67
+ On Gutenberg block editor has the WPVR block under the common blocks. It is used to embed the virtual tour. Provide the tour ID and assign your desired width and height, and the tour will be embedded.
68
+
69
+ **Elementor Widget Support**
70
+ The Elementor page builder will have a WPVR widget under the general widgets. Drag and drop the widget onto the page. Provide the tour ID and set your required width and height to get a live preview.
71
+
72
+ For more control over creating a virtual tour, learn about the [Premium version](https://rextheme.com/wpvr/).
73
+
74
+
75
+ = FEATURES =
76
+ * Gutenberg block support
77
+ * Elementor widget support
78
  * Responsive default design
79
  * Preview tour on back-end
80
+ * Add multiple scenes and hotspots
81
+ * Auto rotation with speed control
82
+ * Auto rotation pause and stop control
83
+ * Keyborad direction keys or mouse to navigate
84
+ * Keyboard +/- keys or mouse scroll to control zoom
85
+ * Scene type hotspot to connect scenes
86
+ * Info type hotspots to give information, on-click or hover
87
+ * Embed video, image or website link to hotspots
88
+ * On screen controls and full screen mode
89
+ * Hotspot customization with custom CSS
90
+ * Scene fade animation
91
+ * Full width tour tag
92
+ * 360 Video embed support
93
  * Support from support forum
 
 
 
 
 
94
 
95
+
96
+ = PREMIUM FEATURES =
97
+ * All free features
98
+ * Unlimited scenes and hotspots (limited to 5 in free version)
99
+ * Gyroscope support on mobile devices
100
+ * 900+ premium hotspot icons
101
+ * Color picker for custom hotspot
102
+ * Control max, min and default zoom level
103
+ * Scene boundary control
104
+ * Custom default scene face
105
+ * Custom compass for panorama
106
+ * Add scene title and description tag
107
+ * File export and import (for WPVR only)
108
+ * Duplicate tour on one click
109
+ * Personalized support (e-mail or forum)
110
+
111
+ [Instructions to upgrade to pro](https://rextheme.com/docs/wp-vr/how-to-upgrade-to-pro/)
112
 
113
  **Upcoming Features**
114
+ - Gallery of scenes
115
+ - Ground map
116
+ - Connect multiple tours
117
  - Background music
118
  - Advanced on-screen control button.
119
 
146
 
147
  To solve this issue, go to your WordPress Dashboard > Settings > General. Here make sure you have “https” added to both “WordPress Address (URL)” and “Site Address (URL)”. That’s it. Your virtual tour will load with no issues. 
148
 
149
+ = 8. How to activate Gyroscope on IOS devices? =
150
+ 1. Go to Settings > Safari
151
+ 2. Scroll down to the Privacy & Security section
152
+ 3. Enable Motion & Orientation Access
153
+
154
+ That’s it. Now you can go to the browser and open the page with the virtual tour.
155
+
156
+ You will find the gyroscope icon at the top left side.
157
 
158
 
159
  == Screenshots ==
227
  * Dynamic error reporting added.
228
 
229
  = 2.9.0 =
230
+ * Tour selector updated on vr block.
231
+
232
+ = 3.0.0 =
233
+ * File import & export system added.
234
+ * Fullwidth tag added.
235
+ * Placeholder color changed.
236
 
237
  == Upgrade Notice ==
238
  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
@@ -96,7 +96,7 @@ class Wpvr_Admin {
96
  wp_enqueue_style( 'icon-picker-css', plugin_dir_url( __FILE__ ) . 'css/jquery.fonticonpicker.min.css', array(), $this->version, 'all' );
97
  wp_enqueue_style( 'icon-picker-css-theme', plugin_dir_url( __FILE__ ) . 'css/jquery.fonticonpicker.grey.min.css', array(), $this->version, 'all' );
98
  }
99
-
100
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-admin.css', array(), $this->version, 'all' );
101
 
102
  }
@@ -121,7 +121,6 @@ class Wpvr_Admin {
121
  */
122
  wp_enqueue_script( 'wp-api' );
123
  $adscreen = get_current_screen();
124
-
125
  wp_enqueue_media();
126
  if ($adscreen->id=="wpvr_item") {
127
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
@@ -130,7 +129,7 @@ class Wpvr_Admin {
130
  wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
131
  wp_enqueue_script( 'videojs-js', plugin_dir_url( __FILE__ ) .'js/video.js', array('jquery'), true);
132
  wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
133
-
134
 
135
  if ($adscreen->id=="toplevel_page_wpvr") {
136
  wp_enqueue_script( 'materialize-js', plugin_dir_url( __FILE__ ) . 'js/materialize.min.js', array( 'jquery' ), $this->version, false );
@@ -140,7 +139,7 @@ class Wpvr_Admin {
140
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
141
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-admin.js', array( 'jquery' ), $this->version, false );
142
  }
143
-
144
  wp_localize_script( $this->plugin_name, 'wpvr_obj', array(
145
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
146
  'ajax_nonce' => wp_create_nonce('wpvr'),
@@ -159,7 +158,7 @@ class Wpvr_Admin {
159
  */
160
 
161
  add_meta_box(
162
- $this->post_type . '_builder_box',
163
  __('Tour Preview', $this->plugin_name),
164
  array($this, 'wpvr_display_meta_box_builder'),
165
  $this->post_type,
@@ -168,7 +167,7 @@ class Wpvr_Admin {
168
  );
169
 
170
  add_meta_box(
171
- $this->post_type . '_shortcode_box',
172
  __('Using this VR', $this->plugin_name),
173
  array($this, 'wpvr_display_meta_box_shortcode'),
174
  $this->post_type,
@@ -197,7 +196,7 @@ class Wpvr_Admin {
197
  'all_items' => __( 'All Tours', $this->plugin_name ),
198
  'menu_name' => __( 'Wpvr', $this->plugin_name ),
199
  );
200
-
201
  $args = array(
202
  'labels' => $labels,
203
  'public' => false,
@@ -206,7 +205,7 @@ class Wpvr_Admin {
206
  'menu_position' => 100,
207
  'supports' => array( 'title' ),
208
  );
209
-
210
  /**
211
  * Documentation : https://codex.wordpress.org/Function_Reference/register_post_type
212
  */
@@ -220,7 +219,7 @@ class Wpvr_Admin {
220
  */
221
  function wpvr_manage_posts_custom_column( $column_name ){
222
  $post = get_post();
223
-
224
  switch( $column_name ) {
225
  case 'shortcode' :
226
  echo '<code>[wpvr id="' . $post->ID . '"]</code>';
@@ -254,7 +253,7 @@ class Wpvr_Admin {
254
  public function wpvr_post_updated_messages( $messages ) {
255
  $messages[$this->post_type][1] = __( 'Wpvr item updated.', $this->plugin_name);
256
  $messages[$this->post_type][4] = __( 'Wpvr item updated.', $this->plugin_name);
257
-
258
  return $messages;
259
  }
260
 
@@ -264,7 +263,7 @@ class Wpvr_Admin {
264
  * @since 1.0.0
265
  */
266
  public function wpvr_display_meta_box_shortcode() {
267
-
268
  include_once( 'partials/wpvr-meta-box-shortcode-display.php' );
269
  }
270
 
@@ -285,7 +284,7 @@ class Wpvr_Admin {
285
  }
286
  public function wpvr_setup($post) {
287
 
288
-
289
  $data_limit = 5;
290
 
291
  $scene_limit = $data_limit + 1;
@@ -296,12 +295,12 @@ class Wpvr_Admin {
296
  if (isset($postdata["autoLoad"])) {
297
  $autoload = $postdata["autoLoad"];
298
  }
299
-
300
  $control = true;
301
  if (isset($postdata["showControls"])) {
302
  $control = $postdata["showControls"];
303
  }
304
-
305
  $default_scene = '';
306
  if (isset($postdata["defaultscene"])) {
307
  $default_scene = $postdata["defaultscene"];
@@ -328,12 +327,12 @@ class Wpvr_Admin {
328
  if (isset($postdata["autoRotateStopDelay"])) {
329
  $autorotationstopdelay = $postdata["autoRotateStopDelay"];
330
  }
331
-
332
  $scene_fade_duration = '';
333
  if (isset($postdata["scenefadeduration"])) {
334
  $scene_fade_duration = $postdata["scenefadeduration"];
335
  }
336
-
337
  $pano_data = '';
338
  if (isset($postdata["panodata"])) {
339
  $pano_data = $postdata["panodata"];
@@ -343,14 +342,14 @@ class Wpvr_Admin {
343
  $custom_icon = $custom_icon_array->icon;
344
 
345
  $html = '';
346
-
347
  $html .= '<div class="pano-setup">';
348
-
349
  $html .= '<div class="pano-alert scene-alert">';
350
  $html .= '<span class="destroy"><i class="fa fa-times"></i></span>';
351
  $html .= '<p></p>';
352
  $html .= '</div>';
353
-
354
  $html .='<div class="rex-pano-tabs">';
355
  $html .='<nav class="rex-pano-tab-nav rex-pano-nav-menu main-nav">';
356
  $html .='<ul>';
@@ -360,10 +359,10 @@ class Wpvr_Admin {
360
  $html .='<li class="video"><span data-href="#video"><i class="fas fa-video"></i> '.__('Video','wpvr').'</span></li>';
361
  $html .='</ul>';
362
  $html .='</nav>';
363
-
364
  $html .='<div class="rex-pano-tab-content">';
365
  $html .='<div class="rex-pano-tab general active" id="general">';
366
-
367
  $html .= '<h6 class="title"> '.__('General Settings : ','wpvr').'</h6>';
368
 
369
  //=Control Setup=
@@ -375,7 +374,7 @@ class Wpvr_Admin {
375
  $html .= '<input class="styled-radio" id="styled-radio-3" type="radio" name="controls" value="off" checked>';
376
  $html .= '<label for="styled-radio-3">Off</label>';
377
  $html .= '</li>';
378
-
379
  $html .= '<li class="radio-btn">';
380
  $html .= '<input class="styled-radio" id="styled-radio-4" type="radio" name="controls" value="on" >';
381
  $html .= '<label for="styled-radio-4">On</label>';
@@ -391,7 +390,7 @@ class Wpvr_Admin {
391
  $html .= '<input class="styled-radio" id="styled-radio-3" type="radio" name="controls" value="off" >';
392
  $html .= '<label for="styled-radio-3">Off</label>';
393
  $html .= '</li>';
394
-
395
  $html .= '<li class="radio-btn">';
396
  $html .= '<input class="styled-radio" id="styled-radio-4" type="radio" name="controls" value="on" checked>';
397
  $html .= '<label for="styled-radio-4">On</label>';
@@ -403,21 +402,21 @@ class Wpvr_Admin {
403
 
404
  //=scene fade duration=//
405
  $html .= '<div class="single-settings scene-fade-duration">';
406
- $html .= '<span>'.__('Scene Fade Duration: ','wpvr').'</span>';
407
  $html .= '<input type="number" name="scene-fade-duration" value="'.$scene_fade_duration.'" />';
408
  $html .= '</div>';
409
  //=scene fade duration End=//
410
-
411
  //=Autoload setup=//
412
  if ($autoload == true) {
413
- $html .= '<div class="single-settings autoload">';
414
  $html .= '<span>'.__('Autoload: ','wpvr').'</span>';
415
  $html .= '<ul>';
416
  $html .= '<li class="radio-btn">';
417
  $html .= '<input class="styled-radio" id="styled-radio-1" type="radio" name="autoload" value="off">';
418
  $html .= '<label for="styled-radio-1">Off</label>';
419
  $html .= '</li>';
420
-
421
  $html .= '<li class="radio-btn">';
422
  $html .= '<input class="styled-radio" id="styled-radio-2" type="radio" name="autoload" value="on" checked >';
423
  $html .= '<label for="styled-radio-2">On</label>';
@@ -426,14 +425,14 @@ class Wpvr_Admin {
426
  $html .= '</div>';
427
  }
428
  else {
429
- $html .= '<div class="single-settings autoload">';
430
  $html .= '<span>'.__('Autoload: ','wpvr').' </span>';
431
  $html .= '<ul>';
432
  $html .= '<li class="radio-btn">';
433
  $html .= '<input class="styled-radio" id="styled-radio-1" type="radio" name="autoload" value="off" checked >';
434
  $html .= '<label for="styled-radio-1">Off</label>';
435
  $html .= '</li>';
436
-
437
  $html .= '<li class="radio-btn">';
438
  $html .= '<input class="styled-radio" id="styled-radio-2" type="radio" name="autoload" value="on">';
439
  $html .= '<label for="styled-radio-2">On</label>';
@@ -448,18 +447,18 @@ class Wpvr_Admin {
448
  $html .= '<div class="single-settings preview-setting">';
449
  $html .= '<span>'.__('Preview Upload or add link : ','wpvr').'</span>';
450
  $html .= '<div class="form-group">';
451
- $html .= '<img class="prev-img" src="'.$preview.'">';
452
- $html .= '<input type="text" name="preview-attachment-url" class="preview-attachment-url" value="'.$preview.'"><br>';
453
  $html .= '<input type="button" class="preview-upload" data-info="" value="Upload"/>';
454
  $html .= '</div>';
455
  $html .= '</div>';
456
  }
457
  else {
458
  $html .= '<div class="single-settings preview-setting">';
459
- $html .= '<span>'.__('Preview Upload or add link : ','wpvr').'</span>';
460
  $html .= '<div class="form-group">';
461
  $html .= '<img class="prev-img" src="" style="display: none;">';
462
- $html .= '<input type="text" name="preview-attachment-url" class="preview-attachment-url" value=""><br>';
463
  $html .= '<input type="button" class="preview-upload" data-info="" value="Upload"/>';
464
  $html .= '</div>';
465
  $html .= '</div>';
@@ -468,14 +467,14 @@ class Wpvr_Admin {
468
 
469
  //===Autorotation on off set==//
470
  if (isset($postdata["autoRotate"])) {
471
- $html .= '<div class="single-settings autoload">';
472
  $html .= '<span>'.__('Auto Rotation: ','wpvr').' </span>';
473
  $html .= '<ul>';
474
  $html .= '<li class="radio-btn">';
475
  $html .= '<input class="styled-radio" id="styled-radio-11" type="radio" name="autorotation" value="off" >';
476
  $html .= '<label for="styled-radio-11">Off</label>';
477
  $html .= '</li>';
478
-
479
  $html .= '<li class="radio-btn">';
480
  $html .= '<input class="styled-radio" id="styled-radio-12" type="radio" name="autorotation" value="on" checked >';
481
  $html .= '<label for="styled-radio-12">On</label>';
@@ -484,14 +483,14 @@ class Wpvr_Admin {
484
  $html .= '</div>';
485
  }
486
  else {
487
- $html .= '<div class="single-settings autoload">';
488
  $html .= '<span>'.__('Auto Rotation: ','wpvr').' </span>';
489
  $html .= '<ul>';
490
  $html .= '<li class="radio-btn">';
491
  $html .= '<input class="styled-radio" id="styled-radio-11" type="radio" name="autorotation" value="off" checked >';
492
  $html .= '<label for="styled-radio-11">Off</label>';
493
  $html .= '</li>';
494
-
495
  $html .= '<li class="radio-btn">';
496
  $html .= '<input class="styled-radio" id="styled-radio-12" type="radio" name="autorotation" value="on">';
497
  $html .= '<label for="styled-radio-12">On</label>';
@@ -503,7 +502,7 @@ class Wpvr_Admin {
503
 
504
  //=Auto Rotation=//
505
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
506
- $html .= '<span>'.__('Auto Rotation: ','wpvr').'</span>';
507
  $html .= '<input type="number" name="auto-rotation" value="'.$autorotation.'" placeholder="-5" />';
508
  $html .= '<div class="field-tooltip">';
509
  $html .= '<i class="fa fa-question-circle"></i>';
@@ -514,7 +513,7 @@ class Wpvr_Admin {
514
 
515
  //=Auto rotation inactive delay=//
516
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
517
- $html .= '<span>'.__('Auto Rotation Inactive Delay: ','wpvr').'</span>';
518
  $html .= '<input type="number" name="auto-rotation-inactive-delay" value="'.$autorotationinactivedelay.'" placeholder="2000" />';
519
  $html .= '<div class="field-tooltip">';
520
  $html .= '<i class="fa fa-question-circle"></i>';
@@ -525,7 +524,7 @@ class Wpvr_Admin {
525
 
526
  //=Auto rotation stop delay=//
527
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
528
- $html .= '<span>'.__('Auto Rotation Stop Delay: ','wpvr').'</span>';
529
  $html .= '<input type="number" name="auto-rotation-stop-delay" value="'.$autorotationstopdelay.'" placeholder="2000" />';
530
  $html .= '<div class="field-tooltip">';
531
  $html .= '<i class="fa fa-question-circle"></i>';
@@ -533,32 +532,32 @@ class Wpvr_Admin {
533
  $html .= '</div>';
534
  $html .= '</div>';
535
  //=Auto rotation stop delay=//
536
-
537
  $html .='</div>';
538
  //---end general tab----
539
-
540
  $html .='<div class="rex-pano-tab" id="scenes">';
541
-
542
  //=Scene and Hotspot repeater=//
543
  if (empty($pano_data)) {
544
  $html .= '<div class="scene-setup rex-pano-sub-tabs" data-limit="'.$scene_limit.'">';
545
-
546
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
547
  $html .= '<ul>';
548
  $html .= '<li class="active"><span data-index="1" data-href="#scene-1"><i class="fa fa-image"></i></span></li>';
549
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
550
  $html .= '</ul>';
551
  $html .= '</nav>';
552
-
553
  $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
554
 
555
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
556
-
557
  $html .= '<div class="scene-content">';
558
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
559
 
560
  //==Set Default Scene==//
561
- $html .= '<div class="single-settings dscene">';
562
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
563
  $html .= '<select class="dscen" name="dscene">';
564
  $html .= '<option value="on"> Yes</option>';
@@ -577,30 +576,30 @@ class Wpvr_Admin {
577
  $html .= '</div>';
578
 
579
  $html .= '<div class=scene-setting>';
580
- $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
581
  $html .= '<div class="form-group">';
582
- $html .= '<img src="" style="display: none;"><br>';
583
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
584
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
585
  $html .= '</div>';
586
  $html .= '</div>';
587
  $html .= '</div>';
588
-
589
  //--hotspot setup--
590
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
591
-
592
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
593
  $html .= '<ul>';
594
  $html .= '<li class="active"><span data-index="1" data-href="#scene-0-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
595
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
596
  $html .= '</ul>';
597
  $html .= '</nav>';
598
-
599
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
600
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-0-hotspot-1">';
601
-
602
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
603
-
604
  $html .= '<div class="wrapper">';
605
  $html .= '<div class="hotspot-setting">';
606
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -620,10 +619,10 @@ class Wpvr_Admin {
620
  $html .= '<div class="hotspot-setting">';
621
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
622
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
623
- $html .= '</div>';
624
-
625
  $html .= '</div>';
626
-
627
  $html .= '<div class="hotspot-type hotspot-setting">';
628
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
629
  $html .= '<select name="hotspot-type">';
@@ -635,12 +634,12 @@ class Wpvr_Admin {
635
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').' </label>';
636
  $html .= '<input type="url" name="hotspot-url" value="" />';
637
  $html .= '</div>';
638
-
639
  $html .= '<div class="hotspot-content">';
640
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
641
  $html .= '<textarea name="hotspot-content"></textarea>';
642
  $html .= '</div>';
643
-
644
  $html .= '<div class="hotspot-hover">';
645
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
646
  $html .= '<textarea name="hotspot-hover"></textarea>';
@@ -652,30 +651,30 @@ class Wpvr_Admin {
652
  $html .= '<option value="none" selected> None</option>';
653
  $html .= '</select>';
654
  $html .= '</div>';
655
-
656
  $html .= '<div class="hotspot-scene" style="display:none;" >';
657
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').' </label>';
658
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
659
  $html .= '</div>';
660
-
661
  $html .= '</div>';
662
  //=Hotspot type End=//
663
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
664
  $html .= '</div>';
665
  $html .= '</div>';
666
-
667
  $html .= '</div>';
668
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
669
  $html .= '</div>';
670
 
671
 
672
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab active" data-title="1" id="scene-1">';
673
-
674
  $html .= '<div class="scene-content">';
675
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
676
 
677
  //==Set Default Scene==//
678
- $html .= '<div class="single-settings dscene">';
679
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
680
  $html .= '<select class="dscen" name="dscene">';
681
  $html .= '<option value="on"> Yes</option>';
@@ -692,33 +691,33 @@ class Wpvr_Admin {
692
  $html .= '<div class=scene-setting>';
693
  $html .= '<label for="scene-type">'.__('Scene Type : ','wpvr').'</label>';
694
  $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
695
- $html .= '</div>';
696
 
697
  $html .= '<div class=scene-setting>';
698
- $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
699
  $html .= '<div class="form-group">';
700
- $html .= '<img src="" style="display: none;"><br>';
701
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
702
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
703
  $html .= '</div>';
704
  $html .= '</div>';
705
  $html .= '</div>';
706
-
707
  //--hotspot setup--//
708
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
709
-
710
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
711
  $html .= '<ul>';
712
  $html .= '<li class="active"><span data-index="1" data-href="#scene-1-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
713
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
714
  $html .= '</ul>';
715
  $html .= '</nav>';
716
-
717
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
718
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-1-hotspot-1">';
719
-
720
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
721
-
722
  $html .= '<div class="wrapper">';
723
  $html .= '<div class="hotspot-setting">';
724
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -738,10 +737,10 @@ class Wpvr_Admin {
738
  $html .= '<div class="hotspot-setting">';
739
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
740
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
741
- $html .= '</div>';
742
 
743
  $html .= '</div>';
744
-
745
  $html .= '<div class="hotspot-type hotspot-setting">';
746
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
747
  $html .= '<select name="hotspot-type">';
@@ -753,17 +752,17 @@ class Wpvr_Admin {
753
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').'</label>';
754
  $html .= '<input type="url" name="hotspot-url" value="" />';
755
  $html .= '</div>';
756
-
757
  $html .= '<div class="hotspot-content">';
758
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
759
  $html .= '<textarea name="hotspot-content"></textarea>';
760
  $html .= '</div>';
761
-
762
  $html .= '<div class="hotspot-hover">';
763
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
764
  $html .= '<textarea name="hotspot-hover"></textarea>';
765
  $html .= '</div>';
766
-
767
  $html .= '<div class="hotspot-scene" style="display:none;" >';
768
  $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ','wpvr').'</label>';
769
  $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
@@ -774,22 +773,22 @@ class Wpvr_Admin {
774
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').'</label>';
775
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
776
  $html .= '</div>';
777
-
778
  $html .= '</div>';
779
  //=Hotspot type End=//
780
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
781
  $html .= '</div>';
782
- $html .= '</div>';
783
  $html .= '</div>';
784
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
785
  $html .= '</div>';
786
  $html .= '</div>';
787
-
788
- $html .= '</div>';
789
  }
790
  else {
791
  $html .= '<div class="scene-setup rex-pano-sub-tabs" data-limit="'.$scene_limit.'">';
792
-
793
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
794
  $html .= '<ul>';
795
  $i = 1;
@@ -806,18 +805,18 @@ class Wpvr_Admin {
806
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
807
  $html .= '</ul>';
808
  $html .= '</nav>';
809
-
810
 
811
  $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
812
 
813
  //===Default empty repeater declared by nazmus sakib===//
814
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
815
-
816
  $html .= '<div class="scene-content">';
817
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
818
 
819
  //==Set Default Scene==//
820
- $html .= '<div class="single-settings dscene">';
821
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
822
  $html .= '<select class="dscen" name="dscene">';
823
  $html .= '<option value="on"> Yes</option>';
@@ -836,30 +835,30 @@ class Wpvr_Admin {
836
  $html .= '</div>';
837
 
838
  $html .= '<div class=scene-setting>';
839
- $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
840
  $html .= '<div class="form-group">';
841
- $html .= '<img src="" style="display: none;"><br>';
842
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
843
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
844
  $html .= '</div>';
845
  $html .= '</div>';
846
  $html .= '</div>';
847
-
848
  //--hotspot setup--//
849
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
850
-
851
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
852
  $html .= '<ul>';
853
  $html .= '<li class="active"><span data-index="1" data-href="#scene-0-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
854
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
855
  $html .= '</ul>';
856
  $html .= '</nav>';
857
-
858
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
859
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-0-hotspot-1">';
860
-
861
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
862
-
863
  $html .= '<div class="wrapper">';
864
  $html .= '<div class="hotspot-setting">';
865
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -879,10 +878,10 @@ class Wpvr_Admin {
879
  $html .= '<div class="hotspot-setting">';
880
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
881
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
882
- $html .= '</div>';
883
 
884
  $html .= '</div>';
885
-
886
  $html .= '<div class="hotspot-type hotspot-setting">';
887
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
888
  $html .= '<select name="hotspot-type">';
@@ -894,12 +893,12 @@ class Wpvr_Admin {
894
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').' </label>';
895
  $html .= '<input type="url" name="hotspot-url" value="" />';
896
  $html .= '</div>';
897
-
898
  $html .= '<div class="hotspot-content">';
899
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
900
  $html .= '<textarea name="hotspot-content"></textarea>';
901
  $html .= '</div>';
902
-
903
  $html .= '<div class="hotspot-hover">';
904
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
905
  $html .= '<textarea name="hotspot-hover"></textarea>';
@@ -911,18 +910,18 @@ class Wpvr_Admin {
911
  $html .= '<option value="none" selected> None</option>';
912
  $html .= '</select>';
913
  $html .= '</div>';
914
-
915
  $html .= '<div class="hotspot-scene" style="display:none;" >';
916
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').' </label>';
917
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
918
  $html .= '</div>';
919
-
920
  $html .= '</div>';
921
  //=Hotspot type End=//
922
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
923
  $html .= '</div>';
924
  $html .= '</div>';
925
-
926
  $html .= '</div>';
927
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
928
  $html .= '</div>';
@@ -945,26 +944,26 @@ class Wpvr_Admin {
945
  if (isset($pano_scenes["hotspot-list"])) {
946
  $pano_hotspots = $pano_scenes["hotspot-list"];
947
  }
948
-
949
  $firstvalueset = reset($pano_data["scene-list"]);
950
  if ($pano_scenes['scene-id'] == $firstvalueset['scene-id']) {
951
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab active" data-title="1" id="scene-'.$s.'">';
952
-
953
  $html .= '<div class="scene-content">';
954
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
955
  //==Set Default Scene==//
956
  if ($dscene == 'on') {
957
- $html .= '<div class="single-settings dscene">';
958
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
959
  $html .= '<select class="dscen" name="dscene">';
960
  $html .= '<option value="on" selected > Yes</option>';
961
  $html .= '<option value="off"> No</option>';
962
  $html .= '</select>';
963
  $html .= '</div>';
964
-
965
  }
966
  else {
967
- $html .= '<div class="single-settings dscene">';
968
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
969
  $html .= '<select class="dscen" name="dscene">';
970
  $html .= '<option value="on"> Yes</option>';
@@ -984,18 +983,18 @@ class Wpvr_Admin {
984
  $html .= '</div>';
985
 
986
  $html .= '<div class=scene-setting>';
987
- $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
988
  $html .= '<div class="form-group">';
989
- $html .= '<img name ="scene-photo" src="'.$scene_photo.'"> <br/>';
990
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
991
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="'.$scene_photo.'">';
992
  $html .= '</div>';
993
  $html .= '</div>';
994
- $html .= '</div>';
995
-
996
  if (!empty($pano_hotspots)) {
997
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
998
-
999
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1000
  $html .= '<ul>';
1001
  $j = 1;
@@ -1003,17 +1002,17 @@ class Wpvr_Admin {
1003
  foreach ($pano_hotspots as $pano_hotspot) {
1004
 
1005
  if ($pano_hotspot['hotspot-title'] == $firstvaluehotspot['hotspot-title']) {
1006
- $html .= '<li class="active"><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1007
  }
1008
  else {
1009
- $html .= '<li><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1010
  }
1011
  $j++;
1012
  }
1013
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
1014
  $html .= '</ul>';
1015
  $html .= '</nav>';
1016
-
1017
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1018
 
1019
  $h = 1;
@@ -1042,9 +1041,9 @@ class Wpvr_Admin {
1042
 
1043
  if ($pano_hotspot['hotspot-title'] == $firstvaluehotspotset['hotspot-title']) {
1044
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1045
-
1046
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1047
-
1048
  $html .= '<div class="wrapper">';
1049
  $html .= '<div class="hotspot-setting">';
1050
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -1065,13 +1064,13 @@ class Wpvr_Admin {
1065
  $html .= '<div class="hotspot-setting">';
1066
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1067
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1068
- $html .= '</div>';
1069
 
1070
  $html .= '</div>';
1071
-
1072
  //=Hotspot type=//
1073
  if ($hotspot_type == "info") {
1074
-
1075
  $html .= '<div class="hotspot-type hotspot-setting">';
1076
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1077
  $html .= '<select name="hotspot-type">';
@@ -1107,10 +1106,10 @@ class Wpvr_Admin {
1107
  $html .= '</div>';
1108
 
1109
  $html .= '</div>';
1110
-
1111
  }
1112
  else {
1113
-
1114
  $html .= '<div class="hotspot-type hotspot-setting">';
1115
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1116
  $html .= '<select class="trtr" name="hotspot-type">';
@@ -1146,17 +1145,17 @@ class Wpvr_Admin {
1146
  $html .= '</div>';
1147
 
1148
  $html .= '</div>';
1149
-
1150
  }
1151
  //=Hotspot type End=//
1152
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1153
- $html .= '</div>';
1154
  }
1155
  else {
1156
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1157
-
1158
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1159
-
1160
  $html .= '<div class="wrapper">';
1161
  $html .= '<div class="hotspot-setting">';
1162
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -1176,13 +1175,13 @@ class Wpvr_Admin {
1176
  $html .= '<div class="hotspot-setting">';
1177
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1178
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1179
- $html .= '</div>';
1180
 
1181
  $html .= '</div>';
1182
-
1183
  //=Hotspot type=//
1184
  if ($hotspot_type == "info") {
1185
-
1186
  $html .= '<div class="hotspot-type hotspot-setting">';
1187
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1188
  $html .= '<select name="hotspot-type">';
@@ -1218,10 +1217,10 @@ class Wpvr_Admin {
1218
  $html .= '</div>';
1219
 
1220
  $html .= '</div>';
1221
-
1222
  }
1223
  else {
1224
-
1225
  $html .= '<div class="hotspot-type hotspot-setting">';
1226
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1227
  $html .= '<select class="trtr" name="hotspot-type">';
@@ -1257,32 +1256,32 @@ class Wpvr_Admin {
1257
  $html .= '</div>';
1258
 
1259
  $html .= '</div>';
1260
-
1261
  }
1262
  //=Hotspot type End=//
1263
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1264
  $html .= '</div>';
1265
  }
1266
  $h++;
1267
  }
1268
  $html .= '</div>';
1269
- $html .= '</div>';
1270
  }
1271
  else {
1272
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1273
-
1274
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1275
  $html .= '<ul>';
1276
  $html .= '<li class="active"><span data-index="1" data-href="#scene-'.$s.'-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
1277
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
1278
  $html .= '</ul>';
1279
  $html .= '</nav>';
1280
-
1281
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1282
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-1">';
1283
-
1284
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1285
-
1286
  $html .= '<div class="wrapper">';
1287
  $html .= '<div class="hotspot-setting">';
1288
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -1302,10 +1301,10 @@ class Wpvr_Admin {
1302
  $html .= '<div class="hotspot-setting">';
1303
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1304
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1305
- $html .= '</div>';
1306
 
1307
  $html .= '</div>';
1308
-
1309
  $html .= '<div class="hotspot-type hotspot-setting">';
1310
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1311
  $html .= '<select name="hotspot-type">';
@@ -1317,17 +1316,17 @@ class Wpvr_Admin {
1317
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').'</label>';
1318
  $html .= '<input type="url" name="hotspot-url" value="" />';
1319
  $html .= '</div>';
1320
-
1321
  $html .= '<div class="hotspot-content">';
1322
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
1323
  $html .= '<textarea name="hotspot-content"></textarea>';
1324
  $html .= '</div>';
1325
-
1326
  $html .= '<div class="hotspot-hover">';
1327
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
1328
  $html .= '<textarea name="hotspot-hover"></textarea>';
1329
  $html .= '</div>';
1330
-
1331
  $html .= '<div class="hotspot-scene" style="display:none;" >';
1332
  $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ','wpvr').'</label>';
1333
  $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
@@ -1338,12 +1337,12 @@ class Wpvr_Admin {
1338
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').'</label>';
1339
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1340
  $html .= '</div>';
1341
-
1342
  $html .= '</div>';
1343
  //=Hotspot type End=//
1344
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1345
  $html .= '</div>';
1346
- $html .= '</div>';
1347
  $html .= '</div>';
1348
  }
1349
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
@@ -1351,23 +1350,23 @@ class Wpvr_Admin {
1351
  }
1352
  else {
1353
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="1" id="scene-'.$s.'">';
1354
-
1355
  $html .= '<div class="scene-content">';
1356
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
1357
 
1358
  //==Set Default Scene==//
1359
  if ($dscene == 'on') {
1360
- $html .= '<div class="single-settings dscene">';
1361
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
1362
  $html .= '<select class="dscen" name="dscene">';
1363
  $html .= '<option value="on" selected > Yes</option>';
1364
  $html .= '<option value="off"> No</option>';
1365
  $html .= '</select>';
1366
  $html .= '</div>';
1367
-
1368
  }
1369
  else {
1370
- $html .= '<div class="single-settings dscene">';
1371
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
1372
  $html .= '<select class="dscen" name="dscene">';
1373
  $html .= '<option value="on"> Yes</option>';
@@ -1388,36 +1387,36 @@ class Wpvr_Admin {
1388
  $html .= '</div>';
1389
 
1390
  $html .= '<div class=scene-setting>';
1391
- $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
1392
  $html .= '<div class="form-group">';
1393
- $html .= '<img name ="scene-photo" src="'.$scene_photo.'"> <br/>';
1394
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
1395
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="'.$scene_photo.'">';
1396
  $html .= '</div>';
1397
  $html .= '</div>';
1398
- $html .= '</div>';
1399
-
1400
  if (!empty($pano_hotspots)) {
1401
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1402
-
1403
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1404
  $html .= '<ul>';
1405
  $j = 1;
1406
  foreach ($pano_hotspots as $pano_hotspot) {
1407
  if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
1408
- $html .= '<li class="active"><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1409
  }
1410
  else {
1411
- $html .= '<li><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1412
  }
1413
  $j++;
1414
  }
1415
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
1416
  $html .= '</ul>';
1417
  $html .= '</nav>';
1418
-
1419
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1420
-
1421
  $h = 1;
1422
  foreach ($pano_hotspots as $pano_hotspot) {
1423
  $hotspot_title = '';
@@ -1443,9 +1442,9 @@ class Wpvr_Admin {
1443
 
1444
  if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
1445
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1446
-
1447
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1448
-
1449
  $html .= '<div class="wrapper">';
1450
  $html .= '<div class="hotspot-setting">';
1451
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -1465,13 +1464,13 @@ class Wpvr_Admin {
1465
  $html .= '<div class="hotspot-setting">';
1466
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1467
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1468
- $html .= '</div>';
1469
 
1470
  $html .= '</div>';
1471
-
1472
  //=Hotspot type=//
1473
  if ($hotspot_type == "info") {
1474
-
1475
  $html .= '<div class="hotspot-type hotspot-setting">';
1476
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1477
  $html .= '<select name="hotspot-type">';
@@ -1507,10 +1506,10 @@ class Wpvr_Admin {
1507
  $html .= '</div>';
1508
 
1509
  $html .= '</div>';
1510
-
1511
  }
1512
  else {
1513
-
1514
  $html .= '<div class="hotspot-type hotspot-setting">';
1515
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1516
  $html .= '<select class="trtr" name="hotspot-type">';
@@ -1546,17 +1545,17 @@ class Wpvr_Admin {
1546
  $html .= '</div>';
1547
 
1548
  $html .= '</div>';
1549
-
1550
  }
1551
  //=Hotspot type End=//
1552
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1553
- $html .= '</div>';
1554
  }
1555
  else {
1556
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1557
-
1558
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting</h6>';
1559
-
1560
  $html .= '<div class="wrapper">';
1561
  $html .= '<div class="hotspot-setting">';
1562
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -1576,13 +1575,13 @@ class Wpvr_Admin {
1576
  $html .= '<div class="hotspot-setting">';
1577
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1578
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1579
- $html .= '</div>';
1580
 
1581
  $html .= '</div>';
1582
-
1583
  //=Hotspot type=//
1584
  if ($hotspot_type == "info") {
1585
-
1586
  $html .= '<div class="hotspot-type hotspot-setting">';
1587
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1588
  $html .= '<select name="hotspot-type">';
@@ -1618,10 +1617,10 @@ class Wpvr_Admin {
1618
  $html .= '</div>';
1619
 
1620
  $html .= '</div>';
1621
-
1622
  }
1623
  else {
1624
-
1625
  $html .= '<div class="hotspot-type hotspot-setting">';
1626
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1627
  $html .= '<select class="trtr" name="hotspot-type">';
@@ -1657,32 +1656,32 @@ class Wpvr_Admin {
1657
  $html .= '</div>';
1658
 
1659
  $html .= '</div>';
1660
-
1661
  }
1662
  //=Hotspot type End=//
1663
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1664
  $html .= '</div>';
1665
  }
1666
  $h++;
1667
  }
1668
  $html .= '</div>';
1669
- $html .= '</div>';
1670
  }
1671
  else {
1672
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1673
-
1674
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1675
  $html .= '<ul>';
1676
  $html .= '<li class="active"><span data-index="1" data-href="#scene-'.$s.'-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
1677
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
1678
  $html .= '</ul>';
1679
  $html .= '</nav>';
1680
-
1681
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1682
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-1">';
1683
-
1684
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1685
-
1686
  $html .= '<div class="wrapper">';
1687
  $html .= '<div class="hotspot-setting">';
1688
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
@@ -1702,10 +1701,10 @@ class Wpvr_Admin {
1702
  $html .= '<div class="hotspot-setting">';
1703
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1704
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1705
- $html .= '</div>';
1706
 
1707
  $html .= '</div>';
1708
-
1709
  $html .= '<div class="hotspot-type hotspot-setting">';
1710
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1711
  $html .= '<select name="hotspot-type">';
@@ -1717,17 +1716,17 @@ class Wpvr_Admin {
1717
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').'</label>';
1718
  $html .= '<input type="url" name="hotspot-url" value="" />';
1719
  $html .= '</div>';
1720
-
1721
  $html .= '<div class="hotspot-content">';
1722
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
1723
  $html .= '<textarea name="hotspot-content"></textarea>';
1724
  $html .= '</div>';
1725
-
1726
  $html .= '<div class="hotspot-hover">';
1727
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
1728
  $html .= '<textarea name="hotspot-hover"></textarea>';
1729
  $html .= '</div>';
1730
-
1731
  $html .= '<div class="hotspot-scene" style="display:none;" >';
1732
  $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ','wpvr').'</label>';
1733
  $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
@@ -1738,12 +1737,12 @@ class Wpvr_Admin {
1738
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').'</label>';
1739
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1740
  $html .= '</div>';
1741
-
1742
  $html .= '</div>';
1743
  //=Hotspot type End=//
1744
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1745
  $html .= '</div>';
1746
- $html .= '</div>';
1747
  $html .= '</div>';
1748
  }
1749
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
@@ -1752,13 +1751,13 @@ class Wpvr_Admin {
1752
  $s++;
1753
  }
1754
  $html .= '</div>';
1755
-
1756
  $html .= '</div>';
1757
  }
1758
-
1759
  $html .= '<div class="preview-btn-wrapper">';
1760
  $html .= '<div class="preview-btn-area clearfix">';
1761
-
1762
  $html .= '<button id="panolenspreview">'.__('Preview','wpvr').'</button>';
1763
  $html .= '</div>';
1764
  $html .= '</div>';
@@ -1789,26 +1788,26 @@ class Wpvr_Admin {
1789
  else {
1790
  $vidcontrol_off = 'checked';
1791
  }
1792
- $html .= '<div class="single-settings videosetup">';
1793
  $html .= '<span>Enable Video: </span>';
1794
  $html .= '<ul>';
1795
  $html .= '<li class="radio-btn">';
1796
  $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" >';
1797
  $html .= '<label for="styled-radio">Off</label>';
1798
  $html .= '</li>';
1799
-
1800
  $html .= '<li class="radio-btn">';
1801
  $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" checked>';
1802
  $html .= '<label for="styled-radio-0">On</label>';
1803
  $html .= '</li>';
1804
  $html .= '</ul>';
1805
  $html .= '</div>';
1806
-
1807
 
1808
  $html .= '<div class="video-setting" style="display:none;">';
1809
- $html .= '<div class="single-settings">';
1810
- $html .= '<span>Upload or add link: </span>';
1811
- $html .= '<div class="form-group">';
1812
  $html .= '<input type="text" name="video-attachment-url" placeholder="Paste Youtube or Vimeo link or upload" class="video-attachment-url" value="'.$postdata['vidurl'].'">';
1813
  $html .= '<input type="button" class="video-upload" data-info="" value="Upload" />';
1814
  $html .= '</div>';
@@ -1817,28 +1816,28 @@ class Wpvr_Admin {
1817
  $html .= '</div>';
1818
  }
1819
  else {
1820
- $html .= '<div class="single-settings videosetup">';
1821
  $html .= '<span>Enable Video: </span>';
1822
  $html .= '<ul>';
1823
  $html .= '<li class="radio-btn">';
1824
  $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" checked >';
1825
  $html .= '<label for="styled-radio">Off</label>';
1826
  $html .= '</li>';
1827
-
1828
  $html .= '<li class="radio-btn">';
1829
  $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" >';
1830
  $html .= '<label for="styled-radio-0">On</label>';
1831
  $html .= '</li>';
1832
  $html .= '</ul>';
1833
  $html .= '</div>';
1834
-
1835
  //==Video setup end==//
1836
-
1837
  //==Video Setting==/
1838
  $html .= '<div class="video-setting" style="display:none;">';
1839
- $html .= '<div class="single-settings">';
1840
- $html .= '<span>Upload or add link: </span>';
1841
- $html .= '<div class="form-group">';
1842
  $html .= '<input type="text" placeholder="Paste Youtube or Vimeo link or upload" name="video-attachment-url" class="video-attachment-url" value="">';
1843
  $html .= '<input type="button" class="video-upload" data-info="" value="Upload"/>';
1844
  $html .= '</div>';
@@ -1846,15 +1845,15 @@ class Wpvr_Admin {
1846
  $html .= '<button id="videopreview">Preview</button>';
1847
  $html .= '</div>';
1848
  }
1849
- //==Video Setting End==//
1850
  $html .='</div>';
1851
  //---end video tab----
1852
  $html .='</div>';
1853
- //---end rex-pano-tab-content----
1854
  $html .='</div>';
1855
  //---end rex-pano-tabs---
1856
- $html .= '</div>';
1857
  echo $html;
1858
  }
1859
 
1860
- }
96
  wp_enqueue_style( 'icon-picker-css', plugin_dir_url( __FILE__ ) . 'css/jquery.fonticonpicker.min.css', array(), $this->version, 'all' );
97
  wp_enqueue_style( 'icon-picker-css-theme', plugin_dir_url( __FILE__ ) . 'css/jquery.fonticonpicker.grey.min.css', array(), $this->version, 'all' );
98
  }
99
+
100
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpvr-admin.css', array(), $this->version, 'all' );
101
 
102
  }
121
  */
122
  wp_enqueue_script( 'wp-api' );
123
  $adscreen = get_current_screen();
 
124
  wp_enqueue_media();
125
  if ($adscreen->id=="wpvr_item") {
126
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
129
  wp_enqueue_script('panelliumlib-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
130
  wp_enqueue_script( 'videojs-js', plugin_dir_url( __FILE__ ) .'js/video.js', array('jquery'), true);
131
  wp_enqueue_script('panelliumvid-js', plugin_dir_url( __FILE__ ) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
132
+
133
 
134
  if ($adscreen->id=="toplevel_page_wpvr") {
135
  wp_enqueue_script( 'materialize-js', plugin_dir_url( __FILE__ ) . 'js/materialize.min.js', array( 'jquery' ), $this->version, false );
139
  wp_enqueue_script('icon-picker', plugin_dir_url( __FILE__ ) . 'lib/jquery.fonticonpicker.min.js', array(), true);
140
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpvr-admin.js', array( 'jquery' ), $this->version, false );
141
  }
142
+
143
  wp_localize_script( $this->plugin_name, 'wpvr_obj', array(
144
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
145
  'ajax_nonce' => wp_create_nonce('wpvr'),
158
  */
159
 
160
  add_meta_box(
161
+ $this->post_type . '_builder_box',
162
  __('Tour Preview', $this->plugin_name),
163
  array($this, 'wpvr_display_meta_box_builder'),
164
  $this->post_type,
167
  );
168
 
169
  add_meta_box(
170
+ $this->post_type . '_shortcode_box',
171
  __('Using this VR', $this->plugin_name),
172
  array($this, 'wpvr_display_meta_box_shortcode'),
173
  $this->post_type,
196
  'all_items' => __( 'All Tours', $this->plugin_name ),
197
  'menu_name' => __( 'Wpvr', $this->plugin_name ),
198
  );
199
+
200
  $args = array(
201
  'labels' => $labels,
202
  'public' => false,
205
  'menu_position' => 100,
206
  'supports' => array( 'title' ),
207
  );
208
+
209
  /**
210
  * Documentation : https://codex.wordpress.org/Function_Reference/register_post_type
211
  */
219
  */
220
  function wpvr_manage_posts_custom_column( $column_name ){
221
  $post = get_post();
222
+
223
  switch( $column_name ) {
224
  case 'shortcode' :
225
  echo '<code>[wpvr id="' . $post->ID . '"]</code>';
253
  public function wpvr_post_updated_messages( $messages ) {
254
  $messages[$this->post_type][1] = __( 'Wpvr item updated.', $this->plugin_name);
255
  $messages[$this->post_type][4] = __( 'Wpvr item updated.', $this->plugin_name);
256
+
257
  return $messages;
258
  }
259
 
263
  * @since 1.0.0
264
  */
265
  public function wpvr_display_meta_box_shortcode() {
266
+
267
  include_once( 'partials/wpvr-meta-box-shortcode-display.php' );
268
  }
269
 
284
  }
285
  public function wpvr_setup($post) {
286
 
287
+
288
  $data_limit = 5;
289
 
290
  $scene_limit = $data_limit + 1;
295
  if (isset($postdata["autoLoad"])) {
296
  $autoload = $postdata["autoLoad"];
297
  }
298
+
299
  $control = true;
300
  if (isset($postdata["showControls"])) {
301
  $control = $postdata["showControls"];
302
  }
303
+
304
  $default_scene = '';
305
  if (isset($postdata["defaultscene"])) {
306
  $default_scene = $postdata["defaultscene"];
327
  if (isset($postdata["autoRotateStopDelay"])) {
328
  $autorotationstopdelay = $postdata["autoRotateStopDelay"];
329
  }
330
+
331
  $scene_fade_duration = '';
332
  if (isset($postdata["scenefadeduration"])) {
333
  $scene_fade_duration = $postdata["scenefadeduration"];
334
  }
335
+
336
  $pano_data = '';
337
  if (isset($postdata["panodata"])) {
338
  $pano_data = $postdata["panodata"];
342
  $custom_icon = $custom_icon_array->icon;
343
 
344
  $html = '';
345
+
346
  $html .= '<div class="pano-setup">';
347
+
348
  $html .= '<div class="pano-alert scene-alert">';
349
  $html .= '<span class="destroy"><i class="fa fa-times"></i></span>';
350
  $html .= '<p></p>';
351
  $html .= '</div>';
352
+
353
  $html .='<div class="rex-pano-tabs">';
354
  $html .='<nav class="rex-pano-tab-nav rex-pano-nav-menu main-nav">';
355
  $html .='<ul>';
359
  $html .='<li class="video"><span data-href="#video"><i class="fas fa-video"></i> '.__('Video','wpvr').'</span></li>';
360
  $html .='</ul>';
361
  $html .='</nav>';
362
+
363
  $html .='<div class="rex-pano-tab-content">';
364
  $html .='<div class="rex-pano-tab general active" id="general">';
365
+
366
  $html .= '<h6 class="title"> '.__('General Settings : ','wpvr').'</h6>';
367
 
368
  //=Control Setup=
374
  $html .= '<input class="styled-radio" id="styled-radio-3" type="radio" name="controls" value="off" checked>';
375
  $html .= '<label for="styled-radio-3">Off</label>';
376
  $html .= '</li>';
377
+
378
  $html .= '<li class="radio-btn">';
379
  $html .= '<input class="styled-radio" id="styled-radio-4" type="radio" name="controls" value="on" >';
380
  $html .= '<label for="styled-radio-4">On</label>';
390
  $html .= '<input class="styled-radio" id="styled-radio-3" type="radio" name="controls" value="off" >';
391
  $html .= '<label for="styled-radio-3">Off</label>';
392
  $html .= '</li>';
393
+
394
  $html .= '<li class="radio-btn">';
395
  $html .= '<input class="styled-radio" id="styled-radio-4" type="radio" name="controls" value="on" checked>';
396
  $html .= '<label for="styled-radio-4">On</label>';
402
 
403
  //=scene fade duration=//
404
  $html .= '<div class="single-settings scene-fade-duration">';
405
+ $html .= '<span>'.__('Scene Fade Duration: ','wpvr').'</span>';
406
  $html .= '<input type="number" name="scene-fade-duration" value="'.$scene_fade_duration.'" />';
407
  $html .= '</div>';
408
  //=scene fade duration End=//
409
+
410
  //=Autoload setup=//
411
  if ($autoload == true) {
412
+ $html .= '<div class="single-settings autoload">';
413
  $html .= '<span>'.__('Autoload: ','wpvr').'</span>';
414
  $html .= '<ul>';
415
  $html .= '<li class="radio-btn">';
416
  $html .= '<input class="styled-radio" id="styled-radio-1" type="radio" name="autoload" value="off">';
417
  $html .= '<label for="styled-radio-1">Off</label>';
418
  $html .= '</li>';
419
+
420
  $html .= '<li class="radio-btn">';
421
  $html .= '<input class="styled-radio" id="styled-radio-2" type="radio" name="autoload" value="on" checked >';
422
  $html .= '<label for="styled-radio-2">On</label>';
425
  $html .= '</div>';
426
  }
427
  else {
428
+ $html .= '<div class="single-settings autoload">';
429
  $html .= '<span>'.__('Autoload: ','wpvr').' </span>';
430
  $html .= '<ul>';
431
  $html .= '<li class="radio-btn">';
432
  $html .= '<input class="styled-radio" id="styled-radio-1" type="radio" name="autoload" value="off" checked >';
433
  $html .= '<label for="styled-radio-1">Off</label>';
434
  $html .= '</li>';
435
+
436
  $html .= '<li class="radio-btn">';
437
  $html .= '<input class="styled-radio" id="styled-radio-2" type="radio" name="autoload" value="on">';
438
  $html .= '<label for="styled-radio-2">On</label>';
447
  $html .= '<div class="single-settings preview-setting">';
448
  $html .= '<span>'.__('Preview Upload or add link : ','wpvr').'</span>';
449
  $html .= '<div class="form-group">';
450
+ $html .= '<img class="prev-img" src="'.$preview.'">';
451
+ $html .= '<input type="text" name="preview-attachment-url" class="preview-attachment-url" value="'.$preview.'"><br>';
452
  $html .= '<input type="button" class="preview-upload" data-info="" value="Upload"/>';
453
  $html .= '</div>';
454
  $html .= '</div>';
455
  }
456
  else {
457
  $html .= '<div class="single-settings preview-setting">';
458
+ $html .= '<span>'.__('Preview Upload or add link : ','wpvr').'</span>';
459
  $html .= '<div class="form-group">';
460
  $html .= '<img class="prev-img" src="" style="display: none;">';
461
+ $html .= '<input type="text" name="preview-attachment-url" class="preview-attachment-url" value=""><br>';
462
  $html .= '<input type="button" class="preview-upload" data-info="" value="Upload"/>';
463
  $html .= '</div>';
464
  $html .= '</div>';
467
 
468
  //===Autorotation on off set==//
469
  if (isset($postdata["autoRotate"])) {
470
+ $html .= '<div class="single-settings autoload">';
471
  $html .= '<span>'.__('Auto Rotation: ','wpvr').' </span>';
472
  $html .= '<ul>';
473
  $html .= '<li class="radio-btn">';
474
  $html .= '<input class="styled-radio" id="styled-radio-11" type="radio" name="autorotation" value="off" >';
475
  $html .= '<label for="styled-radio-11">Off</label>';
476
  $html .= '</li>';
477
+
478
  $html .= '<li class="radio-btn">';
479
  $html .= '<input class="styled-radio" id="styled-radio-12" type="radio" name="autorotation" value="on" checked >';
480
  $html .= '<label for="styled-radio-12">On</label>';
483
  $html .= '</div>';
484
  }
485
  else {
486
+ $html .= '<div class="single-settings autoload">';
487
  $html .= '<span>'.__('Auto Rotation: ','wpvr').' </span>';
488
  $html .= '<ul>';
489
  $html .= '<li class="radio-btn">';
490
  $html .= '<input class="styled-radio" id="styled-radio-11" type="radio" name="autorotation" value="off" checked >';
491
  $html .= '<label for="styled-radio-11">Off</label>';
492
  $html .= '</li>';
493
+
494
  $html .= '<li class="radio-btn">';
495
  $html .= '<input class="styled-radio" id="styled-radio-12" type="radio" name="autorotation" value="on">';
496
  $html .= '<label for="styled-radio-12">On</label>';
502
 
503
  //=Auto Rotation=//
504
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
505
+ $html .= '<span>'.__('Auto Rotation: ','wpvr').'</span>';
506
  $html .= '<input type="number" name="auto-rotation" value="'.$autorotation.'" placeholder="-5" />';
507
  $html .= '<div class="field-tooltip">';
508
  $html .= '<i class="fa fa-question-circle"></i>';
513
 
514
  //=Auto rotation inactive delay=//
515
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
516
+ $html .= '<span>'.__('Auto Rotation Inactive Delay: ','wpvr').'</span>';
517
  $html .= '<input type="number" name="auto-rotation-inactive-delay" value="'.$autorotationinactivedelay.'" placeholder="2000" />';
518
  $html .= '<div class="field-tooltip">';
519
  $html .= '<i class="fa fa-question-circle"></i>';
524
 
525
  //=Auto rotation stop delay=//
526
  $html .= '<div class="single-settings scene-fade-duration autorotationdata" >';
527
+ $html .= '<span>'.__('Auto Rotation Stop Delay: ','wpvr').'</span>';
528
  $html .= '<input type="number" name="auto-rotation-stop-delay" value="'.$autorotationstopdelay.'" placeholder="2000" />';
529
  $html .= '<div class="field-tooltip">';
530
  $html .= '<i class="fa fa-question-circle"></i>';
532
  $html .= '</div>';
533
  $html .= '</div>';
534
  //=Auto rotation stop delay=//
535
+
536
  $html .='</div>';
537
  //---end general tab----
538
+
539
  $html .='<div class="rex-pano-tab" id="scenes">';
540
+
541
  //=Scene and Hotspot repeater=//
542
  if (empty($pano_data)) {
543
  $html .= '<div class="scene-setup rex-pano-sub-tabs" data-limit="'.$scene_limit.'">';
544
+
545
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
546
  $html .= '<ul>';
547
  $html .= '<li class="active"><span data-index="1" data-href="#scene-1"><i class="fa fa-image"></i></span></li>';
548
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
549
  $html .= '</ul>';
550
  $html .= '</nav>';
551
+
552
  $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
553
 
554
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
555
+
556
  $html .= '<div class="scene-content">';
557
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
558
 
559
  //==Set Default Scene==//
560
+ $html .= '<div class="single-settings dscene">';
561
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
562
  $html .= '<select class="dscen" name="dscene">';
563
  $html .= '<option value="on"> Yes</option>';
576
  $html .= '</div>';
577
 
578
  $html .= '<div class=scene-setting>';
579
+ $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
580
  $html .= '<div class="form-group">';
581
+ $html .= '<img src="" style="display: none;"><br>';
582
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
583
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
584
  $html .= '</div>';
585
  $html .= '</div>';
586
  $html .= '</div>';
587
+
588
  //--hotspot setup--
589
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
590
+
591
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
592
  $html .= '<ul>';
593
  $html .= '<li class="active"><span data-index="1" data-href="#scene-0-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
594
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
595
  $html .= '</ul>';
596
  $html .= '</nav>';
597
+
598
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
599
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-0-hotspot-1">';
600
+
601
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
602
+
603
  $html .= '<div class="wrapper">';
604
  $html .= '<div class="hotspot-setting">';
605
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
619
  $html .= '<div class="hotspot-setting">';
620
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
621
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
622
+ $html .= '</div>';
623
+
624
  $html .= '</div>';
625
+
626
  $html .= '<div class="hotspot-type hotspot-setting">';
627
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
628
  $html .= '<select name="hotspot-type">';
634
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').' </label>';
635
  $html .= '<input type="url" name="hotspot-url" value="" />';
636
  $html .= '</div>';
637
+
638
  $html .= '<div class="hotspot-content">';
639
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
640
  $html .= '<textarea name="hotspot-content"></textarea>';
641
  $html .= '</div>';
642
+
643
  $html .= '<div class="hotspot-hover">';
644
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
645
  $html .= '<textarea name="hotspot-hover"></textarea>';
651
  $html .= '<option value="none" selected> None</option>';
652
  $html .= '</select>';
653
  $html .= '</div>';
654
+
655
  $html .= '<div class="hotspot-scene" style="display:none;" >';
656
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').' </label>';
657
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
658
  $html .= '</div>';
659
+
660
  $html .= '</div>';
661
  //=Hotspot type End=//
662
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
663
  $html .= '</div>';
664
  $html .= '</div>';
665
+
666
  $html .= '</div>';
667
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
668
  $html .= '</div>';
669
 
670
 
671
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab active" data-title="1" id="scene-1">';
672
+
673
  $html .= '<div class="scene-content">';
674
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
675
 
676
  //==Set Default Scene==//
677
+ $html .= '<div class="single-settings dscene">';
678
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
679
  $html .= '<select class="dscen" name="dscene">';
680
  $html .= '<option value="on"> Yes</option>';
691
  $html .= '<div class=scene-setting>';
692
  $html .= '<label for="scene-type">'.__('Scene Type : ','wpvr').'</label>';
693
  $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
694
+ $html .= '</div>';
695
 
696
  $html .= '<div class=scene-setting>';
697
+ $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
698
  $html .= '<div class="form-group">';
699
+ $html .= '<img src="" style="display: none;"><br>';
700
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
701
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
702
  $html .= '</div>';
703
  $html .= '</div>';
704
  $html .= '</div>';
705
+
706
  //--hotspot setup--//
707
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
708
+
709
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
710
  $html .= '<ul>';
711
  $html .= '<li class="active"><span data-index="1" data-href="#scene-1-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
712
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
713
  $html .= '</ul>';
714
  $html .= '</nav>';
715
+
716
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
717
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-1-hotspot-1">';
718
+
719
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
720
+
721
  $html .= '<div class="wrapper">';
722
  $html .= '<div class="hotspot-setting">';
723
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
737
  $html .= '<div class="hotspot-setting">';
738
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
739
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
740
+ $html .= '</div>';
741
 
742
  $html .= '</div>';
743
+
744
  $html .= '<div class="hotspot-type hotspot-setting">';
745
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
746
  $html .= '<select name="hotspot-type">';
752
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').'</label>';
753
  $html .= '<input type="url" name="hotspot-url" value="" />';
754
  $html .= '</div>';
755
+
756
  $html .= '<div class="hotspot-content">';
757
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
758
  $html .= '<textarea name="hotspot-content"></textarea>';
759
  $html .= '</div>';
760
+
761
  $html .= '<div class="hotspot-hover">';
762
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
763
  $html .= '<textarea name="hotspot-hover"></textarea>';
764
  $html .= '</div>';
765
+
766
  $html .= '<div class="hotspot-scene" style="display:none;" >';
767
  $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ','wpvr').'</label>';
768
  $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
773
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').'</label>';
774
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
775
  $html .= '</div>';
776
+
777
  $html .= '</div>';
778
  //=Hotspot type End=//
779
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
780
  $html .= '</div>';
781
+ $html .= '</div>';
782
  $html .= '</div>';
783
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
784
  $html .= '</div>';
785
  $html .= '</div>';
786
+
787
+ $html .= '</div>';
788
  }
789
  else {
790
  $html .= '<div class="scene-setup rex-pano-sub-tabs" data-limit="'.$scene_limit.'">';
791
+
792
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
793
  $html .= '<ul>';
794
  $i = 1;
805
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
806
  $html .= '</ul>';
807
  $html .= '</nav>';
808
+
809
 
810
  $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
811
 
812
  //===Default empty repeater declared by nazmus sakib===//
813
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
814
+
815
  $html .= '<div class="scene-content">';
816
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
817
 
818
  //==Set Default Scene==//
819
+ $html .= '<div class="single-settings dscene">';
820
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
821
  $html .= '<select class="dscen" name="dscene">';
822
  $html .= '<option value="on"> Yes</option>';
835
  $html .= '</div>';
836
 
837
  $html .= '<div class=scene-setting>';
838
+ $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
839
  $html .= '<div class="form-group">';
840
+ $html .= '<img src="" style="display: none;"><br>';
841
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
842
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
843
  $html .= '</div>';
844
  $html .= '</div>';
845
  $html .= '</div>';
846
+
847
  //--hotspot setup--//
848
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
849
+
850
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
851
  $html .= '<ul>';
852
  $html .= '<li class="active"><span data-index="1" data-href="#scene-0-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
853
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
854
  $html .= '</ul>';
855
  $html .= '</nav>';
856
+
857
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
858
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-0-hotspot-1">';
859
+
860
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
861
+
862
  $html .= '<div class="wrapper">';
863
  $html .= '<div class="hotspot-setting">';
864
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
878
  $html .= '<div class="hotspot-setting">';
879
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
880
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
881
+ $html .= '</div>';
882
 
883
  $html .= '</div>';
884
+
885
  $html .= '<div class="hotspot-type hotspot-setting">';
886
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
887
  $html .= '<select name="hotspot-type">';
893
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').' </label>';
894
  $html .= '<input type="url" name="hotspot-url" value="" />';
895
  $html .= '</div>';
896
+
897
  $html .= '<div class="hotspot-content">';
898
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
899
  $html .= '<textarea name="hotspot-content"></textarea>';
900
  $html .= '</div>';
901
+
902
  $html .= '<div class="hotspot-hover">';
903
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
904
  $html .= '<textarea name="hotspot-hover"></textarea>';
910
  $html .= '<option value="none" selected> None</option>';
911
  $html .= '</select>';
912
  $html .= '</div>';
913
+
914
  $html .= '<div class="hotspot-scene" style="display:none;" >';
915
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').' </label>';
916
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
917
  $html .= '</div>';
918
+
919
  $html .= '</div>';
920
  //=Hotspot type End=//
921
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
922
  $html .= '</div>';
923
  $html .= '</div>';
924
+
925
  $html .= '</div>';
926
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
927
  $html .= '</div>';
944
  if (isset($pano_scenes["hotspot-list"])) {
945
  $pano_hotspots = $pano_scenes["hotspot-list"];
946
  }
947
+
948
  $firstvalueset = reset($pano_data["scene-list"]);
949
  if ($pano_scenes['scene-id'] == $firstvalueset['scene-id']) {
950
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab active" data-title="1" id="scene-'.$s.'">';
951
+
952
  $html .= '<div class="scene-content">';
953
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
954
  //==Set Default Scene==//
955
  if ($dscene == 'on') {
956
+ $html .= '<div class="single-settings dscene">';
957
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
958
  $html .= '<select class="dscen" name="dscene">';
959
  $html .= '<option value="on" selected > Yes</option>';
960
  $html .= '<option value="off"> No</option>';
961
  $html .= '</select>';
962
  $html .= '</div>';
963
+
964
  }
965
  else {
966
+ $html .= '<div class="single-settings dscene">';
967
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
968
  $html .= '<select class="dscen" name="dscene">';
969
  $html .= '<option value="on"> Yes</option>';
983
  $html .= '</div>';
984
 
985
  $html .= '<div class=scene-setting>';
986
+ $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
987
  $html .= '<div class="form-group">';
988
+ $html .= '<img name ="scene-photo" src="'.$scene_photo.'"> <br/>';
989
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
990
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="'.$scene_photo.'">';
991
  $html .= '</div>';
992
  $html .= '</div>';
993
+ $html .= '</div>';
994
+
995
  if (!empty($pano_hotspots)) {
996
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
997
+
998
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
999
  $html .= '<ul>';
1000
  $j = 1;
1002
  foreach ($pano_hotspots as $pano_hotspot) {
1003
 
1004
  if ($pano_hotspot['hotspot-title'] == $firstvaluehotspot['hotspot-title']) {
1005
+ $html .= '<li class="active"><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1006
  }
1007
  else {
1008
+ $html .= '<li><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1009
  }
1010
  $j++;
1011
  }
1012
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
1013
  $html .= '</ul>';
1014
  $html .= '</nav>';
1015
+
1016
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1017
 
1018
  $h = 1;
1041
 
1042
  if ($pano_hotspot['hotspot-title'] == $firstvaluehotspotset['hotspot-title']) {
1043
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1044
+
1045
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1046
+
1047
  $html .= '<div class="wrapper">';
1048
  $html .= '<div class="hotspot-setting">';
1049
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
1064
  $html .= '<div class="hotspot-setting">';
1065
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1066
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1067
+ $html .= '</div>';
1068
 
1069
  $html .= '</div>';
1070
+
1071
  //=Hotspot type=//
1072
  if ($hotspot_type == "info") {
1073
+
1074
  $html .= '<div class="hotspot-type hotspot-setting">';
1075
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1076
  $html .= '<select name="hotspot-type">';
1106
  $html .= '</div>';
1107
 
1108
  $html .= '</div>';
1109
+
1110
  }
1111
  else {
1112
+
1113
  $html .= '<div class="hotspot-type hotspot-setting">';
1114
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1115
  $html .= '<select class="trtr" name="hotspot-type">';
1145
  $html .= '</div>';
1146
 
1147
  $html .= '</div>';
1148
+
1149
  }
1150
  //=Hotspot type End=//
1151
+ $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1152
+ $html .= '</div>';
1153
  }
1154
  else {
1155
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1156
+
1157
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1158
+
1159
  $html .= '<div class="wrapper">';
1160
  $html .= '<div class="hotspot-setting">';
1161
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
1175
  $html .= '<div class="hotspot-setting">';
1176
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1177
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1178
+ $html .= '</div>';
1179
 
1180
  $html .= '</div>';
1181
+
1182
  //=Hotspot type=//
1183
  if ($hotspot_type == "info") {
1184
+
1185
  $html .= '<div class="hotspot-type hotspot-setting">';
1186
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1187
  $html .= '<select name="hotspot-type">';
1217
  $html .= '</div>';
1218
 
1219
  $html .= '</div>';
1220
+
1221
  }
1222
  else {
1223
+
1224
  $html .= '<div class="hotspot-type hotspot-setting">';
1225
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1226
  $html .= '<select class="trtr" name="hotspot-type">';
1256
  $html .= '</div>';
1257
 
1258
  $html .= '</div>';
1259
+
1260
  }
1261
  //=Hotspot type End=//
1262
+ $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1263
  $html .= '</div>';
1264
  }
1265
  $h++;
1266
  }
1267
  $html .= '</div>';
1268
+ $html .= '</div>';
1269
  }
1270
  else {
1271
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1272
+
1273
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1274
  $html .= '<ul>';
1275
  $html .= '<li class="active"><span data-index="1" data-href="#scene-'.$s.'-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
1276
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
1277
  $html .= '</ul>';
1278
  $html .= '</nav>';
1279
+
1280
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1281
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-1">';
1282
+
1283
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1284
+
1285
  $html .= '<div class="wrapper">';
1286
  $html .= '<div class="hotspot-setting">';
1287
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
1301
  $html .= '<div class="hotspot-setting">';
1302
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1303
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1304
+ $html .= '</div>';
1305
 
1306
  $html .= '</div>';
1307
+
1308
  $html .= '<div class="hotspot-type hotspot-setting">';
1309
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1310
  $html .= '<select name="hotspot-type">';
1316
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').'</label>';
1317
  $html .= '<input type="url" name="hotspot-url" value="" />';
1318
  $html .= '</div>';
1319
+
1320
  $html .= '<div class="hotspot-content">';
1321
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
1322
  $html .= '<textarea name="hotspot-content"></textarea>';
1323
  $html .= '</div>';
1324
+
1325
  $html .= '<div class="hotspot-hover">';
1326
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
1327
  $html .= '<textarea name="hotspot-hover"></textarea>';
1328
  $html .= '</div>';
1329
+
1330
  $html .= '<div class="hotspot-scene" style="display:none;" >';
1331
  $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ','wpvr').'</label>';
1332
  $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1337
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').'</label>';
1338
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1339
  $html .= '</div>';
1340
+
1341
  $html .= '</div>';
1342
  //=Hotspot type End=//
1343
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1344
  $html .= '</div>';
1345
+ $html .= '</div>';
1346
  $html .= '</div>';
1347
  }
1348
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
1350
  }
1351
  else {
1352
  $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="1" id="scene-'.$s.'">';
1353
+
1354
  $html .= '<div class="scene-content">';
1355
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
1356
 
1357
  //==Set Default Scene==//
1358
  if ($dscene == 'on') {
1359
+ $html .= '<div class="single-settings dscene">';
1360
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
1361
  $html .= '<select class="dscen" name="dscene">';
1362
  $html .= '<option value="on" selected > Yes</option>';
1363
  $html .= '<option value="off"> No</option>';
1364
  $html .= '</select>';
1365
  $html .= '</div>';
1366
+
1367
  }
1368
  else {
1369
+ $html .= '<div class="single-settings dscene">';
1370
  $html .= '<span>'.__('Set as default: ','wpvr').'</span>';
1371
  $html .= '<select class="dscen" name="dscene">';
1372
  $html .= '<option value="on"> Yes</option>';
1387
  $html .= '</div>';
1388
 
1389
  $html .= '<div class=scene-setting>';
1390
+ $html .= '<label for="scene-upload">'.__('Scene Upload: ','wpvr').'</label>';
1391
  $html .= '<div class="form-group">';
1392
+ $html .= '<img name ="scene-photo" src="'.$scene_photo.'"> <br/>';
1393
  $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
1394
  $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="'.$scene_photo.'">';
1395
  $html .= '</div>';
1396
  $html .= '</div>';
1397
+ $html .= '</div>';
1398
+
1399
  if (!empty($pano_hotspots)) {
1400
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1401
+
1402
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1403
  $html .= '<ul>';
1404
  $j = 1;
1405
  foreach ($pano_hotspots as $pano_hotspot) {
1406
  if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
1407
+ $html .= '<li class="active"><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1408
  }
1409
  else {
1410
+ $html .= '<li><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1411
  }
1412
  $j++;
1413
  }
1414
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
1415
  $html .= '</ul>';
1416
  $html .= '</nav>';
1417
+
1418
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1419
+
1420
  $h = 1;
1421
  foreach ($pano_hotspots as $pano_hotspot) {
1422
  $hotspot_title = '';
1442
 
1443
  if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
1444
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1445
+
1446
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1447
+
1448
  $html .= '<div class="wrapper">';
1449
  $html .= '<div class="hotspot-setting">';
1450
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
1464
  $html .= '<div class="hotspot-setting">';
1465
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1466
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1467
+ $html .= '</div>';
1468
 
1469
  $html .= '</div>';
1470
+
1471
  //=Hotspot type=//
1472
  if ($hotspot_type == "info") {
1473
+
1474
  $html .= '<div class="hotspot-type hotspot-setting">';
1475
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1476
  $html .= '<select name="hotspot-type">';
1506
  $html .= '</div>';
1507
 
1508
  $html .= '</div>';
1509
+
1510
  }
1511
  else {
1512
+
1513
  $html .= '<div class="hotspot-type hotspot-setting">';
1514
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1515
  $html .= '<select class="trtr" name="hotspot-type">';
1545
  $html .= '</div>';
1546
 
1547
  $html .= '</div>';
1548
+
1549
  }
1550
  //=Hotspot type End=//
1551
+ $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1552
+ $html .= '</div>';
1553
  }
1554
  else {
1555
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1556
+
1557
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting</h6>';
1558
+
1559
  $html .= '<div class="wrapper">';
1560
  $html .= '<div class="hotspot-setting">';
1561
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
1575
  $html .= '<div class="hotspot-setting">';
1576
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1577
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1578
+ $html .= '</div>';
1579
 
1580
  $html .= '</div>';
1581
+
1582
  //=Hotspot type=//
1583
  if ($hotspot_type == "info") {
1584
+
1585
  $html .= '<div class="hotspot-type hotspot-setting">';
1586
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1587
  $html .= '<select name="hotspot-type">';
1617
  $html .= '</div>';
1618
 
1619
  $html .= '</div>';
1620
+
1621
  }
1622
  else {
1623
+
1624
  $html .= '<div class="hotspot-type hotspot-setting">';
1625
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1626
  $html .= '<select class="trtr" name="hotspot-type">';
1656
  $html .= '</div>';
1657
 
1658
  $html .= '</div>';
1659
+
1660
  }
1661
  //=Hotspot type End=//
1662
+ $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1663
  $html .= '</div>';
1664
  }
1665
  $h++;
1666
  }
1667
  $html .= '</div>';
1668
+ $html .= '</div>';
1669
  }
1670
  else {
1671
  $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1672
+
1673
  $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1674
  $html .= '<ul>';
1675
  $html .= '<li class="active"><span data-index="1" data-href="#scene-'.$s.'-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
1676
  $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
1677
  $html .= '</ul>';
1678
  $html .= '</nav>';
1679
+
1680
  $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1681
  $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-1">';
1682
+
1683
  $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1684
+
1685
  $html .= '<div class="wrapper">';
1686
  $html .= '<div class="hotspot-setting">';
1687
  $html .= '<label for="hotspot-title">'.__('Hotspot ID : ','wpvr').'</label>';
1701
  $html .= '<div class="hotspot-setting">';
1702
  $html .= '<label for="hotspot-customclass">'.__('Hotspot custom icon class: ','wpvr').'</label>';
1703
  $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1704
+ $html .= '</div>';
1705
 
1706
  $html .= '</div>';
1707
+
1708
  $html .= '<div class="hotspot-type hotspot-setting">';
1709
  $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ','wpvr').'</label>';
1710
  $html .= '<select name="hotspot-type">';
1716
  $html .= '<label for="hotspot-url">'.__('URL: ','wpvr').'</label>';
1717
  $html .= '<input type="url" name="hotspot-url" value="" />';
1718
  $html .= '</div>';
1719
+
1720
  $html .= '<div class="hotspot-content">';
1721
  $html .= '<label for="hotspot-content">'.__('On click Content: ','wpvr').'</label>';
1722
  $html .= '<textarea name="hotspot-content"></textarea>';
1723
  $html .= '</div>';
1724
+
1725
  $html .= '<div class="hotspot-hover">';
1726
  $html .= '<label for="hotspot-hover">'.__('On hover Content: ','wpvr').'</label>';
1727
  $html .= '<textarea name="hotspot-hover"></textarea>';
1728
  $html .= '</div>';
1729
+
1730
  $html .= '<div class="hotspot-scene" style="display:none;" >';
1731
  $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ','wpvr').'</label>';
1732
  $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1737
  $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ','wpvr').'</label>';
1738
  $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1739
  $html .= '</div>';
1740
+
1741
  $html .= '</div>';
1742
  //=Hotspot type End=//
1743
  $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1744
  $html .= '</div>';
1745
+ $html .= '</div>';
1746
  $html .= '</div>';
1747
  }
1748
  $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
1751
  $s++;
1752
  }
1753
  $html .= '</div>';
1754
+
1755
  $html .= '</div>';
1756
  }
1757
+
1758
  $html .= '<div class="preview-btn-wrapper">';
1759
  $html .= '<div class="preview-btn-area clearfix">';
1760
+
1761
  $html .= '<button id="panolenspreview">'.__('Preview','wpvr').'</button>';
1762
  $html .= '</div>';
1763
  $html .= '</div>';
1788
  else {
1789
  $vidcontrol_off = 'checked';
1790
  }
1791
+ $html .= '<div class="single-settings videosetup">';
1792
  $html .= '<span>Enable Video: </span>';
1793
  $html .= '<ul>';
1794
  $html .= '<li class="radio-btn">';
1795
  $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" >';
1796
  $html .= '<label for="styled-radio">Off</label>';
1797
  $html .= '</li>';
1798
+
1799
  $html .= '<li class="radio-btn">';
1800
  $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" checked>';
1801
  $html .= '<label for="styled-radio-0">On</label>';
1802
  $html .= '</li>';
1803
  $html .= '</ul>';
1804
  $html .= '</div>';
1805
+
1806
 
1807
  $html .= '<div class="video-setting" style="display:none;">';
1808
+ $html .= '<div class="single-settings">';
1809
+ $html .= '<span>Upload or add link: </span>';
1810
+ $html .= '<div class="form-group">';
1811
  $html .= '<input type="text" name="video-attachment-url" placeholder="Paste Youtube or Vimeo link or upload" class="video-attachment-url" value="'.$postdata['vidurl'].'">';
1812
  $html .= '<input type="button" class="video-upload" data-info="" value="Upload" />';
1813
  $html .= '</div>';
1816
  $html .= '</div>';
1817
  }
1818
  else {
1819
+ $html .= '<div class="single-settings videosetup">';
1820
  $html .= '<span>Enable Video: </span>';
1821
  $html .= '<ul>';
1822
  $html .= '<li class="radio-btn">';
1823
  $html .= '<input class="styled-radio" id="styled-radio" type="radio" name="panovideo" value="off" checked >';
1824
  $html .= '<label for="styled-radio">Off</label>';
1825
  $html .= '</li>';
1826
+
1827
  $html .= '<li class="radio-btn">';
1828
  $html .= '<input class="styled-radio" id="styled-radio-0" type="radio" name="panovideo" value="on" >';
1829
  $html .= '<label for="styled-radio-0">On</label>';
1830
  $html .= '</li>';
1831
  $html .= '</ul>';
1832
  $html .= '</div>';
1833
+
1834
  //==Video setup end==//
1835
+
1836
  //==Video Setting==/
1837
  $html .= '<div class="video-setting" style="display:none;">';
1838
+ $html .= '<div class="single-settings">';
1839
+ $html .= '<span>Upload or add link: </span>';
1840
+ $html .= '<div class="form-group">';
1841
  $html .= '<input type="text" placeholder="Paste Youtube or Vimeo link or upload" name="video-attachment-url" class="video-attachment-url" value="">';
1842
  $html .= '<input type="button" class="video-upload" data-info="" value="Upload"/>';
1843
  $html .= '</div>';
1845
  $html .= '<button id="videopreview">Preview</button>';
1846
  $html .= '</div>';
1847
  }
1848
+ //==Video Setting End==//
1849
  $html .='</div>';
1850
  //---end video tab----
1851
  $html .='</div>';
1852
+ //---end rex-pano-tab-content----
1853
  $html .='</div>';
1854
  //---end rex-pano-tabs---
1855
+ $html .= '</div>';
1856
  echo $html;
1857
  }
1858
 
1859
+ }
admin/class-wpvr-ajax.php CHANGED
@@ -306,7 +306,7 @@ class Wpvr_Ajax {
306
  $scene_data = array();
307
 
308
  foreach ($panodata["scene-list"] as $panoscenes) {
309
-
310
  if (!empty($panoscenes['scene-id'])) {
311
 
312
  $scene_ititle = '';
@@ -376,7 +376,7 @@ class Wpvr_Ajax {
376
  "sceneId"=>$hotspot_data["hotspot-scene"],
377
  "targetPitch"=>(float)$hotspot_data["hotspot-scene-pitch"],
378
  "targetYaw"=>(float)$hotspot_data["hotspot-scene-yaw"]);
379
- array_push($hotspots, $hotspot_info);
380
  if (empty($hotspot_data["hotspot-scene"])) {
381
  unset($hotspot_info['targetPitch']);
382
  unset($hotspot_info['targetYaw']);
@@ -398,7 +398,7 @@ class Wpvr_Ajax {
398
  if (empty($panoscenes["scene-author"])) {
399
  unset($scene_info['author']);
400
  }
401
-
402
  if ($panoscenes["cvgscene"] == "off") {
403
  unset($scene_info['maxPitch']);
404
  unset($scene_info['minPitch']);
@@ -434,7 +434,7 @@ class Wpvr_Ajax {
434
  $scene_array = array(
435
  $panoscenes["scene-id"]=>$scene_info
436
  );
437
- $scene_data[$panoscenes["scene-id"]] = $scene_info;
438
  }
439
 
440
  }
@@ -486,7 +486,7 @@ class Wpvr_Ajax {
486
  $foundid = $explodeid[1];
487
  $html = '';
488
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
489
-
490
  } elseif (strpos($videourl, 'youtu.be') > 0) {
491
  $vidtype = 'youtube';
492
  $explodeid = '';
@@ -495,7 +495,7 @@ class Wpvr_Ajax {
495
  $foundid = $explodeid[3];
496
  $html = '';
497
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
498
-
499
  }
500
  elseif (strpos($videourl, 'vimeo') > 0) {
501
  $vidtype = 'vimeo';
@@ -505,7 +505,7 @@ class Wpvr_Ajax {
505
  $foundid = $explodeid[3];
506
  $html = '';
507
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="600" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
508
-
509
  } else {
510
  $vidtype = 'selfhost';
511
  $vidautoplay = '';
@@ -532,7 +532,7 @@ class Wpvr_Ajax {
532
  $html .= '<p class="vjs-no-js">';
533
  $html .= 'To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com html5-video-support/" target="_blank">supports HTML5 video</a>';
534
  $html .= '</p>';
535
- $html .= '</video>';
536
  }
537
 
538
  $response = array();
@@ -564,7 +564,7 @@ class Wpvr_Ajax {
564
  $foundid = $explodeid[1];
565
  $html = '';
566
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
567
-
568
  } elseif (strpos($videourl, 'youtu.be') > 0) {
569
  $vidtype = 'youtube';
570
  $explodeid = '';
@@ -573,7 +573,7 @@ class Wpvr_Ajax {
573
  $foundid = $explodeid[3];
574
  $html = '';
575
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
576
-
577
  }
578
 
579
  elseif (strpos($videourl, 'vimeo') > 0) {
@@ -584,7 +584,7 @@ class Wpvr_Ajax {
584
  $foundid = $explodeid[3];
585
  $html = '';
586
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="600" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
587
-
588
  } else {
589
  $vidtype = 'selfhost';
590
  $vidautoplay = '';
@@ -613,11 +613,11 @@ class Wpvr_Ajax {
613
  $html .= '</p>';
614
  $html .= '</video>';
615
  }
616
-
617
  $videoarray = array();
618
- $videoarray = array(__( "panoid" )=>$panoid,__( "panoviddata" )=>$html,__( "vidid" )=>$vidid,__( "vidurl" )=>$videourl,__( "vidautoplay" )=>$vidautoplay,__( "vidcontrol" )=>$vidcontrol,__( "vidtype" )=>$vidtype);
619
  update_post_meta( $postid, 'panodata', $videoarray );
620
- die();
621
  }
622
 
623
 
@@ -637,7 +637,7 @@ class Wpvr_Ajax {
637
  else {
638
  $gyro = false;
639
  }
640
-
641
  $compass = sanitize_text_field($_POST['compass']);
642
  if ($compass == 'on') {
643
  $compass = true;
@@ -697,7 +697,7 @@ class Wpvr_Ajax {
697
 
698
  if ($panodata["scene-list"] != "") {
699
  foreach ($panodata["scene-list"] as $scenes_val) {
700
-
701
  $scene_id_validate = $scenes_val["scene-id"];
702
  if (!empty($scene_id_validate)) {
703
  $scene_id_validated = preg_replace('/[^0-9a-zA-Z_]/',"",$scene_id_validate);
@@ -917,16 +917,16 @@ class Wpvr_Ajax {
917
  }
918
 
919
  $panolength = count($panodata["scene-list"]);
920
- for ($i=0; $i < $panolength; $i++) {
921
  if (empty($panodata["scene-list"][$i]['scene-id'])) {
922
  unset($panodata["scene-list"][$i]);
923
  }
924
  else {
925
  $panohotspotlength = count($panodata["scene-list"][$i]['hotspot-list']);
926
- for ($j=0; $j < $panohotspotlength; $j++) {
927
  if (empty($panodata["scene-list"][$i]['hotspot-list'][$j]['hotspot-title'])) {
928
  unset($panodata["scene-list"][$i]['hotspot-list'][$j]);
929
- }
930
  }
931
  }
932
  }
@@ -950,8 +950,103 @@ class Wpvr_Ajax {
950
  if (empty($autorotationstopdelay)) {
951
  unset($pano_array['autoRotateStopDelay']);
952
  }
953
-
954
  update_post_meta( $postid, 'panodata', $pano_array );
955
  die();
956
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
957
  }
306
  $scene_data = array();
307
 
308
  foreach ($panodata["scene-list"] as $panoscenes) {
309
+
310
  if (!empty($panoscenes['scene-id'])) {
311
 
312
  $scene_ititle = '';
376
  "sceneId"=>$hotspot_data["hotspot-scene"],
377
  "targetPitch"=>(float)$hotspot_data["hotspot-scene-pitch"],
378
  "targetYaw"=>(float)$hotspot_data["hotspot-scene-yaw"]);
379
+ array_push($hotspots, $hotspot_info);
380
  if (empty($hotspot_data["hotspot-scene"])) {
381
  unset($hotspot_info['targetPitch']);
382
  unset($hotspot_info['targetYaw']);
398
  if (empty($panoscenes["scene-author"])) {
399
  unset($scene_info['author']);
400
  }
401
+
402
  if ($panoscenes["cvgscene"] == "off") {
403
  unset($scene_info['maxPitch']);
404
  unset($scene_info['minPitch']);
434
  $scene_array = array(
435
  $panoscenes["scene-id"]=>$scene_info
436
  );
437
+ $scene_data[$panoscenes["scene-id"]] = $scene_info;
438
  }
439
 
440
  }
486
  $foundid = $explodeid[1];
487
  $html = '';
488
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
489
+
490
  } elseif (strpos($videourl, 'youtu.be') > 0) {
491
  $vidtype = 'youtube';
492
  $explodeid = '';
495
  $foundid = $explodeid[3];
496
  $html = '';
497
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
498
+
499
  }
500
  elseif (strpos($videourl, 'vimeo') > 0) {
501
  $vidtype = 'vimeo';
505
  $foundid = $explodeid[3];
506
  $html = '';
507
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="600" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
508
+
509
  } else {
510
  $vidtype = 'selfhost';
511
  $vidautoplay = '';
532
  $html .= '<p class="vjs-no-js">';
533
  $html .= 'To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com html5-video-support/" target="_blank">supports HTML5 video</a>';
534
  $html .= '</p>';
535
+ $html .= '</video>';
536
  }
537
 
538
  $response = array();
564
  $foundid = $explodeid[1];
565
  $html = '';
566
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
567
+
568
  } elseif (strpos($videourl, 'youtu.be') > 0) {
569
  $vidtype = 'youtube';
570
  $explodeid = '';
573
  $foundid = $explodeid[3];
574
  $html = '';
575
  $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/'.$foundid.'" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
576
+
577
  }
578
 
579
  elseif (strpos($videourl, 'vimeo') > 0) {
584
  $foundid = $explodeid[3];
585
  $html = '';
586
  $html .= '<iframe src="https://player.vimeo.com/video/'.$foundid.'" width="600" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
587
+
588
  } else {
589
  $vidtype = 'selfhost';
590
  $vidautoplay = '';
613
  $html .= '</p>';
614
  $html .= '</video>';
615
  }
616
+
617
  $videoarray = array();
618
+ $videoarray = array(__( "panoid" )=>$panoid,__( "panoviddata" )=>$html,__( "vidid" )=>$vidid,__( "vidurl" )=>$videourl,__( "vidautoplay" )=>$vidautoplay,__( "vidcontrol" )=>$vidcontrol,__( "vidtype" )=>$vidtype);
619
  update_post_meta( $postid, 'panodata', $videoarray );
620
+ die();
621
  }
622
 
623
 
637
  else {
638
  $gyro = false;
639
  }
640
+
641
  $compass = sanitize_text_field($_POST['compass']);
642
  if ($compass == 'on') {
643
  $compass = true;
697
 
698
  if ($panodata["scene-list"] != "") {
699
  foreach ($panodata["scene-list"] as $scenes_val) {
700
+
701
  $scene_id_validate = $scenes_val["scene-id"];
702
  if (!empty($scene_id_validate)) {
703
  $scene_id_validated = preg_replace('/[^0-9a-zA-Z_]/',"",$scene_id_validate);
917
  }
918
 
919
  $panolength = count($panodata["scene-list"]);
920
+ for ($i=0; $i < $panolength; $i++) {
921
  if (empty($panodata["scene-list"][$i]['scene-id'])) {
922
  unset($panodata["scene-list"][$i]);
923
  }
924
  else {
925
  $panohotspotlength = count($panodata["scene-list"][$i]['hotspot-list']);
926
+ for ($j=0; $j < $panohotspotlength; $j++) {
927
  if (empty($panodata["scene-list"][$i]['hotspot-list'][$j]['hotspot-title'])) {
928
  unset($panodata["scene-list"][$i]['hotspot-list'][$j]);
929
+ }
930
  }
931
  }
932
  }
950
  if (empty($autorotationstopdelay)) {
951
  unset($pano_array['autoRotateStopDelay']);
952
  }
953
+
954
  update_post_meta( $postid, 'panodata', $pano_array );
955
  die();
956
  }
957
+
958
+ function wpvr_file_import() {
959
+ set_time_limit(20000000000000000);
960
+ wpvr_delete_temp_file();
961
+ if ($_POST['fileurl']) {
962
+ WP_Filesystem();
963
+ $file_save_url = wp_upload_dir();
964
+ $fileurl = $_POST['fileurl'];
965
+ $attachment_id = $_POST['data_id'];
966
+ $zip_file_path = get_attached_file( $attachment_id );
967
+ $unzipfile = unzip_file($zip_file_path,$file_save_url['basedir'].'/wpvr/temp/');
968
+
969
+ if ( is_wp_error( $unzipfile ) ) {
970
+ wpvr_delete_temp_file();
971
+ wp_send_json_error('Failed to unzip file');
972
+ }
973
+ $result = glob($file_save_url["basedir"].'/wpvr/temp/*.json');
974
+ if (!$result) {
975
+ wpvr_delete_temp_file();
976
+ wp_send_json_error('Tour json file not found');
977
+ }
978
+ $tour_json = $result[0];
979
+ $arrContextOptions=array(
980
+ "ssl"=>array(
981
+ "verify_peer"=>false,
982
+ "verify_peer_name"=>false,
983
+ ),
984
+ );
985
+ $getfile = file_get_contents($tour_json, false, stream_context_create($arrContextOptions));
986
+ $file_content = json_decode($getfile, true);
987
+
988
+ $new_title = $file_content['title'];
989
+ $new_data = $file_content['data'];
990
+ $new_post_id = wp_insert_post( array(
991
+ 'post_title' => $new_title,
992
+ 'post_type' => 'wpvr_item',
993
+ 'post_status' => 'publish',
994
+ ) );
995
+ if ($new_post_id) {
996
+ if ($new_data['panoid']) {
997
+ $new_data['panoid'] = 'pano'.$new_post_id;
998
+ }
999
+ if ($new_data['preview']) {
1000
+ $preview_url = $file_save_url['baseurl'].'/wpvr/temp/scene_preview.jpg';
1001
+ $media_get = wpvr_handle_media_import($preview_url, $new_post_id);
1002
+ if ($media_get['status'] == 'error') {
1003
+ wp_delete_post($new_post_id, true);
1004
+ wpvr_delete_temp_file();
1005
+ wp_send_json_error($media_get['message']);
1006
+ }
1007
+ elseif ($media_get['status'] == 'success') {
1008
+ $new_data['preview'] = $media_get['message'];
1009
+ }
1010
+ else {
1011
+ wp_delete_post($new_post_id, true);
1012
+ wpvr_delete_temp_file();
1013
+ wp_send_json_error('Media transfer process failed');
1014
+ }
1015
+ }
1016
+ if ($new_data['panodata']) {
1017
+
1018
+ if ($new_data['panodata']["scene-list"]) {
1019
+
1020
+ foreach ($new_data['panodata']["scene-list"] as $key => $panoscenes) {
1021
+ if ($panoscenes["scene-attachment-url"]) {
1022
+ $scene_id = $panoscenes['scene-id'];
1023
+ $url = $file_save_url['baseurl'].'/wpvr/temp/'.$scene_id.'.jpg';
1024
+ $media_get = wpvr_handle_media_import($url, $new_post_id);
1025
+ if ($media_get['status'] == 'error') {
1026
+ wp_delete_post($new_post_id, true);
1027
+ wpvr_delete_temp_file();
1028
+ wp_send_json_error($media_get['message']);
1029
+ }
1030
+ elseif ($media_get['status'] == 'success') {
1031
+ $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1032
+ }
1033
+ else {
1034
+ wp_delete_post($new_post_id, true);
1035
+ wpvr_delete_temp_file();
1036
+ wp_send_json_error('Media transfer process failed');
1037
+ }
1038
+ }
1039
+ }
1040
+ }
1041
+ update_post_meta( $new_post_id, 'panodata', $new_data );
1042
+ wpvr_delete_temp_file();
1043
+ }
1044
+ }
1045
+ }
1046
+ else {
1047
+ wpvr_delete_temp_file();
1048
+ wp_send_json_error('No file found to import');
1049
+ }
1050
+ die();
1051
+ }
1052
  }
admin/css/wpvr-admin.css CHANGED
@@ -10,6 +10,33 @@
10
  width: 30px;
11
  background: url('../images/icon.png') no-repeat center center / 100% 100%;
12
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  div.custom-tooltip span {
14
  visibility: hidden;
15
  position: absolute;
10
  width: 30px;
11
  background: url('../images/icon.png') no-repeat center center / 100% 100%;
12
  }
13
+ .vr-export {
14
+ color: #fff!important;
15
+ background-color: #2196F3!important;
16
+ border: none;
17
+ display: inline-block;
18
+ padding: 8px 16px;
19
+ vertical-align: middle;
20
+ overflow: hidden;
21
+ text-decoration: none;
22
+ color: inherit;
23
+ background-color: inherit;
24
+ text-align: center;
25
+ cursor: pointer;
26
+ white-space: nowrap;
27
+ }
28
+ .rex-pano-tab-content ::-webkit-input-placeholder {
29
+ color: #ccc;
30
+ }
31
+
32
+ .rex-pano-tab-content ::-moz-placeholder {
33
+ color: #ccc;
34
+ }
35
+
36
+ .rex-pano-tab-content :-ms-input-placeholder {
37
+ color: #ccc;
38
+ }
39
+
40
  div.custom-tooltip span {
41
  visibility: hidden;
42
  position: absolute;
admin/js/wpvr-admin.js CHANGED
@@ -36,7 +36,7 @@
36
 
37
  j= $('#scene-1').find('.hotspot-nav li').eq(-2).find('span').attr('data-index');
38
  var ajaxurl = wpvr_obj.ajaxurl;
39
- $('#panolenspreview').on('click', function(e){
40
  e.preventDefault();
41
  var postid = $("#post_ID").val();
42
  var autoload = $("input[name='autoload']:checked").val();
@@ -55,7 +55,7 @@
55
  jQuery.ajax({
56
  type: "POST",
57
  url: ajaxurl,
58
- data: {
59
  action: "wpvr_preview",
60
  postid: postid,
61
  compass: compass,
@@ -71,7 +71,7 @@
71
  preview: preview,
72
  scenefadeduration: scenefadeduration,
73
  },
74
-
75
  success: function( response ){
76
  if (response.success == true) {
77
  $('#error_occured').hide();
@@ -80,18 +80,18 @@
80
  var scenes = response.data[1];
81
 
82
  if (scenes) {
83
- $.each(scenes.scenes, function (i) {
84
- $.each(scenes.scenes[i]['hotSpots'], function (key, val) {
85
  if (val["clickHandlerArgs"] != "") {
86
  val["clickHandlerFunc"] = wpvrhotspot;
87
  }
88
  if (val["createTooltipArgs"] != "") {
89
  val["createTooltipFunc"] = wpvrtooltip;
90
- }
91
  });
92
  });
93
  }
94
- var panoshow = pannellum.viewer(response.data[0]["panoid"], scenes);
95
  }
96
  else {
97
  $('#error_occured').show();
@@ -106,27 +106,27 @@
106
  }
107
  });
108
  });
109
- });
110
 
111
  jQuery(document).ready(function($){
112
  var ajaxurl = wpvr_obj.ajaxurl;
113
- $('#videopreview').on('click', function(e){
114
  e.preventDefault();
115
  var postid = $("#post_ID").val();
116
  var videourl = $("input[name='video-attachment-url']").val();
117
  var vidautoplay = $("input[name='playvideo']:checked").val();
118
- var vidcontrol = $("input[name='playcontrol']:checked").val();
119
  jQuery.ajax({
120
  type: "POST",
121
  url: ajaxurl,
122
- data: {
123
  action: "wpvrvideo_preview",
124
  postid: postid,
125
  videourl: videourl,
126
  vidautoplay: vidautoplay,
127
  vidcontrol: vidcontrol,
128
  },
129
-
130
  success: function( response ){
131
  if (response.success == true) {
132
  $('#'+response.data["panoid"]).empty();
@@ -168,7 +168,7 @@
168
  var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
169
 
170
  var scenefadeduration = $("input[name='scene-fade-duration']").val();
171
-
172
  if ($('.scene-setup')[0]) {
173
  var panodata = $('.scene-setup').repeaterVal();
174
  var panolist = JSON.stringify(panodata);
@@ -180,7 +180,7 @@
180
 
181
  type: "POST",
182
  url: ajaxurl,
183
- data: {
184
  action: "wpvr_save",
185
  postid: postid,
186
  panovideo: panovideo,
@@ -197,7 +197,7 @@
197
  autorotationstopdelay: autorotationstopdelay,
198
  scenefadeduration: scenefadeduration,
199
  },
200
-
201
  success: function( response ){
202
  if (response.success == false) {
203
  $('#error_occured').show();
@@ -216,8 +216,8 @@
216
  }
217
  }
218
  });
219
- }
220
- });
221
  });
222
 
223
  jQuery(document).ready(function($){
@@ -225,11 +225,11 @@
225
  $("#error_occured").hide();
226
  $('body').removeClass('error-overlay');
227
  });
228
-
229
  $("#panolenspreview, #error_occured").on("click", function(e){
230
  e.stopPropagation();
231
  });
232
- });
233
 
234
  jQuery(document).ready(function($){
235
 
@@ -252,7 +252,7 @@
252
  var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
253
 
254
  var scenefadeduration = $("input[name='scene-fade-duration']").val();
255
-
256
  if ($('.scene-setup')[0]) {
257
  var panodata = $('.scene-setup').repeaterVal();
258
  var panolist = JSON.stringify(panodata);
@@ -264,7 +264,7 @@
264
 
265
  type: "POST",
266
  url: ajaxurl,
267
- data: {
268
  action: "wpvr_save",
269
  postid: postid,
270
  panovideo: panovideo,
@@ -281,7 +281,7 @@
281
  autorotationstopdelay: autorotationstopdelay,
282
  scenefadeduration: scenefadeduration,
283
  },
284
-
285
  success: function( response ){
286
  if (response.success == false) {
287
  $('#error_occured').show();
@@ -300,9 +300,9 @@
300
  }
301
  }
302
  });
303
- }
304
- });
305
- });
306
 
307
  function wpvrhotspot(hotSpotDiv, args) {
308
  var argst = args.replace(/\\/g, '');
@@ -334,9 +334,9 @@
334
 
335
  var i = $('.scene-nav li').eq(-2).find('span').attr('data-index');
336
  i = parseInt(i);
337
-
338
  $('.scene-setup').repeater({
339
-
340
  defaultValues: {
341
  'scene-type': 'equirectangular',
342
  'dscene': 'off',
@@ -348,19 +348,19 @@
348
  show: function () {
349
 
350
  if( $(this).parents(".scene-setup").attr("data-limit").length > 0 ){
351
-
352
  if( $(this).parents(".scene-setup").find("div[data-repeater-item]:not(.hotspot-setup div[data-repeater-item])").length <= $(this).parents(".scene-setup").attr("data-limit") ){
353
-
354
  $(this).slideDown();
355
  $(this).removeClass('active');
356
 
357
  i=i+1;
358
  var scene = 'scene-'+i;
359
-
360
  $(this).find(".title .scene-num").html(i);
361
-
362
  $('<li><span data-index="'+ i +'" data-href="#'+ scene +'"><i class="fa fa-image"></i></span></li>').insertBefore($(this).parent().parent('.scene-setup').find('.scene-nav ul li:last-child'));
363
-
364
  $(this).attr('id', scene);
365
  changehotspotid(i);
366
  $(this).siblings('.active').removeClass('active');
@@ -374,15 +374,15 @@
374
  } else {
375
  jQuery(this).slideDown();
376
  $(this).removeClass('active');
377
-
378
  i=i+1;
379
  var scene = 'scene-'+i;
380
 
381
-
382
  $(this).find(".title .scene-num").html(i);
383
-
384
  $('<li><span data-index="'+ i +'" data-href="#'+ scene +'"><i class="fa fa-image"></i></span></li>').insertBefore($(this).parent().parent('.scene-setup').find('.scene-nav ul li:last-child'));
385
-
386
  $(this).attr('id', scene);
387
  changehotspotid(i);
388
  }
@@ -390,13 +390,13 @@
390
  $(this).hide();
391
  },
392
  hide: function (deleteElement) {
393
-
394
  var hide_id = $(this).attr("id");
395
  hide_id = "#"+hide_id;
396
-
397
  var current = $(this).attr('id');
398
  var fchild = $('.single-scene:nth-child(2)').attr('id');
399
-
400
  if(confirm('Are you sure you want to delete?')) {
401
  jQuery(this).slideUp(deleteElement);
402
  if(current == fchild){
@@ -412,7 +412,7 @@
412
  }
413
  $(this).parent().parent('.scene-setup').find('.scene-nav li span[data-href="'+hide_id+'"]').parent("li").remove();
414
  setTimeout(deleteinfodata, 1000);
415
- }
416
  },
417
 
418
  repeaters: [{
@@ -424,7 +424,7 @@
424
  show: function () {
425
 
426
  if( $(this).parents(".hotspot-setup").attr("data-limit").length > 0 ){
427
-
428
  if( $(this).parents(".hotspot-setup").find("div[data-repeater-item]").length <= $(this).parents(".hotspot-setup").attr("data-limit") ){
429
 
430
  $(this).slideDown();
@@ -433,18 +433,18 @@
433
  $(this).addClass('active');
434
  j = parseInt(j);
435
  j=j+1;
436
- var parent_scene = $(this).parent().parent().parent('.single-scene.active').attr('id');
437
  var hotspot = parent_scene+'-hotspot-'+ j;
438
-
439
  var replace_string =parent_scene.replace("scene-", "");
440
-
441
  $(this).find(".title .hotspot-num").html(j);
442
  $(this).find(".title .scene-num").html(replace_string);
443
-
444
  $('<li><span data-index="'+ j +'" data-href="#'+ hotspot +'"><i class="far fa-dot-circle"></i></span></li>').insertBefore($(this).parent().parent('.hotspot-setup').find('.hotspot-nav ul li:last-child'));
445
 
446
  $(this).attr('id', hotspot);
447
-
448
  setTimeout(changeicon, 1000);
449
  } else {
450
  $('.pano-alert > p').html('You can only add 5 hotspots for free version');
@@ -456,14 +456,14 @@
456
  $(this).removeClass('active');
457
  j = parseInt(j);
458
  j=j+1;
459
- var parent_scene = $(this).parent().parent().parent('.single-scene.active').attr('id');
460
  var hotspot = parent_scene+'-hotspot-'+ j;
461
-
462
  var replace_string =parent_scene.replace("scene-", "");
463
-
464
  $(this).find(".title .hotspot-num").html(j);
465
  $(this).find(".title .scene-num").html(replace_string);
466
-
467
  $('<li><span data-index="'+ j +'" data-href="#'+ hotspot +'"><i class="far fa-dot-circle"></i></span></li>').insertBefore($(this).parent().parent('.hotspot-setup').find('.hotspot-nav ul li:last-child'));
468
 
469
  $(this).attr('id', hotspot);
@@ -473,7 +473,7 @@
473
 
474
  var hotspot_hide_id = $(this).attr("id");
475
  hotspot_hide_id = "#"+hotspot_hide_id;
476
-
477
 
478
  var hotspot_current = $(this).attr('id');
479
  var hotspot_fchild = $(this).parent().children(":first").attr('id');
@@ -482,32 +482,32 @@
482
  if(hotspot_current == hotspot_fchild){
483
  $(this).next().addClass("active");
484
  $(this).parent().parent('.hotspot-setup').find('.hotspot-nav li span[data-href="'+hotspot_hide_id+'"]').parent("li").next().addClass("active");
485
-
486
  }
487
  else {
488
  $(this).prev().addClass("active");
489
  $(this).parent().parent('.hotspot-setup').find('.hotspot-nav li span[data-href="'+hotspot_hide_id+'"]').parent("li").prev().addClass("active");
490
  }
491
-
492
  $(this).parent().parent('.hotspot-setup').find('.hotspot-nav li:not(:last-child) span[data-href="'+hotspot_hide_id+'"]').parent("li").remove();
493
  },
494
 
495
  }]
496
- });
497
- });
498
-
499
 
500
  var file_frame;
501
  var parent;
502
  $(document).on("click",".scene-upload",function(event) {
503
  event.preventDefault();
504
- parent = $(this).parent( '.form-group' );
505
 
506
  if ( file_frame ) {
507
  file_frame.open();
508
  return;
509
  }
510
-
511
  file_frame = wp.media.frames.file_frame = wp.media({
512
  title: $( this ).data( 'uploader_title' ),
513
  button: {
@@ -516,7 +516,7 @@
516
  library: {
517
  type: [ 'image']
518
  },
519
- multiple: false
520
  });
521
 
522
  file_frame.on( 'select', function() {
@@ -533,13 +533,13 @@
533
  $(document).on("click",".video-upload",function(event) {
534
  event.preventDefault();
535
 
536
- parent = $(this).parent( '.form-group' );
537
 
538
  if ( file_frames ) {
539
  file_frames.open();
540
  return;
541
  }
542
-
543
  file_frames = wp.media.frames.file_frames = wp.media({
544
  title: $( this ).data( 'uploader_title' ),
545
  button: {
@@ -548,7 +548,7 @@
548
  library: {
549
  type: [ 'video/mp4']
550
  },
551
- multiple: false
552
  });
553
 
554
  file_frames.on( 'select', function() {
@@ -565,13 +565,13 @@
565
  event.preventDefault();
566
 
567
 
568
- parent = $(this).parent( '.form-group' );
569
 
570
  if ( file_fram ) {
571
  file_fram.open();
572
  return;
573
  }
574
-
575
  file_fram = wp.media.frames.file_fram = wp.media({
576
  title: $( this ).data( 'uploader_title' ),
577
  button: {
@@ -580,7 +580,7 @@
580
  library: {
581
  type: [ 'image']
582
  },
583
- multiple: false
584
  });
585
 
586
  file_fram.on( 'select', function() {
@@ -649,7 +649,7 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
649
  $(document).on("change","select[name*=hotspot-customclass-pro]",function(event) {
650
  var getval = $(this).val();
651
  $(this).parent('.hotspot-setting').children('span.change-icon').html('<i class="'+getval+'"></i>');
652
-
653
  });
654
 
655
  $(document).on("change",".hotspot-customclass-color",function(event) {
@@ -673,15 +673,15 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
673
  }
674
 
675
  //------------panolens tab js------------------
676
-
677
-
678
  $(document).on("click",".scene-nav ul li:not(:last-child) span",function() {
679
-
680
  var scene_id = $(this).data('index');
681
  scene_id = '#scene-'+ scene_id;
682
-
683
  j = $(scene_id).find('.hotspot-nav li').eq(-2).find('span').attr('data-index');
684
-
685
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
686
 
687
  });
@@ -708,7 +708,7 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
708
  });
709
 
710
  //end add click
711
-
712
  $(document).on("click",".hotspot-nav ul li:not(:last-child) span",function() {
713
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
714
 
@@ -730,21 +730,21 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
730
  $('.trtr').trigger('change');
731
  $('.hotspot-customclass-pro-select').fontIconPicker();
732
  $('span.change-icon').hide();
733
-
734
  });
735
 
736
  function changehotspotid(id){
737
  var scene_id = '#scene-'+ id;
738
- var hotspot_id = 'scene-'+ id +'-hotspot-1';
739
  $(scene_id).find('.hotspot-nav li span').attr('data-href', '#'+hotspot_id+'');
740
  $(scene_id).find('.single-hotspot').attr('id', hotspot_id);
741
-
742
  }
743
-
744
  $(document).on("click",".rex-pano-nav-menu.main-nav ul li span",function() {
745
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
746
  });
747
-
748
  //----------alert dismiss--------//
749
  $(document).on("click","body",function() {
750
  $('.pano-alert').hide();
@@ -755,15 +755,15 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
755
  $(document).on("click",".pano-alert, .rex-pano-sub-tabs .rex-pano-tab-nav li.add",function(e) {
756
  e.stopPropagation();
757
  });
758
-
759
-
760
  $(document).on("click",".main-nav li.hotspot span",function() {
761
  $(".hotspot-setup.rex-pano-sub-tabs").show();
762
  $(".scene-setup > nav.scene-nav").hide();
763
  $(".scene-setup .single-scene > .scene-content").hide();
764
  $(".scene-setup .delete-scene").hide();
765
  });
766
-
767
  $(document).on("click",".main-nav li.scene span",function() {
768
  $(".hotspot-setup.rex-pano-sub-tabs").hide();
769
  $(".scene-setup > nav.scene-nav").show();
@@ -808,7 +808,7 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
808
  }
809
 
810
  $(document).on("change",".hotspotscene",function() {
811
-
812
  var chanheghtptpval = $(this).val();
813
  if(chanheghtptpval != "none") {
814
  $(this).parent('.hotspot-scene').siblings('.hotspot-scene').children('.hotspotsceneinfodata').val(chanheghtptpval);
@@ -820,14 +820,14 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
820
 
821
  $(document).on("click",".hotpitch",function(event) {
822
  var datacoords = $('#panodata').text().split(',');
823
- var pitchsplit = datacoords[0];
824
  var pitch = pitchsplit.split(':');
825
  $(this).parent().parent('.hotspot-setting').children('.hotspot-pitch').val(pitch[1]);
826
  });
827
 
828
  $(document).on("click",".hotyaw",function(event) {
829
  var datacoords = $('#panodata').text().split(',');
830
- var yawsplit = datacoords[1];
831
  var yaw = yawsplit.split(':');
832
  $(this).parent().parent('.hotspot-setting').children('.hotspot-yaw').val(yaw[1]);
833
  });
@@ -849,12 +849,12 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
849
  });
850
 
851
  $(document).on("click",".toppitch",function(event) {
852
- var datacoords = $('#panodata').text().split(',');
853
- var pitchsplit = datacoords[0];
854
  var pitch = pitchsplit.split(':');
855
- var yawsplit = datacoords[1];
856
- var yaw = yawsplit.split(':');
857
-
858
  $('div.single-scene.rex-pano-tab.active').children('div.hotspot-setup.rex-pano-sub-tabs').children('div.rex-pano-tab-content').children('div.single-hotspot.rex-pano-tab.active.clearfix').find('.hotspot-pitch').val(pitch[1]);
859
  $('div.single-scene.rex-pano-tab.active').children('div.hotspot-setup.rex-pano-sub-tabs').children('div.rex-pano-tab-content').children('div.single-hotspot.rex-pano-tab.active.clearfix').find('.hotspot-yaw').val(yaw[1]);
860
  });
@@ -925,4 +925,4 @@ $(document).on("change","input[type=radio][name=panovideo]",function(event) {
925
  }
926
  });
927
 
928
- })( jQuery );
36
 
37
  j= $('#scene-1').find('.hotspot-nav li').eq(-2).find('span').attr('data-index');
38
  var ajaxurl = wpvr_obj.ajaxurl;
39
+ $('#panolenspreview').on('click', function(e){
40
  e.preventDefault();
41
  var postid = $("#post_ID").val();
42
  var autoload = $("input[name='autoload']:checked").val();
55
  jQuery.ajax({
56
  type: "POST",
57
  url: ajaxurl,
58
+ data: {
59
  action: "wpvr_preview",
60
  postid: postid,
61
  compass: compass,
71
  preview: preview,
72
  scenefadeduration: scenefadeduration,
73
  },
74
+
75
  success: function( response ){
76
  if (response.success == true) {
77
  $('#error_occured').hide();
80
  var scenes = response.data[1];
81
 
82
  if (scenes) {
83
+ $.each(scenes.scenes, function (i) {
84
+ $.each(scenes.scenes[i]['hotSpots'], function (key, val) {
85
  if (val["clickHandlerArgs"] != "") {
86
  val["clickHandlerFunc"] = wpvrhotspot;
87
  }
88
  if (val["createTooltipArgs"] != "") {
89
  val["createTooltipFunc"] = wpvrtooltip;
90
+ }
91
  });
92
  });
93
  }
94
+ var panoshow = pannellum.viewer(response.data[0]["panoid"], scenes);
95
  }
96
  else {
97
  $('#error_occured').show();
106
  }
107
  });
108
  });
109
+ });
110
 
111
  jQuery(document).ready(function($){
112
  var ajaxurl = wpvr_obj.ajaxurl;
113
+ $('#videopreview').on('click', function(e){
114
  e.preventDefault();
115
  var postid = $("#post_ID").val();
116
  var videourl = $("input[name='video-attachment-url']").val();
117
  var vidautoplay = $("input[name='playvideo']:checked").val();
118
+ var vidcontrol = $("input[name='playcontrol']:checked").val();
119
  jQuery.ajax({
120
  type: "POST",
121
  url: ajaxurl,
122
+ data: {
123
  action: "wpvrvideo_preview",
124
  postid: postid,
125
  videourl: videourl,
126
  vidautoplay: vidautoplay,
127
  vidcontrol: vidcontrol,
128
  },
129
+
130
  success: function( response ){
131
  if (response.success == true) {
132
  $('#'+response.data["panoid"]).empty();
168
  var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
169
 
170
  var scenefadeduration = $("input[name='scene-fade-duration']").val();
171
+
172
  if ($('.scene-setup')[0]) {
173
  var panodata = $('.scene-setup').repeaterVal();
174
  var panolist = JSON.stringify(panodata);
180
 
181
  type: "POST",
182
  url: ajaxurl,
183
+ data: {
184
  action: "wpvr_save",
185
  postid: postid,
186
  panovideo: panovideo,
197
  autorotationstopdelay: autorotationstopdelay,
198
  scenefadeduration: scenefadeduration,
199
  },
200
+
201
  success: function( response ){
202
  if (response.success == false) {
203
  $('#error_occured').show();
216
  }
217
  }
218
  });
219
+ }
220
+ });
221
  });
222
 
223
  jQuery(document).ready(function($){
225
  $("#error_occured").hide();
226
  $('body').removeClass('error-overlay');
227
  });
228
+
229
  $("#panolenspreview, #error_occured").on("click", function(e){
230
  e.stopPropagation();
231
  });
232
+ });
233
 
234
  jQuery(document).ready(function($){
235
 
252
  var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
253
 
254
  var scenefadeduration = $("input[name='scene-fade-duration']").val();
255
+
256
  if ($('.scene-setup')[0]) {
257
  var panodata = $('.scene-setup').repeaterVal();
258
  var panolist = JSON.stringify(panodata);
264
 
265
  type: "POST",
266
  url: ajaxurl,
267
+ data: {
268
  action: "wpvr_save",
269
  postid: postid,
270
  panovideo: panovideo,
281
  autorotationstopdelay: autorotationstopdelay,
282
  scenefadeduration: scenefadeduration,
283
  },
284
+
285
  success: function( response ){
286
  if (response.success == false) {
287
  $('#error_occured').show();
300
  }
301
  }
302
  });
303
+ }
304
+ });
305
+ });
306
 
307
  function wpvrhotspot(hotSpotDiv, args) {
308
  var argst = args.replace(/\\/g, '');
334
 
335
  var i = $('.scene-nav li').eq(-2).find('span').attr('data-index');
336
  i = parseInt(i);
337
+
338
  $('.scene-setup').repeater({
339
+
340
  defaultValues: {
341
  'scene-type': 'equirectangular',
342
  'dscene': 'off',
348
  show: function () {
349
 
350
  if( $(this).parents(".scene-setup").attr("data-limit").length > 0 ){
351
+
352
  if( $(this).parents(".scene-setup").find("div[data-repeater-item]:not(.hotspot-setup div[data-repeater-item])").length <= $(this).parents(".scene-setup").attr("data-limit") ){
353
+
354
  $(this).slideDown();
355
  $(this).removeClass('active');
356
 
357
  i=i+1;
358
  var scene = 'scene-'+i;
359
+
360
  $(this).find(".title .scene-num").html(i);
361
+
362
  $('<li><span data-index="'+ i +'" data-href="#'+ scene +'"><i class="fa fa-image"></i></span></li>').insertBefore($(this).parent().parent('.scene-setup').find('.scene-nav ul li:last-child'));
363
+
364
  $(this).attr('id', scene);
365
  changehotspotid(i);
366
  $(this).siblings('.active').removeClass('active');
374
  } else {
375
  jQuery(this).slideDown();
376
  $(this).removeClass('active');
377
+
378
  i=i+1;
379
  var scene = 'scene-'+i;
380
 
381
+
382
  $(this).find(".title .scene-num").html(i);
383
+
384
  $('<li><span data-index="'+ i +'" data-href="#'+ scene +'"><i class="fa fa-image"></i></span></li>').insertBefore($(this).parent().parent('.scene-setup').find('.scene-nav ul li:last-child'));
385
+
386
  $(this).attr('id', scene);
387
  changehotspotid(i);
388
  }
390
  $(this).hide();
391
  },
392
  hide: function (deleteElement) {
393
+
394
  var hide_id = $(this).attr("id");
395
  hide_id = "#"+hide_id;
396
+
397
  var current = $(this).attr('id');
398
  var fchild = $('.single-scene:nth-child(2)').attr('id');
399
+
400
  if(confirm('Are you sure you want to delete?')) {
401
  jQuery(this).slideUp(deleteElement);
402
  if(current == fchild){
412
  }
413
  $(this).parent().parent('.scene-setup').find('.scene-nav li span[data-href="'+hide_id+'"]').parent("li").remove();
414
  setTimeout(deleteinfodata, 1000);
415
+ }
416
  },
417
 
418
  repeaters: [{
424
  show: function () {
425
 
426
  if( $(this).parents(".hotspot-setup").attr("data-limit").length > 0 ){
427
+
428
  if( $(this).parents(".hotspot-setup").find("div[data-repeater-item]").length <= $(this).parents(".hotspot-setup").attr("data-limit") ){
429
 
430
  $(this).slideDown();
433
  $(this).addClass('active');
434
  j = parseInt(j);
435
  j=j+1;
436
+ var parent_scene = $(this).parent().parent().parent('.single-scene.active').attr('id');
437
  var hotspot = parent_scene+'-hotspot-'+ j;
438
+
439
  var replace_string =parent_scene.replace("scene-", "");
440
+
441
  $(this).find(".title .hotspot-num").html(j);
442
  $(this).find(".title .scene-num").html(replace_string);
443
+
444
  $('<li><span data-index="'+ j +'" data-href="#'+ hotspot +'"><i class="far fa-dot-circle"></i></span></li>').insertBefore($(this).parent().parent('.hotspot-setup').find('.hotspot-nav ul li:last-child'));
445
 
446
  $(this).attr('id', hotspot);
447
+
448
  setTimeout(changeicon, 1000);
449
  } else {
450
  $('.pano-alert > p').html('You can only add 5 hotspots for free version');
456
  $(this).removeClass('active');
457
  j = parseInt(j);
458
  j=j+1;
459
+ var parent_scene = $(this).parent().parent().parent('.single-scene.active').attr('id');
460
  var hotspot = parent_scene+'-hotspot-'+ j;
461
+
462
  var replace_string =parent_scene.replace("scene-", "");
463
+
464
  $(this).find(".title .hotspot-num").html(j);
465
  $(this).find(".title .scene-num").html(replace_string);
466
+
467
  $('<li><span data-index="'+ j +'" data-href="#'+ hotspot +'"><i class="far fa-dot-circle"></i></span></li>').insertBefore($(this).parent().parent('.hotspot-setup').find('.hotspot-nav ul li:last-child'));
468
 
469
  $(this).attr('id', hotspot);
473
 
474
  var hotspot_hide_id = $(this).attr("id");
475
  hotspot_hide_id = "#"+hotspot_hide_id;
476
+
477
 
478
  var hotspot_current = $(this).attr('id');
479
  var hotspot_fchild = $(this).parent().children(":first").attr('id');
482
  if(hotspot_current == hotspot_fchild){
483
  $(this).next().addClass("active");
484
  $(this).parent().parent('.hotspot-setup').find('.hotspot-nav li span[data-href="'+hotspot_hide_id+'"]').parent("li").next().addClass("active");
485
+
486
  }
487
  else {
488
  $(this).prev().addClass("active");
489
  $(this).parent().parent('.hotspot-setup').find('.hotspot-nav li span[data-href="'+hotspot_hide_id+'"]').parent("li").prev().addClass("active");
490
  }
491
+
492
  $(this).parent().parent('.hotspot-setup').find('.hotspot-nav li:not(:last-child) span[data-href="'+hotspot_hide_id+'"]').parent("li").remove();
493
  },
494
 
495
  }]
496
+ });
497
+ });
498
+
499
 
500
  var file_frame;
501
  var parent;
502
  $(document).on("click",".scene-upload",function(event) {
503
  event.preventDefault();
504
+ parent = $(this).parent( '.form-group' );
505
 
506
  if ( file_frame ) {
507
  file_frame.open();
508
  return;
509
  }
510
+
511
  file_frame = wp.media.frames.file_frame = wp.media({
512
  title: $( this ).data( 'uploader_title' ),
513
  button: {
516
  library: {
517
  type: [ 'image']
518
  },
519
+ multiple: false
520
  });
521
 
522
  file_frame.on( 'select', function() {
533
  $(document).on("click",".video-upload",function(event) {
534
  event.preventDefault();
535
 
536
+ parent = $(this).parent( '.form-group' );
537
 
538
  if ( file_frames ) {
539
  file_frames.open();
540
  return;
541
  }
542
+
543
  file_frames = wp.media.frames.file_frames = wp.media({
544
  title: $( this ).data( 'uploader_title' ),
545
  button: {
548
  library: {
549
  type: [ 'video/mp4']
550
  },
551
+ multiple: false
552
  });
553
 
554
  file_frames.on( 'select', function() {
565
  event.preventDefault();
566
 
567
 
568
+ parent = $(this).parent( '.form-group' );
569
 
570
  if ( file_fram ) {
571
  file_fram.open();
572
  return;
573
  }
574
+
575
  file_fram = wp.media.frames.file_fram = wp.media({
576
  title: $( this ).data( 'uploader_title' ),
577
  button: {
580
  library: {
581
  type: [ 'image']
582
  },
583
+ multiple: false
584
  });
585
 
586
  file_fram.on( 'select', function() {
649
  $(document).on("change","select[name*=hotspot-customclass-pro]",function(event) {
650
  var getval = $(this).val();
651
  $(this).parent('.hotspot-setting').children('span.change-icon').html('<i class="'+getval+'"></i>');
652
+
653
  });
654
 
655
  $(document).on("change",".hotspot-customclass-color",function(event) {
673
  }
674
 
675
  //------------panolens tab js------------------
676
+
677
+
678
  $(document).on("click",".scene-nav ul li:not(:last-child) span",function() {
679
+
680
  var scene_id = $(this).data('index');
681
  scene_id = '#scene-'+ scene_id;
682
+
683
  j = $(scene_id).find('.hotspot-nav li').eq(-2).find('span').attr('data-index');
684
+
685
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
686
 
687
  });
708
  });
709
 
710
  //end add click
711
+
712
  $(document).on("click",".hotspot-nav ul li:not(:last-child) span",function() {
713
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
714
 
730
  $('.trtr').trigger('change');
731
  $('.hotspot-customclass-pro-select').fontIconPicker();
732
  $('span.change-icon').hide();
733
+
734
  });
735
 
736
  function changehotspotid(id){
737
  var scene_id = '#scene-'+ id;
738
+ var hotspot_id = 'scene-'+ id +'-hotspot-1';
739
  $(scene_id).find('.hotspot-nav li span').attr('data-href', '#'+hotspot_id+'');
740
  $(scene_id).find('.single-hotspot').attr('id', hotspot_id);
741
+
742
  }
743
+
744
  $(document).on("click",".rex-pano-nav-menu.main-nav ul li span",function() {
745
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
746
  });
747
+
748
  //----------alert dismiss--------//
749
  $(document).on("click","body",function() {
750
  $('.pano-alert').hide();
755
  $(document).on("click",".pano-alert, .rex-pano-sub-tabs .rex-pano-tab-nav li.add",function(e) {
756
  e.stopPropagation();
757
  });
758
+
759
+
760
  $(document).on("click",".main-nav li.hotspot span",function() {
761
  $(".hotspot-setup.rex-pano-sub-tabs").show();
762
  $(".scene-setup > nav.scene-nav").hide();
763
  $(".scene-setup .single-scene > .scene-content").hide();
764
  $(".scene-setup .delete-scene").hide();
765
  });
766
+
767
  $(document).on("click",".main-nav li.scene span",function() {
768
  $(".hotspot-setup.rex-pano-sub-tabs").hide();
769
  $(".scene-setup > nav.scene-nav").show();
808
  }
809
 
810
  $(document).on("change",".hotspotscene",function() {
811
+
812
  var chanheghtptpval = $(this).val();
813
  if(chanheghtptpval != "none") {
814
  $(this).parent('.hotspot-scene').siblings('.hotspot-scene').children('.hotspotsceneinfodata').val(chanheghtptpval);
820
 
821
  $(document).on("click",".hotpitch",function(event) {
822
  var datacoords = $('#panodata').text().split(',');
823
+ var pitchsplit = datacoords[0];
824
  var pitch = pitchsplit.split(':');
825
  $(this).parent().parent('.hotspot-setting').children('.hotspot-pitch').val(pitch[1]);
826
  });
827
 
828
  $(document).on("click",".hotyaw",function(event) {
829
  var datacoords = $('#panodata').text().split(',');
830
+ var yawsplit = datacoords[1];
831
  var yaw = yawsplit.split(':');
832
  $(this).parent().parent('.hotspot-setting').children('.hotspot-yaw').val(yaw[1]);
833
  });
849
  });
850
 
851
  $(document).on("click",".toppitch",function(event) {
852
+ var datacoords = $('#panodata').text().split(',');
853
+ var pitchsplit = datacoords[0];
854
  var pitch = pitchsplit.split(':');
855
+ var yawsplit = datacoords[1];
856
+ var yaw = yawsplit.split(':');
857
+
858
  $('div.single-scene.rex-pano-tab.active').children('div.hotspot-setup.rex-pano-sub-tabs').children('div.rex-pano-tab-content').children('div.single-hotspot.rex-pano-tab.active.clearfix').find('.hotspot-pitch').val(pitch[1]);
859
  $('div.single-scene.rex-pano-tab.active').children('div.hotspot-setup.rex-pano-sub-tabs').children('div.rex-pano-tab-content').children('div.single-hotspot.rex-pano-tab.active.clearfix').find('.hotspot-yaw').val(yaw[1]);
860
  });
925
  }
926
  });
927
 
928
+ })( jQuery );
admin/partials/wpvr-meta-box-builder-display.php CHANGED
@@ -18,7 +18,9 @@ $id = '';
18
  $postdata = array();
19
  $post = get_post();
20
  $id = $post->ID;
 
21
  $postdata = get_post_meta( $id, 'panodata', true );
 
22
  $panoid = 'pano'.$id;
23
 
24
  if (isset($postdata['vidid'])) {
@@ -29,7 +31,7 @@ if (isset($postdata['vidid'])) {
29
 
30
  </div>
31
  <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
32
- <?php
33
  echo $postdata['panoviddata'];
34
  ?>
35
  <?php
@@ -44,14 +46,14 @@ if (isset($postdata['vidid'])) {
44
  </script>
45
  <?php
46
  }
47
- ?>
48
  </div>
49
  </div>
50
 
51
  <div class="rex-add-coordinates" style="text-align: center;">
52
  <ul>
53
  <li>
54
- <div id="panodata" style="text-align: center; font-weight: bold;">
55
  </div>
56
  </li>
57
  <li class="rex-hide-coordinates add-pitch">
@@ -121,7 +123,7 @@ if (isset($postdata['panodata'])) {
121
  if (isset($panoscenes["scene-ititle"])) {
122
  $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
123
  }
124
-
125
  $scene_author = '';
126
  if (isset($panoscenes["scene-author"])) {
127
  $scene_author = sanitize_text_field($panoscenes["scene-author"]);
@@ -131,7 +133,7 @@ if (isset($postdata['panodata'])) {
131
  if (isset($panoscenes["scene-pitch"])) {
132
  $default_scene_pitch = $panoscenes["scene-pitch"];
133
  }
134
-
135
  $default_scene_yaw = '';
136
  if (isset($panoscenes["scene-yaw"])) {
137
  $default_scene_yaw = $panoscenes["scene-yaw"];
@@ -141,31 +143,31 @@ if (isset($postdata['panodata'])) {
141
  if (isset($panoscenes["scene-maxpitch"])) {
142
  $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
143
  }
144
-
145
 
146
  $scene_min_pitch = '';
147
  if (isset($panoscenes["scene-minpitch"])) {
148
  $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
149
  }
150
-
151
 
152
  $scene_max_yaw = '';
153
  if (isset($panoscenes["scene-maxyaw"])) {
154
  $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
155
  }
156
-
157
 
158
  $scene_min_yaw = '';
159
  if (isset($panoscenes["scene-minyaw"])) {
160
  $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
161
  }
162
-
163
-
164
  $default_zoom = 100;
165
  if (isset($panoscenes["scene-zoom"])) {
166
  $default_zoom = $panoscenes["scene-zoom"];
167
  }
168
-
169
  if (!empty($default_zoom)) {
170
  $default_zoom = (int)$default_zoom;
171
  }
@@ -177,7 +179,7 @@ if (isset($postdata['panodata'])) {
177
  if (isset($panoscenes["scene-maxzoom"])) {
178
  $max_zoom = $panoscenes["scene-maxzoom"];
179
  }
180
-
181
  if (!empty($max_zoom)) {
182
  $max_zoom = (int)$max_zoom;
183
  }
@@ -189,19 +191,19 @@ if (isset($postdata['panodata'])) {
189
  if (isset($panoscenes["scene-minzoom"])) {
190
  $min_zoom = $panoscenes["scene-minzoom"];
191
  }
192
-
193
  if (!empty($min_zoom)) {
194
  $min_zoom = (int)$min_zoom;
195
  }
196
  else {
197
  $min_zoom = 50;
198
  }
199
-
200
  $hotspot_datas = array();
201
  if (isset($panoscenes["hotspot-list"])) {
202
  $hotspot_datas = $panoscenes["hotspot-list"];
203
  }
204
-
205
  $hotspots = array();
206
  foreach ($hotspot_datas as $hotspot_data) {
207
 
@@ -241,21 +243,21 @@ if (isset($postdata['panodata'])) {
241
  unset($scene_info['yaw']);
242
  }
243
  }
244
-
245
  if (empty($panoscenes["scene-ititle"])) {
246
  unset($scene_info['title']);
247
  }
248
  if (empty($panoscenes["scene-author"])) {
249
  unset($scene_info['author']);
250
  }
251
-
252
  if (isset($panoscenes["cvgscene"])) {
253
  if ($panoscenes["cvgscene"] == "off") {
254
  unset($scene_info['maxPitch']);
255
  unset($scene_info['minPitch']);
256
  }
257
  }
258
-
259
  if (empty($panoscenes["scene-maxpitch"])) {
260
  unset($scene_info['maxPitch']);
261
  }
@@ -311,7 +313,7 @@ if (isset($postdata['panodata'])) {
311
  if (empty($autorotationstopdelay)) {
312
  unset($pano_response['autoRotateStopDelay']);
313
  }
314
-
315
  $response = array();
316
  $response = array($pano_id_array,$pano_response);
317
  if (!empty($response)) {
@@ -332,7 +334,7 @@ if (isset($postdata['panodata'])) {
332
  <div class="rex-add-coordinates" style="text-align: center;">
333
  <ul>
334
  <li>
335
- <div id="panodata" style="text-align: center; font-weight: bold;">
336
  </div>
337
  </li>
338
  <li class="rex-hide-coordinates add-pitch">
@@ -348,14 +350,14 @@ if (isset($postdata['panodata'])) {
348
  var response = <?php echo $response; ?>;
349
  var scenes = response[1];
350
  if (scenes) {
351
- $.each(scenes.scenes, function (i) {
352
- $.each(scenes.scenes[i]['hotSpots'], function (key, val) {
353
  if (val["clickHandlerArgs"] != "") {
354
  val["clickHandlerFunc"] = wpvrhotspot;
355
  }
356
  if (val["createTooltipArgs"] != "") {
357
  val["createTooltipFunc"] = wpvrtooltip;
358
- }
359
  });
360
  });
361
  }
@@ -375,14 +377,14 @@ if (isset($postdata['panodata'])) {
375
  hotSpotDiv.classList.add('custom-tooltip');
376
  var span = document.createElement('span');
377
  if (args != null) {
378
- args = args.replace(/\\/g, "");
379
  }
380
  span.innerHTML = args;
381
  hotSpotDiv.appendChild(span);
382
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
383
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
384
  }
385
-
386
  jQuery(document).ready(function($){
387
  $("#cross").on("click", function(e){
388
  e.preventDefault();
@@ -394,6 +396,3 @@ if (isset($postdata['panodata'])) {
394
  </script>
395
  <?php
396
  }
397
-
398
-
399
-
18
  $postdata = array();
19
  $post = get_post();
20
  $id = $post->ID;
21
+
22
  $postdata = get_post_meta( $id, 'panodata', true );
23
+
24
  $panoid = 'pano'.$id;
25
 
26
  if (isset($postdata['vidid'])) {
31
 
32
  </div>
33
  <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
34
+ <?php
35
  echo $postdata['panoviddata'];
36
  ?>
37
  <?php
46
  </script>
47
  <?php
48
  }
49
+ ?>
50
  </div>
51
  </div>
52
 
53
  <div class="rex-add-coordinates" style="text-align: center;">
54
  <ul>
55
  <li>
56
+ <div id="panodata" style="text-align: center; font-weight: bold;">
57
  </div>
58
  </li>
59
  <li class="rex-hide-coordinates add-pitch">
123
  if (isset($panoscenes["scene-ititle"])) {
124
  $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
125
  }
126
+
127
  $scene_author = '';
128
  if (isset($panoscenes["scene-author"])) {
129
  $scene_author = sanitize_text_field($panoscenes["scene-author"]);
133
  if (isset($panoscenes["scene-pitch"])) {
134
  $default_scene_pitch = $panoscenes["scene-pitch"];
135
  }
136
+
137
  $default_scene_yaw = '';
138
  if (isset($panoscenes["scene-yaw"])) {
139
  $default_scene_yaw = $panoscenes["scene-yaw"];
143
  if (isset($panoscenes["scene-maxpitch"])) {
144
  $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
145
  }
146
+
147
 
148
  $scene_min_pitch = '';
149
  if (isset($panoscenes["scene-minpitch"])) {
150
  $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
151
  }
152
+
153
 
154
  $scene_max_yaw = '';
155
  if (isset($panoscenes["scene-maxyaw"])) {
156
  $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
157
  }
158
+
159
 
160
  $scene_min_yaw = '';
161
  if (isset($panoscenes["scene-minyaw"])) {
162
  $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
163
  }
164
+
165
+
166
  $default_zoom = 100;
167
  if (isset($panoscenes["scene-zoom"])) {
168
  $default_zoom = $panoscenes["scene-zoom"];
169
  }
170
+
171
  if (!empty($default_zoom)) {
172
  $default_zoom = (int)$default_zoom;
173
  }
179
  if (isset($panoscenes["scene-maxzoom"])) {
180
  $max_zoom = $panoscenes["scene-maxzoom"];
181
  }
182
+
183
  if (!empty($max_zoom)) {
184
  $max_zoom = (int)$max_zoom;
185
  }
191
  if (isset($panoscenes["scene-minzoom"])) {
192
  $min_zoom = $panoscenes["scene-minzoom"];
193
  }
194
+
195
  if (!empty($min_zoom)) {
196
  $min_zoom = (int)$min_zoom;
197
  }
198
  else {
199
  $min_zoom = 50;
200
  }
201
+
202
  $hotspot_datas = array();
203
  if (isset($panoscenes["hotspot-list"])) {
204
  $hotspot_datas = $panoscenes["hotspot-list"];
205
  }
206
+
207
  $hotspots = array();
208
  foreach ($hotspot_datas as $hotspot_data) {
209
 
243
  unset($scene_info['yaw']);
244
  }
245
  }
246
+
247
  if (empty($panoscenes["scene-ititle"])) {
248
  unset($scene_info['title']);
249
  }
250
  if (empty($panoscenes["scene-author"])) {
251
  unset($scene_info['author']);
252
  }
253
+
254
  if (isset($panoscenes["cvgscene"])) {
255
  if ($panoscenes["cvgscene"] == "off") {
256
  unset($scene_info['maxPitch']);
257
  unset($scene_info['minPitch']);
258
  }
259
  }
260
+
261
  if (empty($panoscenes["scene-maxpitch"])) {
262
  unset($scene_info['maxPitch']);
263
  }
313
  if (empty($autorotationstopdelay)) {
314
  unset($pano_response['autoRotateStopDelay']);
315
  }
316
+
317
  $response = array();
318
  $response = array($pano_id_array,$pano_response);
319
  if (!empty($response)) {
334
  <div class="rex-add-coordinates" style="text-align: center;">
335
  <ul>
336
  <li>
337
+ <div id="panodata" style="text-align: center; font-weight: bold;">
338
  </div>
339
  </li>
340
  <li class="rex-hide-coordinates add-pitch">
350
  var response = <?php echo $response; ?>;
351
  var scenes = response[1];
352
  if (scenes) {
353
+ $.each(scenes.scenes, function (i) {
354
+ $.each(scenes.scenes[i]['hotSpots'], function (key, val) {
355
  if (val["clickHandlerArgs"] != "") {
356
  val["clickHandlerFunc"] = wpvrhotspot;
357
  }
358
  if (val["createTooltipArgs"] != "") {
359
  val["createTooltipFunc"] = wpvrtooltip;
360
+ }
361
  });
362
  });
363
  }
377
  hotSpotDiv.classList.add('custom-tooltip');
378
  var span = document.createElement('span');
379
  if (args != null) {
380
+ args = args.replace(/\\/g, "");
381
  }
382
  span.innerHTML = args;
383
  hotSpotDiv.appendChild(span);
384
  span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
385
  span.style.marginTop = -span.scrollHeight - 12 + 'px';
386
  }
387
+
388
  jQuery(document).ready(function($){
389
  $("#cross").on("click", function(e){
390
  e.preventDefault();
396
  </script>
397
  <?php
398
  }
 
 
 
admin/partials/wpvr-meta-box-shortcode-display.php CHANGED
@@ -13,15 +13,18 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
13
  */
14
  ?>
15
 
16
- <?php
17
  $post = get_post();
18
  $id = $post->ID;
19
  $slug = $post->post_name;
 
 
 
20
  ?>
21
  <p><?php echo __('For classic editor:', 'wpvr'); ?></p>
22
  <p><?php echo __('To use this Wpvr tour in your posts or pages use the following shortcode:', 'wpvr'); ?></p>
23
  <p><code>[wpvr id="<?php echo $id; ?>"]</code><?php ($slug ? 'or' : '') ?></p>
24
  <p><?php echo __('For gutenberg:', 'wpvr'); ?></p>
25
  <p>use id:<code><?php echo $id; ?></code>on wpvr block setting</p>
26
- <p><?php echo __('Check how to use:', 'wpvr'); ?><a href="https://rextheme.com/docs/wp-vr/gutenberg-block/" target="blank">wpvr block</a></p>
27
 
13
  */
14
  ?>
15
 
16
+ <?php
17
  $post = get_post();
18
  $id = $post->ID;
19
  $slug = $post->post_name;
20
+ $postdata = get_post_meta( $post->ID, 'panodata', true );
21
+
22
+
23
  ?>
24
  <p><?php echo __('For classic editor:', 'wpvr'); ?></p>
25
  <p><?php echo __('To use this Wpvr tour in your posts or pages use the following shortcode:', 'wpvr'); ?></p>
26
  <p><code>[wpvr id="<?php echo $id; ?>"]</code><?php ($slug ? 'or' : '') ?></p>
27
  <p><?php echo __('For gutenberg:', 'wpvr'); ?></p>
28
  <p>use id:<code><?php echo $id; ?></code>on wpvr block setting</p>
29
+ <p><?php echo __('Check how to use: ', 'wpvr'); ?><a href="https://rextheme.com/docs/wp-vr/gutenberg-block/" target="blank">wpvr block</a></p>
30
 
admin/partials/wpvr_documentation.php CHANGED
@@ -23,6 +23,13 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
23
  <li class="tab col s3"><a href="#tab1"><i class="material-icons">settings</i><?php _e('General','wpvr'); ?></a></li>
24
  <li class="tab col s3"><a href="#tab2"><i class="material-icons">perm_media</i><?php _e('Video Tutorials','wpvr'); ?></a></li>
25
  <li class="tab col s3"><a href="#tab3"><i class="material-icons">thumb_up_alt</i><?php _e('Go Premium','wpvr'); ?></a></li>
 
 
 
 
 
 
 
26
  </ul>
27
  </div>
28
 
@@ -152,11 +159,38 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
152
  <div class="item"><?php _e('Hotspot based scene face support','wpvr'); ?></div>
153
  <div class="item"><?php _e('Gyroscope support','wpvr'); ?></div>
154
  <div class="item"><?php _e('Duplicate tour support','wpvr'); ?></div>
 
155
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
156
  </div>
157
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
158
  </div>
159
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  </div>
161
  </div>
162
 
23
  <li class="tab col s3"><a href="#tab1"><i class="material-icons">settings</i><?php _e('General','wpvr'); ?></a></li>
24
  <li class="tab col s3"><a href="#tab2"><i class="material-icons">perm_media</i><?php _e('Video Tutorials','wpvr'); ?></a></li>
25
  <li class="tab col s3"><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"><a href="#tab4"><i class="material-icons">add</i><?php _e('Import','wpvr'); ?></a></li>
30
+ <?php
31
+ }
32
+ ?>
33
  </ul>
34
  </div>
35
 
159
  <div class="item"><?php _e('Hotspot based scene face support','wpvr'); ?></div>
160
  <div class="item"><?php _e('Gyroscope support','wpvr'); ?></div>
161
  <div class="item"><?php _e('Duplicate tour support','wpvr'); ?></div>
162
+ <div class="item"><?php _e('File import & export system','wpvr'); ?></div>
163
  <div class="item"><?php _e('Personalized support on both support forum and our support e-mail.','wpvr'); ?></div>
164
  </div>
165
  <a href="https://rextheme.com/wpvr/" target="_blank" class="waves-effect waves-light btn wpvr-btn"><?php _e('Get Premium Version','wpvr'); ?></a>
166
  </div>
167
  </div>
168
+ <?php
169
+ if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) {
170
+ ?>
171
+ <div id="tab4" class="block-wrapper">
172
+ <div class="rex-upgrade">
173
+ <h4><?php _e('Import tour file: ','wpvr'); ?></h4>
174
+ <p style="color: red;"><?php _e('Do not close or refresh the page during import process. It may take few minutes.','wpvr'); ?></p>
175
+ <div class="parent" style="width:100%;">
176
+ <form id="wpvr_import_from">
177
+ <a class="btn-floating btn-large waves-effect waves-light red" id="wpvr_button_upload"><i class="material-icons">add</i></a>
178
+ <div class="file-path-wrapper">
179
+ <input class="file-path validate" id="wpvr_file_url" type="text" value="" data-value="" >
180
+ </div>
181
+ <div id="wpvr_progress" class="progress" style="display:none;">
182
+ <div class="indeterminate"></div>
183
+ </div>
184
+ <button class="btn waves-effect waves-light" type="submit" id="wpvr_button_submit" >Submit
185
+ <i class="material-icons right">send</i>
186
+ </button>
187
+ </form>
188
+ </div>
189
+ </div>
190
+ </div>
191
+ <?php
192
+ }
193
+ ?>
194
  </div>
195
  </div>
196
 
includes/class-wpvr-activator.php CHANGED
@@ -30,7 +30,12 @@ class Wpvr_Activator {
30
  * @since 1.0.0
31
  */
32
  public static function activate() {
33
-
 
 
 
 
 
34
  }
35
 
36
  }
30
  * @since 1.0.0
31
  */
32
  public static function activate() {
33
+ // $upload = wp_upload_dir();
34
+ // $upload_dir = $upload['basedir'];
35
+ // $upload_dir = $upload_dir . '/wpvr/temp';
36
+ // if (! is_dir($upload_dir)) {
37
+ // mkdir( $upload_dir, 0700 );
38
+ // }
39
  }
40
 
41
  }
includes/class-wpvr.php CHANGED
@@ -76,7 +76,7 @@ class Wpvr {
76
  * @since 1.0.0
77
  */
78
  public function __construct() {
79
-
80
  if ( defined( 'WPVR' ) ) {
81
  $this->version = WPVR;
82
  } else {
@@ -187,11 +187,11 @@ class Wpvr {
187
  else {
188
  $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
189
  }
190
-
191
  }
192
  else {
193
  $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
194
- }
195
  }else {
196
  $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
197
  }
@@ -204,11 +204,11 @@ class Wpvr {
204
  else {
205
  $plugin_admin_page = new Wpvr_Admin_Pages();
206
  }
207
-
208
  }
209
  else {
210
  $plugin_admin_page = new Wpvr_Admin_Pages();
211
- }
212
  }else {
213
  $plugin_admin_page = new Wpvr_Admin_Pages();
214
  }
@@ -229,6 +229,7 @@ class Wpvr {
229
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
230
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
231
  $this->loader->add_action( 'wp_ajax_wpvrvideo_preview', $plugin_admin_ajax, 'wpvrvideo_preview' );
 
232
 
233
  }
234
 
@@ -250,11 +251,11 @@ class Wpvr {
250
  else {
251
  $plugin_public = new Wpvr_Public( $this->get_plugin_name(), $this->get_version() );
252
  }
253
-
254
  }
255
  else {
256
  $plugin_public = new Wpvr_Public( $this->get_plugin_name(), $this->get_version() );
257
- }
258
  }else {
259
  $plugin_public = new Wpvr_Public( $this->get_plugin_name(), $this->get_version() );
260
  }
76
  * @since 1.0.0
77
  */
78
  public function __construct() {
79
+
80
  if ( defined( 'WPVR' ) ) {
81
  $this->version = WPVR;
82
  } else {
187
  else {
188
  $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
189
  }
190
+
191
  }
192
  else {
193
  $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
194
+ }
195
  }else {
196
  $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
197
  }
204
  else {
205
  $plugin_admin_page = new Wpvr_Admin_Pages();
206
  }
207
+
208
  }
209
  else {
210
  $plugin_admin_page = new Wpvr_Admin_Pages();
211
+ }
212
  }else {
213
  $plugin_admin_page = new Wpvr_Admin_Pages();
214
  }
229
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
230
  $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
231
  $this->loader->add_action( 'wp_ajax_wpvrvideo_preview', $plugin_admin_ajax, 'wpvrvideo_preview' );
232
+ $this->loader->add_action( 'wp_ajax_wpvr_file_import', $plugin_admin_ajax, 'wpvr_file_import' );
233
 
234
  }
235
 
251
  else {
252
  $plugin_public = new Wpvr_Public( $this->get_plugin_name(), $this->get_version() );
253
  }
254
+
255
  }
256
  else {
257
  $plugin_public = new Wpvr_Public( $this->get_plugin_name(), $this->get_version() );
258
+ }
259
  }else {
260
  $plugin_public = new Wpvr_Public( $this->get_plugin_name(), $this->get_version() );
261
  }
public/class-wpvr-public.php CHANGED
@@ -527,7 +527,18 @@ class Wpvr_Public {
527
  }
528
 
529
  $html .= '</style>';
530
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
 
 
 
 
 
 
 
 
 
 
 
531
  $html .= '<i class="fa fa-times cross"></i>';
532
  $html .= '<div class="custom-ifram" style="display: none;">';
533
  $html .= '</div>';
527
  }
528
 
529
  $html .= '</style>';
530
+ if ($width == 'fullwidth') {
531
+ if (wpvr_isMobileDevice()) {
532
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align:center;">';
533
+ }
534
+ else {
535
+ $html .= '<div id="pano'.$id.'" class="pano-wrap vrfullwidth" style=" text-align:center; height: '.$height.';" >';
536
+ }
537
+ }
538
+ else {
539
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'; height: '.$height.'; margin: 0 auto;">';
540
+ }
541
+
542
  $html .= '<i class="fa fa-times cross"></i>';
543
  $html .= '<div class="custom-ifram" style="display: none;">';
544
  $html .= '</div>';
public/css/wpvr-public.css CHANGED
@@ -12,7 +12,15 @@ div.pnlm-hotspot-base.far:before{
12
  transform: translate(-50%, -50%);
13
  }
14
 
15
- .pnlm-container iframe {
 
 
 
 
 
 
 
 
16
  max-width: inherit;
17
  margin-bottom: 0;
18
  }
@@ -158,8 +166,6 @@ div.custom-ifram {
158
  .custom-tooltip p {
159
  width: 430px;
160
  }
161
-
162
-
163
  }
164
 
165
  @media (max-width: 768px){
12
  transform: translate(-50%, -50%);
13
  }
14
 
15
+ .vrfullwidth {
16
+ width: 98vw;
17
+ position: relative;
18
+ margin-left: -49vw !important;
19
+ left: 50% !important;
20
+ max-width: 100vw !important;
21
+ }
22
+
23
+ .pnlm-container iframe {
24
  max-width: inherit;
25
  margin-bottom: 0;
26
  }
166
  .custom-tooltip p {
167
  width: 430px;
168
  }
 
 
169
  }
170
 
171
  @media (max-width: 768px){
src/index.js CHANGED
@@ -9,7 +9,7 @@ var el = wp.element.createElement,
9
 
10
  const iconEl = el('svg', { width: 20, height: 20 },
11
  el('path', { d: "M16.1,16.6h-2.5c-1,0-1.9-0.6-2.4-1.5L11,14.5c-0.2-0.4-0.5-0.6-0.9-0.6c-0.4,0-0.8,0.2-0.9,0.6l-0.3,0.6 c-0.4,0.9-1.3,1.5-2.4,1.5H3.9c-2.2,0-3.9-1.8-3.9-3.9V7.3c0-2.2,1.8-3.9,3.9-3.9h12.2c2.2,0,3.9,1.8,3.9,3.9v1.5 c0,0.4-0.3,0.8-0.8,0.8c-0.4,0-0.8-0.3-0.8-0.8V7.3c0-1.3-1.1-2.3-2.3-2.3H3.9C2.6,4.9,1.6,6,1.6,7.3v5.4c0,1.3,1.1,2.3,2.3,2.3 h2.6c0.4,0,0.8-0.2,0.9-0.6l0.3-0.6c0.4-0.9,1.3-1.5,2.4-1.5c1,0,1.9,0.6,2.4,1.5l0.3,0.6c0.2,0.4,0.5,0.6,0.9,0.6h2.5 c1.3,0,2.3-1.1,2.3-2.3c0-0.4,0.3-0.8,0.8-0.8c0.4,0,0.8,0.3,0.8,0.8C20,14.9,18.2,16.6,16.1,16.6L16.1,16.6z M16.7,9.4 c0-1.3-1.1-2.3-2.3-2.3C13,7.1,12,8.1,12,9.4s1.1,2.3,2.3,2.3C15.6,11.7,16.7,10.7,16.7,9.4L16.7,9.4z M15.1,9.4 c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8C14.8,8.6,15.1,9,15.1,9.4L15.1,9.4z M8,9.4C8,8.1,7,7.1,5.7,7.1 S3.3,8.1,3.3,9.4s1.1,2.3,2.3,2.3S8,10.7,8,9.4L8,9.4z M6.4,9.4c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8 C6.1,8.6,6.4,9,6.4,9.4L6.4,9.4z M6.4,9.4" } )
12
- );
13
  class wpvredit extends Component {
14
 
15
  constructor() {
@@ -22,10 +22,10 @@ class wpvredit extends Component {
22
 
23
  componentDidMount() {
24
  wp.apiFetch( { path : 'wpvr/v1/panodata' } ).then( data => {
25
- this.setState( { data, data } );
26
- } );
27
  }
28
-
29
  render() {
30
 
31
  return [
@@ -34,8 +34,8 @@ class wpvredit extends Component {
34
  label: 'Id',
35
  value: this.props.attributes.id,
36
 
37
- onChange: ( value ) => {
38
- this.props.setAttributes( { id: value } );
39
  },
40
  options: this.state.data,
41
  } )
@@ -54,20 +54,20 @@ class wpvredit extends Component {
54
  onChange: ( value ) => { this.props.setAttributes( { height: value } ); },
55
  } )
56
  ),
57
-
58
  <p className="wpvr-block-content">
59
  WPVR id={this.props.attributes.id}, Width={this.props.attributes.width}px, Height={this.props.attributes.height}px
60
  </p>
61
-
62
  ];
63
-
64
  }
65
- }
66
  registerBlockType( 'wpvr/wpvr-block', {
67
- title: 'WPVR',
68
  icon: iconEl,
69
  category: 'common',
70
-
71
 
72
  edit: wpvredit,
73
 
@@ -75,5 +75,3 @@ registerBlockType( 'wpvr/wpvr-block', {
75
  return null;
76
  },
77
  } );
78
-
79
-
9
 
10
  const iconEl = el('svg', { width: 20, height: 20 },
11
  el('path', { d: "M16.1,16.6h-2.5c-1,0-1.9-0.6-2.4-1.5L11,14.5c-0.2-0.4-0.5-0.6-0.9-0.6c-0.4,0-0.8,0.2-0.9,0.6l-0.3,0.6 c-0.4,0.9-1.3,1.5-2.4,1.5H3.9c-2.2,0-3.9-1.8-3.9-3.9V7.3c0-2.2,1.8-3.9,3.9-3.9h12.2c2.2,0,3.9,1.8,3.9,3.9v1.5 c0,0.4-0.3,0.8-0.8,0.8c-0.4,0-0.8-0.3-0.8-0.8V7.3c0-1.3-1.1-2.3-2.3-2.3H3.9C2.6,4.9,1.6,6,1.6,7.3v5.4c0,1.3,1.1,2.3,2.3,2.3 h2.6c0.4,0,0.8-0.2,0.9-0.6l0.3-0.6c0.4-0.9,1.3-1.5,2.4-1.5c1,0,1.9,0.6,2.4,1.5l0.3,0.6c0.2,0.4,0.5,0.6,0.9,0.6h2.5 c1.3,0,2.3-1.1,2.3-2.3c0-0.4,0.3-0.8,0.8-0.8c0.4,0,0.8,0.3,0.8,0.8C20,14.9,18.2,16.6,16.1,16.6L16.1,16.6z M16.7,9.4 c0-1.3-1.1-2.3-2.3-2.3C13,7.1,12,8.1,12,9.4s1.1,2.3,2.3,2.3C15.6,11.7,16.7,10.7,16.7,9.4L16.7,9.4z M15.1,9.4 c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8C14.8,8.6,15.1,9,15.1,9.4L15.1,9.4z M8,9.4C8,8.1,7,7.1,5.7,7.1 S3.3,8.1,3.3,9.4s1.1,2.3,2.3,2.3S8,10.7,8,9.4L8,9.4z M6.4,9.4c0,0.4-0.4,0.8-0.8,0.8c-0.4,0-0.8-0.4-0.8-0.8s0.4-0.8,0.8-0.8 C6.1,8.6,6.4,9,6.4,9.4L6.4,9.4z M6.4,9.4" } )
12
+ );
13
  class wpvredit extends Component {
14
 
15
  constructor() {
22
 
23
  componentDidMount() {
24
  wp.apiFetch( { path : 'wpvr/v1/panodata' } ).then( data => {
25
+ this.setState( { data, data } );
26
+ } );
27
  }
28
+
29
  render() {
30
 
31
  return [
34
  label: 'Id',
35
  value: this.props.attributes.id,
36
 
37
+ onChange: ( value ) => {
38
+ this.props.setAttributes( { id: value } );
39
  },
40
  options: this.state.data,
41
  } )
54
  onChange: ( value ) => { this.props.setAttributes( { height: value } ); },
55
  } )
56
  ),
57
+
58
  <p className="wpvr-block-content">
59
  WPVR id={this.props.attributes.id}, Width={this.props.attributes.width}px, Height={this.props.attributes.height}px
60
  </p>
61
+
62
  ];
63
+
64
  }
65
+ }
66
  registerBlockType( 'wpvr/wpvr-block', {
67
+ title: 'WPVR',
68
  icon: iconEl,
69
  category: 'common',
70
+
71
 
72
  edit: wpvredit,
73
 
75
  return null;
76
  },
77
  } );
 
 
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: 2.9.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
@@ -564,7 +564,17 @@ function wpvr_block_render( $attributes ) {
564
 
565
  $html .= '</style>';
566
 
567
- $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'px; height: '.$height.'px; margin: 0 auto;">';
 
 
 
 
 
 
 
 
 
 
568
  $html .= '<i class="fa fa-times cross"></i>';
569
  $html .= '<div class="custom-ifram" style="display: none;">';
570
  $html .= '</div>';
@@ -712,3 +722,39 @@ function wpvr_rest_data_set() {
712
  }
713
  return $wpvr_list;
714
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.0.0
20
  * Author: Rextheme
21
  * Author URI: http://rextheme.com/
22
  * License: GPL-2.0+
564
 
565
  $html .= '</style>';
566
 
567
+ if ($width == 'fullwidth') {
568
+ if (wpvr_isMobileDevice()) {
569
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style="text-align:center;" >';
570
+ }
571
+ else {
572
+ $html .= '<div id="pano'.$id.'" class="pano-wrap vrfullwidth" style=" text-align:center; height: '.$height.'px;" >';
573
+ }
574
+ }
575
+ else {
576
+ $html .= '<div id="pano'.$id.'" class="pano-wrap" style=" text-align:center; width: '.$width.'px; height: '.$height.'px; margin: 0 auto;">';
577
+ }
578
  $html .= '<i class="fa fa-times cross"></i>';
579
  $html .= '<div class="custom-ifram" style="display: none;">';
580
  $html .= '</div>';
722
  }
723
  return $wpvr_list;
724
  }
725
+
726
+ function wpvr_isMobileDevice() {
727
+ return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
728
+ }
729
+
730
+ function wpvr_directory() {
731
+ $upload = wp_upload_dir();
732
+ $upload_dir = $upload['basedir'];
733
+ $upload_dir_temp = $upload_dir . '/wpvr/temp/';
734
+ if (! is_dir($upload_dir_temp)) {
735
+ wp_mkdir_p( $upload_dir_temp, 0700 );
736
+ }
737
+ }
738
+
739
+ add_action('admin_init','wpvr_directory');
740
+ function wpvr_delete_temp_file() {
741
+ $file_save_url = wp_upload_dir();
742
+ $rootPath = realpath( $file_save_url['basedir'].'/wpvr/temp/');
743
+ $files = new RecursiveIteratorIterator(
744
+ new RecursiveDirectoryIterator($rootPath),
745
+ RecursiveIteratorIterator::LEAVES_ONLY
746
+ );
747
+ foreach ($files as $name => $file)
748
+ {
749
+ if (!$file->isDir())
750
+ {
751
+ $filePath = $file->getRealPath();
752
+ $filesToDelete[] = $filePath;
753
+ }
754
+ }
755
+
756
+ foreach ($filesToDelete as $file)
757
+ {
758
+ unlink($file);
759
+ }
760
+ }