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

Version Description

(15-06-2022) = * Update: Plugin Code restructured. * Update: Improvement on tour creation tabs. * New: Welcome page. * New: Guided Tour. * Tweak: Global Preview button. * Fix: Conflict with Divi Page Builder.

Download this release

Release Info

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

Code changes from version 7.3.11 to 8.0.0

Files changed (89) hide show
  1. README.md +1 -0
  2. README.txt +35 -25
  3. admin/class-wpvr-admin-pages.php +0 -38
  4. admin/class-wpvr-admin.php +209 -2733
  5. admin/class-wpvr-ajax.php +0 -1720
  6. admin/class-wpvr-icon.php +0 -1018
  7. admin/class-wpvr-rollback.php +0 -181
  8. admin/classes/class-setup-meta-box.php +206 -0
  9. admin/classes/class-tour-preview-meta-box.php +699 -0
  10. admin/classes/class-wpvr-admin-pages.php +129 -0
  11. admin/classes/class-wpvr-advanced-control.php +58 -0
  12. admin/classes/class-wpvr-ajax.php +211 -0
  13. admin/classes/class-wpvr-basic-setting.php +66 -0
  14. admin/classes/class-wpvr-control-button.php +58 -0
  15. admin/classes/class-wpvr-general.php +111 -0
  16. admin/classes/class-wpvr-hotspot.php +199 -0
  17. admin/classes/class-wpvr-meta-field.php +2563 -0
  18. admin/classes/class-wpvr-post-type.php +172 -0
  19. admin/classes/class-wpvr-scene.php +1772 -0
  20. admin/classes/class-wpvr-shortcode.php +58 -0
  21. admin/classes/class-wpvr-streetview.php +53 -0
  22. admin/classes/class-wpvr-video.php +178 -0
  23. admin/css/wpvr-admin.css +97 -25
  24. admin/css/wpvr-admin2.css +526 -0
  25. admin/fonts/Roboto-Bold.woff +0 -0
  26. admin/fonts/Roboto-Bold.woff2 +0 -0
  27. admin/fonts/Roboto-Medium.woff +0 -0
  28. admin/fonts/Roboto-Medium.woff2 +0 -0
  29. admin/fonts/Roboto-Regular.woff +0 -0
  30. admin/fonts/Roboto-Regular.woff2 +0 -0
  31. admin/helpers/class-wpvr-format.php +1350 -0
  32. admin/helpers/class-wpvr-validator.php +589 -0
  33. admin/icon/360-camera.svg +7 -0
  34. admin/icon/360-view.svg +9 -0
  35. admin/icon/3d-view.svg +7 -0
  36. admin/icon/arrow-return.svg +3 -0
  37. admin/icon/arrow-right-blue.svg +3 -0
  38. admin/icon/background-audio.svg +4 -0
  39. admin/icon/cart-lift.png +0 -0
  40. admin/icon/contact-form.svg +7 -0
  41. admin/icon/control-button.svg +7 -0
  42. admin/icon/explainer-video.svg +6 -0
  43. admin/icon/feature-cta-bg.jpg +0 -0
  44. admin/icon/feature-settings-cta-bg.jpg +0 -0
  45. admin/icon/gyroscope.svg +6 -0
  46. admin/icon/hotspot.svg +7 -0
  47. admin/icon/scene-gallery.svg +16 -0
  48. admin/icon/smartphone.svg +4 -0
  49. admin/icon/street-view.svg +5 -0
  50. admin/icon/vr-hero-video-shape.svg +5 -0
  51. admin/icon/vr-video-poster.png +0 -0
  52. admin/icon/woocommerce.svg +6 -0
  53. admin/icon/youtube-play-icon.svg +4 -0
  54. admin/js/wpvr-admin.js +168 -200
  55. admin/js/wpvr-global.js +8 -0
  56. admin/js/wpvr-shortcode.js +64 -0
  57. admin/js/wpvr-tour-guide.js +554 -0
  58. admin/lib/pannellum/src/js/pannellum.js +1 -0
  59. admin/lib/shepherd/css/shepherd-theme-arrows-plain-buttons.css +215 -0
  60. admin/lib/shepherd/css/wpvr-tour-guide.min.css +202 -0
  61. admin/lib/shepherd/tether-shepherd/LICENSE +8 -0
  62. admin/lib/shepherd/tether-shepherd/shepherd.js +745 -0
  63. admin/lib/shepherd/tether-shepherd/shepherd.min.js +1 -0
  64. admin/lib/shepherd/tether-shepherd/tether.js +1443 -0
  65. admin/lib/shepherd/tether/LICENSE +8 -0
  66. admin/lib/shepherd/tether/tether.js +1820 -0
  67. admin/lib/shepherd/tether/tether.min.js +1 -0
  68. admin/partials/wpvr-admin-display.php +1 -1
  69. admin/partials/wpvr-meta-box-builder-display.php +0 -614
  70. admin/partials/wpvr-meta-box-shortcode-display.php +0 -27
  71. admin/partials/wpvr_confirmation_alert.php +77 -22
  72. admin/partials/wpvr_documentation.php +35 -29
  73. admin/partials/wpvr_setup_wizard.php +233 -0
  74. admin/partials/wpvr_streetview_confirmation_alert.php +0 -20
  75. admin/scss/_welcome-page.scss +594 -0
  76. admin/scss/style.scss +1 -0
  77. admin/views/class-wpvr-meta-box.php +36 -0
  78. admin/views/class-wpvr-singleton.php +113 -0
  79. admin/views/class-wpvr-tour-setting.php +24 -0
  80. build/index.build.js +1 -1
  81. elementor/elementor.php +1 -5
  82. elementor/elements/Wpvr-widget.php +17 -29
  83. includes/class-wpvr-activator.php +6 -6
  84. includes/class-wpvr-deactivator.php +5 -5
  85. includes/class-wpvr-i18n.php +2 -2
  86. includes/class-wpvr-loader.php +2 -2
  87. includes/class-wpvr.php +64 -115
  88. languages/wpvr.pot +292 -292
  89. public/class-wpvr-public.php +82 -510
README.md ADDED
@@ -0,0 +1 @@
 
1
+ # wpvr-free-restructure
README.txt CHANGED
@@ -1,11 +1,11 @@
1
  === WP VR - 360 Panorama and Virtual Tour Builder For WordPress ===
2
  Contributors: rextheme, coderexco
3
- Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour, 360, Streetview, virtual reality, 360 video, virtual, vr, interactive, 360-degree, equirectangular, google streetview, panoramas
4
  Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
5
  Requires at least: 5.0
6
  Tested up to: 6.0
7
  Requires PHP: 7.0.0
8
- Stable tag: 7.3.11
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -37,7 +37,7 @@ On top of that, you can customize the tour further using auto-rotation effect, s
37
 
38
  You may also use interactive hotspots to display information and keep your viewers engaged.
39
 
40
- The best part of this plugin is, you will get a live tour preview at the back-end so that you can see what you are creating on the go.
41
 
42
  Even if you're new to this, you will still be able to create virtual tours on your own, thanks to the actionable video tutorials and step-by-step instructions in our documentation.
43
 
@@ -68,13 +68,13 @@ Also, you will get over 900+ custom icons for hotspots which you can further cus
68
 
69
  **A Simple Tool For 360 Experience**
70
 
71
- Whether you run a travel blog, or sell properties as a realtor, a virtual tour will make your site more interactive. Even just viewing a simple scene with one 360 degree image will add extra value.
72
 
73
  And WPVR is currently the most reliable plugin to help you out with this. You may choose to use it as a simple 360 photo viewer, or create a high quality virtual tour with all the features without any complications.
74
 
75
  **A Functional 360 Video Viewer**
76
 
77
- When you have a 360 camera, you will be able to capture 360 degree apartment videos which is amazing.
78
 
79
  Once you embed the 360 degree videos on your site, your visitors can navigate within the video, while it plays.
80
 
@@ -82,7 +82,7 @@ You may upload your 360 video content to Youtube, Vimeo, or your website, and th
82
 
83
  **Embed Virtual Tours In Just A Few Clicks**
84
 
85
- Once you create a tour, its really easy to embed it on your website.
86
 
87
  Whether you use Gutenberg Editor or Popular page builders, WPVR comes with dedicated blocks and widgets to save you time when embedding your tour on your site.
88
 
@@ -92,11 +92,11 @@ If you use any other page builder, you can still publish the tour by using a sho
92
 
93
  **Use High Quality Images Without WordPress Restriction**
94
 
95
- A good quality 360 panorama usually comes with very high resolution that can easily go over 3000 x 1500 pixels.
96
 
97
  However, WordPress has the default large image handler which usually resizes images to below 2560 x 1280 pixels when you upload the image.
98
 
99
- WPVR comes with the option to disable this restriction so that you can easily upload panoramic images that can be more that 3000 pixels in width.
100
 
101
  **Mobile First VR Approach**
102
 
@@ -137,11 +137,11 @@ To have more control over creating a virtual tour, learn about the [Premium vers
137
  * Tour Autoload Feature.
138
  * Scene Fade Animation.
139
  * Auto Rotation with Speed Control.
140
- * Auto Rotation Direction, Pause, and Stop control.
141
  * Basic Control Buttons (Zoom In, Zoom Out, and Fullscreen).
142
  * Mouse Drag Control on Virtual Tour.
143
  * Zoom In and Out with Mouse Scroll on Virtual Tour.
144
- * Zoom In and Out with ‘+’ and ‘-’ keyboard buttons.
145
  * Add Multiple Scenes and Hotspots.
146
  * Scene Type Hotspot to Connect Scenes.
147
  * Info Type Hotspots to Give Information.
@@ -184,12 +184,12 @@ To have more control over creating a virtual tour, learn about the [Premium vers
184
  * Disable or Enable Mouse Drag Control.
185
  * Disable or Enable Mouse Scroll Zoom.
186
  * Fluent Forms Integration on Hotspots.
187
- * Fill-up and Submit Booking/Contact Forms.
188
  * WooCommerce Product Integration on Hotspots.
189
  * Add To Cart Feature for WooCommerce Products on Hotspots.
190
  * Advanced Control Buttons (Move Up, Down, Left, & Right).
191
- * Customize Icons of Each Control Button (900+ Premium Icons).
192
- * Customize Colors of Each Control Button (RGB, HSL, & HEX).
193
  * Enable or Disable Each Control Button.
194
  * Custom Default Scene Face for Each Scene.
195
  * Default Scene Face For Target Scene.
@@ -218,7 +218,7 @@ To have more control over creating a virtual tour, learn about the [Premium vers
218
  - Background Tour.
219
 
220
  ## Privacy Policy
221
- WP VR uses [Appsero](https://appsero.com) SDK to collect some telemetry data upon user's confirmation. This helps us to troubleshoot problems faster & make product improvements.
222
 
223
  Appsero SDK **does not gather any data by default.** The SDK only starts gathering basic telemetry data **when a user allows it via the admin notice**. We collect the data to ensure a great user experience for all our users.
224
 
@@ -276,25 +276,27 @@ If the Enable Script Control option is turned On, turn it off and reload the tou
276
 
277
  If you wish to use this feature, you have to set the URLs of all the pages on your site with a virtual tour in the List of Allowed Pages To Load WPVR Scripts field.
278
 
279
- =9. What To Do If I Get THE FILE (image link) COULD NOT BE ACCESSED Error?=
280
 
281
- Sometimes when you add a tour on your site, you might face this issue that rather than loading the tour it will give the error THE FILE () COULD NOT BE ACCESSED.”
282
 
283
- This error shows up when you are running a website under HTTPS (secured with SSL certificate) whereas your image link is under HTTP (unsecured).
284
 
285
- 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.
 
 
286
 
287
  =10. Can I make The Virtual Tour Full-width?=
288
 
289
  Yes, you can publish the tours as full-width of your page/post.
290
 
291
- For Gutenberg, Elementor, and Oxygen builder, set fullwidth on the Width field. For shortcodes, set width = fullwidth”.
292
 
293
  =11. What If I Use An Optimization or Caching Plugin?=
294
 
295
  If you use any Optimization or Caching plugins, then you need to exclude WP VR from its optimization function.
296
 
297
- Simply add “/plugins/wpvr to the exclusion field (or use the location where you store plugins).
298
 
299
  =12. Can I Allow The Users of My Site To Create Virtual Tours?=
300
 
@@ -324,6 +326,14 @@ Admins can remove the access from Authors and Editors at any time.
324
  == Changelog ==
325
 
326
 
 
 
 
 
 
 
 
 
327
  = 7.3.11 (03-06-2022) =
328
  * Fix: URL Redirect Issue while Publishing Tour
329
 
@@ -334,15 +344,14 @@ Admins can remove the access from Authors and Editors at any time.
334
  * New: WYSIWYG Editor Integration for Hotspot Content
335
  * New: Close On-click windows on any click.
336
 
337
-
338
  = 7.3.8 (25-05-2022) =
339
  * Update: Checked compatibility with WordPress 6.0.
340
  * Update: Get Started page content updated.
341
  * New: Updated support for Elementor function register_controls().
342
  * Fix: Loading wrong tabs on tour editing mode.
343
- * Fix: Radius not working for self-hosted video tours - Shortcodes.
344
- * Fix: Radius not working for self-hosted video tours - WPVR Gutenberg Block.
345
- * Fix: Radius not working for self-hosted video tours - WPVR Elementor Widget.
346
 
347
  = 7.3.7 (19-05-2022) =
348
  * Fix: ZenCDN Removed.
@@ -361,6 +370,7 @@ Admins can remove the access from Authors and Editors at any time.
361
  * Fix: PHP Warnings on Settings Page.
362
  * Fix: PHP Warnings on Hotspots Page.
363
 
 
364
  = 7.3.5 (27-01-2022) =
365
  * Update: Checked Compatibility with WordPress 5.9.
366
  * Update: Checked Compatibility with WooCommerce 6.1.1.
@@ -705,7 +715,7 @@ Admins can remove the access from Authors and Editors at any time.
705
  * Custom panorama compass support.
706
  * Default zoom level.
707
  * Maximum and minimum zoom range.
708
- * Customize each scenes default face on load.
709
  * Scene grab control and custom boundary for each scene.
710
 
711
  = 2.1.0 =
1
  === WP VR - 360 Panorama and Virtual Tour Builder For WordPress ===
2
  Contributors: rextheme, coderexco
3
+ Tags: virtual tour, real estate tour, panorama, panorama viewer, virtual tour, 360 panorama, interactive tour, 360, Streetview, virtual reality, 360 video, virtual, vr, interactive, 360-degree, equirectangular, google street view, panoramas
4
  Donate link: https://rextheme.com/wp-vr-360-panorama-and-virtual-tour-creator-for-wordpress/
5
  Requires at least: 5.0
6
  Tested up to: 6.0
7
  Requires PHP: 7.0.0
8
+ Stable tag: 8.0.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
37
 
38
  You may also use interactive hotspots to display information and keep your viewers engaged.
39
 
40
+ The best part of this plugin is that you will get a live tour preview at the back-end so that you can see what you are creating on the go.
41
 
42
  Even if you're new to this, you will still be able to create virtual tours on your own, thanks to the actionable video tutorials and step-by-step instructions in our documentation.
43
 
68
 
69
  **A Simple Tool For 360 Experience**
70
 
71
+ Whether you run a travel blog or sell properties as a realtor, a virtual tour will make your site more interactive. Even just viewing a simple scene with one 360 degree image will add extra value.
72
 
73
  And WPVR is currently the most reliable plugin to help you out with this. You may choose to use it as a simple 360 photo viewer, or create a high quality virtual tour with all the features without any complications.
74
 
75
  **A Functional 360 Video Viewer**
76
 
77
+ When you have a 360 camera, you will be able to capture 360 degree apartment videos which is amazing.
78
 
79
  Once you embed the 360 degree videos on your site, your visitors can navigate within the video, while it plays.
80
 
82
 
83
  **Embed Virtual Tours In Just A Few Clicks**
84
 
85
+ Once you create a tour, it's really easy to embed it on your website.
86
 
87
  Whether you use Gutenberg Editor or Popular page builders, WPVR comes with dedicated blocks and widgets to save you time when embedding your tour on your site.
88
 
92
 
93
  **Use High Quality Images Without WordPress Restriction**
94
 
95
+ A good quality 360 panorama usually comes with a very high resolution that can easily go over 3000 x 1500 pixels.
96
 
97
  However, WordPress has the default large image handler which usually resizes images to below 2560 x 1280 pixels when you upload the image.
98
 
99
+ WPVR comes with the option to disable this restriction so that you can easily upload panoramic images that can be more than 3000 pixels in width.
100
 
101
  **Mobile First VR Approach**
102
 
137
  * Tour Autoload Feature.
138
  * Scene Fade Animation.
139
  * Auto Rotation with Speed Control.
140
+ * Auto Rotation Direction, Pause and Stop control.
141
  * Basic Control Buttons (Zoom In, Zoom Out, and Fullscreen).
142
  * Mouse Drag Control on Virtual Tour.
143
  * Zoom In and Out with Mouse Scroll on Virtual Tour.
144
+ * Zoom In and Out with '+' and '-' keyboard buttons.
145
  * Add Multiple Scenes and Hotspots.
146
  * Scene Type Hotspot to Connect Scenes.
147
  * Info Type Hotspots to Give Information.
184
  * Disable or Enable Mouse Drag Control.
185
  * Disable or Enable Mouse Scroll Zoom.
186
  * Fluent Forms Integration on Hotspots.
187
+ * Fill up and Submit Booking/Contact Forms.
188
  * WooCommerce Product Integration on Hotspots.
189
  * Add To Cart Feature for WooCommerce Products on Hotspots.
190
  * Advanced Control Buttons (Move Up, Down, Left, & Right).
191
+ * Customize the Icons of Each Control Button (900+ Premium Icons).
192
+ * Customize the Colors of Each Control Button (RGB, HSL, & HEX).
193
  * Enable or Disable Each Control Button.
194
  * Custom Default Scene Face for Each Scene.
195
  * Default Scene Face For Target Scene.
218
  - Background Tour.
219
 
220
  ## Privacy Policy
221
+ WP VR uses [Appsero](https://appsero.com) SDK to collect some telemetry data upon the user's confirmation. This helps us to troubleshoot problems faster & make product improvements.
222
 
223
  Appsero SDK **does not gather any data by default.** The SDK only starts gathering basic telemetry data **when a user allows it via the admin notice**. We collect the data to ensure a great user experience for all our users.
224
 
276
 
277
  If you wish to use this feature, you have to set the URLs of all the pages on your site with a virtual tour in the List of Allowed Pages To Load WPVR Scripts field.
278
 
279
+ =9. What To Do If I Get "THE FILE (image link) COULD NOT BE ACCESSED Error?=
280
 
281
+ Sometimes when you add a tour to your site, you might face this issue that rather than loading the tour it will give the error "THE FILE (...) COULD NOT BE ACCESSED."
282
 
283
+ This error shows up when you are running a website under "HTTPS" (secured with SSL certificate) whereas your image link is under "HTTP" (unsecured).
284
 
285
+ To solve this issue, go to your WordPress Dashboard > Settings > General.
286
+
287
+ Here make sure you have "http" added to both "WordPress Address (URL)" and "Site Address (URL)". That's it. Your virtual tour will load with no issues.
288
 
289
  =10. Can I make The Virtual Tour Full-width?=
290
 
291
  Yes, you can publish the tours as full-width of your page/post.
292
 
293
+ For Gutenberg, Elementor, and Oxygen builder, set fullwidth on the Width field. For shortcodes, set width = "fullwidth".
294
 
295
  =11. What If I Use An Optimization or Caching Plugin?=
296
 
297
  If you use any Optimization or Caching plugins, then you need to exclude WP VR from its optimization function.
298
 
299
+ Simply add '/plugins/wpvr' to the exclusion field (or use the location where you store plugins).
300
 
301
  =12. Can I Allow The Users of My Site To Create Virtual Tours?=
302
 
326
  == Changelog ==
327
 
328
 
329
+ = 8.0.0 (15-06-2022) =
330
+ * Update: Plugin Code restructured.
331
+ * Update: Improvement on tour creation tabs.
332
+ * New: Welcome page.
333
+ * New: Guided Tour.
334
+ * Tweak: Global Preview button.
335
+ * Fix: Conflict with Divi Page Builder.
336
+
337
  = 7.3.11 (03-06-2022) =
338
  * Fix: URL Redirect Issue while Publishing Tour
339
 
344
  * New: WYSIWYG Editor Integration for Hotspot Content
345
  * New: Close On-click windows on any click.
346
 
 
347
  = 7.3.8 (25-05-2022) =
348
  * Update: Checked compatibility with WordPress 6.0.
349
  * Update: Get Started page content updated.
350
  * New: Updated support for Elementor function register_controls().
351
  * Fix: Loading wrong tabs on tour editing mode.
352
+ * Fix: Radius not working for self-hosted video tours Shortcodes.
353
+ * Fix: Radius not working for self-hosted video tours WPVR Gutenberg Block.
354
+ * Fix: Radius not working for self-hosted video tours WPVR Elementor Widget.
355
 
356
  = 7.3.7 (19-05-2022) =
357
  * Fix: ZenCDN Removed.
370
  * Fix: PHP Warnings on Settings Page.
371
  * Fix: PHP Warnings on Hotspots Page.
372
 
373
+
374
  = 7.3.5 (27-01-2022) =
375
  * Update: Checked Compatibility with WordPress 5.9.
376
  * Update: Checked Compatibility with WooCommerce 6.1.1.
715
  * Custom panorama compass support.
716
  * Default zoom level.
717
  * Maximum and minimum zoom range.
718
+ * Customize each scene's default face on load.
719
  * Scene grab control and custom boundary for each scene.
720
 
721
  = 2.1.0 =
admin/class-wpvr-admin-pages.php DELETED
@@ -1,38 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
- /**
4
- * The admin-specific functionality of the plugin.
5
- *
6
- * @link http://rextheme.com/
7
- * @since 1.0.0
8
- *
9
- * @package Wpvr
10
- * @subpackage Wpvr/admin
11
- */
12
-
13
- class Wpvr_Admin_Pages {
14
-
15
- /**
16
- * Admin page setup is specified in this area.
17
- */
18
- function wpvr_add_admin_pages() {
19
-
20
- add_menu_page( 'WP VR', 'WP VR', 'manage_options', 'wpvr', array( $this, 'wpvr_admin_doc'),plugins_url(). '/wpvr/images/icon.png' , 25);
21
-
22
- add_submenu_page( 'wpvr', 'WP VR', 'Get Started','manage_options', 'wpvr', array( $this, 'wpvr_admin_doc'));
23
-
24
- add_submenu_page( 'wpvr', 'WP VR', 'Tours','manage_options', 'edit.php?post_type=wpvr_item', NULL);
25
-
26
- add_submenu_page( 'wpvr', 'WP VR', 'Add New Tour','manage_options', 'post-new.php?post_type=wpvr_item', NULL);
27
-
28
- do_action('wpvr_pro_license_page');
29
-
30
- }
31
-
32
- function wpvr_admin_doc() {
33
- require_once plugin_dir_path(__FILE__) . '/partials/wpvr_documentation.php';
34
- }
35
- function wpvr_pro_admin_doc() {
36
- require_once plugin_dir_path(__FILE__) . '/partials/wpvr_license.php';
37
- }
38
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-wpvr-admin.php CHANGED
@@ -1,12 +1,10 @@
1
  <?php
2
- if (! defined('ABSPATH')) {
3
- exit;
4
- } // Exit if accessed directly
5
  /**
6
  * The admin-specific functionality of the plugin.
7
  *
8
  * @link http://rextheme.com/
9
- * @since 1.0.0
10
  *
11
  * @package Wpvr
12
  * @subpackage Wpvr/admin
@@ -20,76 +18,121 @@ if (! defined('ABSPATH')) {
20
  *
21
  * @package Wpvr
22
  * @subpackage Wpvr/admin
23
- * @author Rextheme <sakib@coderex.co>t
24
  */
25
- class Wpvr_Admin
26
- {
27
-
28
- /**
29
- * The ID of this plugin.
30
- *
31
- * @since 1.0.0
32
- * @access private
33
- * @var string $plugin_name The ID of this plugin.
34
- */
35
- private $plugin_name;
36
-
37
- /**
38
- * The version of this plugin.
39
- *
40
- * @since 1.0.0
41
- * @access private
42
- * @var string $version The current version of this plugin.
43
- */
44
- private $version;
45
-
46
- /**
47
  * The post type of this plugin.
48
  *
49
- * @since 1.0.0
50
  */
51
  private $post_type;
52
 
53
- /**
54
- * Initialize the class and set its properties.
55
- *
56
- * @since 1.0.0
57
- * @param string $plugin_name The name of this plugin.
58
- * @param string $version The version of this plugin.
59
- */
60
- public function __construct($plugin_name, $version, $post_type)
61
- {
62
- $this->plugin_name = $plugin_name;
63
- $this->version = $version;
64
- $this->post_type = $post_type;
65
- }
66
-
67
- /**
68
- * Register the stylesheets for the admin area.
69
- *
70
- * @since 1.0.0
71
- */
72
- public function enqueue_styles()
73
- {
74
-
75
- /**
76
- * This function is provided for demonstration purposes only.
77
- *
78
- * An instance of this class should be passed to the run() function
79
- * defined in Wpvr_Loader as all of the hooks are defined
80
- * in that particular class.
81
- *
82
- * The Wpvr_Loader will then create the relationship
83
- * between the defined hooks and the functions defined in this
84
- * class.
85
- */
86
-
87
- $screen = get_current_screen();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  if ($screen->id=="toplevel_page_wpvr") {
89
  wp_enqueue_style('materialize-css', plugin_dir_url(__FILE__) . 'css/materialize.min.css', array(), $this->version, 'all');
90
  wp_enqueue_style('materialize-icons', plugin_dir_url(__FILE__) . 'lib/materializeicon.css', array(), $this->version, 'all');
91
  wp_enqueue_style('owl-css', 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css', array(), $this->version, 'all');
92
-
93
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-admin.css', array(), $this->version, 'all');
94
  }
95
 
@@ -102,92 +145,125 @@ class Wpvr_Admin
102
  wp_enqueue_style('videojs-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/video-js.css', array(), true);
103
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-admin.css', array(), $this->version, 'all');
104
  wp_enqueue_style('summernote', plugin_dir_url(__FILE__) . 'lib/summernote/summernote-lite.min.css', array(), $this->version, 'all');
 
 
 
 
105
  }
106
- }
107
-
108
- /**
109
- * Register the JavaScript for the admin area.
110
- *
111
- * @since 1.0.0
112
- */
113
- public function enqueue_scripts()
114
- {
115
-
116
- /**
117
- * This function is provided for demonstration purposes only.
118
- *
119
- * An instance of this class should be passed to the run() function
120
- * defined in Wpvr_Loader as all of the hooks are defined
121
- * in that particular class.
122
- *
123
- * The Wpvr_Loader will then create the relationship
124
- * between the defined hooks and the functions defined in this
125
- * class.
126
- */
127
-
128
- $wpvr_list = array();
129
- $wpvr_list[] = array('value'=>0,'label'=>'None');
130
- $args = array(
131
- 'numberposts' => -1,
132
- 'post_type' => 'wpvr_item'
133
- );
134
 
135
- $wpvr_posts = get_posts( $args );
136
- foreach ($wpvr_posts as $wpvr_post) {
137
- $wpvr_list[] = array('value'=>$wpvr_post->ID,'label'=>$wpvr_post->post_title);
138
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
- wp_enqueue_script('wp-api');
141
- $adscreen = get_current_screen();
142
- // var_dump($adscreen);
143
- // wp_die();
144
- wp_enqueue_media();
145
- if ($adscreen->id=="wpvr_item" || $adscreen->id=="toplevel_page_wpvr") {
146
- wp_enqueue_script('summernote', plugin_dir_url(__FILE__) . 'lib/summernote/summernote-lite.min.js', array('jquery'), true);
147
-
148
- wp_enqueue_script('wpvr-icon-picker', plugin_dir_url(__FILE__) . 'lib/jquery.fonticonpicker.min.js', array(), true);
149
- wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
150
- wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
151
- wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) .'js/video.js', array('jquery'), true);
152
- wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
153
- wp_enqueue_script('jquery-repeater', plugin_dir_url(__FILE__) .'js/jquery.repeater.min.js', array('jquery'), true);
154
- wp_enqueue_script('icon-picker', plugin_dir_url(__FILE__) . 'lib/jquery.fonticonpicker.min.js', array(), true);
155
- wp_enqueue_script('owl', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array( 'jquery' ), false);
156
- wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/wpvr-admin.js', array( 'jquery' ), $this->version, true);
157
  wp_localize_script($this->plugin_name, 'wpvr_obj', array(
158
- 'ajaxurl' => admin_url('admin-ajax.php'),
159
- 'ajax_nonce' => wp_create_nonce('wpvr'),
160
- ));
161
- }
162
-
163
- if ($adscreen->id=="toplevel_page_wpvr") {
164
- wp_enqueue_script('materialize-js', plugin_dir_url(__FILE__) . 'js/materialize.min.js', array( 'jquery' ), $this->version, false);
165
- }
166
-
167
- wp_enqueue_script('owl-js', 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js', array( 'jquery' ), false);
168
- wp_enqueue_script('wpvr-global', plugin_dir_url(__FILE__) . 'js/wpvr-global.js', array( 'jquery' ), $this->version, false);
169
- wp_localize_script('wpvr-global', 'wpvr_global_obj', array(
170
- 'ajaxurl' => admin_url('admin-ajax.php'),
171
- 'site_url' => site_url() . '/wp-json/',
172
- 'ajax_nonce' => wp_create_nonce('wpvr_global'),
 
 
 
 
173
  'url_info' => array(
174
  'admin_url' => admin_url(),
175
  'screen' => $adscreen->action,
176
  'url' => $_SERVER['PHP_SELF'],
177
  'param' => $_GET,
178
  ),
179
- ));
180
- wp_localize_script('wpvr-global', 'wpvr_id_options', $wpvr_list);
181
- }
 
182
 
183
 
184
- /**
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  * Plugin action links
186
  *
187
- * @param $links
188
  * @return array
 
189
  */
190
- public function plugin_action_links_wpvr($actions, $plugin_file, $plugin_data, $context)
191
  {
192
  $actions['get_started'] = sprintf(
193
  '<a href="%s">%s</a>',
@@ -210,2604 +286,4 @@ class Wpvr_Admin
210
  return $actions;
211
  }
212
 
213
-
214
- /**
215
- * Init the edit screen of the plugin post type item
216
- *
217
- * @since 1.0.0
218
- */
219
- public function wpvr_admin_init()
220
- {
221
- /*
222
- * Documentation : https://developer.wordpress.org/reference/functions/add_meta_box/
223
- */
224
-
225
- add_meta_box(
226
- $this->post_type . '_builder__box',
227
- __('Tour Preview', $this->plugin_name),
228
- array($this, 'wpvr_display_meta_box_builder'),
229
- $this->post_type,
230
- 'side',
231
- 'high'
232
- );
233
- }
234
-
235
-
236
- /**
237
- * Register the custom post type
238
- *
239
- * @since 1.0.0
240
- */
241
- public function wpvr_add_plugin_custom_post_type()
242
- {
243
- $labels = array(
244
- 'name' => __('Tours', $this->plugin_name),
245
- 'singular_name' => __('Tours', $this->plugin_name),
246
- 'add_new' => __('Add New Tour', $this->plugin_name),
247
- 'add_new_item' => __('Add New Tour', $this->plugin_name),
248
- 'edit_item' => __('Edit Tour', $this->plugin_name),
249
- 'new_item' => __('New Tour', $this->plugin_name),
250
- 'view_item' => __('View Tour', $this->plugin_name),
251
- 'search_items' => __('Search Wpvr Tour', $this->plugin_name),
252
- 'not_found' => __('No Wpvr Tour found', $this->plugin_name),
253
- 'not_found_in_trash'=> __('No Wpvr Tour found in Trash', $this->plugin_name),
254
- 'parent_item_colon' => '',
255
- 'all_items' => __('All Tours', $this->plugin_name),
256
- 'menu_name' => __('WP VR', $this->plugin_name),
257
- );
258
-
259
- $args = array(
260
- 'labels' => $labels,
261
- 'public' => false,
262
- 'show_ui' => true,
263
- 'show_in_menu' => false,
264
- 'menu_position' => 100,
265
- 'supports' => array( 'title' ),
266
- 'menu_icon' => plugins_url(). '/wpvr/images/icon.png',
267
- 'capabilities' => array(
268
- 'edit_post' => 'edit_wpvr_tour',
269
- 'edit_posts' => 'edit_wpvr_tours',
270
- 'edit_others_posts' => 'edit_other_wpvr_tours',
271
- 'publish_posts' => 'publish_wpvr_tours',
272
- 'read_post' => 'read_wpvr_tour',
273
- 'read_private_posts' => 'read_private_wpvr_tours',
274
- 'delete_post' => 'delete_wpvr_tour'
275
- ),
276
- 'map_meta_cap' => true,
277
- );
278
-
279
- /**
280
- * Documentation : https://codex.wordpress.org/Function_Reference/register_post_type
281
- */
282
- register_post_type($this->post_type, $args);
283
- }
284
-
285
- /**
286
- * Populates the data in the custom columns
287
- *
288
- * @since 1.0.0
289
- */
290
- public function wpvr_manage_posts_custom_column($column_name)
291
- {
292
- $post = get_post();
293
-
294
- switch ($column_name) {
295
- case 'shortcode':
296
- echo '<code>[wpvr id="' . $post->ID . '"]</code>';
297
- break;
298
- default:
299
- break;
300
- }
301
- }
302
-
303
- /**
304
- * Adds the custom columns to the post type admin screen
305
- *
306
- * @since 1.0.0
307
- */
308
- public function wpvr_manage_post_columns()
309
- {
310
- $columns = array(
311
- 'cb' => '<input type="checkbox" />',
312
- 'title' => __('Title', $this->plugin_name),
313
- 'shortcode' => __('Shortcodes', $this->plugin_name),
314
- 'author' => __('Author', $this->plugin_name),
315
- 'date' => __('Date', $this->plugin_name)
316
- );
317
- return $columns;
318
- }
319
-
320
- /**
321
- * Sets the messages for the custom post type
322
- *
323
- * @since 1.0.0
324
- */
325
- public function wpvr_post_updated_messages($messages)
326
- {
327
- $messages[$this->post_type][1] = __('WP VR item updated.', $this->plugin_name);
328
- $messages[$this->post_type][4] = __('WP VR item updated.', $this->plugin_name);
329
-
330
- return $messages;
331
- }
332
-
333
- /**
334
- * Render the shortcode box for this plugin.
335
- *
336
- * @since 1.0.0
337
- */
338
- public function wpvr_display_meta_box_shortcode()
339
- {
340
- include_once('partials/wpvr-meta-box-shortcode-display.php');
341
- }
342
-
343
- /**
344
- * Render the builder box for this plugin.
345
- *
346
- * @since 1.0.0
347
- */
348
- public function wpvr_display_meta_box_builder()
349
- {
350
- include_once('partials/wpvr-meta-box-builder-display.php');
351
- }
352
-
353
- /**
354
- * Custom Metabox
355
- */
356
- public function wpvr_add_setup_metabox()
357
- {
358
- add_meta_box('setup', __('Setup'), array($this, 'wpvr_setup'), 'wpvr_item', 'normal', 'high');
359
- }
360
- public function wpvr_setup($post)
361
- {
362
- $data_limit = 5;
363
-
364
- $scene_limit = $data_limit + 1;
365
- $postdata = get_post_meta($post->ID, 'panodata', true);
366
-
367
-
368
- $autoload = true;
369
- if (isset($postdata["autoLoad"])) {
370
- $autoload = $postdata["autoLoad"];
371
- }
372
-
373
- $control = true;
374
- if (isset($postdata["showControls"])) {
375
- $control = $postdata["showControls"];
376
- }
377
-
378
- $default_scene = '';
379
- if (isset($postdata["defaultscene"])) {
380
- $default_scene = $postdata["defaultscene"];
381
- }
382
-
383
- $preview = '';
384
- if (isset($postdata['preview'])) {
385
- $preview = $postdata['preview'];
386
- }
387
- $previewtext = '';
388
- if (isset($postdata['previewtext'])) {
389
- $previewtext = $postdata['previewtext'];
390
- }
391
-
392
- $autorotation = '';
393
- if (isset($postdata["autoRotate"])) {
394
- $autorotation = $postdata["autoRotate"];
395
- } else {
396
- $autorotation = -5;
397
- }
398
- $autorotationinactivedelay = '';
399
- if (isset($postdata["autoRotateInactivityDelay"])) {
400
- $autorotationinactivedelay = $postdata["autoRotateInactivityDelay"];
401
- }
402
-
403
- $autorotationstopdelay = '';
404
- if (isset($postdata["autoRotateStopDelay"])) {
405
- $autorotationstopdelay = $postdata["autoRotateStopDelay"];
406
- }
407
-
408
- $scene_fade_duration = '';
409
- if (isset($postdata["scenefadeduration"])) {
410
- $scene_fade_duration = $postdata["scenefadeduration"];
411
- }
412
-
413
- $pano_data = '';
414
- if (isset($postdata["panodata"])) {
415
- $pano_data = $postdata["panodata"];
416
- }
417
-
418
- $custom_icon_array = new Wpvr_fontawesome_icons();
419
- $custom_icon = $custom_icon_array->icon;
420
-
421
- $html = '';
422
-
423
-
424
-
425
- $html .= '<div class="pano-setup">';
426
-
427
- // active tab variables
428
- $active_tab = 'general';
429
- $scene_active_tab = 1;
430
- $hotspot_active_tab = 1;
431
- if (isset($_GET['active_tab'])) {
432
- $active_tab = $_GET['active_tab'];
433
- }
434
- if (isset($_GET['scene'])) {
435
- $scene_active_tab = $_GET['scene'];
436
- }
437
- if (isset($_GET['hotspot'])) {
438
- $hotspot_active_tab = $_GET['hotspot'];
439
- }
440
-
441
- $html = '';
442
-
443
- $html .= '<div class="pano-setup">';
444
-
445
- $html .= '<input type="hidden" value="'.$active_tab.'" name="wpvr_active_tab" id="wpvr_active_tab"/>';
446
- $html .= '<input type="hidden" value="'.$scene_active_tab.'" name="wpvr_active_scenes" id="wpvr_active_scenes"/>';
447
- $html .= '<input type="hidden" value="'.$hotspot_active_tab.'" name="wpvr_active_hotspot" id="wpvr_active_hotspot"/>';
448
-
449
- //--------start pano alert------
450
- $html .= '<div class="pano-alert scene-alert">';
451
- $html .= '<div class="pano-error-wrapper">';
452
- $html .= '<div class="pano-error-body">';
453
- $html .= '<span class="cross pano-error-close-btn">
454
- <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
455
- <path fill-rule="evenodd" clip-rule="evenodd" d="M18.7778 18.7786C14.4819 23.074 7.51728 23.0738 3.22169 18.778C-1.0739 14.4823 -1.0739 7.51769 3.22169 3.22196C7.51728 -1.07378 14.4819 -1.07402 18.7778 3.22143C20.8409 5.28436 22 8.08242 22 11C22 13.9176 20.8409 16.7156 18.7778 18.7786ZM14.9278 8.21857L12.1071 11L14.9278 13.7814C15.0865 13.93 15.1765 14.1376 15.1765 14.355C15.1765 14.5724 15.0865 14.78 14.9278 14.9286C14.7795 15.0756 14.5788 15.1576 14.3699 15.1564C14.1638 15.1556 13.9663 15.0737 13.8199 14.9286L10.9992 12.1079L8.21778 14.9286C8.07143 15.0737 7.8739 15.1556 7.66778 15.1564C7.45893 15.1576 7.2582 15.0756 7.10992 14.9286C6.80528 14.6221 6.80528 14.1272 7.10992 13.8207L9.89135 11L7.10992 8.21857C6.84295 7.90683 6.8609 7.44213 7.15112 7.15191C7.44134 6.8617 7.90604 6.84375 8.21778 7.11071L10.9992 9.89214L13.7806 7.11071C13.9785 6.9058 14.2707 6.82202 14.5471 6.89095C14.8236 6.95988 15.0422 7.17104 15.1207 7.44488C15.1992 7.71872 15.1257 8.01365 14.9278 8.21857ZM4.34363 4.34471C8.02058 0.663508 13.9845 0.656605 17.6699 4.32929C19.4452 6.09842 20.4431 8.50157 20.4431 11.0079C20.4431 13.5141 19.4452 15.9173 17.6699 17.6864C13.9845 21.3591 8.02058 21.3522 4.34363 17.671C0.666691 13.9898 0.666691 8.02591 4.34363 4.34471Z" fill="#A8A7BE"/>
456
- </svg>
457
- </span>';
458
-
459
- $html .= '<span class="icon pano-warning">
460
- <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
461
- <path fill-rule="evenodd" clip-rule="evenodd" d="M0 15C0 23.2843 6.71573 30 15 30C23.2843 30 30 23.2843 30 15C30 6.71573 23.2843 0 15 0C6.71573 0 0 6.71573 0 15ZM2 15C2 7.8203 7.8203 2 15 2C22.1797 2 28 7.8203 28 15C28 22.1797 22.1797 28 15 28C7.8203 28 2 22.1797 2 15Z" fill="#004EFA"/>
462
- <circle cx="8.5" cy="11.5" r="1.5" fill="#004EFA"/>
463
- <circle cx="21.5" cy="11.5" r="1.5" fill="#004EFA"/>
464
- <path d="M20.9993 21.9932C20.7336 21.995 20.4781 21.8728 20.2894 21.6537C17.6429 18.5603 13.3571 18.5603 10.7106 21.6537C10.5228 21.8753 10.2673 22 10.0007 22C9.73407 22 9.4785 21.8753 9.29076 21.6537C8.90308 21.1971 8.90308 20.4596 9.29076 20.0029C12.7241 15.999 18.2759 15.999 21.7092 20.0029C22.0969 20.4596 22.0969 21.1971 21.7092 21.6537C21.5205 21.8728 21.2651 21.995 20.9993 21.9932V21.9932Z" fill="#004EFA"/>
465
- </svg>
466
- </span>';
467
-
468
- $html .= '<div class="pano-error-message"></div>';
469
-
470
- $html .= '</div>';
471
- //---end error body---
472
-
473
- //---error footer---
474
- $html .= '<div class="pano-error-footer">';
475
- $html .= '<ul>';
476
- $html .= '<li class="pano-error-close">';
477
- $html .= '<a href="https://rextheme.com/wpvr/" target="_blank" >Upgrade to Pro</a>';
478
- $html .= '</li>';
479
- $html .= '</ul>';
480
- $html .= '</div>';
481
- $html .= '</div>';
482
- $html .= '</div>';
483
- //--------end pano alert------
484
-
485
- $html .='<div class="rex-pano-tabs">';
486
- $html .='<nav class="rex-pano-tab-nav rex-pano-nav-menu main-nav" id="wpvr-main-nav">';
487
- $html .='<ul>';
488
- $html .='<li class="logo"><img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/logo.png'.'" alt="logo" /></li>';
489
-
490
- $html .='<li class="general active" data-screen="general">';
491
- $html .='<span data-href="#general">';
492
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/general-regular.png'.'" alt="icon" class="regular" />';
493
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/general-hover.png'.'" alt="icon" class="hover" />';
494
- $html .=''.__('General', 'wpvr').'</span>';
495
- $html .='</li>';
496
-
497
- $html .='<li class="scene" data-screen="scene">';
498
- $html .='<span data-href="#scenes">';
499
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/scenes-regular.png'.'" alt="icon" class="regular" />';
500
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/scenes-hover.png'.'" alt="icon" class="hover" />';
501
- $html .=''.__('Scenes', 'wpvr').'</span>';
502
- $html .='</li>';
503
-
504
- $html .='<li class="hotspot" data-screen="hotspot">';
505
- $html .='<span data-href="#scenes">';
506
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/hotspot-regular.png'.'" alt="icon" class="regular" />';
507
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/hotspot-hover.png'.'" alt="icon" class="hover" />';
508
- $html .=''.__('Hotspot', 'wpvr').'</span>';
509
- $html .='</li>';
510
-
511
- $html .='<li class="videos" data-screen="video">';
512
- $html .='<span data-href="#video">';
513
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/video-regular.png'.'" alt="icon" class="regular" />';
514
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/video-hover.png'.'" alt="icon" class="hover" />';
515
- $html .=''.__('Video', 'wpvr').'</span>';
516
- $html .='</li>';
517
- $html .='</ul>';
518
- $html .='</nav>';
519
-
520
- $html .='<div class="rex-pano-tab-content" id="wpvr-main-tab-contents">';
521
- $html .='<div class="rex-pano-tab general active" id="general">';
522
-
523
- //=start inner tab=
524
- $html .= '<div class="general-inner-tab">';
525
- //=start inner nav=
526
- $html .= '<ul class="inner-nav">';
527
-
528
- $html .='<li class="gen-basic active">';
529
- $html .='<span data-href="#gen-basic">';
530
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/basic-settings-regular.png'.'" alt="icon" class="regular" />';
531
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/basic-settings-hover.png'.'" alt="icon" class="hover" />';
532
- $html .=''.__('Basic Settings ', 'wpvr').'</span>';
533
- $html .='</li>';
534
-
535
- $html .='<li class="gen-advanced">';
536
- $html .='<span data-href="#gen-advanced">';
537
- $html .='<span class="pro-tag">pro</span>';
538
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/advance-control-regular.png'.'" alt="icon" class="regular" />';
539
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/advance-control-hover.png'.'" alt="icon" class="hover" />';
540
- $html .=''.__('Advanced Controls ', 'wpvr').'</span>';
541
- $html .='</li>';
542
-
543
- $html .='<li class="gen-control">';
544
- $html .='<span data-href="#gen-control">';
545
- $html .='<span class="pro-tag">pro</span>';
546
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/control-buttons-regular.png'.'" alt="icon" class="regular" />';
547
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/control-buttons-hover.png'.'" alt="icon" class="hover" />';
548
- $html .=''.__('Control Buttons ', 'wpvr').'</span>';
549
- $html .='</li>';
550
-
551
- $html .='<li class="vr-documentation">';
552
- $html .='<a href="https://rextheme.com/docs-category/wp-vr/" target="_blank">'.__('Documentation ', 'wpvr').'</a>';
553
- $html .='</li>';
554
-
555
- $html .= '</ul>';
556
- //=end inner nav=
557
-
558
- $html .= '<div class="inner-nav-content">';
559
- $html .= '<div class="basic-settings-content inner-single-content active" id="gen-basic">';
560
- $html .= '<div class="content-wrapper">';
561
- $html .= '<div class="left">';
562
- //===preview image===//
563
- if (!empty($preview)) {
564
- $html .= '<div class="single-settings preview-setting">';
565
- $html .= '<span>'.__('Set a Tour Preview Image : ', 'wpvr').'</span>';
566
- $html .= '<div class="form-group">';
567
- $html .= '<input type="text" name="preview-attachment-url" class="preview-attachment-url" value="'.$preview.'">';
568
- $html .= '<input type="button" class="preview-upload" id="vr-preview-img" data-info="" value="Upload"/>';
569
- $html .= '<div class="img-upload-frame img-uploaded" style="background-image: url('.$preview.')">';
570
- $html .= '<span class="remove-attachment">x</span>';
571
- $html .= '<label for="vr-preview-img">';
572
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/uplad-icon.png'.'" alt="preview img" />';
573
- $html .= '<span>'.__('Click to Upload an Image ', 'wpvr').'</span>';
574
- $html .= '</label>';
575
- $html .= '</div>';
576
-
577
- $html .= '</div>';
578
- $html .= '<span class="hints">'.__('This option will not work if the "Tour Autoload" is turned on.', 'wpvr').'</span>';
579
- $html .= '</div>';
580
- } else {
581
- $html .= '<div class="single-settings preview-setting">';
582
- $html .= '<span>'.__('Set a Tour Preview Image : ', 'wpvr').'</span>';
583
- $html .= '<div class="form-group">';
584
- $html .= '<input type="text" name="preview-attachment-url" class="preview-attachment-url" value="">';
585
- $html .= '<input type="button" class="preview-upload" id="vr-preview-img" data-info="" value="Upload"/>';
586
- $html .= '<div class="img-upload-frame">';
587
- $html .= '<span class="remove-attachment">x</span>';
588
- $html .= '<label for="vr-preview-img">';
589
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/uplad-icon.png'.'" alt="icon" />';
590
- $html .= '<span>'.__('Click to Upload an Image ', 'wpvr').'</span>';
591
- $html .= '</label>';
592
- $html .= '</div>';
593
- $html .= '</div>';
594
- $html .= '</div>';
595
- }
596
- //===preview image end===//
597
-
598
- //=Message on Tour Preview Image=//
599
- if(!empty($previewtext)){
600
- $html .= '<div class="single-settings preview-img-message">';
601
- $html .= '<span>'.__('Preview Image Message: ', 'wpvr').'</span>';
602
- $html .= '<input class="previewtext" type="text" name="previewtext" value="'.$previewtext.'"/>';
603
- $html .= '</div>';
604
- }else{
605
- $html .= '<div class="single-settings preview-img-message">';
606
- $html .= '<span>'.__('Preview Image Message: ', 'wpvr').'</span>';
607
- $html .= '<input class="previewtext" type="text" name="previewtext" value="Click To Load Panorama"/>';
608
- $html .= '</div>';
609
- }
610
-
611
- //=Autoload setup=//
612
- if ($autoload == true) {
613
- $html .= '<div class="single-settings autoload">';
614
- $html .= '<span>'.__('Tour Autoload: ', 'wpvr').'</span>';
615
-
616
- $html .= '<span class="wpvr-switcher">';
617
- $html .= '<input id="wpvr_autoload" class="vr-switcher-check" name="autoload" type="checkbox" value="on" checked />';
618
- $html .= '<label for="wpvr_autoload"></label>';
619
- $html .= '</span>';
620
-
621
- $html .= '<div class="field-tooltip">';
622
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
623
- $html .= '<span>'.__('Tour Preview Image will not appear if this is turned on.', 'wpvr').'</span>';
624
- $html .= '</div>';
625
- $html .= '</div>';
626
- } else {
627
- $html .= '<div class="single-settings autoload">';
628
- $html .= '<span>'.__('Tour Autoload: ', 'wpvr').' </span>';
629
-
630
- $html .= '<span class="wpvr-switcher">';
631
- $html .= '<input id="wpvr_autoload" class="vr-switcher-check" name="autoload" type="checkbox" value="off" />';
632
- $html .= '<label for="wpvr_autoload"></label>';
633
- $html .= '</span>';
634
-
635
- $html .= '<div class="field-tooltip">';
636
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
637
- $html .= '<span>'.__('Tour Preview Image will not appear if this is turned on.', 'wpvr').'</span>';
638
- $html .= '</div>';
639
- $html .= '</div>';
640
- }
641
- //=Autoload setup End=//
642
-
643
-
644
-
645
- //=Control Setup=
646
- if ($control == false) {
647
- $html .= '<div class="single-settings controls">';
648
- $html .= '<span>'.__('Basic Control Buttons: ', 'wpvr').'</span>';
649
-
650
- $html .= '<span class="wpvr-switcher">';
651
- $html .= '<input id="wpvr_controls" class="vr-switcher-check" value="off" name="controls" type="checkbox" />';
652
- $html .= '<label for="wpvr_controls"></label>';
653
- $html .= '</span>';
654
-
655
- $html .= '<div class="field-tooltip">';
656
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
657
- $html .= '<span>'.__('This option will display Zoom In, Zoom Out and Full Screen buttons on the tour.', 'wpvr').'</span>';
658
- $html .= '</div>';
659
- $html .= '</div>';
660
- } else {
661
- $html .= '<div class="single-settings controls">';
662
- $html .= '<span>'.__('Basic Control Buttons: ', 'wpvr').'</span>';
663
-
664
- $html .= '<span class="wpvr-switcher">';
665
- $html .= '<input id="wpvr_controls" class="vr-switcher-check" value="on" name="controls" type="checkbox" checked />';
666
- $html .= '<label for="wpvr_controls"></label>';
667
- $html .= '</span>';
668
-
669
- $html .= '<div class="field-tooltip">';
670
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
671
- $html .= '<span>'.__('This option will display Zoom In, Zoom Out and Full Screen buttons on the tour.', 'wpvr').'</span>';
672
- $html .= '</div>';
673
- $html .= '</div>';
674
- }
675
- //=Control setup End=//
676
-
677
- $html .= '</div>';
678
- //===end left===//
679
-
680
- $html .= '<div class="right">';
681
- //=scene fade duration=//
682
- $html .= '<div class="single-settings scene-fade-duration">';
683
- $html .= '<span>'.__('Scene Fade Duration: ', 'wpvr').'</span>';
684
- $html .= '<input type="number" name="scene-fade-duration" value="'.$scene_fade_duration.'" />';
685
-
686
- $html .= '<div class="field-tooltip">';
687
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
688
- $html .= '<span>'.__('This will set the scene fade effect and execution time.', 'wpvr').'</span>';
689
- $html .= '</div>';
690
- $html .= '</div>';
691
- //=scene fade duration End=//
692
-
693
- //===Autorotation on off set==//
694
- if (isset($postdata["autoRotate"])) {
695
- $html .= '<div class="single-settings autoload">';
696
- $html .= '<span>'.__('Auto Rotation: ', 'wpvr').' </span>';
697
-
698
- $html .= '<span class="wpvr-switcher">';
699
- $html .= '<input id="wpvr_autorotation" class="vr-switcher-check" value="on" name="autorotation" type="checkbox" checked />';
700
- $html .= '<label for="wpvr_autorotation"></label>';
701
- $html .= '</span>';
702
- $html .= '</div>';
703
- } else {
704
- $html .= '<div class="single-settings autoload">';
705
- $html .= '<span>'.__('Auto Rotation: ', 'wpvr').' </span>';
706
-
707
- $html .= '<span class="wpvr-switcher">';
708
- $html .= '<input id="wpvr_autorotation" class="vr-switcher-check" value="off" name="autorotation" type="checkbox" />';
709
- $html .= '<label for="wpvr_autorotation"></label>';
710
- $html .= '</span>';
711
- $html .= '</div>';
712
- }
713
- //===end Autorotation on off set==//
714
-
715
- //=Auto Rotation=//
716
- $html .= '<div class="autorotationdata-wrapper">';
717
- $html .= '<div class="single-settings autorotationdata" >';
718
- $html .= '<span>'.__('Rotation Speed and Direction: ', 'wpvr').'</span>';
719
- $html .= '<input type="number" name="auto-rotation" value="'.$autorotation.'" placeholder="-5" />';
720
-
721
- $html .= '<div class="field-tooltip">';
722
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
723
- $html .= '<span>'.__('Set a value to determine the speed of rotation. The higher the number, the faster it will rotate. Positive values will make it rotate clockwise and negative values will make it rotate anti clockwise', 'wpvr').'</span>';
724
- $html .= '</div>';
725
- $html .= '</div>';
726
- //=Auto Rotation=//
727
-
728
- //=Auto rotation inactive delay=//
729
- $html .= '<div class="single-settings autorotationdata" >';
730
- $html .= '<span>'.__('Resume Auto-rotation after: ', 'wpvr').'</span>';
731
- $html .= '<input type="number" name="auto-rotation-inactive-delay" value="'.$autorotationinactivedelay.'" placeholder="2000" />';
732
-
733
- $html .= '<div class="field-tooltip">';
734
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
735
- $html .= '<span>'.__('When someone clicks on the tour, auto-rotation stops. Here, set a time after which auto rotation will start again. Assign in milliseconds, where 1000 milliseconds = 1 second.', 'wpvr').'</span>';
736
- $html .= '</div>';
737
- $html .= '</div>';
738
- //=Auto rotation inactive delay=//
739
-
740
- //=Auto rotation stop delay=//
741
- $html .= '<div class="single-settings autorotationdata" >';
742
- $html .= '<span>'.__('Stop Auto-rotation after: ', 'wpvr').'</span>';
743
- $html .= '<input type="number" name="auto-rotation-stop-delay" value="'.$autorotationstopdelay.'" placeholder="2000" />';
744
-
745
- $html .= '<div class="field-tooltip">';
746
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
747
- $html .= '<span>'.__('Set a time after which auto rotation will stop. Assign in milliseconds, where 1000 milliseconds = 1 second.', 'wpvr').'</span>';
748
- $html .= '</div>';
749
- $html .= '</div>';
750
- $html .= '</div>';
751
- //=Auto rotation stop delay=//
752
-
753
-
754
- //=end backgound tour=//
755
-
756
-
757
-
758
- $html .= '</div>';
759
- //===end right===//
760
-
761
- $html .= '</div>';
762
- $html .= '</div>';
763
- //===end basic settings===//
764
-
765
- $html .= '<div class="advanced-settings-content inner-single-content" id="gen-advanced">';
766
- $html .= '<div class="content-wrapper">';
767
- $html .= '<div class="left">';
768
-
769
- //=Keyboard Movement Control=//
770
- $html .= '<div class="single-settings compass">';
771
- $html .= '<span>'.__('Keyboard Movement Control: ', 'wpvr').'</span>';
772
-
773
- $html .= '<span class="wpvr-switcher">';
774
- $html .= '<input id="wpvr_diskeyboard" class="vr-switcher-check" value="off" name="diskeyboard" type="checkbox" disabled />';
775
- $html .= '<label for="wpvr_diskeyboard" title="Pro Feature"></label>';
776
- $html .= '</span>';
777
- $html .= '</div>';
778
- //=Keyboard Movement Control end=//
779
-
780
- //=Keyboard Zoom Control Setup=//
781
- $html .= '<div class="single-settings">';
782
- $html .= '<span>'.__('Keyboard Zoom Control: ', 'wpvr').'</span>';
783
-
784
- $html .= '<span class="wpvr-switcher">';
785
- $html .= '<input id="wpvr_keyboardzoom" class="vr-switcher-check" value="off" name="keyboardzoom" type="checkbox" disabled />';
786
- $html .= '<label for="wpvr_keyboardzoom" title="Pro Feature"></label>';
787
- $html .= '</span>';
788
- $html .= '</div>';
789
- //=Keyboard Zoom Control End=//
790
-
791
- //=Mouse Drag Control=//
792
- $html .= '<div class="single-settings">';
793
- $html .= '<span>'.__('Mouse Drag Control: ', 'wpvr').'</span>';
794
-
795
- $html .= '<span class="wpvr-switcher">';
796
- $html .= '<input id="wpvr_draggable" class="vr-switcher-check" name="draggable" type="checkbox" value="off" disabled />';
797
- $html .= '<label for="wpvr_draggable" title="Pro Feature"></label>';
798
- $html .= '</span>';
799
- $html .= '</div>';
800
- //=Mouse Drag Control End=//
801
-
802
- //=Mouse Zoom Control=//
803
- $html .= '<div class="single-settings">';
804
- $html .= '<span>'.__('Mouse Zoom Control: ', 'wpvr').'</span>';
805
-
806
- $html .= '<span class="wpvr-switcher">';
807
- $html .= '<input id="wpvr_mouseZoom" class="vr-switcher-check" value="off" name="mouseZoom" type="checkbox" disabled />';
808
- $html .= '<label for="wpvr_mouseZoom" title="Pro Feature"></label>';
809
- $html .= '</span>';
810
- $html .= '</div>';
811
- //=Mouse Zoom Control End=//
812
-
813
- //=Gyroscope Control=//
814
- $html .= '<div class="single-settings gyro">';
815
- $html .= '<span>'.__('Gyroscope Control: ', 'wpvr').'</span>';
816
-
817
- $html .= '<span class="wpvr-switcher">';
818
- $html .= '<input id="wpvr_gyro" class="vr-switcher-check" value="off" name="gyro" type="checkbox" disabled />';
819
- $html .= '<label for="wpvr_gyro" title="Pro Feature"></label>';
820
- $html .= '</span>';
821
- $html .= '</div>';
822
- //=Gyroscope Control End=//
823
-
824
- //=Auto Gyroscope Support=//
825
- $html .= '<div class="single-settings orientation">';
826
- $html .= '<span>'.__('Auto Gyroscope Support: ', 'wpvr').'</span>';
827
-
828
- $html .= '<span class="wpvr-switcher">';
829
- $html .= '<input id="wpvr_deviceorientationcontrol" class="vr-switcher-check" value="off" name="deviceorientationcontrol" type="checkbox" disabled />';
830
- $html .= '<label for="wpvr_deviceorientationcontrol" title="Pro Feature"></label>';
831
- $html .= '</span>';
832
-
833
- $html .= '<div class="field-tooltip">';
834
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
835
- $html .= '<span>'.__('If set to true, device orientation control will be used when the panorama is loaded, if the device supports it. If false, device orientation control needs to be activated by pressing a button. Defaults to false. Will work if gyroscope is enabled', 'wpvr').'</span>';
836
- $html .= '</div>';
837
- $html .= '</div>';
838
- //=Auto Gyroscope Support End=//
839
-
840
- //=Compass Setup=//
841
- $html .= '<div class="single-settings compass">';
842
- $html .= '<span>'.__('Compass: ', 'wpvr').'</span>';
843
-
844
- $html .= '<span class="wpvr-switcher">';
845
- $html .= '<input id="wpvr_compass" class="vr-switcher-check" value="off" name="compass" type="checkbox" disabled />';
846
- $html .= '<label for="wpvr_compass" title="Pro Feature"></label>';
847
- $html .= '</span>';
848
- $html .= '</div>';
849
- //=Compass setup End=//
850
-
851
- $html .= '</div>';
852
- //===end left===//
853
-
854
- $html .= '<div class="right">';
855
- //= Scene Gallery=//
856
- $html .= '<div class="single-settings gallery">';
857
- $html .= '<span>'.__('Scene Gallery: ', 'wpvr').'</span>';
858
-
859
- $html .= '<span class="wpvr-switcher">';
860
- $html .= '<input id="wpvr_vrgallery" class="vr-switcher-check" value="off" name="vrgallery" type="checkbox" disabled />';
861
- $html .= '<label for="wpvr_vrgallery" title="Pro Feature"></label>';
862
- $html .= '</span>';
863
-
864
- $html .= '<div class="field-tooltip">';
865
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
866
- $html .= '<span>'.__('Turning it On will display a gallery with all the scenes on your tour. By double clicking on a scene thumbnail on the gallery, you can move to that specific scene. The gallery will only show up on the front end and not on the preview.', 'wpvr').'</span>';
867
- $html .= '</div>';
868
- $html .= '</div>';
869
- //= Scene Gallery end=//
870
-
871
- //=Scene Titles on Gallery=//
872
- $html .= '<div class="single-settings">';
873
- $html .= '<span>'.__('Scene Titles on Gallery: ', 'wpvr').'</span>';
874
-
875
- $html .= '<span class="wpvr-switcher">';
876
- $html .= '<input id="wpvr_vrgallery_title" class="vr-switcher-check" value="off" name="vrgallery_title" type="checkbox" disabled />';
877
- $html .= '<label for="wpvr_vrgallery_title" title="Pro Feature"></label>';
878
- $html .= '</span>';
879
-
880
- $html .= '<div class="field-tooltip">';
881
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'.'" alt="icon" />';
882
- $html .= '<span>'.__('Turning it on will display scene titles on each scene thumbnail inside the Scene Gallery. The Scene IDs will be used as the Scene Title.', 'wpvr').'</span>';
883
- $html .= '</div>';
884
- $html .= '</div>';
885
- //=Scene Titles on Gallery End=//
886
-
887
- //===VR Audio setup===//
888
- $html .= '<div class="single-settings">';
889
- $html .= '<span>Tour Background Music: </span>';
890
-
891
- $html .= '<span class="wpvr-switcher">';
892
- $html .= '<input id="wpvr_bg_music" class="vr-switcher-check" value="off" name="bg_music" type="checkbox" disabled />';
893
- $html .= '<label for="wpvr_bg_music" title="Pro Feature"></label>';
894
- $html .= '</span>';
895
- $html .= '</div>';
896
- //==VR audio End==//
897
-
898
- //===Company logo===//
899
- $html .= '<div class="single-settings company-info">';
900
- $html .= '<span>'.__('Add Company Information: ', 'wpvr').' </span>';
901
-
902
- $html .= '<span class="wpvr-switcher">';
903
- $html .= '<input id="wpvr_cpLogoSwitch" class="vr-switcher-check" value="off" name="cpLogoSwitch" type="checkbox" disabled />';
904
- $html .= '<label for="wpvr_cpLogoSwitch" title="Pro Feature"></label>';
905
- $html .= '</span>';
906
- $html .= '</div>';
907
- //===Company logo end===//
908
-
909
- $html .= '</div>';
910
- //===end right===//
911
-
912
- $html .= '</div>';
913
- $html .= '</div>';
914
- //===end advanced settings===//
915
-
916
- $html .= '<div class="control-settings-content inner-single-content" id="gen-control">';
917
- $html .= '<div class="content-wrapper">';
918
- $html .= '<div class="left">';
919
- //=====Move up====//
920
- $html .= '<div class="single-settings controls custom-data-set">';
921
- $html .= '<span>'.__('Move Up: ', 'wpvr').'</span>';
922
-
923
- $html .= '<div class="color-icon">';
924
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/move-up.jpg'.'" alt="icon" />';
925
- $html .= '</div>';
926
-
927
- $html .= '<span class="wpvr-switcher">';
928
- $html .= '<input id="wpvr_panupControl" class="vr-switcher-check" value="off" name="panupControl" type="checkbox" disabled />';
929
- $html .= '<label for="wpvr_panupControl" title="Pro Feature"></label>';
930
- $html .= '</span>';
931
-
932
- $html .= '</div>';
933
- //=====Moveup End====//
934
-
935
- //=====Move Down====//
936
- $html .= '<div class="single-settings controls custom-data-set">';
937
- $html .= '<span>'.__('Move Down: ', 'wpvr').'</span>';
938
-
939
- $html .= '<div class="color-icon">';
940
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/move-down.jpg'.'" alt="icon" />';
941
- $html .= '</div>';
942
-
943
- $html .= '<span class="wpvr-switcher">';
944
- $html .= '<input id="wpvr_panDownControl" class="vr-switcher-check" value="off" name="panDownControl" type="checkbox" disabled />';
945
- $html .= '<label for="wpvr_panDownControl" title="Pro Feature"></label>';
946
- $html .= '</span>';
947
- $html .= '</div>';
948
- //=====Move down End====//
949
-
950
- //=====Move Left====//
951
- $html .= '<div class="single-settings controls custom-data-set">';
952
- $html .= '<span>'.__('Move Left: ', 'wpvr').'</span>';
953
-
954
- $html .= '<div class="color-icon">';
955
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/move-left.jpg'.'" alt="icon" />';
956
- $html .= '</div>';
957
-
958
- $html .= '<span class="wpvr-switcher">';
959
- $html .= '<input id="wpvr_panLeftControl" class="vr-switcher-check" value="off" name="panLeftControl" type="checkbox" disabled />';
960
- $html .= '<label for="wpvr_panLeftControl" title="Pro Feature"></label>';
961
- $html .= '</span>';
962
- $html .= '</div>';
963
- //=====Move Left End====//
964
-
965
- //=====Move Right====//
966
- $html .= '<div class="single-settings controls custom-data-set">';
967
- $html .= '<span>'.__('Move Right: ', 'wpvr').'</span>';
968
-
969
- $html .= '<div class="color-icon">';
970
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/move-right.jpg'.'" alt="icon" />';
971
- $html .= '</div>';
972
-
973
- $html .= '<span class="wpvr-switcher">';
974
- $html .= '<input id="wpvr_panRightControl" class="vr-switcher-check" value="off" name="panRightControl" type="checkbox" disabled />';
975
- $html .= '<label for="wpvr_panRightControl" title="Pro Feature"></label>';
976
- $html .= '</span>';
977
- $html .= '</div>';
978
- //=====Move Right End====//
979
-
980
- //=====Zoom In====//
981
- $html .= '<div class="single-settings controls custom-data-set">';
982
- $html .= '<span>'.__('Zoom In: ', 'wpvr').'</span>';
983
-
984
- $html .= '<div class="color-icon">';
985
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/zoom-in.jpg'.'" alt="icon" />';
986
- $html .= '</div>';
987
-
988
- $html .= '<span class="wpvr-switcher">';
989
- $html .= '<input id="wpvr_panZoomInControl" class="vr-switcher-check" value="off" name="panZoomInControl" type="checkbox" disabled />';
990
- $html .= '<label for="wpvr_panZoomInControl" title="Pro Feature"></label>';
991
- $html .= '</span>';
992
-
993
- $html .= '</div>';
994
- //=====Zoom In End====//
995
-
996
- $html .= '</div>';
997
- //===end left===//
998
-
999
- $html .= '<div class="right">';
1000
- //=====Zoom Out====//
1001
- $html .= '<div class="single-settings controls custom-data-set">';
1002
- $html .= '<span>'.__('Zoom Out: ', 'wpvr').'</span>';
1003
-
1004
- $html .= '<div class="color-icon">';
1005
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/zoom-out.jpg'.'" alt="icon" />';
1006
- $html .= '</div>';
1007
-
1008
- $html .= '<span class="wpvr-switcher">';
1009
- $html .= '<input id="wpvr_panZoomOutControl" class="vr-switcher-check" value="off" name="panZoomOutControl" type="checkbox" disabled />';
1010
- $html .= '<label for="wpvr_panZoomOutControl" title="Pro Feature"></label>';
1011
- $html .= '</span>';
1012
-
1013
- $html .= '</div>';
1014
- //=====Zoom Out End====//
1015
-
1016
- //===== Full Screen====//
1017
- $html .= '<div class="single-settings controls custom-data-set">';
1018
- $html .= '<span>'.__('Full Screen: ', 'wpvr').'</span>';
1019
-
1020
- $html .= '<div class="color-icon">';
1021
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/full-screen.jpg'.'" alt="icon" />';
1022
- $html .= '</div>';
1023
-
1024
- $html .= '<span class="wpvr-switcher">';
1025
- $html .= '<input id="wpvr_panFullscreenControl" class="vr-switcher-check" value="off" name="panFullscreenControl" type="checkbox" disabled />';
1026
- $html .= '<label for="wpvr_panFullscreenControl" title="Pro Feature"></label>';
1027
- $html .= '</span>';
1028
-
1029
- $html .= '</div>';
1030
- //=====Full Screen End====//
1031
-
1032
- //=====Gyroscope====//
1033
- $html .= '<div class="single-settings controls custom-data-set">';
1034
- $html .= '<span>'.__('Gyroscope: ', 'wpvr').'</span>';
1035
-
1036
- $html .= '<div class="color-icon">';
1037
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/gryscop.jpg'.'" alt="icon" />';
1038
- $html .= '</div>';
1039
-
1040
- $html .= '<span class="wpvr-switcher">';
1041
- $html .= '<input id="wpvr_gyroscope" class="vr-switcher-check" value="off" name="gyroscope" type="checkbox" disabled />';
1042
- $html .= '<label for="wpvr_gyroscope" title="Pro Feature"></label>';
1043
- $html .= '</span>';
1044
-
1045
- $html .= '</div>';
1046
- //=====Gyroscope End====//
1047
-
1048
- //=====Back to home====//
1049
- $html .= '<div class="single-settings controls custom-data-set">';
1050
- $html .= '<span>'.__('Home: ', 'wpvr').'</span>';
1051
-
1052
- $html .= '<div class="color-icon">';
1053
- $html .='<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/home.jpg'.'" alt="icon" />';
1054
- $html .= '</div>';
1055
-
1056
- $html .= '<span class="wpvr-switcher">';
1057
- $html .= '<input id="wpvr_backToHome" class="vr-switcher-check" value="off" name="backToHome" type="checkbox" disabled />';
1058
- $html .= '<label for="wpvr_backToHome" title="Pro Feature"></label>';
1059
- $html .= '</span>';
1060
-
1061
- $html .= '</div>';
1062
- //=====Back to home End====//
1063
- $html .= '</div>';
1064
- //===end right===//
1065
-
1066
- $html .= '</div>';
1067
- $html .= '</div>';
1068
- //===end control settings===//
1069
-
1070
- $html .= '</div>';
1071
- //=end inner tab content=
1072
-
1073
- //== Start preview button
1074
- $html .= '<div class="preview-btn-wrapper">';
1075
- $html .= '<div class="preview-btn-area clearfix">';
1076
-
1077
- $html .= '<button id="panolenspreview" class="panolenspreview">' . __('Preview', 'wpvr-pro') . '</button>';
1078
- $html .= '</div>';
1079
- $html .= '</div>';
1080
- //== End preview button
1081
-
1082
- $html .= '<div class="wpvr-use-shortcode">';
1083
- $post = get_post();
1084
- $id = $post->ID;
1085
- $slug = $post->post_name;
1086
- $postdata = get_post_meta($post->ID, 'panodata', true);
1087
-
1088
- $html .= '<h4 class="area-title">'.__('Using this Tour', 'wpvr').'</h4>';
1089
-
1090
- $html .= '<div class="shortcode-wrapper">';
1091
- $html .= '<div class="single-shortcode classic">';
1092
- $html .= '<span class="shortcode-title">'.__('For Classic Editor:', 'wpvr').'</span>';
1093
-
1094
- $html .= '<div class="field-wapper">';
1095
- $html .= '<span>'.__('To use this WP VR tour in your posts or pages use the following shortcode ', 'wpvr').'</span>';
1096
-
1097
- $html .= '<div class="shortcode-field">';
1098
- $html .= '<p class="copycode" id="copy-shortcode">[wpvr id="'.$id.'"]</p>';
1099
-
1100
- $html .= '<span id="wpvr-copy-shortcode" class="wpvr-copy-shortcode">';
1101
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/copy.png'.'" alt="icon" />';
1102
- $html .= '</span>';
1103
- $html .= '</div>';
1104
-
1105
-
1106
- $html .= '<span id="wpvr-copied-notice" class="wpvr-copied-notice"></span>';
1107
-
1108
- $html .= '</div>';
1109
- $html .= '</div>';
1110
-
1111
- $html .= '</div>';
1112
- $html .= '</div>';
1113
- //=end shortcode area=
1114
-
1115
-
1116
- $html .= '</div>';
1117
- //=end inner tab=
1118
-
1119
-
1120
- $html .= '<script>';
1121
- $html .= '
1122
-
1123
- document.getElementById("wpvr-copy-shortcode").addEventListener("click", function() {
1124
- copyToClipboard(document.getElementById("copy-shortcode"));
1125
- });
1126
-
1127
- function copyToClipboard(elem) {
1128
- // create hidden text element, if it doesn\'t already exist
1129
- var targetId = "_hiddenCopyText_";
1130
- var isInput = elem.tagName === "INPUT" || elem.tagName === "TEXTAREA";
1131
- var origSelectionStart, origSelectionEnd;
1132
- if (isInput) {
1133
- // can just use the original source element for the selection and copy
1134
- target = elem;
1135
- origSelectionStart = elem.selectionStart;
1136
- origSelectionEnd = elem.selectionEnd;
1137
- } else {
1138
- // must use a temporary form element for the selection and copy
1139
- target = document.getElementById(targetId);
1140
- if (!target) {
1141
- var target = document.createElement("textarea");
1142
- target.style.position = "absolute";
1143
- target.style.left = "-9999px";
1144
- target.style.top = "0";
1145
- target.id = targetId;
1146
- document.body.appendChild(target);
1147
- }
1148
- target.textContent = elem.textContent;
1149
- }
1150
- // select the content
1151
- var currentFocus = document.activeElement;
1152
- target.focus();
1153
- target.setSelectionRange(0, target.value.length);
1154
-
1155
- // copy the selection
1156
- var succeed;
1157
- try {
1158
- succeed = document.execCommand("copy");
1159
- document.getElementById("wpvr-copied-notice").innerHTML = "Copied!";
1160
- } catch(e) {
1161
- succeed = false;
1162
- }
1163
- // restore original focus
1164
- if (currentFocus && typeof currentFocus.focus === "function") {
1165
- currentFocus.focus();
1166
- }
1167
-
1168
- setTimeout(function(){
1169
- document.getElementById("wpvr-copied-notice").innerHTML = "";
1170
- }, 2000 );
1171
-
1172
- if (isInput) {
1173
- // restore prior selection
1174
- elem.setSelectionRange(origSelectionStart, origSelectionEnd);
1175
- } else {
1176
- // clear temporary content
1177
- target.textContent = "";
1178
- }
1179
- document.getElementById("wpvr-copy-shortcode").scrollIntoView()
1180
- return succeed;
1181
- }
1182
-
1183
- ';
1184
-
1185
- $html .= '</script>';
1186
-
1187
- $html .='</div>';
1188
- //---end general tab----
1189
-
1190
- $html .='<div class="rex-pano-tab" id="scenes">';
1191
-
1192
- //=Scene and Hotspot repeater=//
1193
- if (empty($pano_data)) {
1194
- $html .= '<div class="scene-setup rex-pano-sub-tabs" data-limit="'.$scene_limit.'">';
1195
-
1196
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
1197
- $html .= '<ul>';
1198
- $html .= '<li class="active"><span data-index="1" data-href="#scene-1"><i class="fa fa-image"></i></span></li>';
1199
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
1200
- $html .= '</ul>';
1201
- $html .= '</nav>';
1202
-
1203
- $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
1204
-
1205
- $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
1206
- $html .= '<div class="active_scene_id"><p></p></div>';
1207
- $html .= '<div class="scene-content">';
1208
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
1209
-
1210
- $html .= '<div class="scene-left">';
1211
- //==Set Default Scene==//
1212
- $html .= '<div class="single-settings dscene">';
1213
- $html .= '<span>'.__('Set as Default: ', 'wpvr').'</span>';
1214
- $html .= '<select class="dscen" name="dscene">';
1215
- $html .= '<option value="on"> Yes</option>';
1216
- $html .= '<option value="off" selected > No</option>';
1217
- $html .= '</select>';
1218
- $html .= '</div>';
1219
- //==Set Default Scene end==//
1220
-
1221
- $html .= '<div class=scene-setting>';
1222
- $html .= '<label for="scene-id">'.__('Scene ID : ', 'wpvr').'</label>';
1223
- $html .= '<input class="sceneid" type="text" name="scene-id"/>';
1224
- $html .= '</div>';
1225
-
1226
- $html .= '<div class=scene-setting>';
1227
- $html .= '<label for="scene-type">'.__('Scene Type : ', 'wpvr').'</label>';
1228
- $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
1229
- $html .= '</div>';
1230
-
1231
- $html .= '<div class=scene-setting>';
1232
- $html .= '<label for="scene-upload">'.__('Scene Upload: ', 'wpvr').'</label>';
1233
- $html .= '<div class="form-group">';
1234
- $html .= '<img src="" style="display: none;"><br>';
1235
- $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
1236
- $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
1237
- $html .= '</div>';
1238
- $html .= '</div>';
1239
- $html .= '</div>';
1240
- //---end scene-left---
1241
-
1242
- $html .= '</div>';
1243
-
1244
- //--hotspot setup--
1245
- $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1246
-
1247
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1248
- $html .= '<ul>';
1249
- $html .= '<li class="active"><span data-index="1" data-href="#scene-0-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
1250
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
1251
- $html .= '</ul>';
1252
- $html .= '</nav>';
1253
-
1254
- $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1255
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-0-hotspot-1">';
1256
-
1257
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1258
-
1259
- $html .= '<div class="wrapper">';
1260
- $html .= '<div class="hotspot-setting">';
1261
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
1262
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title"/>';
1263
- $html .= '</div>';
1264
-
1265
- $html .= '<div class="hotspot-setting">';
1266
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
1267
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch"/>';
1268
- $html .= '</div>';
1269
-
1270
- $html .= '<div class="hotspot-setting">';
1271
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
1272
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
1273
- $html .= '</div>';
1274
-
1275
- $html .= '<div class="hotspot-setting">';
1276
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon Class: ', 'wpvr').'</label>';
1277
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1278
- $html .= '</div>';
1279
-
1280
- $html .= '</div>';
1281
-
1282
- $html .= '<div class="hotspot-type hotspot-setting">';
1283
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
1284
- $html .= '<select name="hotspot-type">';
1285
- $html .= '<option value="info" selected> Info</option>';
1286
- $html .= '<option value="scene"> Scene</option>';
1287
- $html .= '</select>';
1288
-
1289
- $html .= '<div class="hotspot-url">';
1290
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').' </label>';
1291
- $html .= '<input type="url" name="hotspot-url" value="" />';
1292
- $html .= '</div>';
1293
-
1294
- //====Hotspot open in same tab===//
1295
- $html .= '<div class="single-settings s_tab">';
1296
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
1297
- $html .= '<label class="wpvr-switcher-v2">';
1298
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off" >';
1299
- $html .= '<span class="switcher-box"></span>';
1300
- $html .= '</label>';
1301
- $html .= '</div>';
1302
- //====Hotspot open in same tab end===//
1303
-
1304
- $html .= '<div class="hotspot-content">';
1305
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
1306
- $html .= '<textarea name="hotspot-content"></textarea>';
1307
- $html .= '</div>';
1308
-
1309
- $html .= '<div class="hotspot-hover">';
1310
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
1311
- $html .= '<textarea name="hotspot-hover"></textarea>';
1312
- $html .= '</div>';
1313
-
1314
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1315
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
1316
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1317
- $html .= '<option value="none" selected> None</option>';
1318
- $html .= '</select>';
1319
- $html .= '</div>';
1320
-
1321
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1322
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').' </label>';
1323
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1324
- $html .= '</div>';
1325
-
1326
- $html .= '</div>';
1327
- //=Hotspot type End=//
1328
- $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1329
- $html .= '</div>';
1330
- $html .= '</div>';
1331
-
1332
- $html .= '</div>';
1333
- $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
1334
- $html .= '</div>';
1335
-
1336
-
1337
- $html .= '<div data-repeater-item class="single-scene rex-pano-tab active" data-title="1" id="scene-1">';
1338
- $html .= '<div class="active_scene_id"><p></p></div>';
1339
- $html .= '<div class="scene-content">';
1340
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
1341
-
1342
- $html .= '<div class="scene-left">';
1343
- //==Set Default Scene==//
1344
- $html .= '<div class="single-settings dscene">';
1345
- $html .= '<span>'.__('Set as Default: ', 'wpvr').'</span>';
1346
- $html .= '<select class="dscen" name="dscene">';
1347
- $html .= '<option value="on"> Yes</option>';
1348
- $html .= '<option value="off" selected > No</option>';
1349
- $html .= '</select>';
1350
- $html .= '</div>';
1351
- //==Set Default Scene end==//
1352
-
1353
- $html .= '<div class=scene-setting>';
1354
- $html .= '<label for="scene-id">'.__('Scene ID : ', 'wpvr').'</label>';
1355
- $html .= '<input class="sceneid" type="text" name="scene-id"/>';
1356
- $html .= '</div>';
1357
-
1358
- $html .= '<div class=scene-setting>';
1359
- $html .= '<label for="scene-type">'.__('Scene Type : ', 'wpvr').'</label>';
1360
- $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
1361
- $html .= '</div>';
1362
-
1363
- $html .= '<div class=scene-setting>';
1364
- $html .= '<label for="scene-upload">'.__('Scene Upload: ', 'wpvr').'</label>';
1365
- $html .= '<div class="form-group">';
1366
- $html .= '<img src="" style="display: none;"><br>';
1367
- $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
1368
- $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
1369
- $html .= '</div>';
1370
- $html .= '</div>';
1371
- $html .= '</div>';
1372
- //----end scene left------
1373
-
1374
- $html .= '</div>';
1375
-
1376
- //--hotspot setup--//
1377
- $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1378
-
1379
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1380
- $html .= '<ul>';
1381
- $html .= '<li class="active"><span data-index="1" data-href="#scene-1-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
1382
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
1383
- $html .= '</ul>';
1384
- $html .= '</nav>';
1385
-
1386
- $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1387
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-1-hotspot-1">';
1388
-
1389
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1390
-
1391
- $html .= '<div class="wrapper">';
1392
- $html .= '<div class="hotspot-setting">';
1393
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
1394
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title"/>';
1395
- $html .= '</div>';
1396
-
1397
- $html .= '<div class="hotspot-setting">';
1398
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
1399
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch"/>';
1400
- $html .= '</div>';
1401
-
1402
- $html .= '<div class="hotspot-setting">';
1403
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
1404
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
1405
- $html .= '</div>';
1406
-
1407
- $html .= '<div class="hotspot-setting">';
1408
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon Class: ', 'wpvr').'</label>';
1409
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1410
- $html .= '</div>';
1411
-
1412
- $html .= '</div>';
1413
-
1414
- $html .= '<div class="hotspot-type hotspot-setting">';
1415
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
1416
- $html .= '<select name="hotspot-type">';
1417
- $html .= '<option value="info" selected> Info</option>';
1418
- $html .= '<option value="scene"> Scene</option>';
1419
- $html .= '</select>';
1420
-
1421
- $html .= '<div class="hotspot-url">';
1422
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').'</label>';
1423
- $html .= '<input type="url" name="hotspot-url" value="" />';
1424
- $html .= '</div>';
1425
-
1426
- //====Hotspot open in same tab===//
1427
- $html .= '<div class="single-settings s_tab">';
1428
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
1429
- $html .= '<label class="wpvr-switcher-v2">';
1430
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off">';
1431
- $html .= '<span class="switcher-box"></span>';
1432
- $html .= '</label>';
1433
- $html .= '</div>';
1434
- //====Hotspot open in same tab end===//
1435
-
1436
- $html .= '<div class="hotspot-content">';
1437
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
1438
- $html .= '<textarea name="hotspot-content"></textarea>';
1439
- $html .= '</div>';
1440
-
1441
- $html .= '<div class="hotspot-hover">';
1442
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
1443
- $html .= '<textarea name="hotspot-hover"></textarea>';
1444
- $html .= '</div>';
1445
-
1446
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1447
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
1448
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1449
- $html .= '<option value="none"> None</option>';
1450
- $html .= '</select>';
1451
- $html .= '</div>';
1452
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1453
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').'</label>';
1454
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1455
- $html .= '</div>';
1456
-
1457
- $html .= '</div>';
1458
- //=Hotspot type End=//
1459
- $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1460
- $html .= '</div>';
1461
- $html .= '</div>';
1462
- $html .= '</div>';
1463
- $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
1464
- $html .= '</div>';
1465
- $html .= '</div>';
1466
-
1467
- $html .= '</div>';
1468
- } else {
1469
- $html .= '<div class="scene-setup rex-pano-sub-tabs" data-limit="'.$scene_limit.'">';
1470
-
1471
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">';
1472
- $html .= '<ul>';
1473
- $i = 1;
1474
- $firstvalue = reset($pano_data["scene-list"]);
1475
- foreach ($pano_data["scene-list"] as $pano_scenes) {
1476
- if ($pano_scenes['scene-id'] == $firstvalue['scene-id']) {
1477
- $html .= '<li class="active"><span data-index="'.$i.'" data-href="#scene-'.$i.'"><i class="fa fa-image"></i></span></li>';
1478
- } else {
1479
- $html .= '<li><span data-index="'.$i.'" data-href="#scene-'.$i.'"><i class="fa fa-image"></i></span></li>';
1480
- }
1481
- $i++;
1482
- }
1483
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
1484
- $html .= '</ul>';
1485
- $html .= '</nav>';
1486
-
1487
-
1488
- $html .= '<div data-repeater-list="scene-list" class="rex-pano-tab-content">';
1489
-
1490
- //===Default empty repeater declared by nazmus sakib===//
1491
- $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">';
1492
- $html .= '<div class="active_scene_id"><p></p></div>';
1493
- $html .= '<div class="scene-content">';
1494
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
1495
-
1496
- $html .= '<div class="scene-left">';
1497
- //==Set Default Scene==//
1498
- $html .= '<div class="single-settings dscene">';
1499
- $html .= '<span>'.__('Set as Default: ', 'wpvr').'</span>';
1500
- $html .= '<select class="dscen" name="dscene">';
1501
- $html .= '<option value="on"> Yes</option>';
1502
- $html .= '<option value="off" selected > No</option>';
1503
- $html .= '</select>';
1504
- $html .= '</div>';
1505
- //==Set Default Scene end==//
1506
- $html .= '<div class=scene-setting>';
1507
- $html .= '<label for="scene-id">'.__('Scene ID : ', 'wpvr').'</label>';
1508
- $html .= '<input class="sceneid" type="text" name="scene-id"/>';
1509
- $html .= '</div>';
1510
-
1511
- $html .= '<div class=scene-setting>';
1512
- $html .= '<label for="scene-type">'.__('Scene Type : ', 'wpvr').'</label>';
1513
- $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
1514
- $html .= '</div>';
1515
-
1516
- $html .= '<div class=scene-setting>';
1517
- $html .= '<label for="scene-upload">'.__('Scene Upload: ', 'wpvr').'</label>';
1518
- $html .= '<div class="form-group">';
1519
- $html .= '<img src="" style="display: none;"><br>';
1520
- $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
1521
- $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="">';
1522
- $html .= '</div>';
1523
- $html .= '</div>';
1524
- $html .= '</div>';
1525
- //-----end scene left------
1526
-
1527
- $html .= '</div>';
1528
-
1529
- //--hotspot setup--//
1530
- $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1531
-
1532
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1533
- $html .= '<ul>';
1534
- $html .= '<li class="active"><span data-index="1" data-href="#scene-0-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
1535
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
1536
- $html .= '</ul>';
1537
- $html .= '</nav>';
1538
-
1539
- $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1540
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-0-hotspot-1">';
1541
-
1542
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1543
-
1544
- $html .= '<div class="wrapper">';
1545
- $html .= '<div class="hotspot-setting">';
1546
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
1547
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title"/>';
1548
- $html .= '</div>';
1549
-
1550
- $html .= '<div class="hotspot-setting">';
1551
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
1552
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch"/>';
1553
- $html .= '</div>';
1554
-
1555
- $html .= '<div class="hotspot-setting">';
1556
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
1557
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
1558
- $html .= '</div>';
1559
-
1560
- $html .= '<div class="hotspot-setting">';
1561
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon Class: ', 'wpvr').'</label>';
1562
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
1563
- $html .= '</div>';
1564
-
1565
- $html .= '</div>';
1566
-
1567
- $html .= '<div class="hotspot-type hotspot-setting">';
1568
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
1569
- $html .= '<select name="hotspot-type">';
1570
- $html .= '<option value="info" selected> Info</option>';
1571
- $html .= '<option value="scene"> Scene</option>';
1572
- $html .= '</select>';
1573
-
1574
- $html .= '<div class="hotspot-url">';
1575
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').' </label>';
1576
- $html .= '<input type="url" name="hotspot-url" value="" />';
1577
- $html .= '</div>';
1578
-
1579
- //====Hotspot open in same tab===//
1580
- $html .= '<div class="single-settings s_tab">';
1581
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
1582
- $html .= '<label class="wpvr-switcher-v2">';
1583
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off">';
1584
- $html .= '<span class="switcher-box"></span>';
1585
- $html .= '</label>';
1586
- $html .= '</div>';
1587
- //====Hotspot open in same tab end===//
1588
-
1589
- $html .= '<div class="hotspot-content">';
1590
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
1591
- $html .= '<textarea name="hotspot-content"></textarea>';
1592
- $html .= '</div>';
1593
-
1594
- $html .= '<div class="hotspot-hover">';
1595
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
1596
- $html .= '<textarea name="hotspot-hover"></textarea>';
1597
- $html .= '</div>';
1598
-
1599
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1600
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
1601
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1602
- $html .= '<option value="none" selected> None</option>';
1603
- $html .= '</select>';
1604
- $html .= '</div>';
1605
-
1606
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1607
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').' </label>';
1608
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1609
- $html .= '</div>';
1610
-
1611
- $html .= '</div>';
1612
- //=Hotspot type End=//
1613
- $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1614
- $html .= '</div>';
1615
- $html .= '</div>';
1616
-
1617
- $html .= '</div>';
1618
- $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
1619
- $html .= '</div>';
1620
- //==Empty repeater end==//
1621
-
1622
- $s = 1;
1623
- foreach ($pano_data["scene-list"] as $pano_scenes) {
1624
- $dscene = '';
1625
- if (isset($pano_scenes['dscene'])) {
1626
- $dscene = $pano_scenes['dscene'];
1627
- }
1628
- $scene_id = '';
1629
- $scene_id = $pano_scenes["scene-id"];
1630
- $scene_type = 'equirectangular';
1631
- $scene_type = $pano_scenes["scene-type"];
1632
- $scene_photo = '';
1633
- $scene_photo = $pano_scenes["scene-attachment-url"];
1634
-
1635
- $pano_hotspots = array();
1636
- if (isset($pano_scenes["hotspot-list"])) {
1637
- $pano_hotspots = $pano_scenes["hotspot-list"];
1638
- }
1639
-
1640
- $firstvalueset = reset($pano_data["scene-list"]);
1641
- if ($pano_scenes['scene-id'] == $firstvalueset['scene-id']) {
1642
- $html .= '<div data-repeater-item class="single-scene rex-pano-tab active" data-title="1" id="scene-'.$s.'">';
1643
- $html .= '<div class="active_scene_id"><p></p></div>';
1644
- $html .= '<div class="scene-content">';
1645
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
1646
-
1647
- $html .= '<div class="scene-left">';
1648
- //==Set Default Scene==//
1649
- if ($dscene == 'on') {
1650
- $html .= '<div class="single-settings dscene">';
1651
- $html .= '<span>'.__('Set as Default: ', 'wpvr').'</span>';
1652
- $html .= '<select class="dscen" name="dscene">';
1653
- $html .= '<option value="on" selected > Yes</option>';
1654
- $html .= '<option value="off"> No</option>';
1655
- $html .= '</select>';
1656
- $html .= '</div>';
1657
- } else {
1658
- $html .= '<div class="single-settings dscene">';
1659
- $html .= '<span>'.__('Set as Default: ', 'wpvr').'</span>';
1660
- $html .= '<select class="dscen" name="dscene">';
1661
- $html .= '<option value="on"> Yes</option>';
1662
- $html .= '<option value="off" selected > No</option>';
1663
- $html .= '</select>';
1664
- $html .= '</div>';
1665
- }
1666
- //==Set Default Scene end==//
1667
- $html .= '<div class=scene-setting>';
1668
- $html .= '<label for="scene-id">'.__('Scene ID : ', 'wpvr').'</label>';
1669
- $html .= '<input class="sceneid" type="text" name="scene-id" value="'.$scene_id.'" />';
1670
- $html .= '</div>';
1671
-
1672
- $html .= '<div class=scene-setting>';
1673
- $html .= '<label for="scene-type">'.__('Scene Type : ', 'wpvr').'</label>';
1674
- $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
1675
- $html .= '</div>';
1676
-
1677
- $html .= '<div class=scene-setting>';
1678
- $html .= '<label for="scene-upload">'.__('Scene Upload: ', 'wpvr').'</label>';
1679
- $html .= '<div class="form-group">';
1680
- $html .= '<img name ="scene-photo" src="'.$scene_photo.'"> <br/>';
1681
- $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
1682
- $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="'.$scene_photo.'">';
1683
- $html .= '</div>';
1684
- $html .= '</div>';
1685
- $html .= '</div>';
1686
- // ---end scene left---
1687
-
1688
- $html .= '</div>';
1689
-
1690
- if (!empty($pano_hotspots)) {
1691
- $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
1692
-
1693
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
1694
- $html .= '<ul>';
1695
- $j = 1;
1696
- $firstvaluehotspot = reset($pano_hotspots);
1697
- foreach ($pano_hotspots as $pano_hotspot) {
1698
- if ($pano_hotspot['hotspot-title'] == $firstvaluehotspot['hotspot-title']) {
1699
- $html .= '<li class="active"><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1700
- } else {
1701
- $html .= '<li><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
1702
- }
1703
- $j++;
1704
- }
1705
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
1706
- $html .= '</ul>';
1707
- $html .= '</nav>';
1708
-
1709
- $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
1710
-
1711
- $h = 1;
1712
- $firstvaluehotspotset = reset($pano_hotspots);
1713
- $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
1714
- foreach ($pano_hotspots as $pano_hotspot) {
1715
- $hotspot_title = '';
1716
- $hotspot_title = $pano_hotspot['hotspot-title'];
1717
- $hotspot_pitch = '';
1718
- $hotspot_pitch = $pano_hotspot['hotspot-pitch'];
1719
- $hotspot_yaw = '';
1720
- $hotspot_yaw = $pano_hotspot['hotspot-yaw'];
1721
- $hotspot_type = '';
1722
- $hotspot_type = $pano_hotspot['hotspot-type'];
1723
- $hotspot_url = '';
1724
- $hotspot_url = $pano_hotspot['hotspot-url'];
1725
- $hotspot_content = '';
1726
- $hotspot_content = $pano_hotspot['hotspot-content'];
1727
- $hotspot_hover = '';
1728
- $hotspot_hover = $pano_hotspot['hotspot-hover'];
1729
- $hotspot_target_scene = '';
1730
- $hotspot_target_scene = $pano_hotspot['hotspot-scene'];
1731
- $hotspot_custom_class = '';
1732
- if (isset($pano_hotspot['hotspot-customclass'])) {
1733
- $hotspot_custom_class = $pano_hotspot['hotspot-customclass'];
1734
- }
1735
-
1736
- if ($pano_hotspot['hotspot-title'] == $firstvaluehotspotset['hotspot-title']) {
1737
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1738
-
1739
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1740
-
1741
- $html .= '<div class="wrapper">';
1742
- $html .= '<div class="hotspot-setting">';
1743
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
1744
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title" value="'.$hotspot_title.'" />';
1745
- $html .= '</div>';
1746
-
1747
- $html .= '<div class="hotspot-setting">';
1748
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'
1749
- </label>';
1750
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch" value="'.$hotspot_pitch.'" />';
1751
- $html .= '</div>';
1752
-
1753
- $html .= '<div class="hotspot-setting">';
1754
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
1755
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1756
- $html .= '</div>';
1757
-
1758
- $html .= '<div class="hotspot-setting">';
1759
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon Class: ', 'wpvr').'</label>';
1760
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1761
- $html .= '</div>';
1762
-
1763
- $html .= '</div>';
1764
-
1765
- //=Hotspot type=//
1766
- if ($hotspot_type == "info") {
1767
- $html .= '<div class="hotspot-type hotspot-setting">';
1768
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
1769
- $html .= '<select name="hotspot-type">';
1770
- $html .= '<option value="info" selected> Info</option>';
1771
- $html .= '<option value="scene"> Scene</option>';
1772
- $html .= '</select>';
1773
-
1774
- $html .= '<div class="hotspot-url">';
1775
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').' </label>';
1776
- $html .= '<input type="url" name="hotspot-url" value="'.$hotspot_url.'" />';
1777
- $html .= '</div>';
1778
-
1779
- //====Hotspot open in same tab===//
1780
- $wpvr_url_open_checked = '';
1781
- $wpvr_url_open_data = 'off';
1782
- if ($pano_hotspot['wpvr_url_open'][0] == 'on') {
1783
- $wpvr_url_open_checked = 'checked';
1784
- $wpvr_url_open_data = 'on';
1785
- }
1786
-
1787
- $html .= '<div class="single-settings s_tab">';
1788
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
1789
- $html .= '<label class="wpvr-switcher-v2">';
1790
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="'.$wpvr_url_open_data.'" '.$wpvr_url_open_checked.'>';
1791
- $html .= '<span class="switcher-box"></span>';
1792
- $html .= '</label>';
1793
- $html .= '</div>';
1794
- //====Hotspot open in same tab end===//
1795
-
1796
- $html .= '<div class="hotspot-content">';
1797
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
1798
- $html .= '<textarea name="hotspot-content">'.$hotspot_content.'</textarea>';
1799
- $html .= '</div>';
1800
-
1801
- $html .= '<div class="hotspot-hover">';
1802
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').' </label>';
1803
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
1804
- $html .= '</div>';
1805
-
1806
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1807
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
1808
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1809
- $html .= '<option value="none" selected> None</option>';
1810
- $html .= '</select>';
1811
- $html .= '</div>';
1812
-
1813
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1814
- $html .= '<label for="hotspot-scene"> '.__('Target Scene ID: ', 'wpvr').'</label>';
1815
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
1816
- $html .= '</div>';
1817
-
1818
- $html .= '</div>';
1819
- } else {
1820
- $html .= '<div class="hotspot-type hotspot-setting">';
1821
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
1822
- $html .= '<select class="trtr" name="hotspot-type">';
1823
- $html .= '<option value="info"> Info</option>';
1824
- $html .= '<option value="scene" selected> Scene</option>';
1825
- $html .= '</select>';
1826
-
1827
- $html .= '<div class="hotspot-url" style="display:none;">';
1828
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').'</label>';
1829
- $html .= '<input type="url" name="hotspot-url" />';
1830
- $html .= '</div>';
1831
-
1832
- //====Hotspot open in same tab===//
1833
- $html .= '<div class="single-settings s_tab" style="display:none;">';
1834
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
1835
- $html .= '<label class="wpvr-switcher-v2">';
1836
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off">';
1837
- $html .= '<span class="switcher-box"></span>';
1838
- $html .= '</label>';
1839
- $html .= '</div>';
1840
- //====Hotspot open in same tab end===//
1841
-
1842
- $html .= '<div class="hotspot-content" style="display:none;">';
1843
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').' </label>';
1844
- $html .= '<textarea name="hotspot-content"></textarea>';
1845
- $html .= '</div>';
1846
-
1847
- $html .= '<div class="hotspot-hover">';
1848
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
1849
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
1850
- $html .= '</div>';
1851
-
1852
- $html .= '<div class="hotspot-scene" >';
1853
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
1854
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1855
- $html .= '<option value="none" selected> None</option>';
1856
- $html .= '</select>';
1857
- $html .= '</div>';
1858
-
1859
- $html .= '<div class="hotspot-scene">';
1860
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').'</label>';
1861
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" value="'.$hotspot_target_scene.'" disabled />';
1862
- $html .= '</div>';
1863
-
1864
- $html .= '</div>';
1865
- }
1866
- //=Hotspot type End=//
1867
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
1868
- $html .= '</div>';
1869
- } else {
1870
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
1871
-
1872
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
1873
-
1874
- $html .= '<div class="wrapper">';
1875
- $html .= '<div class="hotspot-setting">';
1876
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
1877
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title" value="'.$hotspot_title.'" />';
1878
- $html .= '</div>';
1879
-
1880
- $html .= '<div class="hotspot-setting">';
1881
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
1882
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch" value="'.$hotspot_pitch.'" />';
1883
- $html .= '</div>';
1884
-
1885
- $html .= '<div class="hotspot-setting">';
1886
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
1887
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
1888
- $html .= '</div>';
1889
-
1890
- $html .= '<div class="hotspot-setting">';
1891
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon Class: ', 'wpvr').'</label>';
1892
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
1893
- $html .= '</div>';
1894
-
1895
- $html .= '</div>';
1896
-
1897
- //=Hotspot type=//
1898
- if ($hotspot_type == "info") {
1899
- $html .= '<div class="hotspot-type hotspot-setting">';
1900
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
1901
- $html .= '<select name="hotspot-type">';
1902
- $html .= '<option value="info" selected> Info</option>';
1903
- $html .= '<option value="scene"> Scene</option>';
1904
- $html .= '</select>';
1905
-
1906
- $html .= '<div class="hotspot-url">';
1907
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').' </label>';
1908
- $html .= '<input type="url" name="hotspot-url" value="'.$hotspot_url.'" />';
1909
- $html .= '</div>';
1910
-
1911
- //====Hotspot open in same tab===//
1912
- $wpvr_url_open_checked = '';
1913
- $wpvr_url_open_data = 'off';
1914
-
1915
- if (isset($pano_hotspot['wpvr_url_open'][0]) && $pano_hotspot['wpvr_url_open'][0] == 'on') {
1916
- $wpvr_url_open_checked = 'checked';
1917
- $wpvr_url_open_data = 'on';
1918
- }
1919
-
1920
- $html .= '<div class="single-settings s_tab">';
1921
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
1922
- $html .= '<label class="wpvr-switcher-v2">';
1923
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="'.$wpvr_url_open_data.'" '.$wpvr_url_open_checked.'>';
1924
- $html .= '<span class="switcher-box"></span>';
1925
- $html .= '</label>';
1926
- $html .= '</div>';
1927
- //====Hotspot open in same tab end===//
1928
-
1929
- $html .= '<div class="hotspot-content">';
1930
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
1931
- $html .= '<textarea name="hotspot-content">'.$hotspot_content.'</textarea>';
1932
- $html .= '</div>';
1933
-
1934
- $html .= '<div class="hotspot-hover">';
1935
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
1936
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
1937
- $html .= '</div>';
1938
-
1939
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1940
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
1941
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1942
- $html .= '<option value="none" selected> None</option>';
1943
- $html .= '</select>';
1944
- $html .= '</div>';
1945
-
1946
- $html .= '<div class="hotspot-scene" style="display:none;" >';
1947
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').'</label>';
1948
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled />';
1949
- $html .= '</div>';
1950
-
1951
- $html .= '</div>';
1952
- } else {
1953
- $html .= '<div class="hotspot-type hotspot-setting">';
1954
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
1955
- $html .= '<select class="trtr" name="hotspot-type">';
1956
- $html .= '<option value="info"> Info</option>';
1957
- $html .= '<option value="scene" selected> Scene</option>';
1958
- $html .= '</select>';
1959
-
1960
- $html .= '<div class="hotspot-url" style="display:none;">';
1961
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').'</label>';
1962
- $html .= '<input type="url" name="hotspot-url" />';
1963
- $html .= '</div>';
1964
-
1965
- //====Hotspot open in same tab===//
1966
- $html .= '<div class="single-settings s_tab" style="display:none;">';
1967
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
1968
- $html .= '<label class="wpvr-switcher-v2">';
1969
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off">';
1970
- $html .= '<span class="switcher-box"></span>';
1971
- $html .= '</label>';
1972
- $html .= '</div>';
1973
- //====Hotspot open in same tab end===//
1974
-
1975
- $html .= '<div class="hotspot-content" style="display:none;">';
1976
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
1977
- $html .= '<textarea name="hotspot-content"></textarea>';
1978
- $html .= '</div>';
1979
-
1980
- $html .= '<div class="hotspot-hover">';
1981
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').' </label>';
1982
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
1983
- $html .= '</div>';
1984
-
1985
- $html .= '<div class="hotspot-scene" >';
1986
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
1987
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
1988
- $html .= '<option value="none" selected> None</option>';
1989
- $html .= '</select>';
1990
- $html .= '</div>';
1991
-
1992
- $html .= '<div class="hotspot-scene">';
1993
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').'</label>';
1994
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" value="'.$hotspot_target_scene.'" disabled />';
1995
- $html .= '</div>';
1996
-
1997
- $html .= '</div>';
1998
- }
1999
- //=Hotspot type End=//
2000
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
2001
- $html .= '</div>';
2002
- }
2003
- $h++;
2004
- }
2005
- $html .= '</div>';
2006
- $html .= '</div>';
2007
- } else {
2008
- $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
2009
-
2010
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
2011
- $html .= '<ul>';
2012
- $html .= '<li class="active"><span data-index="1" data-href="#scene-'.$s.'-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
2013
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
2014
- $html .= '</ul>';
2015
- $html .= '</nav>';
2016
-
2017
- $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
2018
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-1">';
2019
-
2020
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
2021
-
2022
- $html .= '<div class="wrapper">';
2023
- $html .= '<div class="hotspot-setting">';
2024
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
2025
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title"/>';
2026
- $html .= '</div>';
2027
-
2028
- $html .= '<div class="hotspot-setting">';
2029
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
2030
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch"/>';
2031
- $html .= '</div>';
2032
-
2033
- $html .= '<div class="hotspot-setting">';
2034
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
2035
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
2036
- $html .= '</div>';
2037
-
2038
- $html .= '<div class="hotspot-setting">';
2039
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon class: ', 'wpvr').'</label>';
2040
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
2041
- $html .= '</div>';
2042
-
2043
- $html .= '</div>';
2044
-
2045
- $html .= '<div class="hotspot-type hotspot-setting">';
2046
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
2047
- $html .= '<select name="hotspot-type">';
2048
- $html .= '<option value="info" selected> Info</option>';
2049
- $html .= '<option value="scene"> Scene</option>';
2050
- $html .= '</select>';
2051
-
2052
- $html .= '<div class="hotspot-url">';
2053
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').'</label>';
2054
- $html .= '<input type="url" name="hotspot-url" value="" />';
2055
- $html .= '</div>';
2056
-
2057
- //====Hotspot open in same tab===//
2058
- $html .= '<div class="single-settings s_tab">';
2059
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
2060
- $html .= '<label class="wpvr-switcher-v2">';
2061
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off">';
2062
- $html .= '<span class="switcher-box"></span>';
2063
- $html .= '</label>';
2064
- $html .= '</div>';
2065
- //====Hotspot open in same tab end===//
2066
-
2067
- $html .= '<div class="hotspot-content">';
2068
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
2069
- $html .= '<textarea name="hotspot-content"></textarea>';
2070
- $html .= '</div>';
2071
-
2072
- $html .= '<div class="hotspot-hover">';
2073
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
2074
- $html .= '<textarea name="hotspot-hover"></textarea>';
2075
- $html .= '</div>';
2076
-
2077
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2078
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
2079
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
2080
- $html .= '<option value="none"> None</option>';
2081
- $html .= '</select>';
2082
- $html .= '</div>';
2083
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2084
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').'</label>';
2085
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
2086
- $html .= '</div>';
2087
-
2088
- $html .= '</div>';
2089
- //=Hotspot type End=//
2090
- $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
2091
- $html .= '</div>';
2092
- $html .= '</div>';
2093
- $html .= '</div>';
2094
- }
2095
- $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
2096
- $html .= '</div>';
2097
- } else {
2098
- $html .= '<div data-repeater-item class="single-scene rex-pano-tab" data-title="1" id="scene-'.$s.'">';
2099
- $html .= '<div class="active_scene_id"><p></p></div>';
2100
- $html .= '<div class="scene-content">';
2101
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>';
2102
-
2103
- $html .= '<div class="scene-left">';
2104
- //==Set Default Scene==//
2105
- if ($dscene == 'on') {
2106
- $html .= '<div class="single-settings dscene">';
2107
- $html .= '<span>'.__('Set as Default: ', 'wpvr').'</span>';
2108
- $html .= '<select class="dscen" name="dscene">';
2109
- $html .= '<option value="on" selected > Yes</option>';
2110
- $html .= '<option value="off"> No</option>';
2111
- $html .= '</select>';
2112
- $html .= '</div>';
2113
- } else {
2114
- $html .= '<div class="single-settings dscene">';
2115
- $html .= '<span>'.__('Set as Default: ', 'wpvr').'</span>';
2116
- $html .= '<select class="dscen" name="dscene">';
2117
- $html .= '<option value="on"> Yes</option>';
2118
- $html .= '<option value="off" selected> No</option>';
2119
- $html .= '</select>';
2120
- $html .= '</div>';
2121
- }
2122
- //==Set Default Scene end==//
2123
-
2124
- $html .= '<div class=scene-setting>';
2125
- $html .= '<label for="scene-id">'.__('Scene ID : ', 'wpvr').'</label>';
2126
- $html .= '<input class="sceneid" type="text" name="scene-id" value="'.$scene_id.'" />';
2127
- $html .= '</div>';
2128
-
2129
- $html .= '<div class=scene-setting>';
2130
- $html .= '<label for="scene-type">'.__('Scene Type : ', 'wpvr').'</label>';
2131
- $html .= '<input type="text" name="scene-type" value="equirectangular" disabled/>';
2132
- $html .= '</div>';
2133
-
2134
- $html .= '<div class=scene-setting>';
2135
- $html .= '<label for="scene-upload">'.__('Scene Upload: ', 'wpvr').'</label>';
2136
- $html .= '<div class="form-group">';
2137
- $html .= '<img name ="scene-photo" src="'.$scene_photo.'"> <br/>';
2138
- $html .= '<input type="button" class="scene-upload" data-info="" value="Upload"/>';
2139
- $html .= '<input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="'.$scene_photo.'">';
2140
- $html .= '</div>';
2141
- $html .= '</div>';
2142
- $html .= '</div>';
2143
- //--end scene left----
2144
-
2145
- $html .= '</div>';
2146
-
2147
- if (!empty($pano_hotspots)) {
2148
- $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
2149
-
2150
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
2151
- $html .= '<ul>';
2152
- $j = 1;
2153
- foreach ($pano_hotspots as $pano_hotspot) {
2154
- if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
2155
- $html .= '<li class="active"><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
2156
- } else {
2157
- $html .= '<li><span data-index="'.$j.'" data-href="#scene-'.$s.'-hotspot-'.$j.'"><i class="far fa-dot-circle"></i></span></li>';
2158
- }
2159
- $j++;
2160
- }
2161
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>';
2162
- $html .= '</ul>';
2163
- $html .= '</nav>';
2164
-
2165
- $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
2166
-
2167
- $h = 1;
2168
- foreach ($pano_hotspots as $pano_hotspot) {
2169
- $hotspot_title = '';
2170
- $hotspot_title = $pano_hotspot['hotspot-title'];
2171
- $hotspot_pitch = '';
2172
- $hotspot_pitch = $pano_hotspot['hotspot-pitch'];
2173
- $hotspot_yaw = '';
2174
- $hotspot_yaw = $pano_hotspot['hotspot-yaw'];
2175
- $hotspot_type = '';
2176
- $hotspot_type = $pano_hotspot['hotspot-type'];
2177
- $hotspot_url = '';
2178
- $hotspot_url = $pano_hotspot['hotspot-url'];
2179
- $hotspot_content = '';
2180
- $hotspot_content = $pano_hotspot['hotspot-content'];
2181
- $hotspot_hover = '';
2182
- $hotspot_hover = $pano_hotspot['hotspot-hover'];
2183
- $hotspot_target_scene = '';
2184
- $hotspot_target_scene = $pano_hotspot['hotspot-scene'];
2185
- $hotspot_custom_class = '';
2186
- if (isset($pano_hotspot['hotspot-customclass'])) {
2187
- $hotspot_custom_class = $pano_hotspot['hotspot-customclass'];
2188
- }
2189
-
2190
- if ($pano_hotspot['hotspot-title'] == $pano_hotspots[0]['hotspot-title']) {
2191
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
2192
-
2193
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
2194
-
2195
- $html .= '<div class="wrapper">';
2196
- $html .= '<div class="hotspot-setting">';
2197
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
2198
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title" value="'.$hotspot_title.'" />';
2199
- $html .= '</div>';
2200
-
2201
- $html .= '<div class="hotspot-setting">';
2202
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
2203
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch" value="'.$hotspot_pitch.'" />';
2204
- $html .= '</div>';
2205
-
2206
- $html .= '<div class="hotspot-setting">';
2207
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
2208
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
2209
- $html .= '</div>';
2210
-
2211
- $html .= '<div class="hotspot-setting">';
2212
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon Class: ', 'wpvr').'</label>';
2213
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
2214
- $html .= '</div>';
2215
-
2216
- $html .= '</div>';
2217
-
2218
- //=Hotspot type=//
2219
- if ($hotspot_type == "info") {
2220
- $html .= '<div class="hotspot-type hotspot-setting">';
2221
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
2222
- $html .= '<select name="hotspot-type">';
2223
- $html .= '<option value="info" selected> Info</option>';
2224
- $html .= '<option value="scene"> Scene</option>';
2225
- $html .= '</select>';
2226
-
2227
- $html .= '<div class="hotspot-url">';
2228
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').' </label>';
2229
- $html .= '<input type="url" name="hotspot-url" value="'.$hotspot_url.'" />';
2230
- $html .= '</div>';
2231
-
2232
- //====Hotspot open in same tab===//
2233
- $wpvr_url_open_checked = 'checked';
2234
- $wpvr_url_open_data = 'on';
2235
-
2236
- $wpvr_url_open_checked = '';
2237
- $wpvr_url_open_data = 'off';
2238
-
2239
- if ($pano_hotspot['wpvr_url_open'][0] == 'on') {
2240
- $wpvr_url_open_checked = 'checked';
2241
- $wpvr_url_open_data = 'on';
2242
- }
2243
-
2244
- $html .= '<div class="single-settings s_tab">';
2245
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
2246
- $html .= '<label class="wpvr-switcher-v2">';
2247
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="'.$wpvr_url_open_data.'" '.$wpvr_url_open_checked.'>';
2248
- $html .= '<span class="switcher-box"></span>';
2249
- $html .= '</label>';
2250
- $html .= '</div>';
2251
- //====Hotspot open in same tab end===//
2252
-
2253
- $html .= '<div class="hotspot-content">';
2254
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').' </label>';
2255
- $html .= '<textarea name="hotspot-content">'.$hotspot_content.'</textarea>';
2256
- $html .= '</div>';
2257
-
2258
- $html .= '<div class="hotspot-hover">';
2259
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').' </label>';
2260
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
2261
- $html .= '</div>';
2262
-
2263
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2264
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
2265
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
2266
- $html .= '<option value="none" selected> None</option>';
2267
- $html .= '</select>';
2268
- $html .= '</div>';
2269
-
2270
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2271
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').' </label>';
2272
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene"/>';
2273
- $html .= '</div>';
2274
-
2275
- $html .= '</div>';
2276
- } else {
2277
- $html .= '<div class="hotspot-type hotspot-setting">';
2278
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
2279
- $html .= '<select class="trtr" name="hotspot-type">';
2280
- $html .= '<option value="info"> Info</option>';
2281
- $html .= '<option value="scene" selected> Scene</option>';
2282
- $html .= '</select>';
2283
-
2284
- $html .= '<div class="hotspot-url" style="display:none;">';
2285
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').' </label>';
2286
- $html .= '<input type="url" name="hotspot-url" />';
2287
- $html .= '</div>';
2288
-
2289
- //====Hotspot open in same tab===//
2290
- $html .= '<div class="single-settings s_tab" style="display:none;">';
2291
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
2292
- $html .= '<label class="wpvr-switcher-v2">';
2293
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off" >';
2294
- $html .= '<span class="switcher-box"></span>';
2295
- $html .= '</label>';
2296
- $html .= '</div>';
2297
- //====Hotspot open in same tab end===//
2298
-
2299
- $html .= '<div class="hotspot-content" style="display:none;">';
2300
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
2301
- $html .= '<textarea name="hotspot-content"></textarea>';
2302
- $html .= '</div>';
2303
-
2304
- $html .= '<div class="hotspot-hover">';
2305
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').' </label>';
2306
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
2307
- $html .= '</div>';
2308
-
2309
- $html .= '<div class="hotspot-scene" >';
2310
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
2311
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
2312
- $html .= '<option value="none" selected> None</option>';
2313
- $html .= '</select>';
2314
- $html .= '</div>';
2315
-
2316
- $html .= '<div class="hotspot-scene">';
2317
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').'</label>';
2318
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" value="'.$hotspot_target_scene.'" disabled />';
2319
- $html .= '</div>';
2320
-
2321
- $html .= '</div>';
2322
- }
2323
- //=Hotspot type End=//
2324
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
2325
- $html .= '</div>';
2326
- } else {
2327
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab clearfix" id="scene-'.$s.'-hotspot-'.$h.'">';
2328
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting</h6>';
2329
-
2330
- $html .= '<div class="wrapper">';
2331
- $html .= '<div class="hotspot-setting">';
2332
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
2333
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title" value="'.$hotspot_title.'" />';
2334
- $html .= '</div>';
2335
-
2336
- $html .= '<div class="hotspot-setting">';
2337
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
2338
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch" value="'.$hotspot_pitch.'" />';
2339
- $html .= '</div>';
2340
-
2341
- $html .= '<div class="hotspot-setting">';
2342
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
2343
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw" value="'.$hotspot_yaw.'" />';
2344
- $html .= '</div>';
2345
-
2346
- $html .= '<div class="hotspot-setting">';
2347
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom icon Class: ', 'wpvr').'</label>';
2348
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass" value="'.$hotspot_custom_class.'"/>';
2349
- $html .= '</div>';
2350
-
2351
- $html .= '</div>';
2352
-
2353
- //=Hotspot type=//
2354
- if ($hotspot_type == "info") {
2355
- $html .= '<div class="hotspot-type hotspot-setting">';
2356
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
2357
- $html .= '<select name="hotspot-type">';
2358
- $html .= '<option value="info" selected> Info</option>';
2359
- $html .= '<option value="scene"> Scene</option>';
2360
- $html .= '</select>';
2361
-
2362
- $html .= '<div class="hotspot-url">';
2363
- $html .= '<label for="hotspot-url">'.__(' URL: ', 'wpvr').'</label>';
2364
- $html .= '<input type="url" name="hotspot-url" value="'.$hotspot_url.'" />';
2365
- $html .= '</div>';
2366
-
2367
- //====Hotspot open in same tab===//
2368
- $wpvr_url_open_checked = '';
2369
- $wpvr_url_open_data = 'off';
2370
-
2371
- if ($pano_hotspot['wpvr_url_open'][0] == 'on') {
2372
- $wpvr_url_open_checked = 'checked';
2373
- $wpvr_url_open_data = 'on';
2374
- }
2375
-
2376
- $html .= '<div class="single-settings s_tab">';
2377
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
2378
- $html .= '<label class="wpvr-switcher-v2">';
2379
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="'.$wpvr_url_open_data.'" '.$wpvr_url_open_checked.'>';
2380
- $html .= '<span class="switcher-box"></span>';
2381
- $html .= '</label>';
2382
- $html .= '</div>';
2383
- //====Hotspot open in same tab end===//
2384
-
2385
- $html .= '<div class="hotspot-content">';
2386
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').' </label>';
2387
- $html .= '<textarea name="hotspot-content">'.$hotspot_content.'</textarea>';
2388
- $html .= '</div>';
2389
-
2390
- $html .= '<div class="hotspot-hover">';
2391
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').' </label>';
2392
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
2393
- $html .= '</div>';
2394
-
2395
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2396
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
2397
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
2398
- $html .= '<option value="none" selected> None</option>';
2399
- $html .= '</select>';
2400
- $html .= '</div>';
2401
-
2402
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2403
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').' </label>';
2404
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled />';
2405
- $html .= '</div>';
2406
-
2407
- $html .= '</div>';
2408
- } else {
2409
- $html .= '<div class="hotspot-type hotspot-setting">';
2410
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
2411
- $html .= '<select class="trtr" name="hotspot-type">';
2412
- $html .= '<option value="info"> Info</option>';
2413
- $html .= '<option value="scene" selected> Scene</option>';
2414
- $html .= '</select>';
2415
-
2416
- $html .= '<div class="hotspot-url" style="display:none;">';
2417
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').' </label>';
2418
- $html .= '<input type="url" name="hotspot-url" />';
2419
- $html .= '</div>';
2420
-
2421
- //====Hotspot open in same tab===//
2422
- $html .= '<div class="single-settings s_tab" style="display:none;">';
2423
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
2424
- $html .= '<label class="wpvr-switcher-v2">';
2425
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off">';
2426
- $html .= '<span class="switcher-box"></span>';
2427
- $html .= '</label>';
2428
- $html .= '</div>';
2429
- //====Hotspot open in same tab end===//
2430
-
2431
- $html .= '<div class="hotspot-content" style="display:none;">';
2432
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').' </label>';
2433
- $html .= '<textarea name="hotspot-content"></textarea>';
2434
- $html .= '</div>';
2435
-
2436
- $html .= '<div class="hotspot-hover">';
2437
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
2438
- $html .= '<textarea name="hotspot-hover">'.$hotspot_hover.'</textarea>';
2439
- $html .= '</div>';
2440
-
2441
- $html .= '<div class="hotspot-scene" >';
2442
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
2443
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
2444
- $html .= '<option value="none" selected> None</option>';
2445
- $html .= '</select>';
2446
- $html .= '</div>';
2447
-
2448
- $html .= '<div class="hotspot-scene">';
2449
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').' </label>';
2450
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" value="'.$hotspot_target_scene.'" disabled />';
2451
- $html .= '</div>';
2452
-
2453
- $html .= '</div>';
2454
- }
2455
- //=Hotspot type End=//
2456
- $html .= '<button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
2457
- $html .= '</div>';
2458
- }
2459
- $h++;
2460
- }
2461
- $html .= '</div>';
2462
- $html .= '</div>';
2463
- } else {
2464
- $html .= '<div class="hotspot-setup rex-pano-sub-tabs" data-limit="'.$data_limit.'">';
2465
-
2466
- $html .= '<nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">';
2467
- $html .= '<ul>';
2468
- $html .= '<li class="active"><span data-index="1" data-href="#scene-'.$s.'-hotspot-1"><i class="far fa-dot-circle"></i></span></li>';
2469
- $html .= '<li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>';
2470
- $html .= '</ul>';
2471
- $html .= '</nav>';
2472
-
2473
- $html .= '<div data-repeater-list="hotspot-list" class="rex-pano-tab-content">';
2474
- $html .= '<div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-'.$s.'-hotspot-1">';
2475
-
2476
- $html .= '<h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>';
2477
-
2478
- $html .= '<div class="wrapper">';
2479
- $html .= '<div class="hotspot-setting">';
2480
- $html .= '<label for="hotspot-title">'.__('Hotspot ID : ', 'wpvr').'</label>';
2481
- $html .= '<input type="text" id="hotspot-title" name="hotspot-title"/>';
2482
- $html .= '</div>';
2483
-
2484
- $html .= '<div class="hotspot-setting">';
2485
- $html .= '<label for="hotspot-pitch">'.__('Pitch: ', 'wpvr').'</label>';
2486
- $html .= '<input type="text" class="hotspot-pitch" name="hotspot-pitch"/>';
2487
- $html .= '</div>';
2488
-
2489
- $html .= '<div class="hotspot-setting">';
2490
- $html .= '<label for="hotspot-yaw">'.__('Yaw: ', 'wpvr').'</label>';
2491
- $html .= '<input type="text" class="hotspot-yaw" name="hotspot-yaw"/>';
2492
- $html .= '</div>';
2493
-
2494
- $html .= '<div class="hotspot-setting">';
2495
- $html .= '<label for="hotspot-customclass">'.__('Hotspot Custom Icon Class: ', 'wpvr').'</label>';
2496
- $html .= '<input type="text" id="hotspot-customclass" name="hotspot-customclass"/>';
2497
- $html .= '</div>';
2498
-
2499
- $html .= '</div>';
2500
-
2501
- $html .= '<div class="hotspot-type hotspot-setting">';
2502
- $html .= '<label for="hotspot-type">'.__('Hotspot-Type: ', 'wpvr').'</label>';
2503
- $html .= '<select name="hotspot-type">';
2504
- $html .= '<option value="info" selected> Info</option>';
2505
- $html .= '<option value="scene"> Scene</option>';
2506
- $html .= '</select>';
2507
-
2508
- $html .= '<div class="hotspot-url">';
2509
- $html .= '<label for="hotspot-url">'.__('URL: ', 'wpvr').'</label>';
2510
- $html .= '<input type="url" name="hotspot-url" value="" />';
2511
- $html .= '</div>';
2512
-
2513
- //====Hotspot open in same tab===//
2514
- $html .= '<div class="single-settings s_tab">';
2515
- $html .= '<span>'.__('Open in same tab: ', 'wpvr').'</span>';
2516
- $html .= '<label class="wpvr-switcher-v2">';
2517
- $html .= '<input type="checkbox" class="wpvr_url_open" name="wpvr_url_open" value="off">';
2518
- $html .= '<span class="switcher-box"></span>';
2519
- $html .= '</label>';
2520
- $html .= '</div>';
2521
- //====Hotspot open in same tab end===//
2522
-
2523
- $html .= '<div class="hotspot-content">';
2524
- $html .= '<label for="hotspot-content">'.__('On Click Content: ', 'wpvr').'</label>';
2525
- $html .= '<textarea name="hotspot-content"></textarea>';
2526
- $html .= '</div>';
2527
-
2528
- $html .= '<div class="hotspot-hover">';
2529
- $html .= '<label for="hotspot-hover">'.__('On Hover Content: ', 'wpvr').'</label>';
2530
- $html .= '<textarea name="hotspot-hover"></textarea>';
2531
- $html .= '</div>';
2532
-
2533
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2534
- $html .= '<label for="hotspot-scene">'.__('Select Target Scene from List: ', 'wpvr').'</label>';
2535
- $html .= '<select class="hotspotscene" name="hotspot-scene-list">';
2536
- $html .= '<option value="none"> None</option>';
2537
- $html .= '</select>';
2538
- $html .= '</div>';
2539
- $html .= '<div class="hotspot-scene" style="display:none;" >';
2540
- $html .= '<label for="hotspot-scene">'.__('Target Scene ID: ', 'wpvr').'</label>';
2541
- $html .= '<input class="hotspotsceneinfodata" type="text" name="hotspot-scene" disabled/>';
2542
- $html .= '</div>';
2543
-
2544
- $html .= '</div>';
2545
- //=Hotspot type End=//
2546
- $html .= '<button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>';
2547
- $html .= '</div>';
2548
- $html .= '</div>';
2549
- $html .= '</div>';
2550
- }
2551
- $html .= '<button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>';
2552
- $html .= '</div>';
2553
- }
2554
- $s++;
2555
- }
2556
- $html .= '</div>';
2557
-
2558
- $html .= '</div>';
2559
- }
2560
-
2561
- $html .= '<div class="preview-btn-wrapper">';
2562
- $html .= '<div class="preview-btn-area clearfix">';
2563
-
2564
- $html .= '<button id="panolenspreview" class="panolenspreview">'.__('Preview', 'wpvr').'</button>';
2565
- $html .= '</div>';
2566
- $html .= '</div>';
2567
- $html .='</div>';
2568
- //---end scenes tab----
2569
-
2570
- //-----start pano eror alert------
2571
- $html .= '<div id="error_occured">';
2572
- $html .= '<div class="pano-error-wrapper">';
2573
- $html .= '<div class="pano-error-body">';
2574
- $html .= '<span class="cross pano-error-close-btn">
2575
- <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2576
- <path fill-rule="evenodd" clip-rule="evenodd" d="M18.7778 18.7786C14.4819 23.074 7.51728 23.0738 3.22169 18.778C-1.0739 14.4823 -1.0739 7.51769 3.22169 3.22196C7.51728 -1.07378 14.4819 -1.07402 18.7778 3.22143C20.8409 5.28436 22 8.08242 22 11C22 13.9176 20.8409 16.7156 18.7778 18.7786ZM14.9278 8.21857L12.1071 11L14.9278 13.7814C15.0865 13.93 15.1765 14.1376 15.1765 14.355C15.1765 14.5724 15.0865 14.78 14.9278 14.9286C14.7795 15.0756 14.5788 15.1576 14.3699 15.1564C14.1638 15.1556 13.9663 15.0737 13.8199 14.9286L10.9992 12.1079L8.21778 14.9286C8.07143 15.0737 7.8739 15.1556 7.66778 15.1564C7.45893 15.1576 7.2582 15.0756 7.10992 14.9286C6.80528 14.6221 6.80528 14.1272 7.10992 13.8207L9.89135 11L7.10992 8.21857C6.84295 7.90683 6.8609 7.44213 7.15112 7.15191C7.44134 6.8617 7.90604 6.84375 8.21778 7.11071L10.9992 9.89214L13.7806 7.11071C13.9785 6.9058 14.2707 6.82202 14.5471 6.89095C14.8236 6.95988 15.0422 7.17104 15.1207 7.44488C15.1992 7.71872 15.1257 8.01365 14.9278 8.21857ZM4.34363 4.34471C8.02058 0.663508 13.9845 0.656605 17.6699 4.32929C19.4452 6.09842 20.4431 8.50157 20.4431 11.0079C20.4431 13.5141 19.4452 15.9173 17.6699 17.6864C13.9845 21.3591 8.02058 21.3522 4.34363 17.671C0.666691 13.9898 0.666691 8.02591 4.34363 4.34471Z" fill="#A8A7BE"/>
2577
- </svg>
2578
- </span>';
2579
-
2580
- $html .= '<span class="icon pano-warning">
2581
- <svg width="36" height="30" viewBox="0 0 36 30" fill="none" xmlns="http://www.w3.org/2000/svg">
2582
- <path fill-rule="evenodd" clip-rule="evenodd" d="M21.4802 1.86951L35.4553 24.3914C36.1816 25.5621 36.1816 26.9598 35.4553 28.1305C34.7289 29.3011 33.4278 30 31.9751 30H4.025C2.5722 30 1.2712 29.3011 0.5448 28.1305C-0.1816 26.9598 -0.1816 25.5621 0.5448 24.3914L14.5198 1.86951C15.2462 0.698907 16.5473 0 18 0C19.4527 0 20.7538 0.698841 21.4802 1.86951ZM31.9751 28.0358C32.6647 28.0358 33.2822 27.7041 33.6271 27.1484C33.9719 26.5927 33.9719 25.9291 33.6271 25.3734L19.6521 2.8515C19.3072 2.2958 18.6896 1.96404 18 1.96404C17.3104 1.96404 16.6928 2.2958 16.3479 2.8515L2.37293 25.3734C2.02812 25.9291 2.02812 26.5927 2.37293 27.1484C2.71774 27.7041 3.33537 28.0358 4.025 28.0358H31.9751Z" fill="#FAAC14"/>
2583
- <path d="M18 22C17.4486 22 17 22.4486 17 23C17 23.5514 17.4486 24 18 24C18.5514 24 19 23.5514 19 23C19 22.4486 18.5514 22 18 22Z" fill="#FAAC14"/>
2584
- <rect x="17" y="11" width="2" height="9" fill="#FAAC14"/>
2585
- </svg>
2586
- </span>';
2587
-
2588
- $html .= '<div class="pano-error-message"></div>';
2589
-
2590
- $html .= '</div>';
2591
- //---end error body---
2592
-
2593
- //---error footer---
2594
- $html .= '<div class="pano-error-footer">';
2595
- $html .= '<ul>';
2596
- $html .= '<li class="pano-error-close">';
2597
- $html .= '<button type="button" class="pano-error-close-btn">Ok</button>';
2598
- $html .= '</li>';
2599
- $html .= '</ul>';
2600
- $html .= '</div>';
2601
- $html .= '</div>';
2602
- $html .= '</div>';
2603
- //-----end pano eror alert------
2604
-
2605
- //----start video tab content---------
2606
- $html .='<div class="rex-pano-tab video" id="video">';
2607
- $html .= '<h6 class="title"> '.__('Video Settings : ', 'wpvr').'</h6>';
2608
- //==Video Setup==//
2609
- if (isset($postdata['vidid'])) {
2610
- $vidautoplay = $postdata['vidautoplay'];
2611
- $vidautoplay_on = '';
2612
- $vidautoplay_off = '';
2613
- if (!empty($vidautoplay)) {
2614
- $vidautoplay_on = 'checked';
2615
- } else {
2616
- $vidautoplay_off = 'checked';
2617
- }
2618
-
2619
- $vidcontrol = $postdata['vidcontrol'];
2620
- $vidcontrol_on = '';
2621
- $vidcontrol_off = '';
2622
- if (!empty($vidcontrol)) {
2623
- $vidcontrol_on = 'checked';
2624
- } else {
2625
- $vidcontrol_off = 'checked';
2626
- }
2627
- $html .= '<div class="single-settings videosetup">';
2628
- $html .= '<span>'.__('Enable Video:', 'wpvr').'</span>';
2629
- $html .= '<ul>';
2630
- $html .= '<li class="radio-btn">';
2631
- $html .= '<input class="styled-radio video_status video_off" id="styled-radio" type="radio" name="panovideo" value="off" >';
2632
- $html .= '<label for="styled-radio">Off</label>';
2633
- $html .= '</li>';
2634
-
2635
- $html .= '<li class="radio-btn">';
2636
- $html .= '<input class="styled-radio video_status video_on" id="styled-radio-0" type="radio" name="panovideo" value="on" checked>';
2637
- $html .= '<label for="styled-radio-0">On</label>';
2638
- $html .= '</li>';
2639
- $html .= '</ul>';
2640
- $html .= '</div>';
2641
-
2642
-
2643
- $html .= '<div class="video-setting" style="display:none;">';
2644
- $html .= '<div class="single-settings">';
2645
- $html .= '<span>'.__('Upload or Add Link: ', 'wpvr').'</span>';
2646
- $html .= '<div class="form-group">';
2647
- $html .= '<input type="text" name="video-attachment-url" placeholder="Paste Youtube or Vimeo link or upload" class="video-attachment-url" value="'.$postdata['vidurl'].'">';
2648
- $html .= '<input type="button" class="video-upload" data-info="" value="Upload" />';
2649
- $html .= '</div>';
2650
- $html .= '</div>';
2651
- $html .= '<button id="videopreview">Preview</button>';
2652
- $html .= '</div>';
2653
- } else {
2654
- $html .= '<div class="single-settings videosetup">';
2655
- $html .= '<span>'.__('Enable Video: ', 'wpvr').'</span>';
2656
- $html .= '<ul>';
2657
- $html .= '<li class="radio-btn">';
2658
- $html .= '<input class="styled-radio video_off" id="styled-radio" type="radio" name="panovideo" value="off" checked >';
2659
- $html .= '<label for="styled-radio">Off</label>';
2660
- $html .= '</li>';
2661
-
2662
- $html .= '<li class="radio-btn">';
2663
- $html .= '<input class="styled-radio video_on" id="styled-radio-0" type="radio" name="panovideo" value="on" >';
2664
- $html .= '<label for="styled-radio-0">On</label>';
2665
- $html .= '</li>';
2666
- $html .= '</ul>';
2667
- $html .= '</div>';
2668
-
2669
- //==Video setup end==//
2670
-
2671
- //==Video Setting==/
2672
- $html .= '<div class="video-setting" style="display:none;">';
2673
- $html .= '<div class="single-settings">';
2674
- $html .= '<span>'.__('Upload or Add Link: ', 'wpvr').'</span>';
2675
- $html .= '<div class="form-group">';
2676
- $html .= '<input type="text" placeholder="Paste Youtube or Vimeo link or upload" name="video-attachment-url" class="video-attachment-url" value="">';
2677
- $html .= '<input type="button" class="video-upload" data-info="" value="Upload"/>';
2678
- $html .= '</div>';
2679
- $html .= '</div>';
2680
- $html .= '<button id="videopreview">Preview</button>';
2681
- $html .= '</div>';
2682
- }
2683
-
2684
- $html .= '<div class="wpvr-use-shortcode">';
2685
- $post = get_post();
2686
- $id = $post->ID;
2687
- $slug = $post->post_name;
2688
- $postdata = get_post_meta($post->ID, 'panodata', true);
2689
-
2690
- $html .= '<h4 class="area-title">'.__('Using this Tour', 'wpvr').'</h4>';
2691
-
2692
- $html .= '<div class="shortcode-wrapper">';
2693
- $html .= '<div class="single-shortcode classic">';
2694
- $html .= '<span class="shortcode-title">'.__('For Classic Editor:', 'wpvr').'</span>';
2695
-
2696
- $html .= '<div class="field-wapper">';
2697
- $html .= '<span>'.__('To use this WP VR tour in your posts or pages use the following shortcode ', 'wpvr').'</span>';
2698
-
2699
- $html .= '<div class="shortcode-field">';
2700
- $html .= '<p class="copycode" id="copy-shortcode-video">[wpvr id="'.$id.'"]</p>';
2701
- $html .= '<span id="wpvr-copy-shortcode-video" class="wpvr-copy-shortcode">';
2702
- $html .= '<img src="'.WPVR_PLUGIN_DIR_URL . 'admin/icon/copy.png'.'" alt="icon" />';
2703
- $html .= '</span>';
2704
- $html .= '</div>';
2705
-
2706
- $html .= '<span id="wpvr-copied-notice-video" class="wpvr-copied-notice"></span>';
2707
-
2708
- $html .= '</div>';
2709
- $html .= '</div>';
2710
- $html .= '</div>';
2711
-
2712
- $html .= '<script>';
2713
- $html .= '
2714
-
2715
- document.getElementById("wpvr-copy-shortcode-video").addEventListener("click", function() {
2716
- copyToClipboardVideo(document.getElementById("copy-shortcode-video"));
2717
- });
2718
-
2719
- function copyToClipboardVideo(elem) {
2720
- // create hidden text element, if it doesn\'t already exist
2721
- var targetId = "_hiddenCopyText_";
2722
- var isInput = elem.tagName === "INPUT" || elem.tagName === "TEXTAREA";
2723
- var origSelectionStart, origSelectionEnd;
2724
- if (isInput) {
2725
- // can just use the original source element for the selection and copy
2726
- target = elem;
2727
- origSelectionStart = elem.selectionStart;
2728
- origSelectionEnd = elem.selectionEnd;
2729
- } else {
2730
- // must use a temporary form element for the selection and copy
2731
- target = document.getElementById(targetId);
2732
- if (!target) {
2733
- var target = document.createElement("textarea");
2734
- target.style.position = "absolute";
2735
- target.style.left = "-9999px";
2736
- target.style.top = "0";
2737
- target.id = targetId;
2738
- document.body.appendChild(target);
2739
- }
2740
- target.textContent = elem.textContent;
2741
- }
2742
- // select the content
2743
- var currentFocus = document.activeElement;
2744
- target.focus();
2745
- target.setSelectionRange(0, target.value.length);
2746
-
2747
- // copy the selection
2748
- var succeed;
2749
- try {
2750
- succeed = document.execCommand("copy");
2751
- document.getElementById("wpvr-copied-notice-video").innerHTML = "Copied!";
2752
- } catch(e) {
2753
- succeed = false;
2754
- }
2755
- // restore original focus
2756
- if (currentFocus && typeof currentFocus.focus === "function") {
2757
- currentFocus.focus();
2758
- }
2759
-
2760
- setTimeout(function(){
2761
- document.getElementById("wpvr-copied-notice-video").innerHTML = "";
2762
- }, 2000 );
2763
-
2764
- if (isInput) {
2765
- // restore prior selection
2766
- elem.setSelectionRange(origSelectionStart, origSelectionEnd);
2767
- } else {
2768
- // clear temporary content
2769
- target.textContent = "";
2770
- }
2771
- document.getElementById("wpvr-copy-shortcode-video").scrollIntoView()
2772
- return succeed;
2773
- }
2774
-
2775
- ';
2776
-
2777
- $html .= '</script>';
2778
- $html .= '</div>';
2779
- //=end shortcode area=
2780
- //==Video Setting End==//
2781
-
2782
- $html .='</div>';
2783
- //---end video tab----
2784
- $html .='</div>';
2785
- //---end rex-pano-tab-content----
2786
- $html .='</div>';
2787
- //---end rex-pano-tabs---
2788
- $html .= '</div>';
2789
- $html .= '<div class="wpvr-loading" style="display:none;">Loading&#8230;</div>';
2790
- echo $html;
2791
- }
2792
-
2793
- /**
2794
- * Rollback execution
2795
- */
2796
- public function trigger_rollback()
2797
- {
2798
- if (isset($_GET['wpvr_version'])) {
2799
- $version = $_GET['wpvr_version'];
2800
- $plugin_slug = 'wpvr';
2801
- $rollback = new WPVR_Rollback(
2802
- [
2803
- 'version' => $version,
2804
- 'plugin_name' => 'wpvr',
2805
- 'plugin_slug' => $plugin_slug,
2806
- 'package_url' => sprintf('https://downloads.wordpress.org/plugin/%s.%s.zip', $plugin_slug, $version),
2807
- ]
2808
- );
2809
-
2810
- $rollback->run();
2811
- }
2812
- }
2813
  }
1
  <?php
2
+
 
 
3
  /**
4
  * The admin-specific functionality of the plugin.
5
  *
6
  * @link http://rextheme.com/
7
+ * @since 8.0.0
8
  *
9
  * @package Wpvr
10
  * @subpackage Wpvr/admin
18
  *
19
  * @package Wpvr
20
  * @subpackage Wpvr/admin
21
+ * @author Rextheme <support@rextheme.com>
22
  */
23
+ class Wpvr_Admin {
24
+
25
+ /**
26
+ * The ID of this plugin.
27
+ *
28
+ * @since 8.0.0
29
+ * @access private
30
+ * @var string $plugin_name The ID of this plugin.
31
+ */
32
+ private $plugin_name;
33
+
34
+ /**
35
+ * The version of this plugin.
36
+ *
37
+ * @since 8.0.0
38
+ * @access private
39
+ * @var string $version The current version of this plugin.
40
+ */
41
+ private $version;
42
+
43
+ /**
 
44
  * The post type of this plugin.
45
  *
46
+ * @since 8.0.0
47
  */
48
  private $post_type;
49
 
50
+ /**
51
+ * Instance of WPVR_Admin_Page class
52
+ *
53
+ * @var object
54
+ * @since 8.0.0
55
+ */
56
+ private $plugin_admin_page;
57
+
58
+ /**
59
+ * Instance of WPVR_Setup_Meta_Box class
60
+ *
61
+ * @var object
62
+ * @since 8.0.0
63
+ */
64
+ private $setup_metabox;
65
+
66
+ /**
67
+ * Instacne of WPVR_Tour_Preview class
68
+ *
69
+ * @var object
70
+ * @since 8.0.0
71
+ */
72
+ private $preview_metabox;
73
+
74
+ /**
75
+ * Instance of Wpvr_Ajax class
76
+ *
77
+ * @var object
78
+ * @since 8.0.0
79
+ */
80
+ private $plugin_admin_ajax;
81
+
82
+ /**
83
+ * Instance of WPVR_Post_Type class
84
+ *
85
+ * @var object
86
+ * @since 8.0.0
87
+ */
88
+ private $wpvr_post_type;
89
+
90
+
91
+ /**
92
+ * Initialize the class and set its properties.
93
+ *
94
+ * @since 8.0.0
95
+ * @param string $plugin_name The name of this plugin.
96
+ * @param string $version The version of this plugin.
97
+ * @param string $post_type Post type of this plugin
98
+ */
99
+ public function __construct( $plugin_name, $version, $post_type ) {
100
+
101
+ $this->plugin_name = $plugin_name;
102
+ $this->version = $version;
103
+ $this->post_type = $post_type;
104
+
105
+ $this->wpvr_post_type = new WPVR_Post_Type($this->plugin_name, $this->version, $this->post_type);
106
+ $this->plugin_admin_page = WPVR_Admin_Page::getInstance();
107
+
108
+ add_action( 'admin_init', array($this, 'set_custom_meta_box') );
109
+
110
+ $this->plugin_admin_ajax = new Wpvr_Ajax();
111
+ }
112
+
113
+ /**
114
+ * Register the stylesheets for the admin area.
115
+ *
116
+ * @since 8.0.0
117
+ */
118
+ public function enqueue_styles() {
119
+
120
+ /**
121
+ * This function is provided for demonstration purposes only.
122
+ *
123
+ * An instance of this class should be passed to the run() function
124
+ * defined in Wpvr_Loader as all of the hooks are defined
125
+ * in that particular class.
126
+ *
127
+ * The Wpvr_Loader will then create the relationship
128
+ * between the defined hooks and the functions defined in this
129
+ * class.
130
+ */
131
+ $screen = get_current_screen();
132
  if ($screen->id=="toplevel_page_wpvr") {
133
  wp_enqueue_style('materialize-css', plugin_dir_url(__FILE__) . 'css/materialize.min.css', array(), $this->version, 'all');
134
  wp_enqueue_style('materialize-icons', plugin_dir_url(__FILE__) . 'lib/materializeicon.css', array(), $this->version, 'all');
135
  wp_enqueue_style('owl-css', 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css', array(), $this->version, 'all');
 
136
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-admin.css', array(), $this->version, 'all');
137
  }
138
 
145
  wp_enqueue_style('videojs-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/video-js.css', array(), true);
146
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-admin.css', array(), $this->version, 'all');
147
  wp_enqueue_style('summernote', plugin_dir_url(__FILE__) . 'lib/summernote/summernote-lite.min.css', array(), $this->version, 'all');
148
+ if(isset($_REQUEST['wpvr-guide-tour']) && $_REQUEST['wpvr-guide-tour'] == 1){
149
+ wp_enqueue_style($this->plugin_name.'-shepherd-css', plugin_dir_url(__FILE__) . 'lib/shepherd/css/shepherd-theme-arrows-plain-buttons.css', false, $this->version);
150
+ wp_enqueue_style($this->plugin_name.'-tour-css', plugin_dir_url(__FILE__) . 'lib/shepherd/css/wpvr-tour-guide.min.css', false, $this->version);
151
+ }
152
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
+ if ($screen->id=="wp-vr_page_wpvr-setup-wizard") {
155
+ wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-admin2.css', array(), $this->version, 'all');
 
156
  }
157
+
158
+ }
159
+
160
+
161
+ /**
162
+ * Register the JavaScript for the admin area.
163
+ *
164
+ * @since 8.0.0
165
+ */
166
+ public function enqueue_scripts() {
167
+
168
+ /**
169
+ * This function is provided for demonstration purposes only.
170
+ *
171
+ * An instance of this class should be passed to the run() function
172
+ * defined in Wpvr_Loader as all of the hooks are defined
173
+ * in that particular class.
174
+ *
175
+ * The Wpvr_Loader will then create the relationship
176
+ * between the defined hooks and the functions defined in this
177
+ * class.
178
+ */
179
+ $wpvr_list = array();
180
+ $wpvr_list[] = array('value'=>0,'label'=>'None');
181
+ $args = array(
182
+ 'numberposts' => -1,
183
+ 'post_type' => 'wpvr_item'
184
+ );
185
+
186
+ $wpvr_posts = get_posts( $args );
187
+ foreach ($wpvr_posts as $wpvr_post) {
188
+ $wpvr_list[] = array('value'=>$wpvr_post->ID,'label'=>$wpvr_post->post_title);
189
+ }
190
+
191
+ $asset_url = apply_filters( 'change_asset_url', plugin_dir_url( __FILE__ ) );
192
+
193
+ wp_enqueue_script('wp-api');
194
+ $adscreen = get_current_screen();
195
+ wp_enqueue_media();
196
+ if ($adscreen->id=="wpvr_item" || $adscreen->id=="toplevel_page_wpvr") {
197
+ wp_enqueue_script('summernote', $asset_url . 'lib/summernote/summernote-lite.min.js', array('jquery'), true);
198
+ wp_enqueue_script('wpvr-icon-picker', $asset_url . 'lib/jquery.fonticonpicker.min.js', array(), true);
199
+ wp_enqueue_script('panellium-js', $asset_url . 'lib/pannellum/src/js/pannellum.js', array(), true);
200
+ wp_enqueue_script('panelliumlib-js', $asset_url . 'lib/pannellum/src/js/libpannellum.js', array(), true);
201
+ wp_enqueue_script('videojs-js', $asset_url .'js/video.js', array('jquery'), true);
202
+ wp_enqueue_script('panelliumvid-js', $asset_url . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
203
+ wp_enqueue_script('jquery-repeater', $asset_url .'js/jquery.repeater.min.js', array('jquery'), true);
204
+ wp_enqueue_script('icon-picker', $asset_url . 'lib/jquery.fonticonpicker.min.js', array(), true);
205
+ wp_enqueue_script('owl', $asset_url . 'js/owl.carousel.js', array( 'jquery' ), false);
206
+ wp_enqueue_script($this->plugin_name, $asset_url . 'js/wpvr-admin.js', array( 'jquery' ), $this->version, true);
207
+
208
+ if(isset($_REQUEST['wpvr-guide-tour']) && $_REQUEST['wpvr-guide-tour'] == 1){
209
+ wp_enqueue_script($this->plugin_name.'-tether-js', plugin_dir_url( __FILE__ ) .'lib/shepherd/tether/tether.js', $this->version, true);
210
+ wp_enqueue_script($this->plugin_name.'-shepherd-js', plugin_dir_url( __FILE__ ) .'lib/shepherd/tether-shepherd/shepherd.js', array($this->plugin_name.'-tether-js'), $this->version, true);
211
+ wp_enqueue_script($this->plugin_name.'-tour-guide', plugin_dir_url( __FILE__ ) . 'js/wpvr-tour-guide.js', array( 'jquery',$this->plugin_name.'-tether-js'), $this->version, true);
212
+ }
213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  wp_localize_script($this->plugin_name, 'wpvr_obj', array(
215
+ 'ajaxurl' => admin_url('admin-ajax.php'),
216
+ 'ajax_nonce' => wp_create_nonce('wpvr'),
217
+ ));
218
+ }
219
+
220
+ if ($adscreen->id=="toplevel_page_wpvr") {
221
+ wp_enqueue_script('materialize-js', $asset_url . 'js/materialize.min.js', array( 'jquery' ), $this->version, false);
222
+ }
223
+ if ($adscreen->id=="wpvr_item") {
224
+ wp_enqueue_script($this->plugin_name. '-shortcode', plugin_dir_url(__FILE__) . 'js/wpvr-shortcode.js', array( 'jquery' ), $this->version, true);
225
+ }
226
+
227
+
228
+ wp_enqueue_script('owl-js', 'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js', array( 'jquery' ), false);
229
+ wp_enqueue_script('wpvr-global', $asset_url . 'js/wpvr-global.js', array( 'jquery' ), $this->version, false);
230
+ wp_localize_script('wpvr-global', 'wpvr_global_obj', array(
231
+ 'ajaxurl' => admin_url('admin-ajax.php'),
232
+ 'site_url' => site_url() . '/wp-json/',
233
+ 'ajax_nonce' => wp_create_nonce('wpvr_global'),
234
  'url_info' => array(
235
  'admin_url' => admin_url(),
236
  'screen' => $adscreen->action,
237
  'url' => $_SERVER['PHP_SELF'],
238
  'param' => $_GET,
239
  ),
240
+ ));
241
+ wp_localize_script('wpvr-global', 'wpvr_id_options', $wpvr_list);
242
+
243
+ }
244
 
245
 
246
+ /**
247
+ * Set Preview and Setup custom metabox of this plugin
248
+ *
249
+ * @since 8.0.0
250
+ */
251
+ public function set_custom_meta_box()
252
+ {
253
+ $this->setup_metabox = new WPVR_Setup_Meta_Box('setup', __('Setup'), 'wpvr_item', 'normal', 'high');
254
+
255
+ $this->preview_metabox = new WPVR_Tour_Preview($this->post_type . '_builder__box', __('Tour Preview', $this->plugin_name), $this->post_type, 'side', 'high');
256
+ }
257
+
258
+
259
+ /**
260
  * Plugin action links
261
  *
262
+ * @param $actions || $links
263
  * @return array
264
+ * @since 8.0.0
265
  */
266
+ public function plugin_action_links_wpvr($actions)
267
  {
268
  $actions['get_started'] = sprintf(
269
  '<a href="%s">%s</a>',
286
  return $actions;
287
  }
288
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  }
admin/class-wpvr-ajax.php DELETED
@@ -1,1720 +0,0 @@
1
- <?php
2
- if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
- /**
4
- * The admin-specific Ajax files.
5
- *
6
- * @link http://rextheme.com/
7
- * @since 1.0.0
8
- *
9
- * @package Wpvr
10
- * @subpackage Wpvr/admin
11
- */
12
-
13
- class Wpvr_Ajax
14
- {
15
-
16
- /**
17
- * Preview show ajax function
18
- */
19
- function wpvr_show_preview()
20
- {
21
- $panoid = '';
22
- $postid = sanitize_text_field($_POST['postid']);
23
- $post_type = get_post_type($postid);
24
-
25
- $panoid = 'pano' . $postid;
26
-
27
- $control = sanitize_text_field($_POST['control']);
28
- if ($control == 'on') {
29
- $control = true;
30
- } else {
31
- $control = false;
32
- }
33
-
34
- $compass = sanitize_text_field($_POST['compass']);
35
- if ($compass == 'on') {
36
- $compass = true;
37
- } else {
38
- $compass = false;
39
- }
40
-
41
- $mouseZoom = sanitize_text_field($_POST['mouseZoom']);
42
- if ($mouseZoom == 'off') {
43
- $mouseZoom = false;
44
- } else {
45
- $mouseZoom = true;
46
- }
47
-
48
- $draggable = sanitize_text_field($_POST['draggable']);
49
- if ($draggable == 'off') {
50
- $draggable = false;
51
- } else {
52
- $draggable = true;
53
- }
54
-
55
- $diskeyboard = sanitize_text_field($_POST['diskeyboard']);
56
- if ($diskeyboard == 'on') {
57
- $diskeyboard = true;
58
- } else {
59
- $diskeyboard = false;
60
- }
61
-
62
- $keyboardzoom = sanitize_text_field($_POST['keyboardzoom']);
63
- if ($keyboardzoom == 'off') {
64
- $keyboardzoom = false;
65
- } else {
66
- $keyboardzoom = true;
67
- }
68
-
69
- $autoload = sanitize_text_field($_POST['autoload']);
70
- if ($autoload == 'on') {
71
- $autoload = true;
72
- } else {
73
- $autoload = false;
74
- }
75
-
76
- $default_scene = '';
77
- // $default_scene = sanitize_text_field($_POST['defaultscene']);
78
- $preview = '';
79
- $preview = esc_url($_POST['preview']);
80
-
81
- $rotation = '';
82
- $rotation = sanitize_text_field($_POST['rotation']);
83
-
84
- $autorotation = '';
85
- $autorotation = sanitize_text_field($_POST['autorotation']);
86
- $autorotationinactivedelay = '';
87
- $autorotationinactivedelay = sanitize_text_field($_POST['autorotationinactivedelay']);
88
- $autorotationstopdelay = '';
89
- $autorotationstopdelay = sanitize_text_field($_POST['autorotationstopdelay']);
90
-
91
- $default_global_zoom = '';
92
- $max_global_zoom = '';
93
- $min_global_zoom = '';
94
- if (isset($_POST['gzoom']) == 'on') {
95
- $default_global_zoom = $_POST['dzoom'];
96
- $max_global_zoom = $_POST['maxzoom'];
97
- $min_global_zoom = $_POST['minzoom'];
98
- }
99
- if (!empty($autorotationinactivedelay) && !empty($autorotationstopdelay)) {
100
- wp_send_json_error('<span class="pano-error-title">Dual Action Error for Auto-Rotation</span><p> You can not use both Resume Auto-rotation & Stop Auto-rotation on the same tour. You can use only one of them.</p>');
101
-
102
- die();
103
- }
104
-
105
- $scene_fade_duration = '';
106
- $scene_fade_duration = sanitize_text_field($_POST['scenefadeduration']);
107
-
108
- $panodata = $_POST['panodata'];
109
- $panolist = stripslashes($panodata);
110
- $panodata = (array)json_decode($panolist);
111
- $panolist = array();
112
- if (is_array($panodata["scene-list"])) {
113
- foreach ($panodata["scene-list"] as $scenes_data) {
114
- $temp_array = array();
115
- $temp_array = (array)$scenes_data;
116
- if ($temp_array['hotspot-list']) {
117
- $_hotspot_array = array();
118
- foreach ($temp_array['hotspot-list'] as $temp_hotspot) {
119
- $temp_hotspot = (array)$temp_hotspot;
120
- $_hotspot_array[] = $temp_hotspot;
121
- }
122
- }
123
- $temp_array['hotspot-list'] = $_hotspot_array;
124
- $panolist['scene-list'][] = $temp_array;
125
- }
126
- }
127
- $panodata = $panolist;
128
-
129
- //===Error Control and Validation===//
130
-
131
- if ($panodata["scene-list"] != "") {
132
- foreach ($panodata["scene-list"] as $scenes_val) {
133
-
134
- $scene_id_validate = $scenes_val["scene-id"];
135
-
136
-
137
- if (!empty($scene_id_validate)) {
138
- $scene_id_validated = preg_replace('/[^0-9a-zA-Z_]/', "", $scene_id_validate);
139
- if ($scene_id_validated != $scene_id_validate) {
140
- wp_send_json_error('<span class="pano-error-title">Invalid Scene ID</span> <p>Scene ID can\'t contain spaces and special characters. <br/>Please assign a unique Scene ID with letters and numbers where Scene ID is : ' . $scene_id_validate . '</p>');
141
- die();
142
- }
143
-
144
- if ($scenes_val['scene-type'] == 'cubemap') {
145
- if (empty($scenes_val["scene-attachment-url-face0"])) {
146
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 0</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
147
- die();
148
- }
149
-
150
- if (empty($scenes_val["scene-attachment-url-face1"])) {
151
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 1</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
152
- die();
153
- }
154
-
155
- if (empty($scenes_val["scene-attachment-url-face2"])) {
156
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 2</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
157
- die();
158
- }
159
-
160
- if (empty($scenes_val["scene-attachment-url-face3"])) {
161
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 3</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
162
- die();
163
- }
164
-
165
- if (empty($scenes_val["scene-attachment-url-face4"])) {
166
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 4</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
167
- die();
168
- }
169
-
170
- if (empty($scenes_val["scene-attachment-url-face5"])) {
171
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 5</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
172
- die();
173
- }
174
- } else {
175
- if (empty($scenes_val["scene-attachment-url"])) {
176
- wp_send_json_error('<span class="pano-error-title">Missing Scene Image</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
177
- die();
178
- }
179
- }
180
-
181
- if (!empty($scenes_val["scene-pitch"])) {
182
- $validate_scene_pitch = $scenes_val["scene-pitch"];
183
- $validated_scene_pitch = preg_replace('/[^0-9.-]/', '', $validate_scene_pitch);
184
- if ($validated_scene_pitch != $validate_scene_pitch) {
185
- wp_send_json_error('<span class="pano-error-title">Invalid Pitch Value</span><p> The Pitch Value can only contain float numbers where Scene ID: ' . $scene_id_validate . '</p>');
186
- die();
187
- }
188
- }
189
-
190
- if (!empty($scenes_val["scene-yaw"])) {
191
- $validate_scene_yaw = $scenes_val["scene-yaw"];
192
- $validated_scene_yaw = preg_replace('/[^0-9.-]/', '', $validate_scene_yaw);
193
- if ($validated_scene_yaw != $validate_scene_yaw) {
194
- wp_send_json_error('<span class="pano-error-title">Invalid Yaw Value</span><p> The Yaw Value can only contain float numbers where Scene ID: ' . $scene_id_validate . '</p>');
195
- die();
196
- }
197
- }
198
-
199
- if (!empty($scenes_val["scene-zoom"])) {
200
- $validate_default_zoom = $scenes_val["scene-zoom"];
201
- $validated_default_zoom = preg_replace('/[^0-9-]/', '', $validate_default_zoom);
202
- if ($validated_default_zoom != $validate_default_zoom) {
203
- wp_send_json_error('<span class="pano-error-title">Invalid Default Zoom Value</span><p> You can only set Default Zoom in Degree values from 50 to 120 where Scene ID: ' . $scene_id_validate . '</p>');
204
- die();
205
- }
206
- $default_zoom_value = (int)$scenes_val["scene-zoom"];
207
- if ($default_zoom_value > 120 || $default_zoom_value < 50) {
208
- wp_send_json_error('<span class="pano-error-title">Invalid Default Zoom Value</span><p> You can only set Default Zoom in Degree values from 50 to 120 where Scene ID: ' . $scene_id_validate . '</p>');
209
-
210
- die();
211
- }
212
- }
213
-
214
- if (!empty($scenes_val["scene-maxzoom"])) {
215
- $validate_max_zoom = $scenes_val["scene-maxzoom"];
216
- $validated_max_zoom = preg_replace('/[^0-9-]/', '', $validate_max_zoom);
217
- if ($validated_max_zoom != $validate_max_zoom) {
218
- wp_send_json_error('<span class="pano-error-title">Invalid Max-zoom Value:</span><p> You can only set Max-zoom in degree values (50-120) where Scene ID: ' . $scene_id_validate . '</p>');
219
-
220
- die();
221
- }
222
- $max_zoom_value = (int)$scenes_val["scene-maxzoom"];
223
- if ($max_zoom_value > 120) {
224
- wp_send_json_error('<span class="pano-error-title">Max-zoom Value Limit Exceeded</span><p> You can set the Max-zoom Value up to 120 degrees.</p>');
225
- die();
226
- }
227
-
228
- if ($max_zoom_value < 50) {
229
- wp_send_json_error('<span class="pano-error-title">Max-zoom Value Limit Exceeded</span><p> You can not set the Max-zoom Value lower than 50 degrees.</p>');
230
- die();
231
- }
232
- }
233
-
234
- if (!empty($scenes_val["scene-minzoom"])) {
235
- $validate_min_zoom = $scenes_val["scene-minzoom"];
236
- $validated_min_zoom = preg_replace('/[^0-9-]/', '', $validate_min_zoom);
237
- if ($validated_min_zoom != $validate_min_zoom) {
238
- wp_send_json_error('<span class="pano-error-title">Invalid Min-zoom Value</span><p> You can only set Min-zoom in degree values (50-120) where Scene ID: ' . $scene_id_validate . '</p>');
239
- die();
240
- }
241
- $min_zoom_value = (int)$scenes_val["scene-minzoom"];
242
- if ($min_zoom_value < 50) {
243
- wp_send_json_error('<span class="pano-error-title">Low Min-Zoom Value</span><p> The Min-zoom value must be more than 50 in degree values where Scene ID: ' . $scene_id_validate . '</p>');
244
- die();
245
- }
246
-
247
- if ($min_zoom_value > 120) {
248
- wp_send_json_error('<span class="pano-error-title">High Min-Zoom Value</span><p> The Min-zoom value must be less than 120 in degree values where Scene ID: ' . $scene_id_validate . '</p>');
249
- die();
250
- }
251
- }
252
-
253
- if ($scenes_val["hotspot-list"] != "") {
254
- foreach ($scenes_val["hotspot-list"] as $hotspot_val) {
255
-
256
- $hotspot_title_validate = $hotspot_val["hotspot-title"];
257
-
258
-
259
- if (!empty($hotspot_title_validate)) {
260
- $hotspot_title_validated = preg_replace('/[^0-9a-zA-Z_]/', "", $hotspot_title_validate);
261
- if ($hotspot_title_validated != $hotspot_title_validate) {
262
- wp_send_json_error('<span class="pano-error-title">Invalid Hotspot ID</span> <p>Hotspot ID can\'t contain spaces and special characters. <br/>Please assign a unique Hotspot ID with letters and numbers where Scene id: ' . $scene_id_validate . ' Hotspot ID is: ' . $hotspot_title_validate . '</p>');
263
- die();
264
- }
265
-
266
- $hotspot_pitch_validate = $hotspot_val["hotspot-pitch"];
267
- if (!empty($hotspot_pitch_validate)) {
268
- $hotspot_pitch_validated = preg_replace('/[^0-9.-]/', '', $hotspot_pitch_validate);
269
- if ($hotspot_pitch_validated != $hotspot_pitch_validate) {
270
- wp_send_json_error('<span class="pano-error-title">Invalid Pitch Value</span> <p>The Pitch Value can only contain float numbers where Scene ID: ' . $scene_id_validate . ' Hotspot ID is: ' . $hotspot_title_validate . '</p>');
271
-
272
- die();
273
- }
274
- }
275
-
276
- $hotspot_yaw_validate = $hotspot_val["hotspot-yaw"];
277
- if (!empty($hotspot_yaw_validate)) {
278
- $hotspot_yaw_validated = preg_replace('/[^0-9.-]/', '', $hotspot_yaw_validate);
279
- if ($hotspot_yaw_validated != $hotspot_yaw_validate) {
280
- wp_send_json_error('<span class="pano-error-title">Invalid Yaw Value</span> <p>The Yaw Value can only contain float numbers where Scene ID: ' . $scene_id_validate . ' Hotspot ID is: ' . $hotspot_title_validate . '</p>');
281
-
282
- die();
283
- }
284
- }
285
-
286
- if (is_plugin_active('wpvr-pro/wpvr-pro.php')) {
287
- $status = get_option('wpvr_edd_license_status');
288
- if ($status !== false && $status == 'valid') {
289
- if ($hotspot_val["hotspot-customclass-pro"] != 'none' && !empty($hotspot_val["hotspot-customclass"])) {
290
- wp_send_json_error('<span class="pano-error-title">Warning!</span> <p>You can not use both Custom Icon and Custom Icon Class for a hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
291
- die();
292
- }
293
- }
294
- }
295
- $hotspot_type_validate = $hotspot_val["hotspot-type"];
296
- $hotspot_url_validate = $hotspot_val["hotspot-url"];
297
- if (!empty($hotspot_url_validate)) {
298
- $hotspot_url_validated = esc_url($hotspot_url_validate);
299
- if ($hotspot_url_validated != $hotspot_url_validate) {
300
- wp_send_json_error('<p><span>Warning:</span> Hotspot Url is invalid where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
301
- die();
302
- }
303
- }
304
- $hotspot_content_validate = $hotspot_val["hotspot-content"];
305
-
306
- $hotspot_scene_validate = $hotspot_val["hotspot-scene"];
307
-
308
- if ($hotspot_type_validate == "info") {
309
- if (!empty($hotspot_scene_validate)) {
310
- wp_send_json_error('<p><span>Warning:</span> Don\'t add Target Scene ID on info type hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
311
- die();
312
- }
313
- if (!empty($hotspot_url_validate) && !empty($hotspot_content_validate)) {
314
- wp_send_json_error('<span class="pano-error-title">Warning!</span> <p>You can not set both On Click Content and URL on a hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
315
- die();
316
- }
317
- }
318
-
319
- if ($hotspot_type_validate == "scene") {
320
- if (empty($hotspot_scene_validate)) {
321
- wp_send_json_error('<span class="pano-error-title">Target Scene Missing</span> <p>Assign a Target Scene to the Scene-type Hotspot where Scene ID: ' . $scene_id_validate . ' and Hotspot ID : ' . $hotspot_title_validate . '</p>');
322
- die();
323
- }
324
- if (!empty($hotspot_url_validate) || !empty($hotspot_content_validate)) {
325
- wp_send_json_error('<p><span>Warning:</span> Don\'t add Url or On click content on scene type hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
326
- die();
327
- }
328
- }
329
- }
330
- }
331
- }
332
- }
333
- }
334
- }
335
- //===Error Control and Validation===//
336
- foreach ($panodata["scene-list"] as $panoscenes) {
337
- if (empty($panoscenes['scene-id']) && !empty($panoscenes['scene-attachment-url'])) {
338
- wp_send_json_error('<span class="pano-error-title">Missing Scene ID</span> <p>Please assign a unique Scene ID to your uploaded scene.</p>');
339
- die();
340
- }
341
- }
342
-
343
- $allsceneids = array();
344
-
345
- foreach ($panodata["scene-list"] as $panoscenes) {
346
- if (!empty($panoscenes['scene-id'])) {
347
- array_push($allsceneids, $panoscenes['scene-id']);
348
- }
349
- }
350
-
351
- foreach ($panodata["scene-list"] as $panoscenes) {
352
-
353
- if ($panoscenes['dscene'] == 'on') {
354
- $default_scene = $panoscenes['scene-id'];
355
- }
356
- }
357
- if (empty($default_scene)) {
358
- if ($allsceneids) {
359
- $default_scene = $allsceneids[0];
360
- } else {
361
- wp_send_json_error('<span class="pano-error-title">Missing Image & Scene ID</span> <p>Please Upload An Image and Set A Scene ID To See The Preview</p>');
362
- die();
363
- }
364
- }
365
-
366
- $allsceneids_count = array_count_values($allsceneids);
367
- foreach ($allsceneids_count as $key => $value) {
368
- if ($value > 1) {
369
- wp_send_json_error('<span class="pano-error-title">Duplicate Scene ID</span> <p>You\'ve assigned a duplicate Scene ID. <br/>Please assign unique Scene IDs to each scene. </p>');
370
- die();
371
- }
372
- }
373
-
374
- foreach ($panodata["scene-list"] as $panoscenes) {
375
- if (!empty($panoscenes['scene-id'])) {
376
- $allhotspot = array();
377
- foreach ($panoscenes["hotspot-list"] as $hotspot_val) {
378
-
379
- if (!empty($hotspot_val["hotspot-title"])) {
380
- array_push($allhotspot, $hotspot_val["hotspot-title"]);
381
- }
382
- }
383
- $allhotspotcount = array_count_values($allhotspot);
384
- foreach ($allhotspotcount as $key => $value) {
385
- if ($value > 1) {
386
- wp_send_json_error('<span class="pano-error-title">Duplicate Hotspot ID</span> <p>You\'ve assigned a duplicate Hotspot ID. <br/>Please assign unique Hotspot IDs to each Hotspot.</p>');
387
- die();
388
- }
389
- }
390
- }
391
- }
392
-
393
- $default_data = array();
394
- if ($_POST['gzoom'] == 'on') {
395
- $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration, "hfov" => $default_global_zoom, "maxHfov" => $max_global_zoom, "minHfov" => $min_global_zoom);
396
- } else {
397
- $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration);
398
- }
399
- $scene_data = array();
400
- foreach ($panodata["scene-list"] as $panoscenes) {
401
- if (!empty($panoscenes['scene-id'])) {
402
- $scene_ititle = '';
403
- $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
404
- $scene_author = '';
405
- $scene_author = sanitize_text_field($panoscenes["scene-author"]);
406
-
407
- $scene_vaov = 180;
408
- $scene_vaov = (float)$panoscenes["scene-vaov"];
409
-
410
- $scene_haov = 360;
411
- $scene_haov = (float)$panoscenes["scene-haov"];
412
-
413
- $scene_vertical_offset = 0;
414
- $scene_vertical_offset = (float)$panoscenes["scene-vertical-offset"];
415
-
416
- $default_scene_pitch = null;
417
- $default_scene_pitch = (float)$panoscenes["scene-pitch"];
418
-
419
- $default_scene_yaw = null;
420
- $default_scene_yaw = (float)$panoscenes["scene-yaw"];
421
-
422
- $scene_max_pitch = '';
423
- $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
424
-
425
- $scene_min_pitch = '';
426
- $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
427
-
428
- $scene_max_yaw = '';
429
- $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
430
-
431
- $scene_min_yaw = '';
432
- $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
433
-
434
- $default_zoom = 100;
435
- $default_zoom = $panoscenes["scene-zoom"];
436
- if (!empty($default_zoom)) {
437
- $default_zoom = (int)$panoscenes["scene-zoom"];
438
- } else {
439
- $default_zoom = 100;
440
- }
441
-
442
- $max_zoom = 120;
443
- $max_zoom = $panoscenes["scene-maxzoom"];
444
- if (!empty($max_zoom)) {
445
- $max_zoom = (int)$panoscenes["scene-maxzoom"];
446
- } else {
447
- $max_zoom = 120;
448
- }
449
-
450
- $min_zoom = 50;
451
- $min_zoom = $panoscenes["scene-minzoom"];
452
- if (!empty($min_zoom)) {
453
- $min_zoom = (int)$panoscenes["scene-minzoom"];
454
- } else {
455
- $min_zoom = 50;
456
- }
457
-
458
- $hotspot_datas = $panoscenes["hotspot-list"];
459
-
460
- $hotspots = array();
461
- foreach ($hotspot_datas as $hotspot_data) {
462
-
463
- if (!empty($hotspot_data["hotspot-title"])) {
464
-
465
- $hotspot_type = $hotspot_data["hotspot-type"] !== 'scene' ? 'info' : $hotspot_data["hotspot-type"];
466
- $hotspot_content = '';
467
-
468
- ob_start();
469
- do_action('wpvr_hotspot_content_admin', $hotspot_data);
470
- $hotspot_content = ob_get_clean();
471
-
472
-
473
- if (!$hotspot_content) $hotspot_content = $hotspot_data["hotspot-content"];
474
-
475
-
476
- $hotspot_info = array(
477
- "text" => $hotspot_data["hotspot-title"],
478
- "pitch" => $hotspot_data["hotspot-pitch"],
479
- "yaw" => $hotspot_data["hotspot-yaw"],
480
- "type" => $hotspot_type,
481
- "URL" => $hotspot_data["hotspot-url"],
482
- "clickHandlerArgs" => $hotspot_content,
483
- "createTooltipArgs" => $hotspot_data["hotspot-hover"],
484
- "sceneId" => $hotspot_data["hotspot-scene"],
485
- "targetPitch" => (float)$hotspot_data["hotspot-scene-pitch"],
486
- "targetYaw" => (float)$hotspot_data["hotspot-scene-yaw"],
487
- 'hotspot_type' => $hotspot_data['hotspot-type']
488
- );
489
-
490
- array_push($hotspots, $hotspot_info);
491
- if (empty($hotspot_data["hotspot-scene"])) {
492
- unset($hotspot_info['targetPitch']);
493
- unset($hotspot_info['targetYaw']);
494
- }
495
- }
496
- }
497
-
498
- $scene_info = array();
499
- if ($panoscenes["scene-type"] == 'cubemap') {
500
- $pano_type = 'cubemap';
501
- $pano_attachment = array(
502
- $panoscenes["scene-attachment-url-face0"],
503
- $panoscenes["scene-attachment-url-face1"],
504
- $panoscenes["scene-attachment-url-face2"],
505
- $panoscenes["scene-attachment-url-face3"],
506
- $panoscenes["scene-attachment-url-face4"],
507
- $panoscenes["scene-attachment-url-face5"]
508
- );
509
-
510
- $scene_info = array("type" => $panoscenes["scene-type"], "cubeMap" => $pano_attachment, "pitch" => $default_scene_pitch, "maxPitch" => $scene_max_pitch, "minPitch" => $scene_min_pitch, "maxYaw" => $scene_max_yaw, "minYaw" => $scene_min_yaw, "yaw" => $default_scene_yaw, "hfov" => $default_zoom, "maxHfov" => $max_zoom, "minHfov" => $min_zoom, "title" => $scene_ititle, "author" => $scene_author, "vaov" => $scene_vaov, "haov" => $scene_haov, "vOffset" => $scene_vertical_offset, "hotSpots" => $hotspots);
511
- } else {
512
- $scene_info = array("type" => $panoscenes["scene-type"], "panorama" => $panoscenes["scene-attachment-url"], "pitch" => $default_scene_pitch, "maxPitch" => $scene_max_pitch, "minPitch" => $scene_min_pitch, "maxYaw" => $scene_max_yaw, "minYaw" => $scene_min_yaw, "yaw" => $default_scene_yaw, "hfov" => $default_zoom, "maxHfov" => $max_zoom, "minHfov" => $min_zoom, "title" => $scene_ititle, "author" => $scene_author, "vaov" => $scene_vaov, "haov" => $scene_haov, "vOffset" => $scene_vertical_offset, "hotSpots" => $hotspots);
513
- }
514
-
515
-
516
- if ($panoscenes["ptyscene"] == "off") {
517
- unset($scene_info['pitch']);
518
- unset($scene_info['yaw']);
519
- }
520
-
521
- if (empty($panoscenes["scene-ititle"])) {
522
- unset($scene_info['title']);
523
- }
524
- if (empty($panoscenes["scene-author"])) {
525
- unset($scene_info['author']);
526
- }
527
-
528
- if (empty($scene_vaov)) {
529
- unset($scene_info['vaov']);
530
- }
531
-
532
- if (empty($scene_haov)) {
533
- unset($scene_info['haov']);
534
- }
535
-
536
- if (empty($scene_vertical_offset)) {
537
- unset($scene_info['vOffset']);
538
- }
539
-
540
- if ($panoscenes["cvgscene"] == "off") {
541
- unset($scene_info['maxPitch']);
542
- unset($scene_info['minPitch']);
543
- }
544
- if (empty($panoscenes["scene-maxpitch"])) {
545
- unset($scene_info['maxPitch']);
546
- }
547
-
548
- if (empty($panoscenes["scene-minpitch"])) {
549
- unset($scene_info['minPitch']);
550
- }
551
-
552
- if ($panoscenes["chgscene"] == "off") {
553
- unset($scene_info['maxYaw']);
554
- unset($scene_info['minYaw']);
555
- }
556
- if (empty($panoscenes["scene-maxyaw"])) {
557
- unset($scene_info['maxYaw']);
558
- }
559
-
560
- if (empty($panoscenes["scene-minyaw"])) {
561
- unset($scene_info['minYaw']);
562
- }
563
-
564
- // if ($panoscenes["czscene"] == "off") {
565
- // unset($scene_info['hfov']);
566
- // unset($scene_info['maxHfov']);
567
- // unset($scene_info['minHfov']);
568
- // }
569
-
570
- $scene_array = array();
571
- $scene_array = array(
572
- $panoscenes["scene-id"] => $scene_info
573
- );
574
- $scene_data[$panoscenes["scene-id"]] = $scene_info;
575
- }
576
- }
577
-
578
- $pano_id_array = array();
579
- $pano_id_array = array("panoid" => $panoid);
580
- $pano_response = array();
581
- $pano_response = array("autoLoad" => $autoload, "defaultZoom" => $default_global_zoom, "minZoom" => $min_global_zoom, "maxZoom" => $max_global_zoom, "showControls" => $control, "compass" => $compass, "mouseZoom" => $mouseZoom, "draggable" => $draggable, "disableKeyboardCtrl" => $diskeyboard, 'keyboardZoom' => $keyboardzoom, "preview" => $preview, "autoRotate" => $autorotation, "autoRotateInactivityDelay" => $autorotationinactivedelay, "autoRotateStopDelay" => $autorotationstopdelay, "default" => $default_data, "scenes" => $scene_data);
582
-
583
- if ($rotation == 'off') {
584
- unset($pano_response['autoRotate']);
585
- unset($pano_response['autoRotateInactivityDelay']);
586
- unset($pano_response['autoRotateStopDelay']);
587
- }
588
- if (empty($autorotation)) {
589
- unset($pano_response['autoRotate']);
590
- unset($pano_response['autoRotateInactivityDelay']);
591
- unset($pano_response['autoRotateStopDelay']);
592
- }
593
- if (empty($autorotationinactivedelay)) {
594
- unset($pano_response['autoRotateInactivityDelay']);
595
- }
596
- if (empty($autorotationstopdelay)) {
597
- unset($pano_response['autoRotateStopDelay']);
598
- }
599
-
600
- // if($_POST['gzoom'] == 'off' ){
601
- // unset($pano_response['defaultZoom']);
602
- // unset($pano_response['minZoom']);
603
- // unset($pano_response['maxZoom']);
604
- // }
605
- $response = array();
606
- $response = array($pano_id_array, $pano_response);
607
- wp_send_json_success($response);
608
- }
609
-
610
- /**
611
- * Video Preview show ajax function
612
- */
613
- function wpvrvideo_preview()
614
- {
615
- $panoid = '';
616
- $postid = sanitize_text_field($_POST['postid']);
617
- $panoid = 'pano' . $postid;
618
- $randid = rand(1000, 1000000);
619
- $vidid = 'vid' . $randid;
620
- $videourl = esc_url_raw($_POST['videourl']);
621
- $autoplay = sanitize_text_field($_POST['autoplay']);
622
- $loop = sanitize_text_field($_POST['loop']);
623
-
624
- $vidtype = '';
625
- if (strpos($videourl, 'youtube') > 0) {
626
- $vidtype = 'youtube';
627
- $explodeid = '';
628
- $explodeid = explode("=", $videourl);
629
-
630
- if ($autoplay == 'on') {
631
- $autoplay = '&autoplay=1';
632
- $muted = '&mute=1';
633
- } else {
634
- $autoplay = '';
635
- $muted = '';
636
- }
637
-
638
- if ($loop == 'on') {
639
- $loop = '&loop=1';
640
- } else {
641
- $loop = '';
642
- }
643
-
644
- $foundid = '';
645
- $foundid = $explodeid[1] . '?' . $autoplay . $loop;
646
- $html = '';
647
- $html .= '
648
- <iframe src="https://www.youtube.com/embed/' . $explodeid[1] . '?rel=0&modestbranding=1' . $loop . '&autohide=1' . $muted . '&showinfo=0&controls=1' . $autoplay . '" width="600" height="400" frameborder="0" allowfullscreen></iframe>
649
- ';
650
- } elseif (strpos($videourl, 'youtu.be') > 0) {
651
- $vidtype = 'youtube';
652
- $explodeid = '';
653
- $explodeid = explode("/", $videourl);
654
-
655
- if ($autoplay == 'on') {
656
- $autoplay = '&autoplay=1';
657
- } else {
658
- $autoplay = '';
659
- }
660
-
661
- if ($loop == 'on') {
662
- $loop = '&loop=1';
663
- } else {
664
- $loop = '';
665
- }
666
-
667
- $foundid = '';
668
- $foundid = $explodeid[3] . '?' . $autoplay . $loop;
669
- $html = '';
670
- $html .= '<iframe width="600" height="400" src="https://www.youtube.com/embed/' . $foundid . '" frameborder="0" allow="accelerometer; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
671
- } elseif (strpos($videourl, 'vimeo') > 0) {
672
- $vidtype = 'vimeo';
673
- $explodeid = '';
674
- $explodeid = explode("/", $videourl);
675
- $foundid = '';
676
-
677
- if ($autoplay == 'on') {
678
- $autoplay = '&autoplay=1&muted=1';
679
- } else {
680
- $autoplay = '';
681
- }
682
-
683
- if ($loop == 'on') {
684
- $loop = '&loop=1';
685
- } else {
686
- $loop = '';
687
- }
688
-
689
- $foundid = $explodeid[3] . '?' . $autoplay . $loop;
690
- $html = '';
691
- $html .= '<iframe src="https://player.vimeo.com/video/' . $foundid . '" width="600" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
692
- } else {
693
- $vidtype = 'selfhost';
694
-
695
- if ($autoplay == 'on') {
696
- $autoplay = 'autoplay';
697
- } else {
698
- $autoplay = '';
699
- }
700
-
701
-
702
- if ($loop == 'on') {
703
- $loop = 'loop';
704
- } else {
705
- $loop = '';
706
- }
707
-
708
- $html = '';
709
- $html .= '<video id="' . $vidid . '" class="video-js vjs-default-skin vjs-big-play-centered" ' . $autoplay . ' ' . $loop . ' controls preload="none" style="width:100%;height:400px;" poster="" >';
710
- $html .= '<source src="' . $videourl . '" type="video/mp4"/>';
711
- $html .= '<p class="vjs-no-js">';
712
- $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>';
713
- $html .= '</p>';
714
- $html .= '</video>';
715
- }
716
-
717
- $response = array();
718
- $response = array(__("panoid") => $panoid, __("panodata") => $html, __("vidid") => $vidid, __("vidtype") => $vidtype);
719
- wp_send_json_success($response);
720
- }
721
-
722
- function wpvr_save_data()
723
- {
724
-
725
- $panoid = '';
726
- $html = '';
727
- $postid = sanitize_text_field($_POST['postid']);
728
- $prevtext = sanitize_text_field($_POST['previewtext']);
729
- // error_log(print_r($_POST['customColor'],1));
730
- $previewtext = '';
731
- if (strlen($prevtext) <= 50) {
732
- $previewtext = $prevtext;
733
- }
734
- $post_type = get_post_type($postid);
735
- if ($post_type != 'wpvr_item') {
736
- die();
737
- }
738
- $panoid = 'pano' . $postid;
739
-
740
- $default_global_zoom = '';
741
- $max_global_zoom = '';
742
- $min_global_zoom = '';
743
- if (isset($_POST['gzoom']) == 'on') {
744
- $default_global_zoom = $_POST['dzoom'];
745
- $max_global_zoom = $_POST['maxzoom'];
746
- $min_global_zoom = $_POST['minzoom'];
747
- }
748
-
749
- if (isset($_POST['streetview'])) {
750
- $streetview = $_POST['streetview'];
751
- if ($streetview == 'on') {
752
- $streetviewurl = esc_url_raw($_POST['streetviewurl']);
753
- if ($streetviewurl) {
754
- $html .= '<iframe src="' . $streetviewurl . '" width="600" height="400" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
755
- }
756
- $streetviewarray = array();
757
- $streetviewarray = array(__("panoid") => $panoid, __("streetviewdata") => $html, __("streetviewurl") => $streetviewurl, __("streetview") => $streetview);
758
- update_post_meta($postid, 'panodata', $streetviewarray);
759
- die();
760
- }
761
- }
762
-
763
-
764
- $pnovideo = $_POST['panovideo'];
765
- if ($pnovideo == "on") {
766
-
767
- $vidid = 'vid' . $postid;
768
- $videourl = esc_url_raw($_POST['videourl']);
769
- $autoplay = sanitize_text_field($_POST['autoplay']);
770
- $vidautoplay = sanitize_text_field($_POST['autoplay']);
771
- $loop = sanitize_text_field($_POST['loop']);
772
- $vidloop = sanitize_text_field($_POST['loop']);
773
- $vidtype = '';
774
-
775
- if (strpos($videourl, 'youtube') > 0) {
776
- $vidtype = 'youtube';
777
- $explodeid = '';
778
- $explodeid = explode("=", $videourl);
779
- $foundid = '';
780
-
781
- if ($autoplay == 'on') {
782
- $autoplay = '&autoplay=1';
783
- } else {
784
- $autoplay = '';
785
- }
786
-
787
- if ($loop == 'on') {
788
- $loop = '&loop=1';
789
- } else {
790
- $loop = '';
791
- }
792
-
793
- $foundid = $explodeid[1] . '?' . $autoplay . $loop;
794
- $html = '';
795
- $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>';
796
- } elseif (strpos($videourl, 'youtu.be') > 0) {
797
- $vidtype = 'youtube';
798
- $explodeid = '';
799
- $explodeid = explode("/", $videourl);
800
- $foundid = '';
801
-
802
- if ($autoplay == 'on') {
803
- $autoplay = '&autoplay=1';
804
- } else {
805
- $autoplay = '';
806
- }
807
-
808
- if ($loop == 'on') {
809
- $loop = '&loop=1';
810
- } else {
811
- $loop = '';
812
- }
813
-
814
- $foundid = $explodeid[3] . '?' . $autoplay . $loop;
815
- $html = '';
816
- $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>';
817
- } elseif (strpos($videourl, 'vimeo') > 0) {
818
- $vidtype = 'vimeo';
819
- $explodeid = '';
820
- $explodeid = explode("/", $videourl);
821
- $foundid = '';
822
-
823
- if ($autoplay == 'on') {
824
- $autoplay = '&autoplay=1&muted=1';
825
- } else {
826
- $autoplay = '';
827
- }
828
-
829
- if ($loop == 'on') {
830
- $loop = '&loop=1';
831
- } else {
832
- $loop = '';
833
- }
834
-
835
- $foundid = $explodeid[3] . '?' . $autoplay . $loop;
836
- $html = '';
837
- $html .= '<iframe src="https://player.vimeo.com/video/' . $foundid . '" width="600" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
838
- } else {
839
- $vidtype = 'selfhost';
840
- $vidautoplay = '';
841
- // $vidautoplay = sanitize_text_field($_POST['vidautoplay']);
842
- $vidautoplay = sanitize_text_field($_POST['autoplay']);
843
-
844
- if ($autoplay == 'on') {
845
- $autoplay = 'autoplay muted';
846
- } else {
847
- $autoplay = '';
848
- }
849
-
850
- if ($loop == 'on') {
851
- $loop = 'loop';
852
- } else {
853
- $loop = '';
854
- }
855
-
856
- $html = '';
857
- $html .= '<video id="' . $vidid . '" class="video-js vjs-default-skin vjs-big-play-centered" ' . $autoplay . ' ' . $loop . ' controls preload="auto" style="width:100%;height:100%;" poster="" >';
858
- $html .= '<source src="' . $videourl . '" type="video/mp4"/>';
859
- $html .= '<p class="vjs-no-js">';
860
- $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>';
861
- $html .= '</p>';
862
- $html .= '</video>';
863
- }
864
-
865
-
866
-
867
- $videoarray = array();
868
- $videoarray = array(__("panoid") => $panoid, __("panoviddata") => $html, __("vidid") => $vidid, __("vidurl") => $videourl, __("autoplay") => $autoplay, __("loop") => $vidloop, __("vidtype") => $vidtype);
869
- update_post_meta($postid, 'panodata', $videoarray);
870
- die();
871
- }
872
-
873
-
874
- $control = sanitize_text_field($_POST['control']);
875
- if ($control == 'on') {
876
- $control = true;
877
- } else {
878
- $control = false;
879
- }
880
-
881
- //===Custom Control===//
882
- $custom_control = $_POST['customcontrol'];
883
-
884
- //===Custom Control End===//
885
-
886
- $vrgallery = sanitize_text_field($_POST['vrgallery']);
887
- if ($vrgallery == 'on') {
888
- $vrgallery = true;
889
- } else {
890
- $vrgallery = false;
891
- }
892
-
893
- $vrgallery_title = sanitize_text_field($_POST['vrgallery_title']);
894
- if ($vrgallery_title == 'on') {
895
- $vrgallery_title = true;
896
- } else {
897
- $vrgallery_title = false;
898
- }
899
-
900
- $vrgallery_display = sanitize_text_field($_POST['vrgallery_display']);
901
- if ($vrgallery_display == 'on') {
902
- $vrgallery_display = true;
903
- } else {
904
- $vrgallery_display = false;
905
- }
906
-
907
- $gyro = false;
908
- if (isset($_POST['gyro'])) {
909
- $gyro = sanitize_text_field($_POST['gyro']);
910
- }
911
-
912
- $deviceorientationcontrol = sanitize_text_field($_POST['deviceorientationcontrol']);
913
-
914
- if ($gyro == 'on') {
915
- if (!is_ssl()) {
916
- wp_send_json_error('<p><span>Warning:</span> Please add SSL to enable Gyroscope for WP VR. </p>');
917
- die();
918
- }
919
- $gyro = true;
920
- if ($deviceorientationcontrol == 'on') {
921
- $deviceorientationcontrol = true;
922
- } else {
923
- $deviceorientationcontrol = false;
924
- }
925
- } else {
926
- $gyro = false;
927
- $deviceorientationcontrol = false;
928
- }
929
-
930
- $compass = sanitize_text_field($_POST['compass']);
931
- if ($compass == 'on') {
932
- $compass = true;
933
- } else {
934
- $compass = false;
935
- }
936
-
937
- $mouseZoom = sanitize_text_field($_POST['mouseZoom']);
938
- if ($mouseZoom == 'off') {
939
- $mouseZoom = false;
940
- } else {
941
- $mouseZoom = true;
942
- }
943
-
944
- $draggable = sanitize_text_field($_POST['draggable']);
945
- if ($draggable == 'off') {
946
- $draggable = false;
947
- } else {
948
- $draggable = true;
949
- }
950
-
951
- $diskeyboard = sanitize_text_field($_POST['diskeyboard']);
952
- if ($diskeyboard == 'on') {
953
- $diskeyboard = true;
954
- } else {
955
- $diskeyboard = false;
956
- }
957
-
958
- $keyboardzoom = sanitize_text_field($_POST['keyboardzoom']);
959
-
960
- if ($keyboardzoom == 'off') {
961
- $keyboardzoom = false;
962
- } else {
963
- $keyboardzoom = true;
964
- }
965
-
966
- $autoload = sanitize_text_field($_POST['autoload']);
967
- if ($autoload == 'on') {
968
- $autoload = true;
969
- } else {
970
- $autoload = false;
971
- }
972
-
973
- $default_scene = '';
974
-
975
- $preview = '';
976
- $preview = esc_url($_POST['preview']);
977
-
978
- $rotation = '';
979
- $rotation = sanitize_text_field($_POST['rotation']);
980
-
981
- $autorotation = '';
982
- $autorotation = sanitize_text_field($_POST['autorotation']);
983
- $autorotationinactivedelay = '';
984
- $autorotationinactivedelay = sanitize_text_field($_POST['autorotationinactivedelay']);
985
- $autorotationstopdelay = '';
986
- $autorotationstopdelay = sanitize_text_field($_POST['autorotationstopdelay']);
987
-
988
-
989
-
990
- if (!empty($autorotationinactivedelay) && !empty($autorotationstopdelay)) {
991
- wp_send_json_error('<span class="pano-error-title">Dual Action Error for Auto-Rotation</span><p> You can not use both Resume Auto-rotation & Stop Auto-rotation on the same tour. You can use only one of them.</p>');
992
- die();
993
- }
994
-
995
- //===Company Logo===//
996
- $cpLogoSwitch = 'off';
997
- $cpLogoSwitch = $_POST['cpLogoSwitch'];
998
- $cpLogoImg = '';
999
- $cpLogoImg = $_POST['cpLogoImg'];
1000
- $cpLogoContent = '';
1001
- $cpLogoContent = sanitize_text_field($_POST['cpLogoContent']);
1002
- //===Company Logo===//
1003
-
1004
- //===Explainer video===//
1005
- $explainerSwitch = 'off';
1006
- $explainerSwitch = $_POST['explainerSwitch'];
1007
- $explainerContent = '';
1008
- $explainerContent = $_POST['explainerContent'];
1009
- //===Explainer video===//
1010
-
1011
- //===background tour ===//
1012
- $bg_tour_enabler = sanitize_text_field($_POST['wpvr_bg_tour_enabler']);
1013
- // $bg_tour_navmenu = sanitize_text_field($_POST['wpvr_bg_tour_navmenu_enabler']);
1014
- $bg_tour_title = sanitize_text_field($_POST['bg_tour_title']);
1015
- $bg_tour_subtitle = sanitize_text_field($_POST['bg_tour_subtitle']);
1016
- //===background tour end ===//
1017
-
1018
- // update_post_meta($postid,'hotspot_colors',$_POST['customColor']);
1019
-
1020
- $scene_fade_duration = '';
1021
- $scene_fade_duration = $_POST['scenefadeduration'];
1022
-
1023
- $panodata = $_POST['panodata'];
1024
- $panolist = stripslashes($panodata);
1025
- $panodata = (array)json_decode($panolist);
1026
- $panolist = array();
1027
- if (is_array($panodata["scene-list"])) {
1028
- foreach ($panodata["scene-list"] as $scenes_data) {
1029
- $temp_array = array();
1030
- $temp_array = (array)$scenes_data;
1031
- // $scene_id_ = $temp_array["scene-id"];
1032
-
1033
- if ($temp_array['hotspot-list']) {
1034
- $_hotspot_array = array();
1035
- foreach ($temp_array['hotspot-list'] as $temp_hotspot) {
1036
-
1037
- $temp_hotspot = (array)$temp_hotspot;
1038
- $_hotspot_array[] = $temp_hotspot;
1039
- }
1040
- }
1041
-
1042
- $temp_array['hotspot-list'] = $_hotspot_array;
1043
- $panolist['scene-list'][] = $temp_array;
1044
- }
1045
- }
1046
- $panodata = $panolist;
1047
-
1048
- //===Error Control and Validation===//
1049
-
1050
- if ($panodata["scene-list"] != "") {
1051
- foreach ($panodata["scene-list"] as $scenes_val) {
1052
-
1053
- $scene_id_validate = $scenes_val["scene-id"];
1054
- if (!empty($scene_id_validate)) {
1055
- $scene_id_validated = preg_replace('/[^0-9a-zA-Z_]/', "", $scene_id_validate);
1056
- if ($scene_id_validated != $scene_id_validate) {
1057
- wp_send_json_error('<span class="pano-error-title">Invalid Scene ID</span> <p>Scene ID can\'t contain spaces and special characters. <br/>Please assign a unique Scene ID with letters and numbers where Scene ID is : ' . $scene_id_validate . '</p>');
1058
- die();
1059
- }
1060
-
1061
- if ($scenes_val['scene-type'] == 'cubemap') {
1062
- if (empty($scenes_val["scene-attachment-url-face0"])) {
1063
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 0</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
1064
- die();
1065
- }
1066
-
1067
- if (empty($scenes_val["scene-attachment-url-face1"])) {
1068
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 1</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
1069
- die();
1070
- }
1071
-
1072
- if (empty($scenes_val["scene-attachment-url-face2"])) {
1073
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 2</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
1074
- die();
1075
- }
1076
-
1077
- if (empty($scenes_val["scene-attachment-url-face3"])) {
1078
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 3</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
1079
- die();
1080
- }
1081
-
1082
- if (empty($scenes_val["scene-attachment-url-face4"])) {
1083
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 4</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
1084
- die();
1085
- }
1086
-
1087
- if (empty($scenes_val["scene-attachment-url-face5"])) {
1088
- wp_send_json_error('<span class="pano-error-title">Missing Cubemap Scene Face 5</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
1089
- die();
1090
- }
1091
- } else {
1092
- if (empty($scenes_val["scene-attachment-url"])) {
1093
- wp_send_json_error('<span class="pano-error-title">Missing Scene Image</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
1094
- die();
1095
- }
1096
- }
1097
-
1098
- if (!empty($scenes_val["scene-pitch"])) {
1099
- $validate_scene_pitch = $scenes_val["scene-pitch"];
1100
- $validated_scene_pitch = preg_replace('/[^0-9.-]/', '', $validate_scene_pitch);
1101
- if ($validated_scene_pitch != $validate_scene_pitch) {
1102
- wp_send_json_error('<span class="pano-error-title">Invalid Pitch Value</span><p> The Pitch Value can only contain float numbers where Scene ID: ' . $scene_id_validate . '</p>');
1103
- die();
1104
- }
1105
- }
1106
-
1107
- if (!empty($scenes_val["scene-yaw"])) {
1108
- $validate_scene_yaw = $scenes_val["scene-yaw"];
1109
- $validated_scene_yaw = preg_replace('/[^0-9.-]/', '', $validate_scene_yaw);
1110
- if ($validated_scene_yaw != $validate_scene_yaw) {
1111
- wp_send_json_error('<span class="pano-error-title">Invalid Yaw Value</span><p> The Yaw Value can only contain float numbers where Scene ID: ' . $scene_id_validate . '</p>');
1112
- die();
1113
- }
1114
- }
1115
-
1116
- if (!empty($scenes_val["scene-zoom"])) {
1117
- $validate_default_zoom = $scenes_val["scene-zoom"];
1118
- $validated_default_zoom = preg_replace('/[^0-9-]/', '', $validate_default_zoom);
1119
- if ($validated_default_zoom != $validate_default_zoom) {
1120
- wp_send_json_error('<span class="pano-error-title">Invalid Default Zoom Value</span><p> You can only set Default Zoom in Degree values from 50 to 120 where Scene ID: ' . $scene_id_validate . '</p>');
1121
-
1122
- die();
1123
- }
1124
- $default_zoom_value = (int)$scenes_val["scene-zoom"];
1125
- if ($default_zoom_value > 120 || $default_zoom_value < 50) {
1126
- wp_send_json_error('<span class="pano-error-title">Invalid Default Zoom Value</span><p> You can only set Default Zoom in Degree values from 50 to 120 where Scene ID: ' . $scene_id_validate . '</p>');
1127
-
1128
- die();
1129
- }
1130
- }
1131
-
1132
- if (!empty($scenes_val["scene-maxzoom"])) {
1133
- $validate_max_zoom = $scenes_val["scene-maxzoom"];
1134
- $validated_max_zoom = preg_replace('/[^0-9-]/', '', $validate_max_zoom);
1135
- if ($validated_max_zoom != $validate_max_zoom) {
1136
- wp_send_json_error('<span class="pano-error-title">Invalid Max-zoom Value:</span><p> You can only set Max-zoom in degree values (50-120) where Scene ID: ' . $scene_id_validate . '</p>');
1137
-
1138
- die();
1139
- }
1140
- $max_zoom_value = (int)$scenes_val["scene-maxzoom"];
1141
- if ($max_zoom_value > 120) {
1142
- wp_send_json_error('<span class="pano-error-title">Max-zoom Value Limit Exceeded</span><p> You can set the Max-zoom Value up to 120 degrees.</p>');
1143
-
1144
- die();
1145
- }
1146
-
1147
- if ($max_zoom_value < 50) {
1148
- wp_send_json_error('<span class="pano-error-title">Max-zoom Value Limit Exceeded</span><p> You can not set the Max-zoom Value lower than 50 degrees.</p>');
1149
- die();
1150
- }
1151
- }
1152
-
1153
- if (!empty($scenes_val["scene-minzoom"])) {
1154
- $validate_min_zoom = $scenes_val["scene-minzoom"];
1155
- $validated_min_zoom = preg_replace('/[^0-9-]/', '', $validate_min_zoom);
1156
- if ($validated_min_zoom != $validate_min_zoom) {
1157
- wp_send_json_error('<span class="pano-error-title">Invalid Min-zoom Value</span><p> You can only set Min-zoom in degree values (50-120) where Scene ID: ' . $scene_id_validate . '</p>');
1158
- die();
1159
- }
1160
- $min_zoom_value = (int)$scenes_val["scene-minzoom"];
1161
- if ($min_zoom_value < 50) {
1162
- wp_send_json_error('<span class="pano-error-title">Low Min-Zoom Value</span><p> The Min-zoom value must be more than 50 in degree values where Scene ID: ' . $scene_id_validate . '</p>');
1163
- die();
1164
- }
1165
-
1166
- if ($min_zoom_value > 120) {
1167
- wp_send_json_error('<span class="pano-error-title">Hight Min-Zoom Value</span><p> The Min-zoom value must be less than 120 in degree values where Scene ID: ' . $scene_id_validate . '</p>');
1168
- die();
1169
- }
1170
- }
1171
-
1172
- if ($scenes_val["hotspot-list"] != "") {
1173
- foreach ($scenes_val["hotspot-list"] as $hotspot_val) {
1174
-
1175
- $hotspot_title_validate = $hotspot_val["hotspot-title"];
1176
-
1177
- if (!empty($hotspot_title_validate)) {
1178
- $hotspot_title_validated = preg_replace('/[^0-9a-zA-Z_]/', "", $hotspot_title_validate);
1179
- if ($hotspot_title_validated != $hotspot_title_validate) {
1180
- wp_send_json_error('<span class="pano-error-title">Invalid Hotspot ID</span> <p>Hotspot ID can\'t contain spaces and special characters.<br/> Please assign a unique Hotspot ID with letters and numbers where Scene id: ' . $scene_id_validate . ' Hotspot ID is: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1181
- die();
1182
- }
1183
- $hotspot_pitch_validate = $hotspot_val["hotspot-pitch"];
1184
- if (empty($hotspot_pitch_validate)) {
1185
- wp_send_json_error('<p><span>Warning:</span> Hotspot pitch is required for every hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1186
- die();
1187
- }
1188
- if (!empty($hotspot_pitch_validate)) {
1189
- $hotspot_pitch_validated = preg_replace('/[^0-9.-]/', '', $hotspot_pitch_validate);
1190
- if ($hotspot_pitch_validated != $hotspot_pitch_validate) {
1191
- wp_send_json_error('<span class="pano-error-title">Invalid Pitch Value</span> <p>The Pitch Value can only contain float numbers where Scene ID: ' . $scene_id_validate . ' Hotspot ID is: ' . $hotspot_title_validate . '</p>');
1192
-
1193
-
1194
- die();
1195
- }
1196
- }
1197
-
1198
- $hotspot_yaw_validate = $hotspot_val["hotspot-yaw"];
1199
- if (empty($hotspot_yaw_validate)) {
1200
- wp_send_json_error('<p><span>Warning:</span> Hotspot yaw is required for every hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1201
- die();
1202
- }
1203
- if (!empty($hotspot_yaw_validate)) {
1204
- $hotspot_yaw_validated = preg_replace('/[^0-9.-]/', '', $hotspot_yaw_validate);
1205
- if ($hotspot_yaw_validated != $hotspot_yaw_validate) {
1206
- wp_send_json_error('<span class="pano-error-title">Invalid Yaw Value</span> <p>The Yaw Value can only contain float numbers where Scene ID: ' . $scene_id_validate . ' Hotspot ID is: ' . $hotspot_title_validate . '</p>');
1207
-
1208
- die();
1209
- }
1210
- }
1211
-
1212
- if (is_plugin_active('wpvr-pro/wpvr-pro.php')) {
1213
- $status = get_option('wpvr_edd_license_status');
1214
- if ($status !== false && $status == 'valid') {
1215
- if ($hotspot_val["hotspot-customclass-pro"] != 'none' && !empty($hotspot_val["hotspot-customclass"])) {
1216
- wp_send_json_error('<span class="pano-error-title">Warning!</span> <p>You can not use both Custom Icon and Custom Icon Class for a hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1217
- die();
1218
- }
1219
- }
1220
- }
1221
- $hotspot_type_validate = $hotspot_val["hotspot-type"];
1222
- $hotspot_url_validate = $hotspot_val["hotspot-url"];
1223
- if (!empty($hotspot_url_validate)) {
1224
- $hotspot_url_validated = esc_url($hotspot_url_validate);
1225
- if ($hotspot_url_validated != $hotspot_url_validate) {
1226
- wp_send_json_error('<p><span>Warning:</span> Hotspot Url is invalid where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1227
- die();
1228
- }
1229
- }
1230
- $hotspot_content_validate = $hotspot_val["hotspot-content"];
1231
-
1232
- $hotspot_scene_validate = $hotspot_val["hotspot-scene"];
1233
-
1234
- if ($hotspot_type_validate == "info") {
1235
- if (!empty($hotspot_scene_validate)) {
1236
- wp_send_json_error('<p><span>Warning:</span> Don\'t add Target Scene ID on info type hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1237
- die();
1238
- }
1239
- if (!empty($hotspot_url_validate) && !empty($hotspot_content_validate)) {
1240
- wp_send_json_error('<span class="pano-error-title">Warning!</span> <p>You can not set both On Click Content and URL on a hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1241
- die();
1242
- }
1243
- }
1244
-
1245
-
1246
-
1247
- if ($hotspot_type_validate == "shortcode_editor") {
1248
- if (substr($hotspot_val['hotspot-shortcode'], 0, 1) === '[') {
1249
- $pattern = get_shortcode_regex();
1250
- preg_match('/' . $pattern . '/s', $hotspot_val['hotspot-shortcode'], $matches);
1251
- if (is_array($matches) && !isset($matches[2])) {
1252
- wp_send_json_error('<p><span>Warning:</span> This is not a valid shortcode where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1253
- die();
1254
- }
1255
- }
1256
- }
1257
-
1258
- if ($hotspot_type_validate == "scene") {
1259
- if (empty($hotspot_scene_validate)) {
1260
- wp_send_json_error('<span class="pano-error-title">Target Scene Missing</span> <p>Assign a Target Scene to the Scene-type Hotspot where Scene ID: ' . $scene_id_validate . ' and Hotspot ID : ' . $hotspot_title_validate . '</p>');
1261
- die();
1262
- }
1263
- if (!empty($hotspot_url_validate) || !empty($hotspot_content_validate)) {
1264
- wp_send_json_error('<p><span>Warning:</span> Don\'t add Url or On click content on scene type hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
1265
- die();
1266
- }
1267
- }
1268
- }
1269
- }
1270
- }
1271
- }
1272
- }
1273
- }
1274
- //===Error Control and Validation===//
1275
-
1276
- foreach ($panodata["scene-list"] as $panoscenes) {
1277
- if (empty($panoscenes['scene-id']) && !empty($panoscenes['scene-attachment-url'])) {
1278
- wp_send_json_error('<span class="pano-error-title">Missing Scene ID</span> <p>Please assign a unique Scene ID to your uploaded scene.</p>');
1279
- die();
1280
- }
1281
- }
1282
-
1283
- $allsceneids = array();
1284
-
1285
- foreach ($panodata["scene-list"] as $panoscenes) {
1286
- if (!empty($panoscenes['scene-id'])) {
1287
- array_push($allsceneids, $panoscenes['scene-id']);
1288
- }
1289
- }
1290
-
1291
- foreach ($panodata["scene-list"] as $panoscenes) {
1292
-
1293
- if ($panoscenes['dscene'] == 'on') {
1294
- $default_scene = $panoscenes['scene-id'];
1295
- }
1296
- }
1297
- if (empty($default_scene)) {
1298
- if ($allsceneids) {
1299
- $default_scene = $allsceneids[0];
1300
- } else {
1301
-
1302
- wp_send_json_error('<span class="pano-error-title">Missing Image & Scene ID</span> <p>Please Upload An Image and Set A Scene ID To See The Preview</p>');
1303
- die();
1304
- }
1305
- }
1306
-
1307
- $allsceneids_count = array_count_values($allsceneids);
1308
- foreach ($allsceneids_count as $key => $value) {
1309
- if ($value > 1) {
1310
- wp_send_json_error('<span class="pano-error-title">Duplicate Scene ID</span> <p>You\'ve assigned a duplicate Scene ID. <br/>Please assign unique Scene IDs to each scene. </p>');
1311
- die();
1312
- }
1313
- }
1314
-
1315
- foreach ($panodata["scene-list"] as $panoscenes) {
1316
- if (!empty($panoscenes['scene-id'])) {
1317
- $allhotspot = array();
1318
- foreach ($panoscenes["hotspot-list"] as $hotspot_val) {
1319
- if (!empty($hotspot_val["hotspot-title"])) {
1320
- array_push($allhotspot, $hotspot_val["hotspot-title"]);
1321
- }
1322
- }
1323
- $allhotspotcount = array_count_values($allhotspot);
1324
- foreach ($allhotspotcount as $key => $value) {
1325
- if ($value > 1) {
1326
- wp_send_json_error('<span class="pano-error-title">Duplicate Hotspot ID</span> <p>You\'ve assigned a duplicate Hotspot ID. <br/>Please assign unique Hotspot IDs to each Hotspot.</p>');
1327
- die();
1328
- }
1329
- }
1330
- }
1331
- }
1332
-
1333
- $panolength = count($panodata["scene-list"]);
1334
- for ($i = 0; $i < $panolength; $i++) {
1335
- if (empty($panodata["scene-list"][$i]['scene-id'])) {
1336
- unset($panodata["scene-list"][$i]);
1337
- } else {
1338
- $panohotspotlength = count($panodata["scene-list"][$i]['hotspot-list']);
1339
- for ($j = 0; $j < $panohotspotlength; $j++) {
1340
- if (empty($panodata["scene-list"][$i]['hotspot-list'][$j]['hotspot-title'])) {
1341
- unset($panodata["scene-list"][$i]['hotspot-list'][$j]);
1342
- }
1343
- }
1344
- }
1345
- }
1346
-
1347
- //===audio===//
1348
- $bg_music = 'off';
1349
- $bg_music_url = '';
1350
- $autoplay_bg_music = 'off';
1351
- $loop_bg_music = 'off';
1352
- $bg_music = sanitize_text_field($_POST['bg_music']);
1353
- $bg_music_url = esc_url_raw($_POST['bg_music_url']);
1354
- $autoplay_bg_music = sanitize_text_field($_POST['autoplay_bg_music']);
1355
- $loop_bg_music = sanitize_text_field($_POST['loop_bg_music']);
1356
- if ($bg_music == 'on') {
1357
- if (empty($bg_music_url)) {
1358
- wp_send_json_error('<p><span>Warning:</span> Please add an audio file as you enabled audio for this tour </p>');
1359
- die();
1360
- }
1361
- }
1362
- //===audio===//
1363
-
1364
- $pano_array = array();
1365
- $pano_array = array(__("panoid") => $panoid, __("autoLoad") => $autoload, __("hfov") => $default_global_zoom, __("maxHfov") => $max_global_zoom, __("minHfov") => $min_global_zoom, __("showControls") => $control, __("cpLogoSwitch") => $cpLogoSwitch, __("cpLogoImg") => $cpLogoImg, __("cpLogoContent") => $cpLogoContent, __("explainerSwitch") => $explainerSwitch, __("explainerContent") => $explainerContent, __("vrgallery") => $vrgallery, __("vrgallery_title") => $vrgallery_title, __("vrgallery_display") => $vrgallery_display, __("customcontrol") => $custom_control, __("gyro") => $gyro, __("deviceorientationcontrol") => $deviceorientationcontrol, __("compass") => $compass, __("mouseZoom") => $mouseZoom, __("draggable") => $draggable, __("diskeyboard") => $diskeyboard, __("keyboardzoom") => $keyboardzoom, __("autoRotate") => $autorotation, __("autoRotateInactivityDelay") => $autorotationinactivedelay, __("autoRotateStopDelay") => $autorotationstopdelay, __("preview") => $preview, __("defaultscene") => $default_scene, __("scenefadeduration") => $scene_fade_duration, __("bg_music") => $bg_music, __("bg_music_url") => $bg_music_url, __("autoplay_bg_music") => $autoplay_bg_music, __("loop_bg_music") => $loop_bg_music, __("panodata") => $panodata, __("previewtext") => $previewtext, __("bg_tour_enabler") => $bg_tour_enabler, __("bg_tour_navmenu") => $bg_tour_navmenu, __("bg_tour_title") => $bg_tour_title, __("bg_tour_subtitle") => $bg_tour_subtitle);
1366
-
1367
- if ($rotation == 'off') {
1368
- unset($pano_array['autoRotate']);
1369
- unset($pano_array['autoRotateInactivityDelay']);
1370
- unset($pano_array['autoRotateStopDelay']);
1371
- }
1372
- if (empty($autorotation)) {
1373
- unset($pano_array['autoRotate']);
1374
- unset($pano_array['autoRotateInactivityDelay']);
1375
- unset($pano_array['autoRotateStopDelay']);
1376
- }
1377
- if (empty($autorotationinactivedelay)) {
1378
- unset($pano_array['autoRotateInactivityDelay']);
1379
- }
1380
- if (empty($autorotationstopdelay)) {
1381
- unset($pano_array['autoRotateStopDelay']);
1382
- }
1383
- if (empty($autorotationstopdelay)) {
1384
- unset($pano_array['autoRotateStopDelay']);
1385
- }
1386
- update_post_meta($postid, 'panodata', $pano_array);
1387
- die();
1388
- }
1389
-
1390
- function wpvr_file_import()
1391
- {
1392
- set_time_limit(20000000000000000);
1393
- wpvr_delete_temp_file();
1394
- if ($_POST['fileurl']) {
1395
- WP_Filesystem();
1396
- $file_save_url = wp_upload_dir();
1397
- $fileurl = $_POST['fileurl'];
1398
- $attachment_id = $_POST['data_id'];
1399
- $zip_file_path = get_attached_file($attachment_id);
1400
- $unzipfile = unzip_file($zip_file_path, $file_save_url['basedir'] . '/wpvr/temp/');
1401
-
1402
- if (is_wp_error($unzipfile)) {
1403
- wpvr_delete_temp_file();
1404
- wp_send_json_error('Failed to unzip file');
1405
- }
1406
- $result = glob($file_save_url["basedir"] . '/wpvr/temp/*.json');
1407
- // var_dump($result);
1408
- // die();
1409
- if (!$result) {
1410
- wpvr_delete_temp_file();
1411
- wp_send_json_error('Tour json file not found');
1412
- }
1413
- $tour_json = $result[0];
1414
- $arrContextOptions = array(
1415
- "ssl" => array(
1416
- "verify_peer" => false,
1417
- "verify_peer_name" => false,
1418
- ),
1419
- );
1420
- $getfile = file_get_contents($tour_json, false, stream_context_create($arrContextOptions));
1421
- $file_content = json_decode($getfile, true);
1422
-
1423
- $new_title = $file_content['title'];
1424
- $new_data = $file_content['data'];
1425
- $new_post_id = wp_insert_post(array(
1426
- 'post_title' => $new_title,
1427
- 'post_type' => 'wpvr_item',
1428
- 'post_status' => 'publish',
1429
- ));
1430
- if ($new_post_id) {
1431
- if ($new_data['panoid']) {
1432
- $new_data['panoid'] = 'pano' . $new_post_id;
1433
- }
1434
- if ($new_data['preview']) {
1435
- $preview_url = $file_save_url['baseurl'] . '/wpvr/temp/scene_preview.jpg';
1436
- $media_get = wpvr_handle_media_import($preview_url, $new_post_id);
1437
- if ($media_get['status'] == 'error') {
1438
- wp_delete_post($new_post_id, true);
1439
- wpvr_delete_temp_file();
1440
- wp_send_json_error($media_get['message']);
1441
- } elseif ($media_get['status'] == 'success') {
1442
- $new_data['preview'] = $media_get['message'];
1443
- } else {
1444
- wp_delete_post($new_post_id, true);
1445
- wpvr_delete_temp_file();
1446
- wp_send_json_error('Media transfer process failed');
1447
- }
1448
- }
1449
- if ($new_data['preview']) {
1450
- $preview_url = $file_save_url['baseurl'] . '/wpvr/temp/scene_preview.jpg';
1451
- $media_get = wpvr_handle_media_import($preview_url, $new_post_id);
1452
- if ($media_get['status'] == 'error') {
1453
- wp_delete_post($new_post_id, true);
1454
- wpvr_delete_temp_file();
1455
- wp_send_json_error($media_get['message']);
1456
- } elseif ($media_get['status'] == 'success') {
1457
- $new_data['preview'] = $media_get['message'];
1458
- } else {
1459
- wp_delete_post($new_post_id, true);
1460
- wpvr_delete_temp_file();
1461
- wp_send_json_error('Media transfer process failed');
1462
- }
1463
- }
1464
- if ($new_data['cpLogoImg']) {
1465
- $logo = $new_data['cpLogoImg'];
1466
- $get_logo_format = explode(".", $logo);
1467
- $logo_format = end($get_logo_format);
1468
- $logo_img = $file_save_url['baseurl'] . '/wpvr/temp/logo_img.' . $logo_format;
1469
- $media_get = wpvr_handle_media_import($logo_img, $new_post_id);
1470
- if ($media_get['status'] == 'error') {
1471
- wp_delete_post($new_post_id, true);
1472
- wpvr_delete_temp_file();
1473
- wp_send_json_error($media_get['message']);
1474
- } elseif ($media_get['status'] == 'success') {
1475
- $new_data['cpLogoImg'] = $media_get['message'];
1476
- } else {
1477
- wp_delete_post($new_post_id, true);
1478
- wpvr_delete_temp_file();
1479
- wp_send_json_error('Media transfer process failed');
1480
- }
1481
- }
1482
- if ($new_data['bg_music_url']) {
1483
- $music_url = $new_data['bg_music_url'];
1484
- $get_music_format = explode(".", $music_url);
1485
- $music_format = end($get_music_format);
1486
- $music_url = $file_save_url['baseurl'] . '/wpvr/temp/music_url.' . $music_format;
1487
- $media_get = wpvr_handle_media_import($music_url, $new_post_id);
1488
- if ($media_get['status'] == 'error') {
1489
- wp_delete_post($new_post_id, true);
1490
- wpvr_delete_temp_file();
1491
- wp_send_json_error($media_get['message']);
1492
- } elseif ($media_get['status'] == 'success') {
1493
- $new_data['bg_music_url'] = $media_get['message'];
1494
- } else {
1495
- wp_delete_post($new_post_id, true);
1496
- wpvr_delete_temp_file();
1497
- wp_send_json_error('Media transfer process failed');
1498
- }
1499
- }
1500
- if ($new_data['panodata']) {
1501
-
1502
- if ($new_data['panodata']["scene-list"]) {
1503
-
1504
- foreach ($new_data['panodata']["scene-list"] as $key => $panoscenes) {
1505
-
1506
- if ($panoscenes['scene-type'] == 'cubemap') {
1507
-
1508
- // face 0
1509
- if ($panoscenes["scene-attachment-url-face0"]) {
1510
- $scene_id = $panoscenes['scene-id'];
1511
- $url = $file_save_url['baseurl'] . '/wpvr/temp/' . $scene_id . '_face0.jpg';
1512
- $media_get = wpvr_handle_media_import($url, $new_post_id);
1513
- if ($media_get['status'] == 'error') {
1514
- wp_delete_post($new_post_id, true);
1515
- wpvr_delete_temp_file();
1516
- wp_send_json_error($media_get['message']);
1517
- } elseif ($media_get['status'] == 'success') {
1518
- $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1519
- } else {
1520
- wp_delete_post($new_post_id, true);
1521
- wpvr_delete_temp_file();
1522
- wp_send_json_error('Media transfer process failed');
1523
- }
1524
- }
1525
-
1526
- // face 1
1527
- if ($panoscenes["scene-attachment-url-face1"]) {
1528
- $scene_id = $panoscenes['scene-id'];
1529
- $url = $file_save_url['baseurl'] . '/wpvr/temp/' . $scene_id . '_face1.jpg';
1530
- $media_get = wpvr_handle_media_import($url, $new_post_id);
1531
- if ($media_get['status'] == 'error') {
1532
- wp_delete_post($new_post_id, true);
1533
- wpvr_delete_temp_file();
1534
- wp_send_json_error($media_get['message']);
1535
- } elseif ($media_get['status'] == 'success') {
1536
- $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1537
- } else {
1538
- wp_delete_post($new_post_id, true);
1539
- wpvr_delete_temp_file();
1540
- wp_send_json_error('Media transfer process failed');
1541
- }
1542
- }
1543
-
1544
- // face 2
1545
- if ($panoscenes["scene-attachment-url-face2"]) {
1546
- $scene_id = $panoscenes['scene-id'];
1547
- $url = $file_save_url['baseurl'] . '/wpvr/temp/' . $scene_id . '_face2.jpg';
1548
- $media_get = wpvr_handle_media_import($url, $new_post_id);
1549
- if ($media_get['status'] == 'error') {
1550
- wp_delete_post($new_post_id, true);
1551
- wpvr_delete_temp_file();
1552
- wp_send_json_error($media_get['message']);
1553
- } elseif ($media_get['status'] == 'success') {
1554
- $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1555
- } else {
1556
- wp_delete_post($new_post_id, true);
1557
- wpvr_delete_temp_file();
1558
- wp_send_json_error('Media transfer process failed');
1559
- }
1560
- }
1561
-
1562
- // face 3
1563
- if ($panoscenes["scene-attachment-url-face0"]) {
1564
- $scene_id = $panoscenes['scene-id'];
1565
- $url = $file_save_url['baseurl'] . '/wpvr/temp/' . $scene_id . '_face3.jpg';
1566
- $media_get = wpvr_handle_media_import($url, $new_post_id);
1567
- if ($media_get['status'] == 'error') {
1568
- wp_delete_post($new_post_id, true);
1569
- wpvr_delete_temp_file();
1570
- wp_send_json_error($media_get['message']);
1571
- } elseif ($media_get['status'] == 'success') {
1572
- $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1573
- } else {
1574
- wp_delete_post($new_post_id, true);
1575
- wpvr_delete_temp_file();
1576
- wp_send_json_error('Media transfer process failed');
1577
- }
1578
- }
1579
-
1580
- // face 4
1581
- if ($panoscenes["scene-attachment-url-face4"]) {
1582
- $scene_id = $panoscenes['scene-id'];
1583
- $url = $file_save_url['baseurl'] . '/wpvr/temp/' . $scene_id . '_face4.jpg';
1584
- $media_get = wpvr_handle_media_import($url, $new_post_id);
1585
- if ($media_get['status'] == 'error') {
1586
- wp_delete_post($new_post_id, true);
1587
- wpvr_delete_temp_file();
1588
- wp_send_json_error($media_get['message']);
1589
- } elseif ($media_get['status'] == 'success') {
1590
- $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1591
- } else {
1592
- wp_delete_post($new_post_id, true);
1593
- wpvr_delete_temp_file();
1594
- wp_send_json_error('Media transfer process failed');
1595
- }
1596
- }
1597
-
1598
- // face 5
1599
- if ($panoscenes["scene-attachment-url-face5"]) {
1600
- $scene_id = $panoscenes['scene-id'];
1601
- $url = $file_save_url['baseurl'] . '/wpvr/temp/' . $scene_id . '_face5.jpg';
1602
- $media_get = wpvr_handle_media_import($url, $new_post_id);
1603
- if ($media_get['status'] == 'error') {
1604
- wp_delete_post($new_post_id, true);
1605
- wpvr_delete_temp_file();
1606
- wp_send_json_error($media_get['message']);
1607
- } elseif ($media_get['status'] == 'success') {
1608
- $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1609
- } else {
1610
- wp_delete_post($new_post_id, true);
1611
- wpvr_delete_temp_file();
1612
- wp_send_json_error('Media transfer process failed');
1613
- }
1614
- }
1615
- } else {
1616
- if ($panoscenes["scene-attachment-url"]) {
1617
- $scene_id = $panoscenes['scene-id'];
1618
- $url = $file_save_url['baseurl'] . '/wpvr/temp/' . $scene_id . '.jpg';
1619
- $media_get = wpvr_handle_media_import($url, $new_post_id);
1620
- if ($media_get['status'] == 'error') {
1621
- wp_delete_post($new_post_id, true);
1622
- wpvr_delete_temp_file();
1623
- wp_send_json_error($media_get['message']);
1624
- } elseif ($media_get['status'] == 'success') {
1625
- $new_data['panodata']["scene-list"][$key]['scene-attachment-url'] = $media_get['message'];
1626
- } else {
1627
- wp_delete_post($new_post_id, true);
1628
- wpvr_delete_temp_file();
1629
- wp_send_json_error('Media transfer process failed');
1630
- }
1631
- }
1632
- }
1633
- }
1634
- }
1635
- update_post_meta($new_post_id, 'panodata', $new_data);
1636
- wpvr_delete_temp_file();
1637
- }
1638
- }
1639
- } else {
1640
- wpvr_delete_temp_file();
1641
- wp_send_json_error('No file found to import');
1642
- }
1643
- die();
1644
- }
1645
-
1646
- /**
1647
- * Video Preview show ajax function
1648
- */
1649
- function wpvrstreetview_preview()
1650
- {
1651
- $panoid = '';
1652
- $html = '';
1653
- $postid = sanitize_text_field($_POST['postid']);
1654
- $panoid = 'pano' . $postid;
1655
- $randid = rand(1000, 1000000);
1656
- $streetviewid = 'streetview' . $randid;
1657
- $streetviewurl = $_POST['streetview'];
1658
- if ($streetviewurl) {
1659
- $html .= '<iframe src="' . $streetviewurl . '" width="600" height="400" frameborder="0" style="border:0;" allowfullscreen=""></iframe>';
1660
- }
1661
-
1662
- $response = array();
1663
- $response = array(__("panoid") => $panoid, __("panodata") => $html, __("streetview") => $streetviewid);
1664
- wp_send_json_success($response);
1665
- }
1666
-
1667
- /**
1668
- * Role management
1669
- */
1670
- function wpvr_role_management()
1671
- {
1672
- $editor = sanitize_text_field($_POST['editor']);
1673
- $author = sanitize_text_field($_POST['author']);
1674
- $fontawesome = sanitize_text_field($_POST['fontawesome']);
1675
- $mobile_media_resize = sanitize_text_field($_POST['mobile_media_resize']);
1676
- $high_res_image = sanitize_text_field($_POST['high_res_image']);
1677
- $dis_on_hover = sanitize_text_field($_POST['dis_on_hover']);
1678
- $wpvr_frontend_notice = sanitize_text_field($_POST['wpvr_frontend_notice']);
1679
- $wpvr_frontend_notice_area = sanitize_text_field($_POST['wpvr_frontend_notice_area']);
1680
- $wpvr_script_control = sanitize_text_field($_POST['wpvr_script_control']);
1681
- $wpvr_script_list = sanitize_text_field($_POST['wpvr_script_list']);
1682
-
1683
- $wpvr_video_script_control = sanitize_text_field($_POST['wpvr_video_script_control']);
1684
- $wpvr_video_script_list = sanitize_text_field($_POST['wpvr_video_script_list']);
1685
-
1686
- // $enable_woocommerce = sanitize_text_field($_POST['woocommerce']);
1687
-
1688
- $wpvr_script_list = str_replace(' ', '', $wpvr_script_list);
1689
-
1690
- update_option('wpvr_editor_active', $editor);
1691
- update_option('wpvr_author_active', $author);
1692
- update_option('wpvr_fontawesome_disable', $fontawesome);
1693
- update_option('mobile_media_resize', $mobile_media_resize);
1694
- update_option('high_res_image', $high_res_image);
1695
- update_option('dis_on_hover', $dis_on_hover);
1696
- update_option('wpvr_frontend_notice', $wpvr_frontend_notice);
1697
- update_option('wpvr_frontend_notice_area', $wpvr_frontend_notice_area);
1698
- update_option('wpvr_script_control', $wpvr_script_control);
1699
- update_option('wpvr_script_list', $wpvr_script_list);
1700
-
1701
- update_option('wpvr_video_script_control', $wpvr_video_script_control);
1702
- update_option('wpvr_video_script_list', $wpvr_video_script_list);
1703
-
1704
- // update_option('wpvr_enable_woocommerce', $enable_woocommerce);
1705
-
1706
- $response = array(
1707
- 'status' => 'success',
1708
- 'message' => 'Successfully saved',
1709
- );
1710
- wp_send_json($response);
1711
- }
1712
-
1713
- /**
1714
- * Notice
1715
- */
1716
- function wpvr_notice()
1717
- {
1718
- update_option('wpvr_warning', '1');
1719
- }
1720
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-wpvr-icon.php DELETED
@@ -1,1018 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
- /**
4
- * The fontawesome functionality of the plugin.
5
- *
6
- * @link http://rextheme.com/
7
- * @since 1.0.0
8
- *
9
- * @package
10
- * @subpackage /admin
11
- */
12
-
13
- class Wpvr_fontawesome_icons {
14
-
15
- public $icon;
16
-
17
- /**
18
- * Admin icon setup is specified in this area.
19
- */
20
-
21
- public function __construct() {
22
-
23
- $this->icon = array (
24
- 'none' => 'None',
25
- 'fab fa-500px' => '500px',
26
- 'fab fa-accessible-icon' => 'accessible-icon',
27
- 'fab fa-accusoft' => 'accusoft',
28
- 'fas fa-address-book' => 'address-book',
29
- 'far fa-address-book' => 'address-book',
30
- 'fas fa-address-card' => 'address-card',
31
- 'far fa-address-card' => 'address-card',
32
- 'fas fa-adjust' => 'adjust',
33
- 'fab fa-adn' => 'adn',
34
- 'fab fa-adversal' => 'adversal',
35
- 'fab fa-affiliatetheme' => 'affiliatetheme',
36
- 'fab fa-algolia' => 'algolia',
37
- 'fas fa-align-center' => 'align-center',
38
- 'fas fa-align-justify' => 'align-justify',
39
- 'fas fa-align-left' => 'align-left',
40
- 'fas fa-align-right' => 'align-right',
41
- 'fas fa-allergies' => 'allergies',
42
- 'fab fa-amazon' => 'amazon',
43
- 'fab fa-amazon-pay' => 'amazon-pay',
44
- 'fas fa-ambulance' => 'ambulance',
45
- 'fas fa-american-sign-language-interpreting' => 'american-sign-language-interpreting',
46
- 'fab fa-amilia' => 'amilia',
47
- 'fas fa-anchor' => 'anchor',
48
- 'fab fa-android' => 'android',
49
- 'fab fa-angellist' => 'angellist',
50
- 'fas fa-angle-double-down' => 'angle-double-down',
51
- 'fas fa-angle-double-left' => 'angle-double-left',
52
- 'fas fa-angle-double-right' => 'angle-double-right',
53
- 'fas fa-angle-double-up' => 'angle-double-up',
54
- 'fas fa-angle-down' => 'angle-down',
55
- 'fas fa-angle-left' => 'angle-left',
56
- 'fas fa-angle-right' => 'angle-right',
57
- 'fas fa-angle-up' => 'angle-up',
58
- 'fab fa-angrycreative' => 'angrycreative',
59
- 'fab fa-angular' => 'angular',
60
- 'fab fa-app-store' => 'app-store',
61
- 'fab fa-app-store-ios' => 'app-store-ios',
62
- 'fab fa-apper' => 'apper',
63
- 'fab fa-apple' => 'apple',
64
- 'fab fa-apple-pay' => 'apple-pay',
65
- 'fas fa-archive' => 'archive',
66
- 'fas fa-arrow-alt-circle-down' => 'arrow-alt-circle-down',
67
- 'far fa-arrow-alt-circle-down' => 'arrow-alt-circle-down',
68
- 'fas fa-arrow-alt-circle-left' => 'arrow-alt-circle-left',
69
- 'far fa-arrow-alt-circle-left' => 'arrow-alt-circle-left',
70
- 'fas fa-arrow-alt-circle-right' => 'arrow-alt-circle-right',
71
- 'far fa-arrow-alt-circle-right' => 'arrow-alt-circle-right',
72
- 'fas fa-arrow-alt-circle-up' => 'arrow-alt-circle-up',
73
- 'far fa-arrow-alt-circle-up' => 'arrow-alt-circle-up',
74
- 'fas fa-arrow-circle-down' => 'arrow-circle-down',
75
- 'fas fa-arrow-circle-left' => 'arrow-circle-left',
76
- 'fas fa-arrow-circle-right' => 'arrow-circle-right',
77
- 'fas fa-arrow-circle-up' => 'arrow-circle-up',
78
- 'fas fa-arrow-down' => 'arrow-down',
79
- 'fas fa-arrow-left' => 'arrow-left',
80
- 'fas fa-arrow-right' => 'arrow-right',
81
- 'fas fa-arrow-up' => 'arrow-up',
82
- 'fas fa-arrows-alt' => 'arrows-alt',
83
- 'fas fa-arrows-alt-h' => 'arrows-alt-h',
84
- 'fas fa-arrows-alt-v' => 'arrows-alt-v',
85
- 'fas fa-assistive-listening-systems' => 'assistive-listening-systems',
86
- 'fas fa-asterisk' => 'asterisk',
87
- 'fab fa-asymmetrik' => 'asymmetrik',
88
- 'fas fa-at' => 'at',
89
- 'fab fa-audible' => 'audible',
90
- 'fas fa-audio-description' => 'audio-description',
91
- 'fab fa-autoprefixer' => 'autoprefixer',
92
- 'fab fa-avianex' => 'avianex',
93
- 'fab fa-aviato' => 'aviato',
94
- 'fab fa-aws' => 'aws',
95
- 'fas fa-backward' => 'backward',
96
- 'fas fa-balance-scale' => 'balance-scale',
97
- 'fas fa-ban' => 'ban',
98
- 'fas fa-band-aid' => 'band-aid',
99
- 'fab fa-bandcamp' => 'bandcamp',
100
- 'fas fa-barcode' => 'barcode',
101
- 'fas fa-bars' => 'bars',
102
- 'fas fa-baseball-ball' => 'baseball-ball',
103
- 'fas fa-basketball-ball' => 'basketball-ball',
104
- 'fas fa-bath' => 'bath',
105
- 'fas fa-battery-empty' => 'battery-empty',
106
- 'fas fa-battery-full' => 'battery-full',
107
- 'fas fa-battery-half' => 'battery-half',
108
- 'fas fa-battery-quarter' => 'battery-quarter',
109
- 'fas fa-battery-three-quarters' => 'battery-three-quarters',
110
- 'fas fa-bed' => 'bed',
111
- 'fas fa-beer' => 'beer',
112
- 'fab fa-behance' => 'behance',
113
- 'fab fa-behance-square' => 'behance-square',
114
- 'fas fa-bell' => 'bell',
115
- 'far fa-bell' => 'bell',
116
- 'fas fa-bell-slash' => 'bell-slash',
117
- 'far fa-bell-slash' => 'bell-slash',
118
- 'fas fa-bicycle' => 'bicycle',
119
- 'fab fa-bimobject' => 'bimobject',
120
- 'fas fa-binoculars' => 'binoculars',
121
- 'fas fa-birthday-cake' => 'birthday-cake',
122
- 'fab fa-bitbucket' => 'bitbucket',
123
- 'fab fa-bitcoin' => 'bitcoin',
124
- 'fab fa-bity' => 'bity',
125
- 'fab fa-black-tie' => 'black-tie',
126
- 'fab fa-blackberry' => 'blackberry',
127
- 'fas fa-blind' => 'blind',
128
- 'fab fa-blogger' => 'blogger',
129
- 'fab fa-blogger-b' => 'blogger-b',
130
- 'fab fa-bluetooth' => 'bluetooth',
131
- 'fab fa-bluetooth-b' => 'bluetooth-b',
132
- 'fas fa-bold' => 'bold',
133
- 'fas fa-bolt' => 'bolt',
134
- 'fas fa-bomb' => 'bomb',
135
- 'fas fa-book' => 'book',
136
- 'fas fa-bookmark' => 'bookmark',
137
- 'far fa-bookmark' => 'bookmark',
138
- 'fas fa-bowling-ball' => 'bowling-ball',
139
- 'fas fa-box' => 'box',
140
- 'fas fa-box-open' => 'box-open',
141
- 'fas fa-boxes' => 'boxes',
142
- 'fas fa-braille' => 'braille',
143
- 'fas fa-briefcase' => 'briefcase',
144
- 'fas fa-briefcase-medical' => 'briefcase-medical',
145
- 'fab fa-btc' => 'btc',
146
- 'fas fa-bug' => 'bug',
147
- 'fas fa-building' => 'building',
148
- 'far fa-building' => 'building',
149
- 'fas fa-bullhorn' => 'bullhorn',
150
- 'fas fa-bullseye' => 'bullseye',
151
- 'fas fa-burn' => 'burn',
152
- 'fab fa-buromobelexperte' => 'buromobelexperte',
153
- 'fas fa-bus' => 'bus',
154
- 'fab fa-buysellads' => 'buysellads',
155
- 'fas fa-calculator' => 'calculator',
156
- 'fas fa-calendar' => 'calendar',
157
- 'far fa-calendar' => 'calendar',
158
- 'fas fa-calendar-alt' => 'calendar-alt',
159
- 'far fa-calendar-alt' => 'calendar-alt',
160
- 'fas fa-calendar-check' => 'calendar-check',
161
- 'far fa-calendar-check' => 'calendar-check',
162
- 'fas fa-calendar-minus' => 'calendar-minus',
163
- 'far fa-calendar-minus' => 'calendar-minus',
164
- 'fas fa-calendar-plus' => 'calendar-plus',
165
- 'far fa-calendar-plus' => 'calendar-plus',
166
- 'fas fa-calendar-times' => 'calendar-times',
167
- 'far fa-calendar-times' => 'calendar-times',
168
- 'fas fa-camera' => 'camera',
169
- 'fas fa-camera-retro' => 'camera-retro',
170
- 'fas fa-capsules' => 'capsules',
171
- 'fas fa-car' => 'car',
172
- 'fas fa-caret-down' => 'caret-down',
173
- 'fas fa-caret-left' => 'caret-left',
174
- 'fas fa-caret-right' => 'caret-right',
175
- 'fas fa-caret-square-down' => 'caret-square-down',
176
- 'far fa-caret-square-down' => 'caret-square-down',
177
- 'fas fa-caret-square-left' => 'caret-square-left',
178
- 'far fa-caret-square-left' => 'caret-square-left',
179
- 'fas fa-caret-square-right' => 'caret-square-right',
180
- 'far fa-caret-square-right' => 'caret-square-right',
181
- 'fas fa-caret-square-up' => 'caret-square-up',
182
- 'far fa-caret-square-up' => 'caret-square-up',
183
- 'fas fa-caret-up' => 'caret-up',
184
- 'fas fa-cart-arrow-down' => 'cart-arrow-down',
185
- 'fas fa-cart-plus' => 'cart-plus',
186
- 'fab fa-cc-amazon-pay' => 'cc-amazon-pay',
187
- 'fab fa-cc-amex' => 'cc-amex',
188
- 'fab fa-cc-apple-pay' => 'cc-apple-pay',
189
- 'fab fa-cc-diners-club' => 'cc-diners-club',
190
- 'fab fa-cc-discover' => 'cc-discover',
191
- 'fab fa-cc-jcb' => 'cc-jcb',
192
- 'fab fa-cc-mastercard' => 'cc-mastercard',
193
- 'fab fa-cc-paypal' => 'cc-paypal',
194
- 'fab fa-cc-stripe' => 'cc-stripe',
195
- 'fab fa-cc-visa' => 'cc-visa',
196
- 'fab fa-centercode' => 'centercode',
197
- 'fas fa-certificate' => 'certificate',
198
- 'fas fa-chart-area' => 'chart-area',
199
- 'fas fa-chart-bar' => 'chart-bar',
200
- 'far fa-chart-bar' => 'chart-bar',
201
- 'fas fa-chart-line' => 'chart-line',
202
- 'fas fa-chart-pie' => 'chart-pie',
203
- 'fas fa-check' => 'check',
204
- 'fas fa-check-circle' => 'check-circle',
205
- 'far fa-check-circle' => 'check-circle',
206
- 'fas fa-check-square' => 'check-square',
207
- 'far fa-check-square' => 'check-square',
208
- 'fas fa-chess' => 'chess',
209
- 'fas fa-chess-bishop' => 'chess-bishop',
210
- 'fas fa-chess-board' => 'chess-board',
211
- 'fas fa-chess-king' => 'chess-king',
212
- 'fas fa-chess-knight' => 'chess-knight',
213
- 'fas fa-chess-pawn' => 'chess-pawn',
214
- 'fas fa-chess-queen' => 'chess-queen',
215
- 'fas fa-chess-rook' => 'chess-rook',
216
- 'fas fa-chevron-circle-down' => 'chevron-circle-down',
217
- 'fas fa-chevron-circle-left' => 'chevron-circle-left',
218
- 'fas fa-chevron-circle-right' => 'chevron-circle-right',
219
- 'fas fa-chevron-circle-up' => 'chevron-circle-up',
220
- 'fas fa-chevron-down' => 'chevron-down',
221
- 'fas fa-chevron-left' => 'chevron-left',
222
- 'fas fa-chevron-right' => 'chevron-right',
223
- 'fas fa-chevron-up' => 'chevron-up',
224
- 'fas fa-child' => 'child',
225
- 'fab fa-chrome' => 'chrome',
226
- 'fas fa-circle' => 'circle',
227
- 'far fa-circle' => 'circle',
228
- 'fas fa-circle-notch' => 'circle-notch',
229
- 'fas fa-clipboard' => 'clipboard',
230
- 'far fa-clipboard' => 'clipboard',
231
- 'fas fa-clipboard-check' => 'clipboard-check',
232
- 'fas fa-clipboard-list' => 'clipboard-list',
233
- 'fas fa-clock' => 'clock',
234
- 'far fa-clock' => 'clock',
235
- 'fas fa-clone' => 'clone',
236
- 'far fa-clone' => 'clone',
237
- 'fas fa-closed-captioning' => 'closed-captioning',
238
- 'far fa-closed-captioning' => 'closed-captioning',
239
- 'fas fa-cloud' => 'cloud',
240
- 'fas fa-cloud-download-alt' => 'cloud-download-alt',
241
- 'fas fa-cloud-upload-alt' => 'cloud-upload-alt',
242
- 'fab fa-cloudscale' => 'cloudscale',
243
- 'fab fa-cloudsmith' => 'cloudsmith',
244
- 'fab fa-cloudversify' => 'cloudversify',
245
- 'fas fa-code' => 'code',
246
- 'fas fa-code-branch' => 'code-branch',
247
- 'fab fa-codepen' => 'codepen',
248
- 'fab fa-codiepie' => 'codiepie',
249
- 'fas fa-coffee' => 'coffee',
250
- 'fas fa-cog' => 'cog',
251
- 'fas fa-cogs' => 'cogs',
252
- 'fas fa-columns' => 'columns',
253
- 'fas fa-comment' => 'comment',
254
- 'far fa-comment' => 'comment',
255
- 'fas fa-comment-alt' => 'comment-alt',
256
- 'far fa-comment-alt' => 'comment-alt',
257
- 'fas fa-comment-dots' => 'comment-dots',
258
- 'fas fa-comment-slash' => 'comment-slash',
259
- 'fas fa-comments' => 'comments',
260
- 'far fa-comments' => 'comments',
261
- 'fas fa-compass' => 'compass',
262
- 'far fa-compass' => 'compass',
263
- 'fas fa-compress' => 'compress',
264
- 'fab fa-connectdevelop' => 'connectdevelop',
265
- 'fab fa-contao' => 'contao',
266
- 'fas fa-copy' => 'copy',
267
- 'far fa-copy' => 'copy',
268
- 'fas fa-copyright' => 'copyright',
269
- 'far fa-copyright' => 'copyright',
270
- 'fas fa-couch' => 'couch',
271
- 'fab fa-cpanel' => 'cpanel',
272
- 'fab fa-creative-commons' => 'creative-commons',
273
- 'fas fa-credit-card' => 'credit-card',
274
- 'far fa-credit-card' => 'credit-card',
275
- 'fas fa-crop' => 'crop',
276
- 'fas fa-crosshairs' => 'crosshairs',
277
- 'fab fa-css3' => 'css3',
278
- 'fab fa-css3-alt' => 'css3-alt',
279
- 'fas fa-cube' => 'cube',
280
- 'fas fa-cubes' => 'cubes',
281
- 'fas fa-cut' => 'cut',
282
- 'fab fa-cuttlefish' => 'cuttlefish',
283
- 'fab fa-d-and-d' => 'd-and-d',
284
- 'fab fa-dashcube' => 'dashcube',
285
- 'fas fa-database' => 'database',
286
- 'fas fa-deaf' => 'deaf',
287
- 'fab fa-delicious' => 'delicious',
288
- 'fab fa-deploydog' => 'deploydog',
289
- 'fab fa-deskpro' => 'deskpro',
290
- 'fas fa-desktop' => 'desktop',
291
- 'fab fa-deviantart' => 'deviantart',
292
- 'fas fa-diagnoses' => 'diagnoses',
293
- 'fab fa-digg' => 'digg',
294
- 'fab fa-digital-ocean' => 'digital-ocean',
295
- 'fab fa-discord' => 'discord',
296
- 'fab fa-discourse' => 'discourse',
297
- 'fas fa-dna' => 'dna',
298
- 'fab fa-dochub' => 'dochub',
299
- 'fab fa-docker' => 'docker',
300
- 'fas fa-dollar-sign' => 'dollar-sign',
301
- 'fas fa-dolly' => 'dolly',
302
- 'fas fa-dolly-flatbed' => 'dolly-flatbed',
303
- 'fas fa-donate' => 'donate',
304
- 'fas fa-dot-circle' => 'dot-circle',
305
- 'far fa-dot-circle' => 'dot-circle',
306
- 'fas fa-dove' => 'dove',
307
- 'fas fa-download' => 'download',
308
- 'fab fa-draft2digital' => 'draft2digital',
309
- 'fab fa-dribbble' => 'dribbble',
310
- 'fab fa-dribbble-square' => 'dribbble-square',
311
- 'fab fa-dropbox' => 'dropbox',
312
- 'fab fa-drupal' => 'drupal',
313
- 'fab fa-dyalog' => 'dyalog',
314
- 'fab fa-earlybirds' => 'earlybirds',
315
- 'fab fa-edge' => 'edge',
316
- 'fas fa-edit' => 'edit',
317
- 'far fa-edit' => 'edit',
318
- 'fas fa-eject' => 'eject',
319
- 'fab fa-elementor' => 'elementor',
320
- 'fas fa-ellipsis-h' => 'ellipsis-h',
321
- 'fas fa-ellipsis-v' => 'ellipsis-v',
322
- 'fab fa-ember' => 'ember',
323
- 'fab fa-empire' => 'empire',
324
- 'fas fa-envelope' => 'envelope',
325
- 'far fa-envelope' => 'envelope',
326
- 'fas fa-envelope-open' => 'envelope-open',
327
- 'far fa-envelope-open' => 'envelope-open',
328
- 'fas fa-envelope-square' => 'envelope-square',
329
- 'fab fa-envira' => 'envira',
330
- 'fas fa-eraser' => 'eraser',
331
- 'fab fa-erlang' => 'erlang',
332
- 'fab fa-ethereum' => 'ethereum',
333
- 'fab fa-etsy' => 'etsy',
334
- 'fas fa-euro-sign' => 'euro-sign',
335
- 'fas fa-exchange-alt' => 'exchange-alt',
336
- 'fas fa-exclamation' => 'exclamation',
337
- 'fas fa-exclamation-circle' => 'exclamation-circle',
338
- 'fas fa-exclamation-triangle' => 'exclamation-triangle',
339
- 'fas fa-expand' => 'expand',
340
- 'fas fa-expand-arrows-alt' => 'expand-arrows-alt',
341
- 'fab fa-expeditedssl' => 'expeditedssl',
342
- 'fas fa-external-link-alt' => 'external-link-alt',
343
- 'fas fa-external-link-square-alt' => 'external-link-square-alt',
344
- 'fas fa-eye' => 'eye',
345
- 'fas fa-eye-dropper' => 'eye-dropper',
346
- 'fas fa-eye-slash' => 'eye-slash',
347
- 'far fa-eye-slash' => 'eye-slash',
348
- 'fab fa-facebook' => 'facebook',
349
- 'fab fa-facebook-f' => 'facebook-f',
350
- 'fab fa-facebook-messenger' => 'facebook-messenger',
351
- 'fab fa-facebook-square' => 'facebook-square',
352
- 'fas fa-fast-backward' => 'fast-backward',
353
- 'fas fa-fast-forward' => 'fast-forward',
354
- 'fas fa-fax' => 'fax',
355
- 'fas fa-female' => 'female',
356
- 'fas fa-fighter-jet' => 'fighter-jet',
357
- 'fas fa-file' => 'file',
358
- 'far fa-file' => 'file',
359
- 'fas fa-file-alt' => 'file-alt',
360
- 'far fa-file-alt' => 'file-alt',
361
- 'fas fa-file-archive' => 'file-archive',
362
- 'far fa-file-archive' => 'file-archive',
363
- 'fas fa-file-audio' => 'file-audio',
364
- 'far fa-file-audio' => 'file-audio',
365
- 'fas fa-file-code' => 'file-code',
366
- 'far fa-file-code' => 'file-code',
367
- 'fas fa-file-excel' => 'file-excel',
368
- 'far fa-file-excel' => 'file-excel',
369
- 'fas fa-file-image' => 'file-image',
370
- 'far fa-file-image' => 'file-image',
371
- 'fas fa-file-medical' => 'file-medical',
372
- 'fas fa-file-medical-alt' => 'file-medical-alt',
373
- 'fas fa-file-pdf' => 'file-pdf',
374
- 'far fa-file-pdf' => 'file-pdf',
375
- 'fas fa-file-powerpoint' => 'file-powerpoint',
376
- 'far fa-file-powerpoint' => 'file-powerpoint',
377
- 'fas fa-file-video' => 'file-video',
378
- 'far fa-file-video' => 'file-video',
379
- 'fas fa-file-word' => 'file-word',
380
- 'far fa-file-word' => 'file-word',
381
- 'fas fa-film' => 'film',
382
- 'fas fa-filter' => 'filter',
383
- 'fas fa-fire' => 'fire',
384
- 'fas fa-fire-extinguisher' => 'fire-extinguisher',
385
- 'fab fa-firefox' => 'firefox',
386
- 'fas fa-first-aid' => 'first-aid',
387
- 'fab fa-first-order' => 'first-order',
388
- 'fab fa-firstdraft' => 'firstdraft',
389
- 'fas fa-flag' => 'flag',
390
- 'far fa-flag' => 'flag',
391
- 'fas fa-flag-checkered' => 'flag-checkered',
392
- 'fas fa-flask' => 'flask',
393
- 'fab fa-flickr' => 'flickr',
394
- 'fab fa-flipboard' => 'flipboard',
395
- 'fab fa-fly' => 'fly',
396
- 'fas fa-folder' => 'folder',
397
- 'far fa-folder' => 'folder',
398
- 'fas fa-folder-open' => 'folder-open',
399
- 'far fa-folder-open' => 'folder-open',
400
- 'fas fa-font' => 'font',
401
- 'fab fa-font-awesome' => 'font-awesome',
402
- 'fab fa-font-awesome-alt' => 'font-awesome-alt',
403
- 'fab fa-font-awesome-flag' => 'font-awesome-flag',
404
- 'fab fa-fonticons' => 'fonticons',
405
- 'fab fa-fonticons-fi' => 'fonticons-fi',
406
- 'fas fa-football-ball' => 'football-ball',
407
- 'fab fa-fort-awesome' => 'fort-awesome',
408
- 'fab fa-fort-awesome-alt' => 'fort-awesome-alt',
409
- 'fab fa-forumbee' => 'forumbee',
410
- 'fas fa-forward' => 'forward',
411
- 'fab fa-foursquare' => 'foursquare',
412
- 'fab fa-free-code-camp' => 'free-code-camp',
413
- 'fab fa-freebsd' => 'freebsd',
414
- 'fas fa-frown' => 'frown',
415
- 'far fa-frown' => 'frown',
416
- 'fas fa-futbol' => 'futbol',
417
- 'far fa-futbol' => 'futbol',
418
- 'fas fa-gamepad' => 'gamepad',
419
- 'fas fa-gavel' => 'gavel',
420
- 'fas fa-gem' => 'gem',
421
- 'far fa-gem' => 'gem',
422
- 'fas fa-genderless' => 'genderless',
423
- 'fab fa-get-pocket' => 'get-pocket',
424
- 'fab fa-gg' => 'gg',
425
- 'fab fa-gg-circle' => 'gg-circle',
426
- 'fas fa-gift' => 'gift',
427
- 'fab fa-git' => 'git',
428
- 'fab fa-git-square' => 'git-square',
429
- 'fab fa-github' => 'github',
430
- 'fab fa-github-alt' => 'github-alt',
431
- 'fab fa-github-square' => 'github-square',
432
- 'fab fa-gitkraken' => 'gitkraken',
433
- 'fab fa-gitlab' => 'gitlab',
434
- 'fab fa-gitter' => 'gitter',
435
- 'fas fa-glass-martini' => 'glass-martini',
436
- 'fab fa-glide' => 'glide',
437
- 'fab fa-glide-g' => 'glide-g',
438
- 'fas fa-globe' => 'globe',
439
- 'fab fa-gofore' => 'gofore',
440
- 'fas fa-golf-ball' => 'golf-ball',
441
- 'fab fa-goodreads' => 'goodreads',
442
- 'fab fa-goodreads-g' => 'goodreads-g',
443
- 'fab fa-google' => 'google',
444
- 'fab fa-google-drive' => 'google-drive',
445
- 'fab fa-google-play' => 'google-play',
446
- 'fab fa-google-plus' => 'google-plus',
447
- 'fab fa-google-plus-g' => 'google-plus-g',
448
- 'fab fa-google-plus-square' => 'google-plus-square',
449
- 'fab fa-google-wallet' => 'google-wallet',
450
- 'fas fa-graduation-cap' => 'graduation-cap',
451
- 'fab fa-gratipay' => 'gratipay',
452
- 'fab fa-grav' => 'grav',
453
- 'fab fa-gripfire' => 'gripfire',
454
- 'fab fa-grunt' => 'grunt',
455
- 'fab fa-gulp' => 'gulp',
456
- 'fas fa-h-square' => 'h-square',
457
- 'fab fa-hacker-news' => 'hacker-news',
458
- 'fab fa-hacker-news-square' => 'hacker-news-square',
459
- 'fas fa-hand-holding' => 'hand-holding',
460
- 'fas fa-hand-holding-heart' => 'hand-holding-heart',
461
- 'fas fa-hand-holding-usd' => 'hand-holding-usd',
462
- 'fas fa-hand-lizard' => 'hand-lizard',
463
- 'far fa-hand-lizard' => 'hand-lizard',
464
- 'fas fa-hand-paper' => 'hand-paper',
465
- 'far fa-hand-paper' => 'hand-paper',
466
- 'fas fa-hand-peace' => 'hand-peace',
467
- 'far fa-hand-peace' => 'hand-peace',
468
- 'fas fa-hand-point-down' => 'hand-point-down',
469
- 'far fa-hand-point-down' => 'hand-point-down',
470
- 'fas fa-hand-point-left' => 'hand-point-left',
471
- 'far fa-hand-point-left' => 'hand-point-left',
472
- 'fas fa-hand-point-right' => 'hand-point-right',
473
- 'far fa-hand-point-right' => 'hand-point-right',
474
- 'fas fa-hand-point-up' => 'hand-point-up',
475
- 'far fa-hand-point-up' => 'hand-point-up',
476
- 'fas fa-hand-pointer' => 'hand-pointer',
477
- 'far fa-hand-pointer' => 'hand-pointer',
478
- 'fas fa-hand-rock' => 'hand-rock',
479
- 'far fa-hand-rock' => 'hand-rock',
480
- 'fas fa-hand-scissors' => 'hand-scissors',
481
- 'far fa-hand-scissors' => 'hand-scissors',
482
- 'fas fa-hand-spock' => 'hand-spock',
483
- 'far fa-hand-spock' => 'hand-spock',
484
- 'fas fa-hands' => 'hands',
485
- 'fas fa-hands-helping' => 'hands-helping',
486
- 'fas fa-handshake' => 'handshake',
487
- 'far fa-handshake' => 'handshake',
488
- 'fas fa-hashtag' => 'hashtag',
489
- 'fas fa-hdd' => 'hdd',
490
- 'far fa-hdd' => 'hdd',
491
- 'fas fa-heading' => 'heading',
492
- 'fas fa-headphones' => 'headphones',
493
- 'fas fa-heart' => 'heart',
494
- 'far fa-heart' => 'heart',
495
- 'fas fa-heartbeat' => 'heartbeat',
496
- 'fab fa-hips' => 'hips',
497
- 'fab fa-hire-a-helper' => 'hire-a-helper',
498
- 'fas fa-history' => 'history',
499
- 'fas fa-hockey-puck' => 'hockey-puck',
500
- 'fas fa-home' => 'home',
501
- 'fab fa-hooli' => 'hooli',
502
- 'fas fa-hospital' => 'hospital',
503
- 'far fa-hospital' => 'hospital',
504
- 'fas fa-hospital-alt' => 'hospital-alt',
505
- 'fas fa-hospital-symbol' => 'hospital-symbol',
506
- 'fab fa-hotjar' => 'hotjar',
507
- 'fas fa-hourglass' => 'hourglass',
508
- 'far fa-hourglass' => 'hourglass',
509
- 'fas fa-hourglass-end' => 'hourglass-end',
510
- 'fas fa-hourglass-half' => 'hourglass-half',
511
- 'fas fa-hourglass-start' => 'hourglass-start',
512
- 'fab fa-houzz' => 'houzz',
513
- 'fab fa-html5' => 'html5',
514
- 'fab fa-hubspot' => 'hubspot',
515
- 'fas fa-i-cursor' => 'i-cursor',
516
- 'fas fa-id-badge' => 'id-badge',
517
- 'far fa-id-badge' => 'id-badge',
518
- 'fas fa-id-card' => 'id-card',
519
- 'far fa-id-card' => 'id-card',
520
- 'fas fa-id-card-alt' => 'id-card-alt',
521
- 'fas fa-image' => 'image',
522
- 'far fa-image' => 'image',
523
- 'fas fa-images' => 'images',
524
- 'far fa-images' => 'images',
525
- 'fab fa-imdb' => 'imdb',
526
- 'fas fa-inbox' => 'inbox',
527
- 'fas fa-indent' => 'indent',
528
- 'fas fa-industry' => 'industry',
529
- 'fas fa-info' => 'info',
530
- 'fas fa-info-circle' => 'info-circle',
531
- 'fab fa-instagram' => 'instagram',
532
- 'fab fa-internet-explorer' => 'internet-explorer',
533
- 'fab fa-ioxhost' => 'ioxhost',
534
- 'fas fa-italic' => 'italic',
535
- 'fab fa-itunes' => 'itunes',
536
- 'fab fa-itunes-note' => 'itunes-note',
537
- 'fab fa-java' => 'java',
538
- 'fab fa-jenkins' => 'jenkins',
539
- 'fab fa-joget' => 'joget',
540
- 'fab fa-joomla' => 'joomla',
541
- 'fab fa-js' => 'js',
542
- 'fab fa-js-square' => 'js-square',
543
- 'fab fa-jsfiddle' => 'jsfiddle',
544
- 'fas fa-key' => 'key',
545
- 'fas fa-keyboard' => 'keyboard',
546
- 'far fa-keyboard' => 'keyboard',
547
- 'fab fa-keycdn' => 'keycdn',
548
- 'fab fa-kickstarter' => 'kickstarter',
549
- 'fab fa-kickstarter-k' => 'kickstarter-k',
550
- 'fab fa-korvue' => 'korvue',
551
- 'fas fa-language' => 'language',
552
- 'fas fa-laptop' => 'laptop',
553
- 'fab fa-laravel' => 'laravel',
554
- 'fab fa-lastfm' => 'lastfm',
555
- 'fab fa-lastfm-square' => 'lastfm-square',
556
- 'fas fa-leaf' => 'leaf',
557
- 'fab fa-leanpub' => 'leanpub',
558
- 'fas fa-lemon' => 'lemon',
559
- 'far fa-lemon' => 'lemon',
560
- 'fab fa-less' => 'less',
561
- 'fas fa-level-down-alt' => 'level-down-alt',
562
- 'fas fa-level-up-alt' => 'level-up-alt',
563
- 'fas fa-life-ring' => 'life-ring',
564
- 'far fa-life-ring' => 'life-ring',
565
- 'fas fa-lightbulb' => 'lightbulb',
566
- 'far fa-lightbulb' => 'lightbulb',
567
- 'fab fa-line' => 'line',
568
- 'fas fa-link' => 'link',
569
- 'fab fa-linkedin' => 'linkedin',
570
- 'fab fa-linkedin-in' => 'linkedin-in',
571
- 'fab fa-linode' => 'linode',
572
- 'fab fa-linux' => 'linux',
573
- 'fas fa-lira-sign' => 'lira-sign',
574
- 'fas fa-list' => 'list',
575
- 'fas fa-list-alt' => 'list-alt',
576
- 'far fa-list-alt' => 'list-alt',
577
- 'fas fa-list-ol' => 'list-ol',
578
- 'fas fa-list-ul' => 'list-ul',
579
- 'fas fa-location-arrow' => 'location-arrow',
580
- 'fas fa-lock' => 'lock',
581
- 'fas fa-lock-open' => 'lock-open',
582
- 'fas fa-long-arrow-alt-down' => 'long-arrow-alt-down',
583
- 'fas fa-long-arrow-alt-left' => 'long-arrow-alt-left',
584
- 'fas fa-long-arrow-alt-right' => 'long-arrow-alt-right',
585
- 'fas fa-long-arrow-alt-up' => 'long-arrow-alt-up',
586
- 'fas fa-low-vision' => 'low-vision',
587
- 'fab fa-lyft' => 'lyft',
588
- 'fab fa-magento' => 'magento',
589
- 'fas fa-magic' => 'magic',
590
- 'fas fa-magnet' => 'magnet',
591
- 'fas fa-male' => 'male',
592
- 'fas fa-map' => 'map',
593
- 'far fa-map' => 'map',
594
- 'fas fa-map-marker' => 'map-marker',
595
- 'fas fa-map-marker-alt' => 'map-marker-alt',
596
- 'fas fa-map-pin' => 'map-pin',
597
- 'fas fa-map-signs' => 'map-signs',
598
- 'fas fa-mars' => 'mars',
599
- 'fas fa-mars-double' => 'mars-double',
600
- 'fas fa-mars-stroke' => 'mars-stroke',
601
- 'fas fa-mars-stroke-h' => 'mars-stroke-h',
602
- 'fas fa-mars-stroke-v' => 'mars-stroke-v',
603
- 'fab fa-maxcdn' => 'maxcdn',
604
- 'fab fa-medapps' => 'medapps',
605
- 'fab fa-medium' => 'medium',
606
- 'fab fa-medium-m' => 'medium-m',
607
- 'fas fa-medkit' => 'medkit',
608
- 'fab fa-medrt' => 'medrt',
609
- 'fab fa-meetup' => 'meetup',
610
- 'fas fa-meh' => 'meh',
611
- 'far fa-meh' => 'meh',
612
- 'fas fa-mercury' => 'mercury',
613
- 'fas fa-microchip' => 'microchip',
614
- 'fas fa-microphone' => 'microphone',
615
- 'fas fa-microphone-slash' => 'microphone-slash',
616
- 'fab fa-microsoft' => 'microsoft',
617
- 'fas fa-minus' => 'minus',
618
- 'fas fa-minus-circle' => 'minus-circle',
619
- 'fas fa-minus-square' => 'minus-square',
620
- 'far fa-minus-square' => 'minus-square',
621
- 'fab fa-mix' => 'mix',
622
- 'fab fa-mixcloud' => 'mixcloud',
623
- 'fab fa-mizuni' => 'mizuni',
624
- 'fas fa-mobile' => 'mobile',
625
- 'fas fa-mobile-alt' => 'mobile-alt',
626
- 'fab fa-modx' => 'modx',
627
- 'fab fa-monero' => 'monero',
628
- 'fas fa-money-bill-alt' => 'money-bill-alt',
629
- 'far fa-money-bill-alt' => 'money-bill-alt',
630
- 'fas fa-moon' => 'moon',
631
- 'far fa-moon' => 'moon',
632
- 'fas fa-motorcycle' => 'motorcycle',
633
- 'fas fa-mouse-pointer' => 'mouse-pointer',
634
- 'fas fa-music' => 'music',
635
- 'fab fa-napster' => 'napster',
636
- 'fas fa-neuter' => 'neuter',
637
- 'fas fa-newspaper' => 'newspaper',
638
- 'far fa-newspaper' => 'newspaper',
639
- 'fab fa-nintendo-switch' => 'nintendo-switch',
640
- 'fab fa-node' => 'node',
641
- 'fab fa-node-js' => 'node-js',
642
- 'fas fa-notes-medical' => 'notes-medical',
643
- 'fab fa-npm' => 'npm',
644
- 'fab fa-ns8' => 'ns8',
645
- 'fab fa-nutritionix' => 'nutritionix',
646
- 'fas fa-object-group' => 'object-group',
647
- 'far fa-object-group' => 'object-group',
648
- 'fas fa-object-ungroup' => 'object-ungroup',
649
- 'far fa-object-ungroup' => 'object-ungroup',
650
- 'fab fa-odnoklassniki' => 'odnoklassniki',
651
- 'fab fa-odnoklassniki-square' => 'odnoklassniki-square',
652
- 'fab fa-opencart' => 'opencart',
653
- 'fab fa-openid' => 'openid',
654
- 'fab fa-opera' => 'opera',
655
- 'fab fa-optin-monster' => 'optin-monster',
656
- 'fab fa-osi' => 'osi',
657
- 'fas fa-outdent' => 'outdent',
658
- 'fab fa-page4' => 'page4',
659
- 'fab fa-pagelines' => 'pagelines',
660
- 'fas fa-paint-brush' => 'paint-brush',
661
- 'fab fa-palfed' => 'palfed',
662
- 'fas fa-pallet' => 'pallet',
663
- 'fas fa-paper-plane' => 'paper-plane',
664
- 'far fa-paper-plane' => 'paper-plane',
665
- 'fas fa-paperclip' => 'paperclip',
666
- 'fas fa-parachute-box' => 'parachute-box',
667
- 'fas fa-paragraph' => 'paragraph',
668
- 'fas fa-paste' => 'paste',
669
- 'fab fa-patreon' => 'patreon',
670
- 'fas fa-pause' => 'pause',
671
- 'fas fa-pause-circle' => 'pause-circle',
672
- 'far fa-pause-circle' => 'pause-circle',
673
- 'fas fa-paw' => 'paw',
674
- 'fab fa-paypal' => 'paypal',
675
- 'fas fa-pen-square' => 'pen-square',
676
- 'fas fa-pencil-alt' => 'pencil-alt',
677
- 'fas fa-people-carry' => 'people-carry',
678
- 'fas fa-percent' => 'percent',
679
- 'fab fa-periscope' => 'periscope',
680
- 'fab fa-phabricator' => 'phabricator',
681
- 'fab fa-phoenix-framework' => 'phoenix-framework',
682
- 'fas fa-phone' => 'phone',
683
- 'fas fa-phone-slash' => 'phone-slash',
684
- 'fas fa-phone-square' => 'phone-square',
685
- 'fas fa-phone-volume' => 'phone-volume',
686
- 'fab fa-php' => 'php',
687
- 'fab fa-pied-piper' => 'pied-piper',
688
- 'fab fa-pied-piper-alt' => 'pied-piper-alt',
689
- 'fab fa-pied-piper-hat' => 'pied-piper-hat',
690
- 'fab fa-pied-piper-pp' => 'pied-piper-pp',
691
- 'fas fa-piggy-bank' => 'piggy-bank',
692
- 'fas fa-pills' => 'pills',
693
- 'fab fa-pinterest' => 'pinterest',
694
- 'fab fa-pinterest-p' => 'pinterest-p',
695
- 'fab fa-pinterest-square' => 'pinterest-square',
696
- 'fas fa-plane' => 'plane',
697
- 'fas fa-play' => 'play',
698
- 'fas fa-play-circle' => 'play-circle',
699
- 'far fa-play-circle' => 'play-circle',
700
- 'fab fa-playstation' => 'playstation',
701
- 'fas fa-plug' => 'plug',
702
- 'fas fa-plus' => 'plus',
703
- 'fas fa-plus-circle' => 'plus-circle',
704
- 'fas fa-plus-square' => 'plus-square',
705
- 'far fa-plus-square' => 'plus-square',
706
- 'fas fa-podcast' => 'podcast',
707
- 'fas fa-poo' => 'poo',
708
- 'fas fa-pound-sign' => 'pound-sign',
709
- 'fas fa-power-off' => 'power-off',
710
- 'fas fa-prescription-bottle' => 'prescription-bottle',
711
- 'fas fa-prescription-bottle-alt' => 'prescription-bottle-alt',
712
- 'fas fa-print' => 'print',
713
- 'fas fa-procedures' => 'procedures',
714
- 'fab fa-product-hunt' => 'product-hunt',
715
- 'fab fa-pushed' => 'pushed',
716
- 'fas fa-puzzle-piece' => 'puzzle-piece',
717
- 'fab fa-python' => 'python',
718
- 'fab fa-qq' => 'qq',
719
- 'fas fa-qrcode' => 'qrcode',
720
- 'fas fa-question' => 'question',
721
- 'fas fa-question-circle' => 'question-circle',
722
- 'far fa-question-circle' => 'question-circle',
723
- 'fas fa-quidditch' => 'quidditch',
724
- 'fab fa-quinscape' => 'quinscape',
725
- 'fab fa-quora' => 'quora',
726
- 'fas fa-quote-left' => 'quote-left',
727
- 'fas fa-quote-right' => 'quote-right',
728
- 'fas fa-random' => 'random',
729
- 'fab fa-ravelry' => 'ravelry',
730
- 'fab fa-react' => 'react',
731
- 'fab fa-readme' => 'readme',
732
- 'fab fa-rebel' => 'rebel',
733
- 'fas fa-recycle' => 'recycle',
734
- 'fab fa-red-river' => 'red-river',
735
- 'fab fa-reddit' => 'reddit',
736
- 'fab fa-reddit-alien' => 'reddit-alien',
737
- 'fab fa-reddit-square' => 'reddit-square',
738
- 'fas fa-redo' => 'redo',
739
- 'fas fa-redo-alt' => 'redo-alt',
740
- 'fas fa-registered' => 'registered',
741
- 'far fa-registered' => 'registered',
742
- 'fab fa-rendact' => 'rendact',
743
- 'fab fa-renren' => 'renren',
744
- 'fas fa-reply' => 'reply',
745
- 'fas fa-reply-all' => 'reply-all',
746
- 'fab fa-replyd' => 'replyd',
747
- 'fab fa-resolving' => 'resolving',
748
- 'fas fa-retweet' => 'retweet',
749
- 'fas fa-ribbon' => 'ribbon',
750
- 'fas fa-road' => 'road',
751
- 'fas fa-rocket' => 'rocket',
752
- 'fab fa-rocketchat' => 'rocketchat',
753
- 'fab fa-rockrms' => 'rockrms',
754
- 'fas fa-rss' => 'rss',
755
- 'fas fa-rss-square' => 'rss-square',
756
- 'fas fa-ruble-sign' => 'ruble-sign',
757
- 'fas fa-rupee-sign' => 'rupee-sign',
758
- 'fab fa-safari' => 'safari',
759
- 'fab fa-sass' => 'sass',
760
- 'fas fa-save' => 'save',
761
- 'far fa-save' => 'save',
762
- 'fab fa-schlix' => 'schlix',
763
- 'fab fa-scribd' => 'scribd',
764
- 'fas fa-search' => 'search',
765
- 'fas fa-search-minus' => 'search-minus',
766
- 'fas fa-search-plus' => 'search-plus',
767
- 'fab fa-searchengin' => 'searchengin',
768
- 'fas fa-seedling' => 'seedling',
769
- 'fab fa-sellcast' => 'sellcast',
770
- 'fab fa-sellsy' => 'sellsy',
771
- 'fas fa-server' => 'server',
772
- 'fab fa-servicestack' => 'servicestack',
773
- 'fas fa-share' => 'share',
774
- 'fas fa-share-alt' => 'share-alt',
775
- 'fas fa-share-alt-square' => 'share-alt-square',
776
- 'fas fa-share-square' => 'share-square',
777
- 'far fa-share-square' => 'share-square',
778
- 'fas fa-shekel-sign' => 'shekel-sign',
779
- 'fas fa-shield-alt' => 'shield-alt',
780
- 'fas fa-ship' => 'ship',
781
- 'fas fa-shipping-fast' => 'shipping-fast',
782
- 'fab fa-shirtsinbulk' => 'shirtsinbulk',
783
- 'fas fa-shopping-bag' => 'shopping-bag',
784
- 'fas fa-shopping-basket' => 'shopping-basket',
785
- 'fas fa-shopping-cart' => 'shopping-cart',
786
- 'fas fa-shower' => 'shower',
787
- 'fas fa-sign' => 'sign',
788
- 'fas fa-sign-in-alt' => 'sign-in-alt',
789
- 'fas fa-sign-language' => 'sign-language',
790
- 'fas fa-sign-out-alt' => 'sign-out-alt',
791
- 'fas fa-signal' => 'signal',
792
- 'fab fa-simplybuilt' => 'simplybuilt',
793
- 'fab fa-sistrix' => 'sistrix',
794
- 'fas fa-sitemap' => 'sitemap',
795
- 'fab fa-skyatlas' => 'skyatlas',
796
- 'fab fa-skype' => 'skype',
797
- 'fab fa-slack' => 'slack',
798
- 'fab fa-slack-hash' => 'slack-hash',
799
- 'fas fa-sliders-h' => 'sliders-h',
800
- 'fab fa-slideshare' => 'slideshare',
801
- 'fas fa-smile' => 'smile',
802
- 'far fa-smile' => 'smile',
803
- 'fas fa-smoking' => 'smoking',
804
- 'fab fa-snapchat' => 'snapchat',
805
- 'fab fa-snapchat-ghost' => 'snapchat-ghost',
806
- 'fab fa-snapchat-square' => 'snapchat-square',
807
- 'fas fa-snowflake' => 'snowflake',
808
- 'far fa-snowflake' => 'snowflake',
809
- 'fas fa-sort' => 'sort',
810
- 'fas fa-sort-alpha-down' => 'sort-alpha-down',
811
- 'fas fa-sort-alpha-up' => 'sort-alpha-up',
812
- 'fas fa-sort-amount-down' => 'sort-amount-down',
813
- 'fas fa-sort-amount-up' => 'sort-amount-up',
814
- 'fas fa-sort-down' => 'sort-down',
815
- 'fas fa-sort-numeric-down' => 'sort-numeric-down',
816
- 'fas fa-sort-numeric-up' => 'sort-numeric-up',
817
- 'fas fa-sort-up' => 'sort-up',
818
- 'fab fa-soundcloud' => 'soundcloud',
819
- 'fas fa-space-shuttle' => 'space-shuttle',
820
- 'fab fa-speakap' => 'speakap',
821
- 'fas fa-spinner' => 'spinner',
822
- 'fab fa-spotify' => 'spotify',
823
- 'fas fa-square' => 'square',
824
- 'far fa-square' => 'square',
825
- 'fas fa-square-full' => 'square-full',
826
- 'fab fa-stack-exchange' => 'stack-exchange',
827
- 'fab fa-stack-overflow' => 'stack-overflow',
828
- 'fas fa-star' => 'star',
829
- 'far fa-star' => 'star',
830
- 'fas fa-star-half' => 'star-half',
831
- 'far fa-star-half' => 'star-half',
832
- 'fab fa-staylinked' => 'staylinked',
833
- 'fab fa-steam' => 'steam',
834
- 'fab fa-steam-square' => 'steam-square',
835
- 'fab fa-steam-symbol' => 'steam-symbol',
836
- 'fas fa-step-backward' => 'step-backward',
837
- 'fas fa-step-forward' => 'step-forward',
838
- 'fas fa-stethoscope' => 'stethoscope',
839
- 'fab fa-sticker-mule' => 'sticker-mule',
840
- 'fas fa-sticky-note' => 'sticky-note',
841
- 'far fa-sticky-note' => 'sticky-note',
842
- 'fas fa-stop' => 'stop',
843
- 'fas fa-stop-circle' => 'stop-circle',
844
- 'far fa-stop-circle' => 'stop-circle',
845
- 'fas fa-stopwatch' => 'stopwatch',
846
- 'fab fa-strava' => 'strava',
847
- 'fas fa-street-view' => 'street-view',
848
- 'fas fa-strikethrough' => 'strikethrough',
849
- 'fab fa-stripe' => 'stripe',
850
- 'fab fa-stripe-s' => 'stripe-s',
851
- 'fab fa-studiovinari' => 'studiovinari',
852
- 'fab fa-stumbleupon' => 'stumbleupon',
853
- 'fab fa-stumbleupon-circle' => 'stumbleupon-circle',
854
- 'fas fa-subscript' => 'subscript',
855
- 'fas fa-subway' => 'subway',
856
- 'fas fa-suitcase' => 'suitcase',
857
- 'fas fa-sun' => 'sun',
858
- 'far fa-sun' => 'sun',
859
- 'fab fa-superpowers' => 'superpowers',
860
- 'fas fa-superscript' => 'superscript',
861
- 'fab fa-supple' => 'supple',
862
- 'fas fa-sync' => 'sync',
863
- 'fas fa-sync-alt' => 'sync-alt',
864
- 'fas fa-syringe' => 'syringe',
865
- 'fas fa-table' => 'table',
866
- 'fas fa-table-tennis' => 'table-tennis',
867
- 'fas fa-tablet' => 'tablet',
868
- 'fas fa-tablet-alt' => 'tablet-alt',
869
- 'fas fa-tablets' => 'tablets',
870
- 'fas fa-tachometer-alt' => 'tachometer-alt',
871
- 'fas fa-tag' => 'tag',
872
- 'fas fa-tags' => 'tags',
873
- 'fas fa-tape' => 'tape',
874
- 'fas fa-tasks' => 'tasks',
875
- 'fas fa-taxi' => 'taxi',
876
- 'fab fa-telegram' => 'telegram',
877
- 'fab fa-telegram-plane' => 'telegram-plane',
878
- 'fab fa-tencent-weibo' => 'tencent-weibo',
879
- 'fas fa-terminal' => 'terminal',
880
- 'fas fa-text-height' => 'text-height',
881
- 'fas fa-text-width' => 'text-width',
882
- 'fas fa-th' => 'th',
883
- 'fas fa-th-large' => 'th-large',
884
- 'fas fa-th-list' => 'th-list',
885
- 'fab fa-themeisle' => 'themeisle',
886
- 'fas fa-thermometer' => 'thermometer',
887
- 'fas fa-thermometer-empty' => 'thermometer-empty',
888
- 'fas fa-thermometer-full' => 'thermometer-full',
889
- 'fas fa-thermometer-half' => 'thermometer-half',
890
- 'fas fa-thermometer-quarter' => 'thermometer-quarter',
891
- 'fas fa-thermometer-three-quarters' => 'thermometer-three-quarters',
892
- 'fas fa-thumbs-down' => 'thumbs-down',
893
- 'far fa-thumbs-down' => 'thumbs-down',
894
- 'fas fa-thumbs-up' => 'thumbs-up',
895
- 'far fa-thumbs-up' => 'thumbs-up',
896
- 'fas fa-thumbtack' => 'thumbtack',
897
- 'fas fa-ticket-alt' => 'ticket-alt',
898
- 'fas fa-times' => 'times',
899
- 'fas fa-times-circle' => 'times-circle',
900
- 'far fa-times-circle' => 'times-circle',
901
- 'fas fa-tint' => 'tint',
902
- 'fas fa-toggle-off' => 'toggle-off',
903
- 'fas fa-toggle-on' => 'toggle-on',
904
- 'fas fa-trademark' => 'trademark',
905
- 'fas fa-train' => 'train',
906
- 'fas fa-transgender' => 'transgender',
907
- 'fas fa-transgender-alt' => 'transgender-alt',
908
- 'fas fa-trash' => 'trash',
909
- 'fas fa-trash-alt' => 'trash-alt',
910
- 'far fa-trash-alt' => 'trash-alt',
911
- 'fas fa-tree' => 'tree',
912
- 'fab fa-trello' => 'trello',
913
- 'fab fa-tripadvisor' => 'tripadvisor',
914
- 'fas fa-trophy' => 'trophy',
915
- 'fas fa-truck' => 'truck',
916
- 'fas fa-truck-loading' => 'truck-loading',
917
- 'fas fa-truck-moving' => 'truck-moving',
918
- 'fas fa-tty' => 'tty',
919
- 'fab fa-tumblr' => 'tumblr',
920
- 'fab fa-tumblr-square' => 'tumblr-square',
921
- 'fas fa-tv' => 'tv',
922
- 'fab fa-twitch' => 'twitch',
923
- 'fab fa-twitter' => 'twitter',
924
- 'fab fa-twitter-square' => 'twitter-square',
925
- 'fab fa-typo3' => 'typo3',
926
- 'fab fa-uber' => 'uber',
927
- 'fab fa-uikit' => 'uikit',
928
- 'fas fa-umbrella' => 'umbrella',
929
- 'fas fa-underline' => 'underline',
930
- 'fas fa-undo' => 'undo',
931
- 'fas fa-undo-alt' => 'undo-alt',
932
- 'fab fa-uniregistry' => 'uniregistry',
933
- 'fas fa-universal-access' => 'universal-access',
934
- 'fas fa-university' => 'university',
935
- 'fas fa-unlink' => 'unlink',
936
- 'fas fa-unlock' => 'unlock',
937
- 'fas fa-unlock-alt' => 'unlock-alt',
938
- 'fab fa-untappd' => 'untappd',
939
- 'fas fa-upload' => 'upload',
940
- 'fab fa-usb' => 'usb',
941
- 'fas fa-user' => 'user',
942
- 'far fa-user' => 'user',
943
- 'fas fa-user-circle' => 'user-circle',
944
- 'far fa-user-circle' => 'user-circle',
945
- 'fas fa-user-md' => 'user-md',
946
- 'fas fa-user-plus' => 'user-plus',
947
- 'fas fa-user-secret' => 'user-secret',
948
- 'fas fa-user-times' => 'user-times',
949
- 'fas fa-users' => 'users',
950
- 'fab fa-ussunnah' => 'ussunnah',
951
- 'fas fa-utensil-spoon' => 'utensil-spoon',
952
- 'fas fa-utensils' => 'utensils',
953
- 'fab fa-vaadin' => 'vaadin',
954
- 'fas fa-venus' => 'venus',
955
- 'fas fa-venus-double' => 'venus-double',
956
- 'fas fa-venus-mars' => 'venus-mars',
957
- 'fab fa-viacoin' => 'viacoin',
958
- 'fab fa-viadeo' => 'viadeo',
959
- 'fab fa-viadeo-square' => 'viadeo-square',
960
- 'fas fa-vial' => 'vial',
961
- 'fas fa-vials' => 'vials',
962
- 'fab fa-viber' => 'viber',
963
- 'fas fa-video' => 'video',
964
- 'fas fa-video-slash' => 'video-slash',
965
- 'fab fa-vimeo' => 'vimeo',
966
- 'fab fa-vimeo-square' => 'vimeo-square',
967
- 'fab fa-vimeo-v' => 'vimeo-v',
968
- 'fab fa-vine' => 'vine',
969
- 'fab fa-vk' => 'vk',
970
- 'fab fa-vnv' => 'vnv',
971
- 'fas fa-volleyball-ball' => 'volleyball-ball',
972
- 'fas fa-volume-down' => 'volume-down',
973
- 'fas fa-volume-off' => 'volume-off',
974
- 'fas fa-volume-up' => 'volume-up',
975
- 'fab fa-vuejs' => 'vuejs',
976
- 'fas fa-warehouse' => 'warehouse',
977
- 'fab fa-weibo' => 'weibo',
978
- 'fas fa-weight' => 'weight',
979
- 'fab fa-weixin' => 'weixin',
980
- 'fab fa-whatsapp' => 'whatsapp',
981
- 'fab fa-whatsapp-square' => 'whatsapp-square',
982
- 'fas fa-wheelchair' => 'wheelchair',
983
- 'fab fa-whmcs' => 'whmcs',
984
- 'fas fa-wifi' => 'wifi',
985
- 'fab fa-wikipedia-w' => 'wikipedia-w',
986
- 'fas fa-window-close' => 'window-close',
987
- 'far fa-window-close' => 'window-close',
988
- 'fas fa-window-maximize' => 'window-maximize',
989
- 'far fa-window-maximize' => 'window-maximize',
990
- 'fas fa-window-minimize' => 'window-minimize',
991
- 'far fa-window-minimize' => 'window-minimize',
992
- 'fas fa-window-restore' => 'window-restore',
993
- 'far fa-window-restore' => 'window-restore',
994
- 'fab fa-windows' => 'windows',
995
- 'fas fa-wine-glass' => 'wine-glass',
996
- 'fas fa-won-sign' => 'won-sign',
997
- 'fab fa-wordpress' => 'wordpress',
998
- 'fab fa-wordpress-simple' => 'wordpress-simple',
999
- 'fab fa-wpbeginner' => 'wpbeginner',
1000
- 'fab fa-wpexplorer' => 'wpexplorer',
1001
- 'fab fa-wpforms' => 'wpforms',
1002
- 'fas fa-wrench' => 'wrench',
1003
- 'fas fa-x-ray' => 'x-ray',
1004
- 'fab fa-xbox' => 'xbox',
1005
- 'fab fa-xing' => 'xing',
1006
- 'fab fa-xing-square' => 'xing-square',
1007
- 'fab fa-y-combinator' => 'y-combinator',
1008
- 'fab fa-yahoo' => 'yahoo',
1009
- 'fab fa-yandex' => 'yandex',
1010
- 'fab fa-yandex-international' => 'yandex-international',
1011
- 'fab fa-yelp' => 'yelp',
1012
- 'fas fa-yen-sign' => 'yen-sign',
1013
- 'fab fa-yoast' => 'yoast',
1014
- 'fab fa-youtube' => 'youtube',
1015
- 'fab fa-youtube-square' => 'youtube-square',
1016
- );
1017
- }
1018
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-wpvr-rollback.php DELETED
@@ -1,181 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit; // Exit if accessed directly.
5
- }
6
-
7
- /**
8
- * WP VR rollback.
9
- *
10
- * WP VR rollback handler class is responsible for rolling back WP VR to
11
- * previous version.
12
- *
13
- * @since 5.7.0
14
- */
15
- class WPVR_Rollback {
16
-
17
- /**
18
- * Package URL.
19
- *
20
- * Holds the package URL.
21
- *
22
- * @since 5.7.0
23
- * @access protected
24
- *
25
- * @var string Package URL.
26
- */
27
- protected $package_url;
28
-
29
- /**
30
- * Version.
31
- *
32
- * Holds the version.
33
- *
34
- * @since 5.7.0
35
- * @access protected
36
- *
37
- * @var string Package URL.
38
- */
39
- protected $version;
40
-
41
- /**
42
- * Plugin name.
43
- *
44
- * Holds the plugin name.
45
- *
46
- * @since 5.7.0
47
- * @access protected
48
- *
49
- * @var string Plugin name.
50
- */
51
- protected $plugin_name;
52
-
53
- /**
54
- * Plugin slug.
55
- *
56
- * Holds the plugin slug.
57
- *
58
- * @since 5.7.0
59
- * @access protected
60
- *
61
- * @var string Plugin slug.
62
- */
63
- protected $plugin_slug;
64
-
65
- /**
66
- * Rollback constructor.
67
- *
68
- * Initializing WP VR rollback.
69
- *
70
- * @since 5.7.0
71
- * @access public
72
- *
73
- * @param array $args Optional. Rollback arguments. Default is an empty array.
74
- */
75
- public function __construct( $args = [] ) {
76
- foreach ( $args as $key => $value ) {
77
- $this->{$key} = $value;
78
- }
79
- }
80
-
81
- /**
82
- * Print inline style.
83
- *
84
- * Add an inline CSS to the rollback page.
85
- *
86
- * @since 5.7.0
87
- * @access private
88
- */
89
- private function print_inline_style() {
90
- ?>
91
- <style>
92
- .wrap {
93
- overflow: hidden;
94
- max-width: 850px;
95
- margin: auto;
96
- font-family: Courier, monospace;
97
- }
98
-
99
- h1 {
100
- background: #4775f6;
101
- text-align: center;
102
- color: #fff !important;
103
- padding: 70px !important;
104
- text-transform: uppercase;
105
- letter-spacing: 1px;
106
- }
107
-
108
- h1 img {
109
- max-width: 300px;
110
- display: block;
111
- margin: auto auto 50px;
112
- }
113
- </style>
114
- <?php
115
- }
116
-
117
- /**
118
- * Apply package.
119
- *
120
- * Change the plugin data when WordPress checks for updates. This method
121
- * modifies package data to update the plugin from a specific URL containing
122
- * the version package.
123
- *
124
- * @since 5.7.0
125
- * @access protected
126
- */
127
- protected function apply_package() {
128
- $update_plugins = get_site_transient( 'update_plugins' );
129
- if ( ! is_object( $update_plugins ) ) {
130
- $update_plugins = new \stdClass();
131
- }
132
-
133
- $plugin_info = new \stdClass();
134
- $plugin_info->new_version = $this->version;
135
- $plugin_info->slug = $this->plugin_slug;
136
- $plugin_info->package = $this->package_url;
137
- $plugin_info->url = 'https://rextheme.com/wpvr/';
138
-
139
- $update_plugins->response[ $this->plugin_name ] = $plugin_info;
140
-
141
- set_site_transient( 'update_plugins', $update_plugins );
142
- }
143
-
144
- /**
145
- * Upgrade.
146
- *
147
- * Run WordPress upgrade to rollback WP VR to previous version.
148
- *
149
- * @since 5.7.0
150
- * @access protected
151
- */
152
- protected function upgrade() {
153
- require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
154
-
155
- $this->plugin_name = 'wpvr';
156
- $upgrader_args = [
157
- 'url' => 'update.php?action=upgrade-plugin&plugin=' . rawurlencode( $this->plugin_name ),
158
- 'plugin' => $this->plugin_name,
159
- 'nonce' => 'upgrade-plugin_' . $this->plugin_name,
160
- 'title' => __( 'WP VR Plugin Rollback', 'wpvr' ),
161
- ];
162
-
163
- $this->print_inline_style();
164
-
165
- $upgrader = new \Plugin_Upgrader( new \Plugin_Upgrader_Skin( $upgrader_args ) );
166
- $upgrader->upgrade( $this->plugin_name );
167
- }
168
-
169
- /**
170
- * Run.
171
- *
172
- * Rollback WP VR to previous versions.
173
- *
174
- * @since 5.7.0
175
- * @access public
176
- */
177
- public function run() {
178
- $this->apply_package();
179
- $this->upgrade();
180
- }
181
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/classes/class-setup-meta-box.php ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Setup meta box related functionalities
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Setup_Meta_Box extends WPVR_Meta_Box {
14
+
15
+ /**
16
+ * @var string
17
+ * @since 8.0.0
18
+ */
19
+ protected $title = '';
20
+
21
+ /**
22
+ * Metabox ID
23
+ *
24
+ * @var string
25
+ * @since 8.0.0
26
+ */
27
+ protected $slug = '';
28
+
29
+ /**
30
+ * @var string
31
+ * @since 8.0.0
32
+ */
33
+ protected $post_type = '';
34
+
35
+ /**
36
+ * Metabox context
37
+ *
38
+ * @var string
39
+ * @since 8.0.0
40
+ */
41
+ protected $context = '';
42
+
43
+ /**
44
+ * Metabox priority
45
+ *
46
+ * @var string
47
+ * @since 8.0.0
48
+ */
49
+ protected $priority = '';
50
+
51
+ /**
52
+ * Instance of WPVR_Scene class
53
+ *
54
+ * @var object
55
+ * @since 8.0.0
56
+ */
57
+ protected $scene;
58
+
59
+ /**
60
+ * Instance of WPVR_Video class
61
+ *
62
+ * @var object
63
+ * @since 8.0.0
64
+ */
65
+ protected $video;
66
+
67
+ /**
68
+ * Instance of WPVR_General class
69
+ *
70
+ * @var object
71
+ * @since 8.0.0
72
+ */
73
+ protected $general;
74
+
75
+
76
+ public function __construct( $slug, $title, $post_type, $context, $priority ) {
77
+ if( $slug == '' || $context == '' || $priority == '' ) {
78
+ return;
79
+ }
80
+
81
+ if( $title == '' ) {
82
+ $this->title = ucfirst( $slug );
83
+ }
84
+
85
+ if( empty( $post_type ) ) {
86
+ return;
87
+ }
88
+
89
+ $this->title = $title;
90
+ $this->slug = $slug;
91
+ $this->post_type = $post_type;
92
+ $this->context = $context;
93
+ $this->priority = $priority;
94
+
95
+ $this->scene = new WPVR_Scene();
96
+ $this->video = new WPVR_Video();
97
+ $this->general = new WPVR_General();
98
+
99
+ add_action( 'add_meta_boxes', array( $this, 'register' ) );
100
+ }
101
+
102
+
103
+ /**
104
+ * Register custom meta box
105
+ *
106
+ * @param string $post_type
107
+ *
108
+ * @return void
109
+ * @since 8.0.0
110
+ */
111
+ public function register( $post_type ) {
112
+ if ( $post_type == $this->post_type ) {
113
+ add_meta_box( $this->slug, $this->title, array( $this, 'render' ), $post_type, $this->context, $this->priority );
114
+ }
115
+ }
116
+
117
+
118
+ /**
119
+ * Render custom meta box
120
+ *
121
+ * @param object $post
122
+ *
123
+ * @return void
124
+ * @since 8.0.0
125
+ */
126
+ public function render( $post ) {
127
+
128
+ $primary = WPVR_Meta_Field::get_primary_meta_fields();
129
+ $post_meta_data = get_post_meta($post->ID, 'panodata', true);
130
+ $post_meta_data = (is_array($post_meta_data)) ? $post_meta_data : array($post_meta_data);
131
+
132
+ $postdata = array_merge($primary, $post_meta_data);
133
+ // active tab variables
134
+ $active_tab = 'scene';
135
+ $scene_active_tab = 1;
136
+ $hotspot_active_tab = 1;
137
+ if (isset($_GET['active_tab'])) {
138
+ $active_tab = $_GET['active_tab'];
139
+ }
140
+ if (isset($_GET['scene'])) {
141
+ $scene_active_tab = $_GET['scene'];
142
+ }
143
+ if (isset($_GET['hotspot'])) {
144
+ $hotspot_active_tab = $_GET['hotspot'];
145
+ }
146
+
147
+ // Start custom meta box rendering
148
+ ob_start();
149
+
150
+ ?>
151
+
152
+ <div class="pano-setup">
153
+
154
+ <input type="hidden" value="<?php echo $active_tab;?>" name="wpvr_active_tab" id="wpvr_active_tab"/>
155
+ <input type="hidden" value="<?php echo $scene_active_tab;?>" name="wpvr_active_scenes" id="wpvr_active_scenes"/>
156
+ <input type="hidden" value="<?php echo $hotspot_active_tab;?>" name="wpvr_active_hotspot" id="wpvr_active_hotspot"/>
157
+
158
+ <!-- start rex-pano-tabs -->
159
+ <div class="rex-pano-tabs">
160
+
161
+ <?php WPVR_Meta_Field::render_pano_tab_nav($postdata); ?>
162
+ <!-- start rex-pano-tab-content -->
163
+ <div class="rex-pano-tab-content" id="wpvr-main-tab-contents">
164
+
165
+ <!-- start scenes tab -->
166
+ <div class="rex-pano-tab wpvr_scene active" id="scenes">
167
+ <?php
168
+ $this->scene->render_scene($postdata);
169
+ ?>
170
+ </div>
171
+
172
+ <!-- start general tab -->
173
+ <div class="rex-pano-tab general" id="general">
174
+ <?php
175
+ $this->general->render_setting($postdata);
176
+ ?>
177
+ </div>
178
+
179
+ <!-- start video tab content -->
180
+ <div class="rex-pano-tab video" id="video">
181
+ <?php
182
+ $this->video->render_video($postdata);
183
+ ?>
184
+ </div>
185
+
186
+ <!-- This hook will render background Tour tab content -->
187
+ <?php do_action( 'include_background_tour_meta_content', $postdata )?>
188
+
189
+ <!-- This hook will render Street View tab content -->
190
+ <?php do_action( 'include_street_view_meta_content', $postdata )?>
191
+
192
+ <?php do_action( 'include_export_meta_content', $postdata, $post )?>
193
+
194
+ </div>
195
+ <!-- end rex-pano-tab-content -->
196
+ </div>
197
+ <!-- end rex-pano-tabs -->
198
+ </div>
199
+ <div class="wpvr-loading" style="display:none;">Loading&#8230;</div>
200
+
201
+ <?php
202
+ ob_end_flush();
203
+ // End custom meta box rendering
204
+ }
205
+
206
+ }
admin/classes/class-tour-preview-meta-box.php ADDED
@@ -0,0 +1,699 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Preview meta box related functionalities
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Tour_Preview extends WPVR_Meta_Box {
14
+
15
+ /**
16
+ * @var string
17
+ * @since 8.0.0
18
+ */
19
+ protected $title = '';
20
+
21
+ /**
22
+ * Metabox ID
23
+ *
24
+ * @var string
25
+ * @since 8.0.0
26
+ */
27
+ protected $slug = '';
28
+
29
+ /**
30
+ * @var string
31
+ * @since 8.0.0
32
+ */
33
+ protected $post_type = '';
34
+
35
+ /**
36
+ * Metabox context
37
+ *
38
+ * @var string
39
+ * @since 8.0.0
40
+ */
41
+ protected $context = '';
42
+
43
+ /**
44
+ * Metabox priority
45
+ *
46
+ * @var string
47
+ * @since 8.0.0
48
+ */
49
+ protected $priority = '';
50
+
51
+
52
+ public function __construct( $slug, $title, $post_type, $context, $priority ) {
53
+ if( $slug == '' || $context == '' || $priority == '' ) {
54
+ return;
55
+ }
56
+
57
+ if( $title == '' ) {
58
+ $this->title = ucfirst( $slug );
59
+ }
60
+
61
+ if( empty( $post_type ) ) {
62
+ return;
63
+ }
64
+
65
+ $this->title = $title;
66
+ $this->slug = $slug;
67
+ $this->post_type = $post_type;
68
+ $this->context = $context;
69
+ $this->priority = $priority;
70
+
71
+ add_action( 'add_meta_boxes', array( $this, 'register' ) );
72
+ }
73
+
74
+
75
+ /**
76
+ * Register review custom meta box
77
+ *
78
+ * @param string $post_type
79
+ *
80
+ * @return void
81
+ * @since 8.0.0
82
+ */
83
+ public function register( $post_type ) {
84
+ if ( $post_type == $this->post_type ) {
85
+ add_meta_box( $this->slug, $this->title, array( $this, 'render' ), $post_type, $this->context, $this->priority );
86
+ }
87
+ }
88
+
89
+
90
+ /**
91
+ * Render custom meta box
92
+ *
93
+ * @param object $post
94
+ *
95
+ * @return void
96
+ * @since 8.0.0
97
+ */
98
+ public function render( $post ) {
99
+ $post = '';
100
+ $id = '';
101
+ $postdata = array();
102
+ $post = get_post();
103
+ $id = $post->ID;
104
+
105
+ $postdata = get_post_meta( $id, 'panodata', true );
106
+ $panoid = 'pano'.$id;
107
+
108
+ if (isset($postdata['vidid'])) {
109
+ ob_start();
110
+ ?>
111
+ <div class="iframe-wrapper">
112
+ <i class="fa fa-times" id="cross"></i>
113
+ <div id="custom-ifram" style="display: none;"></div>
114
+ <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap dfgsdg" style="height: 100%;">
115
+ <?php echo $postdata['panoviddata']; ?>
116
+ <?php if ($postdata['vidtype'] == 'selfhost') { ?>
117
+ <script>
118
+ videojs(<?php echo $postdata['vidid']; ?>, {
119
+ plugins: {
120
+ pannellum: {}
121
+ }
122
+ });
123
+ </script>
124
+ <?php } ?>
125
+ </div>
126
+ </div>
127
+ <?php
128
+ ob_end_flush();
129
+ } elseif (isset($postdata['streetviewdata'])) {
130
+ ob_start();
131
+ ?>
132
+ <div class="iframe-wrapper">
133
+ <i class="fa fa-times" id="cross"></i>
134
+ <div id="custom-ifram" style="display: none;">
135
+
136
+ </div>
137
+ <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
138
+ <?php
139
+ echo $postdata['streetviewdata'];
140
+ ?>
141
+ </div>
142
+ </div>
143
+
144
+ <div class="rex-add-coordinates" style="text-align: center;">
145
+ <ul>
146
+ <li>
147
+ <div id="panodata" style="text-align: center; font-weight: bold;">
148
+ </div>
149
+ </li>
150
+ <li class="rex-hide-coordinates add-pitch">
151
+ <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
152
+ <i class="fa fa-arrow-down toppitch"></i>
153
+ </li>
154
+ </ul>
155
+ </div>
156
+ <?php
157
+ ob_end_flush();
158
+ } elseif (isset($postdata['flat_image'])) {
159
+ ob_start();
160
+ ?>
161
+ <div class="iframe-wrapper">
162
+ <i class="fa fa-times" id="cross"></i>
163
+ <div id="custom-ifram" style="display: none;">
164
+
165
+ </div>
166
+ <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
167
+ <img src="<?php echo $postdata['flat_image_url']; ?>" style="width: 600px">
168
+ </div>
169
+ </div>
170
+
171
+ <div class="rex-add-coordinates" style="text-align: center;">
172
+ <ul>
173
+ <li>
174
+ <div id="panodata" style="text-align: center; font-weight: bold;">
175
+ </div>
176
+ </li>
177
+ <li class="rex-hide-coordinates add-pitch">
178
+ <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
179
+ <i class="fa fa-arrow-down toppitch"></i>
180
+ </li>
181
+ </ul>
182
+ </div>
183
+ <?php
184
+ ob_end_flush();
185
+ } else {
186
+
187
+ $control = false;
188
+ if (isset($postdata['showControls'])) {
189
+ $control = $postdata['showControls'];
190
+ }
191
+
192
+ $compass = false;
193
+ if (isset($postdata['compass'])) {
194
+ $compass = $postdata['compass'] == 'on' || $postdata['compass'] != null ? true : false;
195
+ }
196
+ $mouseZoom = true;
197
+ if (isset($postdata['mouseZoom'])) {
198
+ $mouseZoom = $postdata['mouseZoom'];
199
+ }
200
+ $draggable = true;
201
+ if (isset($postdata['draggable'])) {
202
+ $draggable = $postdata['draggable'] == 'on' || $postdata['draggable'] != null ? true : false;
203
+ }
204
+ $diskeyboard = false;
205
+ if (isset($postdata['diskeyboard'])) {
206
+ $diskeyboard = $postdata['diskeyboard'] == 'off' || $postdata['diskeyboard'] == null ? false : true;
207
+ }
208
+ $keyboardzoom = true;
209
+ if (isset($postdata['keyboardzoom'])) {
210
+ $keyboardzoom = $postdata['keyboardzoom'] == 'on' || $postdata['keyboardzoom'] != null ? true : false;
211
+ }
212
+ $autoload = false;
213
+ if (isset($postdata['autoLoad'])) {
214
+ $autoload = $postdata['autoLoad'];
215
+ }
216
+
217
+ $default_scene = '';
218
+ if (isset($postdata['defaultscene'])) {
219
+ $default_scene = $postdata['defaultscene'];
220
+ }
221
+
222
+ $preview = '';
223
+ if (isset($postdata['preview'])) {
224
+ $preview = $postdata['preview'];
225
+ }
226
+
227
+ $autorotation = '';
228
+ if (isset($postdata["autoRotate"])) {
229
+ $autorotation = $postdata["autoRotate"];
230
+ }
231
+ $autorotationinactivedelay = '';
232
+ if (isset($postdata["autoRotateInactivityDelay"])) {
233
+ $autorotationinactivedelay = $postdata["autoRotateInactivityDelay"];
234
+ }
235
+ $autorotationstopdelay = '';
236
+ if (isset($postdata["autoRotateStopDelay"])) {
237
+ $autorotationstopdelay = $postdata["autoRotateStopDelay"];
238
+ }
239
+
240
+ $scene_fade_duration = '';
241
+ if (isset($postdata['scenefadeduration'])) {
242
+ $scene_fade_duration = $postdata['scenefadeduration'];
243
+ }
244
+
245
+ $default_global_zoom = '';
246
+ if (isset($postdata['hfov'])) {
247
+ $default_global_zoom = $postdata['hfov'];
248
+ }
249
+
250
+ $max_global_zoom = '';
251
+ if (isset($postdata['maxHfov'])) {
252
+ $max_global_zoom = $postdata['maxHfov'];
253
+ }
254
+
255
+ $min_global_zoom = '';
256
+ if (isset($postdata['minHfov'])) {
257
+ $min_global_zoom = $postdata['minHfov'];
258
+ }
259
+
260
+ $panodata = '';
261
+ if (isset($postdata['panodata'])) {
262
+ $panodata = $postdata['panodata'];
263
+ }
264
+
265
+ $default_data = array();
266
+ if($default_global_zoom != '' && $max_global_zoom != '' && $min_global_zoom != ''){
267
+ $default_data = array("firstScene"=>$default_scene,"sceneFadeDuration"=>$scene_fade_duration,"hfov"=>$default_global_zoom,"maxHfov"=>$max_global_zoom,"minHfov"=>$min_global_zoom);
268
+ }else{
269
+ $default_data = array("firstScene"=>$default_scene,"sceneFadeDuration"=>$scene_fade_duration);
270
+ }
271
+
272
+ $scene_data = array();
273
+
274
+ if (!empty($panodata)) {
275
+ foreach ($panodata["scene-list"] as $panoscenes) {
276
+
277
+ $scene_ititle = '';
278
+ if (isset($panoscenes["scene-ititle"])) {
279
+ $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
280
+ }
281
+
282
+ $scene_author = '';
283
+ if (isset($panoscenes["scene-author"])) {
284
+ $scene_author = sanitize_text_field($panoscenes["scene-author"]);
285
+ }
286
+
287
+ $scene_vaov = 180;
288
+ if (isset($panoscenes["scene-vaov"])) {
289
+ $scene_vaov = (float)$panoscenes["scene-vaov"];
290
+ }
291
+
292
+ $scene_haov = 360;
293
+ if (isset($panoscenes["scene-haov"])) {
294
+ $scene_haov = (float)$panoscenes["scene-haov"];
295
+ }
296
+
297
+
298
+ $scene_vertical_offset = 0;
299
+ if (isset($panoscenes["scene-vertical-offset"])) {
300
+ $scene_vertical_offset = (float)$panoscenes["scene-vertical-offset"];
301
+ }
302
+
303
+ $default_scene_pitch = null;
304
+ if (isset($panoscenes["scene-pitch"])) {
305
+ $default_scene_pitch = (float)$panoscenes["scene-pitch"];
306
+ }
307
+
308
+ $default_scene_yaw = null;
309
+ if (isset($panoscenes["scene-yaw"])) {
310
+ $default_scene_yaw = (float)$panoscenes["scene-yaw"];
311
+ }
312
+
313
+ $scene_max_pitch = '';
314
+ if (isset($panoscenes["scene-maxpitch"])) {
315
+ $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
316
+ }
317
+
318
+
319
+ $scene_min_pitch = '';
320
+ if (isset($panoscenes["scene-minpitch"])) {
321
+ $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
322
+ }
323
+
324
+
325
+ $scene_max_yaw = '';
326
+ if (isset($panoscenes["scene-maxyaw"])) {
327
+ $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
328
+ }
329
+
330
+
331
+ $scene_min_yaw = '';
332
+ if (isset($panoscenes["scene-minyaw"])) {
333
+ $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
334
+ }
335
+
336
+
337
+ $default_zoom = 100;
338
+ if (isset($panoscenes["scene-zoom"]) && $panoscenes["scene-zoom"] != '') {
339
+ $default_zoom = (int)$panoscenes["scene-zoom"];
340
+
341
+ }else{
342
+ if($default_global_zoom != ''){
343
+ $default_zoom = (int)$default_global_zoom;
344
+
345
+ }
346
+ }
347
+
348
+
349
+
350
+ $max_zoom = 120;
351
+ if (isset($panoscenes["scene-maxzoom"]) && $panoscenes["scene-maxzoom"] != '') {
352
+ $max_zoom = (int)$panoscenes["scene-maxzoom"];
353
+ }else{
354
+ if($max_global_zoom != ''){
355
+ $max_zoom = (int)$max_global_zoom;
356
+ }
357
+ }
358
+
359
+
360
+
361
+
362
+ $min_zoom = 50;
363
+ if (isset($panoscenes["scene-minzoom"]) && $panoscenes["scene-minzoom"] != '') {
364
+ $min_zoom = (int)$panoscenes["scene-minzoom"];
365
+ }else{
366
+ if($min_global_zoom != ''){
367
+ $min_zoom = (int)$min_global_zoom;
368
+ }
369
+ }
370
+
371
+ $hotspot_datas = array();
372
+ if (isset($panoscenes["hotspot-list"])) {
373
+ $hotspot_datas = $panoscenes["hotspot-list"];
374
+ }
375
+
376
+ $hotspots = array();
377
+ foreach ($hotspot_datas as $hotspot_data) {
378
+
379
+ $hotspot_scene_pitch = '';
380
+ if (isset($hotspot_data["hotspot-scene-pitch"])) {
381
+ $hotspot_scene_pitch = $hotspot_data["hotspot-scene-pitch"];
382
+ }
383
+ $hotspot_scene_yaw = '';
384
+ if (isset($hotspot_data["hotspot-scene-yaw"])) {
385
+ $hotspot_scene_yaw = $hotspot_data["hotspot-scene-yaw"];
386
+ }
387
+
388
+ $hotspot_type = $hotspot_data["hotspot-type"] !== 'scene' ? 'info' : $hotspot_data["hotspot-type"];
389
+ $hotspot_content = '';
390
+
391
+ ob_start();
392
+ do_action('wpvr_hotspot_content', $hotspot_data);
393
+ $hotspot_content = ob_get_clean();
394
+
395
+ if(!$hotspot_content) $hotspot_content = $hotspot_data["hotspot-content"];
396
+
397
+
398
+ $hotspot_info = array(
399
+ "text"=>$hotspot_data["hotspot-title"],
400
+ "pitch"=>$hotspot_data["hotspot-pitch"],
401
+ "yaw"=>$hotspot_data["hotspot-yaw"],
402
+ "type"=>$hotspot_type,
403
+ "URL"=>$hotspot_data["hotspot-url"],
404
+ "clickHandlerArgs"=>$hotspot_content,
405
+ "createTooltipArgs"=>$hotspot_data["hotspot-hover"],
406
+ "sceneId"=>$hotspot_data["hotspot-scene"],
407
+ "targetPitch"=>(float)$hotspot_scene_pitch,
408
+ "targetYaw"=>(float)$hotspot_scene_yaw);
409
+ array_push($hotspots, $hotspot_info);
410
+ if (empty($hotspot_data["hotspot-scene"])) {
411
+ unset($hotspot_info['targetPitch']);
412
+ unset($hotspot_info['targetYaw']);
413
+ }
414
+ }
415
+
416
+ $scene_info = array();
417
+
418
+
419
+ if ($panoscenes["scene-type"] == 'cubemap') {
420
+ $pano_type = 'cubemap';
421
+ $pano_attachment = array(
422
+ $panoscenes["scene-attachment-url-face0"],
423
+ $panoscenes["scene-attachment-url-face1"],
424
+ $panoscenes["scene-attachment-url-face2"],
425
+ $panoscenes["scene-attachment-url-face3"],
426
+ $panoscenes["scene-attachment-url-face4"],
427
+ $panoscenes["scene-attachment-url-face5"]
428
+ );
429
+
430
+ $scene_info = array("type"=>$panoscenes["scene-type"],"cubeMap"=>$pano_attachment,"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
431
+ }
432
+ else {
433
+ $scene_info = array("type"=>$panoscenes["scene-type"],"panorama"=>$panoscenes["scene-attachment-url"],"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
434
+ }
435
+
436
+
437
+
438
+ if (isset($panoscenes["ptyscene"])) {
439
+ if ($panoscenes["ptyscene"] == "off") {
440
+ unset($scene_info['pitch']);
441
+ unset($scene_info['yaw']);
442
+ }
443
+ }
444
+
445
+ if (empty($panoscenes["scene-ititle"])) {
446
+ unset($scene_info['title']);
447
+ }
448
+ if (empty($panoscenes["scene-author"])) {
449
+ unset($scene_info['author']);
450
+ }
451
+
452
+ if (empty($scene_vaov)) {
453
+ unset($scene_info['vaov']);
454
+ }
455
+
456
+ if (empty($scene_haov)) {
457
+ unset($scene_info['haov']);
458
+ }
459
+
460
+ if (empty($scene_vertical_offset)) {
461
+ unset($scene_info['vOffset']);
462
+ }
463
+
464
+ if (isset($panoscenes["cvgscene"])) {
465
+ if ($panoscenes["cvgscene"] == "off") {
466
+ unset($scene_info['maxPitch']);
467
+ unset($scene_info['minPitch']);
468
+ }
469
+ }
470
+
471
+ if (empty($panoscenes["scene-maxpitch"])) {
472
+ unset($scene_info['maxPitch']);
473
+ }
474
+
475
+ if (empty($panoscenes["scene-minpitch"])) {
476
+ unset($scene_info['minPitch']);
477
+ }
478
+
479
+ if (isset($panoscenes["chgscene"])) {
480
+ if ($panoscenes["chgscene"] == "off") {
481
+ unset($scene_info['maxYaw']);
482
+ unset($scene_info['minYaw']);
483
+ }
484
+ }
485
+ if (empty($panoscenes["scene-maxyaw"])) {
486
+ unset($scene_info['maxYaw']);
487
+ }
488
+
489
+ if (empty($panoscenes["scene-minyaw"])) {
490
+ unset($scene_info['minYaw']);
491
+ }
492
+
493
+ // if (isset($panoscenes["czscene"])) {
494
+ // if ($panoscenes["czscene"] == "off") {
495
+ // unset($scene_info['hfov']);
496
+ // unset($scene_info['maxHfov']);
497
+ // unset($scene_info['minHfov']);
498
+ // }
499
+ // }
500
+
501
+ $scene_array = array();
502
+ $scene_array = array(
503
+ $panoscenes["scene-id"]=>$scene_info
504
+ );
505
+ $scene_data[$panoscenes["scene-id"]] = $scene_info;
506
+ }
507
+ }
508
+
509
+ $pano_id_array = array();
510
+ $pano_id_array = array("panoid"=>$panoid);
511
+ $pano_response = array();
512
+ $pano_response = array("autoLoad"=>$autoload,"showControls"=>$control,'compass'=>$compass,'mouseZoom'=>$mouseZoom,'draggable'=>$draggable,'disableKeyboardCtrl'=>$diskeyboard,'keyboardZoom'=>$keyboardzoom,"preview"=>$preview,"autoRotate"=>$autorotation,"autoRotateInactivityDelay"=>$autorotationinactivedelay,"autoRotateStopDelay"=>$autorotationstopdelay,"default"=>$default_data,"scenes"=>$scene_data);
513
+
514
+ if (empty($autorotation)) {
515
+ unset($pano_response['autoRotate']);
516
+ unset($pano_response['autoRotateInactivityDelay']);
517
+ unset($pano_response['autoRotateStopDelay']);
518
+ }
519
+ if (empty($autorotationinactivedelay)) {
520
+ unset($pano_response['autoRotateInactivityDelay']);
521
+ }
522
+ if (empty($autorotationstopdelay)) {
523
+ unset($pano_response['autoRotateStopDelay']);
524
+ }
525
+
526
+ $response = array();
527
+ $response = array($pano_id_array,$pano_response);
528
+ if (!empty($response)) {
529
+ $response = json_encode($response);
530
+ }
531
+ ob_start();
532
+ ?>
533
+
534
+ <div class="iframe-wrapper">
535
+ <i class="fa fa-times" id="cross"></i>
536
+ <div id="custom-ifram" style="display: none;"></div>
537
+ <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="direction:ltr; height: 100%"></div>
538
+ </div>
539
+
540
+ <div class="rex-add-coordinates" style="text-align: center;">
541
+ <ul>
542
+ <li>
543
+ <div id="panodata" style="text-align: center; font-weight: bold;">
544
+
545
+ </div>
546
+ </li>
547
+ <li class="rex-hide-coordinates add-pitch">
548
+ <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
549
+ <i class="fa fa-arrow-down toppitch"></i>
550
+ </li>
551
+ </ul>
552
+
553
+ <div class="scene-gallery vrowl-carousel" style="direction:ltr;">
554
+
555
+ </div>
556
+
557
+ </div>
558
+
559
+ <?php
560
+ ob_end_flush();
561
+ /**
562
+ * Nasim
563
+ * include alert modal
564
+ */
565
+
566
+ ?>
567
+ <script>
568
+ var response = <?php echo $response; ?>;
569
+ var scenes = response[1];
570
+
571
+ if (scenes) {
572
+ jQuery.each(scenes.scenes, function (i) {
573
+ jQuery.each(scenes.scenes[i]['hotSpots'], function (key, val) {
574
+ if (val["clickHandlerArgs"] != "") {
575
+ val["clickHandlerFunc"] = wpvrhotspot;
576
+ }
577
+ if (val["createTooltipArgs"] != "") {
578
+ val["createTooltipFunc"] = wpvrtooltip;
579
+ }
580
+ });
581
+ });
582
+ }
583
+ if (scenes) {
584
+ jQuery('.scene-gallery').empty();
585
+
586
+ jQuery.each(scenes.scenes, function (key, val) {
587
+ if (val.type == 'cubemap') {
588
+ var img_data = val.cubeMap[0];
589
+ }
590
+ else {
591
+ var img_data = val.panorama;
592
+ }
593
+ jQuery('.scene-gallery').append('<ul style="width:150px;"><li class="owlscene owl'+key+'">'+key+'</li><li title="Double click to view scene"><img class="scctrl" id="'+key+'_gallery" src="'+img_data+'"></li></ul>');
594
+ });
595
+ }
596
+
597
+ if (response[1]['scenes'] != "") {
598
+ var panoshow = pannellum.viewer(response[0]["panoid"], scenes);
599
+
600
+ if (scenes.autoRotate) {
601
+ panoshow.on('load', function (){
602
+ setTimeout(function(){ panoshow.startAutoRotate(scenes.autoRotate, 0); }, 3000);
603
+ });
604
+ panoshow.on('scenechange', function (){
605
+ setTimeout(function(){ panoshow.startAutoRotate(scenes.autoRotate, 0); }, 3000);
606
+ });
607
+ }
608
+
609
+ var touchtime = 0;
610
+ if (scenes) {
611
+ jQuery.each(scenes.scenes, function (key, val) {
612
+ document.getElementById(''+key+'_gallery').addEventListener('click', function(e) {
613
+ if (touchtime == 0) {
614
+ touchtime = new Date().getTime();
615
+ }
616
+ else {
617
+ if (((new Date().getTime()) - touchtime) < 800) {
618
+ panoshow.loadScene(key);
619
+ touchtime = 0;
620
+ }
621
+ else {
622
+ touchtime = new Date().getTime();
623
+ }
624
+ }
625
+ });
626
+ });
627
+ }
628
+
629
+ }
630
+
631
+ function wpvrhotspot(hotSpotDiv, args) {
632
+ var argst = args.replace(/\\/g, '');
633
+ jQuery("#custom-ifram").html(argst);
634
+ jQuery("#custom-ifram").fadeToggle();
635
+ jQuery(".iframe-wrapper").toggleClass("show-modal");
636
+ jQuery('button.ff-btn.ff-btn-submit.ff-btn-md').prop('disabled', true);
637
+
638
+ //------add to cart button------
639
+ jQuery('.wpvr-product-container p.add_to_cart_inline a.button').wrap('<span class="wpvr-cart-wrap"></span>');
640
+ }
641
+
642
+ function wpvrtooltip(hotSpotDiv, args) {
643
+ hotSpotDiv.classList.add('custom-tooltip');
644
+ var span = document.createElement('span');
645
+ if (args != null) {
646
+ args = args.replace(/\\/g, "");
647
+ }
648
+ span.innerHTML = args;
649
+ hotSpotDiv.appendChild(span);
650
+ span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
651
+ span.style.marginTop = -span.scrollHeight - 12 + 'px';
652
+ }
653
+
654
+ jQuery(document).ready(function($){
655
+ jQuery("#cross").on("click", function(e){
656
+ e.preventDefault();
657
+ jQuery("#custom-ifram").fadeOut();
658
+ jQuery(".iframe-wrapper").removeClass("show-modal");
659
+ jQuery('iframe').attr('src', $('iframe').attr('src'));
660
+ });
661
+ });
662
+ </script>
663
+ <?php } ?>
664
+
665
+
666
+ <div class="wpvr-use-shortcode">
667
+ <?php
668
+ $post = get_post();
669
+ $id = $post->ID;
670
+ $slug = $post->post_name;
671
+ $postdata = get_post_meta($post->ID, 'panodata', true);
672
+ ?>
673
+ <div class="shortcode-wrapper">
674
+
675
+ <div class="single-shortcode classic">
676
+
677
+ <div class="field-wapper">
678
+ <!-- Start preview button -->
679
+ <button id="panolenspreview" class="panolenspreview wpvr_preview_button"><?php echo __('Preview', 'wpvr'); ?></button>
680
+ <!-- End preview button -->
681
+ <div class="shortcode-field">
682
+
683
+ <p class="copycode" id="copy-shortcode">[wpvr id="<?php echo $id; ?>"]</p>
684
+
685
+ <span id="wpvr-copy-shortcode" class="wpvr-copy-shortcode">
686
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/copy.png'; ?>" alt="icon" />
687
+ </span>
688
+ </div>
689
+
690
+ <span id="wpvr-copied-notice" class="wpvr-copied-notice"></span>
691
+
692
+ </div>
693
+ </div>
694
+
695
+ </div>
696
+ </div>
697
+ <?php }
698
+
699
+ }
admin/classes/class-wpvr-admin-pages.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ /**
4
+ * The admin-specific functionality of the plugin.
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Admin_Page {
14
+
15
+ /**
16
+ * Instance of WPVR_Admin_Page class
17
+ *
18
+ * @var object
19
+ * @since 8.0.0
20
+ */
21
+ static $instance;
22
+
23
+
24
+ private function __construct()
25
+ {
26
+ // Register WPVR menu
27
+ add_action('admin_menu', array($this, 'wpvr_add_admin_pages'));
28
+ // Display confirmation alert
29
+ add_action('admin_footer', array($this, 'vpvr_confirmation_alert_display'));
30
+ }
31
+
32
+
33
+ /**
34
+ * Declared to overwrite magic method __clone()
35
+ * In order to prevent object cloning
36
+ *
37
+ * @return void
38
+ * @since 8.0.0
39
+ */
40
+ private function __clone()
41
+ {
42
+ // Do nothing
43
+ }
44
+
45
+
46
+ /**
47
+ * Create instance of this class
48
+ *
49
+ * @return object
50
+ * @since 8.0.0
51
+ */
52
+ public static function getInstance()
53
+ {
54
+ if(!(self::$instance instanceof self)) {
55
+ self::$instance = new self();
56
+ }
57
+ return self::$instance;
58
+ }
59
+
60
+
61
+ /**
62
+ * Admin page setup is specified in this area.
63
+ *
64
+ * @since 8.0.0
65
+ */
66
+ function wpvr_add_admin_pages() {
67
+ add_menu_page( 'WP VR', 'WP VR', 'manage_options', 'wpvr', array( $this, 'wpvr_admin_doc'),plugins_url(). '/wpvr/images/icon.png' , 25);
68
+
69
+ add_submenu_page( 'wpvr', 'WP VR', 'Get Started','manage_options', 'wpvr', array( $this, 'wpvr_admin_doc'));
70
+
71
+ add_submenu_page( 'wpvr', 'WP VR', 'Tours','manage_options', 'edit.php?post_type=wpvr_item', NULL);
72
+
73
+ add_submenu_page( 'wpvr', 'WP VR', 'Add New Tour','manage_options', 'post-new.php?post_type=wpvr_item', NULL);
74
+
75
+
76
+ do_action('wpvr_pro_license_page');
77
+
78
+ add_submenu_page( 'wpvr', 'WP VR', 'Setup Wizard','manage_options', 'wpvr-setup-wizard', array($this,'wpvr_setup_wizard'));
79
+
80
+ if(!is_plugin_active('wpvr-pro/wpvr-pro.php')){
81
+ add_submenu_page('wpvr', '', '<span class="dashicons dashicons-star-filled" style="font-size: 17px; color:#1fb3fb;"></span> ' . __( 'Go Pro', 'wpvr' ), 'manage_options', 'go_wpvr_pro', array($this,'wpvr_redirect_to_pro'));
82
+ }
83
+ }
84
+
85
+ public static function wpvr_redirect_to_pro() {
86
+ $url = 'https://rextheme.com/wpvr/#pricing';
87
+ $url = filter_var( $url, FILTER_SANITIZE_URL );
88
+ exit( esc_url( wp_redirect( $url ) ) );
89
+ }
90
+
91
+ /**
92
+ * Provide setup wizard area view for the plugin
93
+ *
94
+ * @since 8.0.0
95
+ */
96
+ function wpvr_setup_wizard(){
97
+ require_once plugin_dir_path(__FILE__) . '../partials/wpvr_setup_wizard.php';
98
+ }
99
+
100
+ /**
101
+ * Provide a admin area view for the plugin
102
+ *
103
+ * @since 8.0.0
104
+ */
105
+ function wpvr_admin_doc() {
106
+ require_once plugin_dir_path(__FILE__) . '../partials/wpvr_documentation.php';
107
+ }
108
+
109
+
110
+ /**
111
+ * Provide license key submission or plugin activition page
112
+ *
113
+ * @since 8.0.0
114
+ */
115
+ function wpvr_pro_admin_doc() {
116
+ require_once plugin_dir_path(__FILE__) . '../partials/wpvr_license.php';
117
+ }
118
+
119
+
120
+ /**
121
+ * Provide cofiramtion alert for events
122
+ *
123
+ * @since 8.0.0
124
+ */
125
+ function vpvr_confirmation_alert_display() {
126
+ require_once plugin_dir_path(__FILE__) . '../partials/wpvr_confirmation_alert.php';
127
+ }
128
+
129
+ }
admin/classes/class-wpvr-advanced-control.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing advanced control setting
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Advanced_Control extends Singleton {
14
+
15
+ /**
16
+ * Render Advanced Control Tab Content
17
+ *
18
+ * @return void
19
+ * @since 8.0.0
20
+ */
21
+ public static function render($postdata)
22
+ {
23
+ ob_start();
24
+ ?>
25
+ <div class="advanced-settings-content inner-single-content" id="gen-advanced">
26
+ <?php self::render_meta_fields($postdata);?>
27
+ </div>
28
+ <?php
29
+ ob_end_flush();
30
+ }
31
+
32
+
33
+ /**
34
+ * Render Advanced Setting Meta Fields
35
+ *
36
+ * @return void
37
+ * @since 8.0.0
38
+ */
39
+ public static function render_meta_fields($postdata) {
40
+ ob_start();
41
+ ?>
42
+
43
+ <div class="content-wrapper">
44
+ <div class="left">
45
+ <?php WPVR_Meta_Field::render_advanced_settings_left_fields($postdata) ?>
46
+ </div>
47
+ <!-- end left -->
48
+
49
+ <div class="right">
50
+ <?php WPVR_Meta_Field::render_advanced_settings_right_fields($postdata) ?>
51
+ </div>
52
+ <!-- end right -->
53
+ </div>
54
+
55
+ <?php
56
+ ob_end_flush();
57
+ }
58
+ }
admin/classes/class-wpvr-ajax.php ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
4
+ /**
5
+ * The admin-specific Ajax files.
6
+ *
7
+ * @link http://rextheme.com/
8
+ * @since 8.0.0
9
+ *
10
+ * @package Wpvr
11
+ * @subpackage Wpvr/admin
12
+ */
13
+
14
+ class Wpvr_Ajax {
15
+
16
+ /**
17
+ * Instance of WPVR_Format class
18
+ *
19
+ * @var object
20
+ * @since 8.0.0
21
+ */
22
+ protected $format;
23
+
24
+
25
+ /**
26
+ * Instance of WPVR_StreetView class
27
+ *
28
+ * @var object
29
+ * @since 8.0.0
30
+ */
31
+ protected $streetview;
32
+
33
+
34
+ /**
35
+ * Instance of WPVR_Video class
36
+ *
37
+ * @var object
38
+ * @since 8.0.0
39
+ */
40
+ protected $video;
41
+
42
+
43
+ /**
44
+ * Instance of WPVR_Scene class
45
+ *
46
+ * @var object
47
+ * @since 8.0.0
48
+ */
49
+ protected $scene;
50
+
51
+
52
+ /**
53
+ * Instance of WPVR_Validator class
54
+ *
55
+ * @var object
56
+ * @since 8.0.0
57
+ */
58
+ protected $validator;
59
+
60
+
61
+ function __construct()
62
+ {
63
+ $this->format = new WPVR_Format();
64
+ $this->streetview = new WPVR_StreetView();
65
+ $this->video = new WPVR_Video();
66
+ $this->scene = new WPVR_Scene();
67
+ $this->validator = new WPVR_Validator();
68
+
69
+ add_action( 'wp_ajax_wpvr_save', array($this, 'wpvr_save_data') );
70
+ add_action( 'wp_ajax_wpvr_preview', array($this, 'wpvr_show_preview') );
71
+ add_action( 'wp_ajax_wpvrstreetview_preview', array($this, 'wpvrstreetview_preview') );
72
+ add_action( 'wp_ajax_wpvr_file_import', array($this, 'wpvr_file_import') );
73
+ add_action( 'wp_ajax_wpvr_role_management', array($this, 'wpvr_role_management') );
74
+ add_action( 'wp_ajax_wpvr_notice', array($this, 'wpvr_notice') );
75
+
76
+ }
77
+
78
+
79
+
80
+ /**
81
+ * Responsible for Tour Preview
82
+ *
83
+ * @return void
84
+ * @since 8.0.0
85
+ */
86
+ public function wpvr_show_preview()
87
+ {
88
+ $panoid = '';
89
+ $postid = sanitize_text_field($_POST['postid']);
90
+ $panoid = 'pano' . $postid;
91
+ if(isset($_POST['panovideo'])){
92
+ $panovideo = sanitize_text_field($_POST['panovideo']);
93
+ }
94
+
95
+ $post_type = get_post_type($postid);
96
+ if ($post_type != 'wpvr_item') {
97
+ die();
98
+ }
99
+
100
+ do_action( 'wpvr_pro_street_view_preview', $postid, $panoid );
101
+
102
+ if($panovideo == 'off') {
103
+ $this->scene->wpvr_scene_preview($panoid, $panovideo); // Preapre preview based on Scene data //
104
+ } else {
105
+ $this->video->wpvr_video_preview($panoid); // Prepare preview based on Video data //
106
+ }
107
+ }
108
+
109
+
110
+ /**
111
+ * Responsible for saving WPVR data
112
+ *
113
+ * @return void
114
+ * @since 8.0.0
115
+ */
116
+ public function wpvr_save_data()
117
+ {
118
+ $panoid = '';
119
+ $postid = sanitize_text_field($_POST['postid']);
120
+ $post_type = get_post_type($postid);
121
+ if ($post_type != 'wpvr_item') {
122
+ die();
123
+ }
124
+ $panoid = 'pano' . $postid;
125
+ do_action( 'wpvr_pro_update_street_view', $postid, $panoid );
126
+
127
+ if ($_POST['panovideo'] == "on") {
128
+ $this->video->wpvr_update_meta_box($postid, $panoid);
129
+ } else {
130
+ $this->scene->wpvr_update_meta_box($postid, $panoid);
131
+ }
132
+
133
+
134
+ }
135
+
136
+
137
+ /**
138
+ * Responsible for importing tour
139
+ *
140
+ * @return void
141
+ * @since 8.0.0
142
+ */
143
+ public function wpvr_file_import()
144
+ {
145
+ WPVR_Import::prepare_tour_import_feature();
146
+ }
147
+
148
+
149
+
150
+ /**
151
+ * WPVR Role Management
152
+ *
153
+ * @return void
154
+ * @since 8.0.0
155
+ */
156
+ function wpvr_role_management()
157
+ {
158
+ $editor = sanitize_text_field($_POST['editor']);
159
+ $author = sanitize_text_field($_POST['author']);
160
+ $fontawesome = sanitize_text_field($_POST['fontawesome']);
161
+ $mobile_media_resize = sanitize_text_field($_POST['mobile_media_resize']);
162
+ $high_res_image = sanitize_text_field($_POST['high_res_image']);
163
+ $dis_on_hover = sanitize_text_field($_POST['dis_on_hover']);
164
+ $wpvr_frontend_notice = sanitize_text_field($_POST['wpvr_frontend_notice']);
165
+ $wpvr_frontend_notice_area = sanitize_text_field($_POST['wpvr_frontend_notice_area']);
166
+ $wpvr_script_control = sanitize_text_field($_POST['wpvr_script_control']);
167
+ $wpvr_script_list = sanitize_text_field($_POST['wpvr_script_list']);
168
+
169
+ $wpvr_video_script_control = sanitize_text_field($_POST['wpvr_video_script_control']);
170
+ $wpvr_video_script_list = sanitize_text_field($_POST['wpvr_video_script_list']);
171
+
172
+ // $enable_woocommerce = sanitize_text_field($_POST['woocommerce']);
173
+
174
+ $wpvr_script_list = str_replace(' ', '', $wpvr_script_list);
175
+
176
+ update_option('wpvr_editor_active', $editor);
177
+ update_option('wpvr_author_active', $author);
178
+ update_option('wpvr_fontawesome_disable', $fontawesome);
179
+ update_option('mobile_media_resize', $mobile_media_resize);
180
+ update_option('high_res_image', $high_res_image);
181
+ update_option('dis_on_hover', $dis_on_hover);
182
+ update_option('wpvr_frontend_notice', $wpvr_frontend_notice);
183
+ update_option('wpvr_frontend_notice_area', $wpvr_frontend_notice_area);
184
+ update_option('wpvr_script_control', $wpvr_script_control);
185
+ update_option('wpvr_script_list', $wpvr_script_list);
186
+
187
+ update_option('wpvr_video_script_control', $wpvr_video_script_control);
188
+ update_option('wpvr_video_script_list', $wpvr_video_script_list);
189
+
190
+ // update_option('wpvr_enable_woocommerce', $enable_woocommerce);
191
+
192
+ $response = array(
193
+ 'status' => 'success',
194
+ 'message' => 'Successfully saved',
195
+ );
196
+ wp_send_json($response);
197
+ }
198
+
199
+
200
+ /**
201
+ * WPVR Notice
202
+ *
203
+ * @return void
204
+ * @since 8.0.0
205
+ */
206
+ function wpvr_notice()
207
+ {
208
+ update_option('wpvr_warning', '1');
209
+ }
210
+
211
+ }
admin/classes/class-wpvr-basic-setting.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing basic settings
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 1.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Basic_Setting {
14
+ function __construct()
15
+ {
16
+
17
+ }
18
+
19
+
20
+ /**
21
+ * Render Basic Setting Tab Content
22
+ * @param mixed $preview
23
+ * @param mixed $previewtext
24
+ * @param mixed $autoload
25
+ * @param mixed $control
26
+ * @param mixed $postdata
27
+ * @param mixed $autorotation
28
+ * @param mixed $autorotationinactivedelay
29
+ * @param mixed $autorotationstopdelay
30
+ *
31
+ * @return void
32
+ */
33
+ public function render_basic_setting($postdata)
34
+ {
35
+ ob_start();
36
+ ?>
37
+ <div class="basic-settings-content inner-single-content active" id="gen-basic">
38
+ <?php $this->render_basic_setting_content_wrapper($postdata) ;?>
39
+ </div>
40
+ <?php
41
+ ob_end_flush();
42
+ }
43
+
44
+
45
+ private function render_basic_setting_content_wrapper($postdata)
46
+ {
47
+ ob_start();
48
+ ?>
49
+ <div class="content-wrapper">
50
+ <div class="left">
51
+ <?php WPVR_Meta_Field::render_basic_settings_left_fields($postdata);?>
52
+ </div>
53
+
54
+ <div class="right">
55
+ <?php WPVR_Meta_Field::render_basic_setting_right_fields($postdata) ;?>
56
+
57
+ <div class="autorotationdata-wrapper">
58
+ <?php WPVR_Meta_Field::render_autorotation_data_wrapper_fields($postdata) ;?>
59
+ </div>
60
+ </div>
61
+
62
+ </div>
63
+ <?php
64
+ ob_end_flush();
65
+ }
66
+ }
admin/classes/class-wpvr-control-button.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing control button tab content
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Control_Button extends Singleton {
14
+
15
+ /**
16
+ * Render Advanced Control Tab Content
17
+ *
18
+ * @return void
19
+ * @since 8.0.0
20
+ */
21
+ public static function render($postdata)
22
+ {
23
+ ob_start();
24
+ ?>
25
+ <div class="control-settings-content inner-single-content" id="gen-control">
26
+ <?php self::render_meta_fields($postdata);?>
27
+ </div>
28
+ <?php
29
+ ob_end_flush();
30
+ }
31
+
32
+
33
+ /**
34
+ * Render Control Button Meta Fields
35
+ *
36
+ * @return void
37
+ * @since 8.0.0
38
+ */
39
+ public static function render_meta_fields($postdata) {
40
+ ob_start();
41
+ ?>
42
+
43
+ <div class="content-wrapper">
44
+ <div class="left">
45
+ <?php WPVR_Meta_Field::render_control_button_left_fields($postdata) ?>
46
+ </div>
47
+ <!-- end left -->
48
+
49
+ <div class="right">
50
+ <?php WPVR_Meta_Field::render_control_button_right_fields($postdata) ?>
51
+ </div>
52
+ <!-- end right -->
53
+ </div>
54
+
55
+ <?php
56
+ ob_end_flush();
57
+ }
58
+ }
admin/classes/class-wpvr-general.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing General tab content
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_General extends WPVR_Tour_setting {
14
+
15
+ /**
16
+ * Instance of WPVR_Advanced_control class
17
+ *
18
+ * @var object
19
+ * @since 8.0.0
20
+ */
21
+ private $advanced_control;
22
+
23
+ /**
24
+ * Instance of WPVR_Basic_Setting class
25
+ *
26
+ * @var object
27
+ * @since 8.0.0
28
+ */
29
+ private $basic_setting;
30
+
31
+ /**
32
+ * Instance of WPVR_Control_Button class
33
+ *
34
+ * @var object
35
+ * @since 8.0.0
36
+ */
37
+ private $control_button;
38
+
39
+ function __construct()
40
+ {
41
+ $this->advanced_control = WPVR_Advanced_Control::get_instance();
42
+
43
+ $this->control_button = WPVR_Control_Button::get_instance();
44
+
45
+ $this->basic_setting = new WPVR_Basic_Setting();
46
+
47
+ }
48
+
49
+ /**
50
+ * Render General Tab Content
51
+ * @param mixed $preview
52
+ * @param mixed $previewtext
53
+ * @param mixed $autoload
54
+ * @param mixed $control
55
+ * @param mixed $postdata
56
+ * @param mixed $autorotation
57
+ * @param mixed $autorotationinactivedelay
58
+ * @param mixed $autorotationstopdelay
59
+ *
60
+ * @return void
61
+ */
62
+ public function render_setting($postdata)
63
+ {
64
+ ob_start();
65
+ ?>
66
+
67
+ <!-- start inner tab -->
68
+ <div class="general-inner-tab">
69
+ <!-- start inner nav -->
70
+ <?php WPVR_Meta_Field::render_general_inner_navigation() ?>
71
+ <!-- end inner nav -->
72
+
73
+ <!-- start inner tab content -->
74
+ <div class="inner-nav-content">
75
+
76
+ <?php $this->basic_setting->render_basic_setting($postdata); ?>
77
+
78
+ <?php WPVR_Advanced_Control::render($postdata); ?>
79
+
80
+ <?php WPVR_Control_Button::render($postdata); ?>
81
+
82
+ </div>
83
+ <!-- end inner tab content -->
84
+
85
+ <!-- Embed Iframe -->
86
+ <?php if (apply_filters('is_wpvr_embed_addon_premium', false)) { $post = get_post(); $id = $post->ID;?>
87
+ <div class="wpvr-use-shortcode">
88
+ <h4 class="area-title">Using this Tour</h4>
89
+ <div class="wpvr-shortcode-wrapper">
90
+ <div class="wpvr-single-shortcode gutenberg">
91
+ <span class="shortcode-title">To Embed on External Page:</span>
92
+ <div class="field-wapper">
93
+ <span>Use the iframe below to share this tour on an external page.</span><br>
94
+ <span style="color:red;">Note: WooCommerce &amp; Fluent Forms hotspots will not be supported on embedded tours.</span>
95
+ <div class="wpvr-shortcode-field">
96
+ <p class="copycode">&lt;iframe src="<?= home_url() ?>/?embed_page=<?= $id ?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen width="100%" height="400">&lt;/iframe&gt;</p>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ <?php } ?>
103
+ <!-- End Embed Iframe -->
104
+ </div>
105
+ <!-- end inner tab -->
106
+
107
+ <?php
108
+ ob_end_flush();
109
+ }
110
+
111
+ }
admin/classes/class-wpvr-hotspot.php ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing Hotspot tab content on Setup meta box
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 1.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Hotspot {
14
+
15
+ function __construct()
16
+ {
17
+ /**
18
+ * TODO hotspot setting class initiate
19
+ */
20
+ }
21
+
22
+ /**
23
+ * Render hotspot for default repeater item
24
+ *
25
+ * @param $s value of scene html id
26
+ * @param $h value of hotspot html id
27
+ *
28
+ * @return void
29
+ * @since 8.0.0
30
+ */
31
+ public function render_hotspot($s, $h)
32
+ {
33
+ ob_start();
34
+ ?>
35
+
36
+ <nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">
37
+ <?php $this->render_hotspot_nav($s, $h); ?>
38
+ </nav>
39
+
40
+ <div data-repeater-list="hotspot-list" class="rex-pano-tab-content">
41
+ <div data-repeater-item class="single-hotspot rex-pano-tab active clearfix" id="scene-<?php echo $s; ?>-hotspot-<?php echo $h; ?>">
42
+ <?php $this->render_hotspot_repeater_item(); ?>
43
+ </div>
44
+ </div>
45
+
46
+ <?php
47
+ ob_end_flush();
48
+ }
49
+
50
+ /**
51
+ * Render hotspot which has panaromic data
52
+ *
53
+ * @param array $pano_hotspots value of hotspot list
54
+ * @param $s value of scene html id
55
+ *
56
+ * @return void
57
+ * @since 8.0.0
58
+ */
59
+ public function render_hotspot_with_panodata($pano_hotspots, $s)
60
+ {
61
+ ob_start();
62
+ ?>
63
+ <nav class="rex-pano-tab-nav rex-pano-nav-menu hotspot-nav">
64
+ <?php $this->render_hotspot_nav_with_panodata($pano_hotspots, $s); ?>
65
+ </nav>
66
+
67
+ <div data-repeater-list="hotspot-list" class="rex-pano-tab-content">
68
+ <?php $this->render_hotspot_repeater_item_with_panodata($pano_hotspots, $s); ?>
69
+ </div>
70
+ <?php
71
+ ob_end_flush();
72
+ }
73
+
74
+
75
+ /**
76
+ * Render hotspot nav for default scene
77
+ *
78
+ * @param int $s
79
+ * @param int $h
80
+ *
81
+ * @return void
82
+ * @since 8.0.0
83
+ */
84
+ private function render_hotspot_nav($s, $h)
85
+ {
86
+ ob_start();
87
+ ?>
88
+ <ul>
89
+ <li class="active"><span data-index="1" data-href="#scene-<?php echo $s; ?>-hotspot-<?php echo $h; ?>"><i class="far fa-dot-circle"></i></span></li>
90
+ <li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i> </span></li>
91
+ </ul>
92
+ <?php
93
+ ob_end_flush();
94
+ }
95
+
96
+
97
+ /**
98
+ * Render hotspot repeater item for default scene
99
+ *
100
+ * @return void
101
+ * @since 8.0.0
102
+ */
103
+ private function render_hotspot_repeater_item()
104
+ {
105
+ $postdata = WPVR_Meta_Field::get_primary_meta_fields();
106
+ $pano_hotspot = $postdata['panodata']['scene-list'][0]['hotspot-list'][0];
107
+ ob_start();
108
+ ?>
109
+ <h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>
110
+
111
+ <div class="wrapper">
112
+ <?php WPVR_Meta_Field::render_hotspot_setting_left_fields($pano_hotspot); ?>
113
+ </div>
114
+
115
+ <div class="hotspot-type hotspot-setting">
116
+ <?php WPVR_Meta_Field::render_hotspot_setting_right_fields(); ?>
117
+ </div>
118
+ <!-- Hotspot type End -->
119
+ <button data-repeater-delete title="Delete Hotspot" type="button" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>
120
+ <?php
121
+ ob_end_flush();
122
+ }
123
+
124
+
125
+ /**
126
+ * Render hotspot nav if scene has hotspot data
127
+ *
128
+ * @param array $pano_hotspots
129
+ * @param int $s
130
+ *
131
+ * @return void
132
+ * @since 8.0.0
133
+ */
134
+ private function render_hotspot_nav_with_panodata($pano_hotspots, $s)
135
+ {
136
+ ob_start();
137
+ ?>
138
+ <ul>
139
+ <?php $j = 1;
140
+
141
+ $firstvaluehotspot = reset($pano_hotspots);
142
+ foreach ($pano_hotspots as $pano_hotspot) { ?>
143
+ <li class="<?php if($pano_hotspot['hotspot-title'] == $firstvaluehotspot['hotspot-title']) { echo 'active'; } ?>"><span data-index="<?php echo $j;?>" data-href="#scene-<?php echo $s;?>-hotspot-<?php echo $j;?>"><i class="far fa-dot-circle"></i></span></li>
144
+ <?php $j++; } ?>
145
+ <li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>
146
+ </ul>
147
+ <?php
148
+ ob_end_flush();
149
+ }
150
+
151
+
152
+ /**
153
+ * Render hotspot repeater item if scene has panodata
154
+ *
155
+ * @param array $pano_hotspots
156
+ * @param int $s
157
+ *
158
+ * @return void
159
+ * @since 8.0.0
160
+ */
161
+ private function render_hotspot_repeater_item_with_panodata($pano_hotspots, $s)
162
+ {
163
+ $h = 1;
164
+ $firstvaluehotspotset = reset($pano_hotspots);
165
+ $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
166
+ foreach ($pano_hotspots as $pano_hotspot) { ob_start(); ?>
167
+ <div data-repeater-item class="single-hotspot rex-pano-tab clearfix <?php if($pano_hotspot['hotspot-title'] == $firstvaluehotspotset['hotspot-title']) { echo 'active'; } ?>" id="scene-<?php echo $s;?>-hotspot-<?php echo $h;?>">
168
+
169
+ <h6 class="title"><i class="fa fa-cog"></i> Hotspot Setting </h6>
170
+
171
+ <div class="wrapper">
172
+ <?php WPVR_Meta_Field::render_hotspot_setting_left_fields($pano_hotspot); ?>
173
+ </div>
174
+
175
+ <!-- Hotspot type -->
176
+
177
+ <?php if ($pano_hotspot['hotspot-type'] == "info") { ?>
178
+ <div class="hotspot-type hotspot-setting">
179
+ <?php WPVR_Meta_Field::render_hotspot_setting_info_fields($pano_hotspot); ?>
180
+ </div>
181
+ <?php }elseif($pano_hotspot['hotspot-type'] == "fluent_form" && $is_wpvr_premium == 1){ ?>
182
+ <div class="hotspot-type hotspot-setting">
183
+ <?php WPVR_Meta_Field::render_hotspot_setting_fluent_form_fields($pano_hotspot); ?>
184
+ </div>
185
+ <?php }elseif($pano_hotspot['hotspot-type'] == "wc_product" && $is_wpvr_premium == 1){ ?>
186
+ <div class="hotspot-type hotspot-setting">
187
+ <?php WPVR_Meta_Field::render_hotspot_setting_wc_product_fields($pano_hotspot); ?>
188
+ </div>
189
+ <?php } else { ?>
190
+ <div class="hotspot-type hotspot-setting">
191
+ <?php WPVR_Meta_Field::render_hotspot_setting_scene_fields($pano_hotspot); ?>
192
+ </div>
193
+ <?php } ?>
194
+ <!-- Hotspot type End -->
195
+ <button data-repeater-delete type="button" title="Delete Hotspot" class="delete-hotspot"><i class="far fa-trash-alt"></i></button>
196
+ </div>
197
+ <?php ob_end_flush(); $h++; }
198
+ }
199
+ }
admin/classes/class-wpvr-meta-field.php ADDED
@@ -0,0 +1,2563 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing wpvr meta fields
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+
14
+ class WPVR_Meta_Field {
15
+
16
+
17
+ public function __construct()
18
+ {
19
+
20
+ }
21
+
22
+
23
+ /**
24
+ * Initialize primary meta fields for a Tour
25
+ *
26
+ * @return array
27
+ * @since 8.0.0
28
+ */
29
+ public static function get_primary_meta_fields()
30
+ {
31
+ $meta_fields = array(
32
+ 'panoid' => null,
33
+ 'autoLoad' => 1,
34
+ 'hfov' => null,
35
+ 'maxHfov' => null,
36
+ 'minHfov' => null,
37
+ 'showControls' => 1,
38
+ 'customcontrol' => null,
39
+ 'preview' => null,
40
+ 'defaultscene' => null,
41
+ 'scenefadeduration' => null,
42
+ 'panodata' => array(
43
+ 'scene-list' => array(
44
+ array(
45
+ 'scene-id' => null,
46
+ 'scene-type' => 'equirectangular',
47
+ 'hotspot-list' => array(
48
+ array(
49
+ 'hotspot-title' => null,
50
+ 'hotspot-pitch' => null,
51
+ 'hotspot-yaw' => null,
52
+ 'hotspot-customclass' => null,
53
+ 'hotspot-scene' => null,
54
+ 'hotspot-url' => null,
55
+ 'hotspot-content' => null,
56
+ 'hotspot-hover' => null,
57
+ 'hotspot-type' => 'info',
58
+ 'hotspot-scene-list' => 'none',
59
+ 'wpvr_url_open' => array(
60
+ 0 => 'off'
61
+ )
62
+ ),
63
+ ),
64
+ 'dscene' => 'off',
65
+ 'scene-attachment-url' => null,
66
+ ),
67
+ ),
68
+ ),
69
+ 'previewtext' => 'Click To Load Panorama',
70
+ );
71
+ return apply_filters( 'extend_primary_meta_fields', $meta_fields );
72
+ }
73
+
74
+
75
+ /**
76
+ * Initialise Tab Navigation Items
77
+ * @return array
78
+ * @since 8.0.0
79
+ */
80
+ public static function get_navigation_fields() {
81
+ $fields = array(
82
+ array(
83
+ 'class' => 'scene',
84
+ 'screen' => 'scene',
85
+ 'href' => 'scenes',
86
+ 'r_src' => 'admin/icon/scenes-regular.png',
87
+ 'h_src' => 'admin/icon/scenes-hover.png',
88
+ 'title' => 'Scenes',
89
+ 'active' => 'active'
90
+ ),
91
+ array(
92
+ 'class' => 'hotspot',
93
+ 'screen' => 'hotspot',
94
+ 'href' => 'scenes',
95
+ 'r_src' => 'admin/icon/hotspot-regular.png',
96
+ 'h_src' => 'admin/icon/hotspot-hover.png',
97
+ 'title' => 'Hotspot',
98
+ 'active' => ''
99
+ ),
100
+ array(
101
+ 'class' => 'general',
102
+ 'screen' => 'general',
103
+ 'href' => 'general',
104
+ 'r_src' => 'admin/icon/general-regular.png',
105
+ 'h_src' => 'admin/icon/general-hover.png',
106
+ 'title' => 'General',
107
+ 'active' => ''
108
+ ),
109
+ array(
110
+ 'class' => 'videos',
111
+ 'screen' => 'video',
112
+ 'href' => 'video',
113
+ 'r_src' => 'admin/icon/video-regular.png',
114
+ 'h_src' => 'admin/icon/video-hover.png',
115
+ 'title' => 'Video',
116
+ 'active' => ''
117
+ ),
118
+ );
119
+ return apply_filters( 'extend_rex_pano_nav_menu', $fields );
120
+ }
121
+
122
+
123
+ /**
124
+ * Initialise Basic Setting Left Field
125
+ * @param mixed $preview
126
+ * @param mixed $previewtext
127
+ * @param mixed $autoload
128
+ * @param mixed $control
129
+ *
130
+ * @return array
131
+ * @since 8.0.0
132
+ */
133
+ public static function get_basic_setting_left_fields($postdata)
134
+ {
135
+ return array(
136
+ 'preview-attachment-url' => array(
137
+ 'class' => 'single-settings preview-setting',
138
+ 'type' => 'preview_image',
139
+ 'value' => $postdata['preview'],
140
+ 'title' => 'Set a Tour Preview Image'
141
+ ),
142
+ 'previewtext' => array(
143
+ 'class' => 'single-settings preview-img-message',
144
+ 'type' => 'preview_image_msg',
145
+ 'value' => $postdata['previewtext'],
146
+ 'title' => 'Preview Image Message'
147
+ ),
148
+ 'autoload' => array(
149
+ 'class' => 'single-settings autoload',
150
+ 'type' => 'basic_setting_checkbox',
151
+ 'title' => 'Tour Autoload',
152
+ 'id' => 'wpvr_autoload',
153
+ 'have_tooltip' => true,
154
+ 'tooltip_text' => 'Tour Preview Image will not appear if this is turned on.',
155
+ 'checked' => $postdata['autoLoad'],
156
+ ),
157
+ 'controls' => array(
158
+ 'class' => 'single-settings controls',
159
+ 'type' => 'basic_setting_checkbox',
160
+ 'title' => 'Basic Control Buttons',
161
+ 'id' => 'wpvr_controls',
162
+ 'have_tooltip' => true,
163
+ 'tooltip_text' => 'This option will display Zoom In, Zoom Out and Full Screen buttons on the tour.',
164
+ 'checked' => $postdata['showControls'],
165
+ ),
166
+ );
167
+ }
168
+
169
+
170
+ /**
171
+ * Initialize fields render method
172
+ * @param mixed $preview
173
+ * @param mixed $previewtext
174
+ * @param mixed $autoload
175
+ * @param mixed $control
176
+ *
177
+ * @return void
178
+ * @since 8.0.0
179
+ */
180
+ public static function render_basic_settings_left_fields($postdata)
181
+ {
182
+ $fields = self::get_basic_setting_left_fields($postdata);
183
+
184
+ foreach($fields as $name => $val) {
185
+ self::{ 'render_' . $val['type'] }( $name, $val );
186
+ }
187
+ }
188
+
189
+
190
+ /**
191
+ * Initilize Basic Setting Right Fields
192
+ * @param mixed $scene_fade_duration
193
+ * @param mixed $postdata
194
+ *
195
+ * @return array
196
+ * @since 8.0.0
197
+ */
198
+ public static function get_basic_setting_right_fields($postdata)
199
+ {
200
+ if(!isset($postdata['autoRotate'])){
201
+ $rotation = 0;
202
+ }else{
203
+ $rotation = 1;
204
+ }
205
+
206
+ return array(
207
+ 'scene-fade-duration' => array(
208
+ 'class' => 'single-settings scene-fade-duration',
209
+ 'title' => 'Scene Fade Duration',
210
+ 'type' => 'number_field',
211
+ 'value' => $postdata['scenefadeduration'],
212
+ 'placeholder' => null,
213
+ 'have_tooltip' => true,
214
+ 'tooltip_text' => 'This will set the scene fade effect and execution time.',
215
+ ),
216
+ 'autorotation' => array(
217
+ 'class' => 'single-settings autoload',
218
+ 'title' => 'Auto Rotation',
219
+ 'id' => 'wpvr_autorotation',
220
+ 'type' => 'basic_setting_checkbox',
221
+ 'checked' => $rotation,
222
+ 'have_tooltip' => false,
223
+ 'tooltip_text' => '',
224
+ ),
225
+ );
226
+ }
227
+
228
+
229
+ /**
230
+ * Render Basic Setting Right Fields
231
+ * @param mixed $scene_fade_duration
232
+ * @param mixed $postdata
233
+ *
234
+ * @return void
235
+ * @since 8.0.0
236
+ */
237
+ public static function render_basic_setting_right_fields($postdata)
238
+ {
239
+ $fields = self::get_basic_setting_right_fields($postdata);
240
+
241
+ foreach($fields as $name => $val) {
242
+ self::{ 'render_' . $val['type'] }( $name, $val );
243
+ }
244
+ }
245
+
246
+
247
+ /**
248
+ * Initialize Autorotation Data Wrapper Fields
249
+ * @param mixed $autorotation
250
+ * @param mixed $autorotationinactivedelay
251
+ * @param mixed $autorotationstopdelay
252
+ *
253
+ * @return array
254
+ * @since 8.0.0
255
+ */
256
+ public static function get_autorotation_data_wrapper_fields($postdata)
257
+ {
258
+ return array(
259
+ 'auto-rotation' => array(
260
+ 'class' => 'single-settings autorotationdata',
261
+ 'title' => 'Rotation Speed and Direction',
262
+ 'type' => 'number_field',
263
+ 'value' => isset($postdata['autoRotate']) ? $postdata['autoRotate'] : -5,
264
+ 'placeholder' => -5,
265
+ 'have_tooltip' => true,
266
+ 'tooltip_text' => 'Set a value to determine the speed of rotation. The higher the number, the faster it will rotate. Positive values will make it rotate clockwise and negative values will make it rotate anti clockwise',
267
+ ),
268
+ 'auto-rotation-inactive-delay' => array(
269
+ 'class' => 'single-settings autorotationdata',
270
+ 'title' => 'Resume Auto-rotation after',
271
+ 'type' => 'number_field',
272
+ 'value' => isset($postdata['autoRotateInactivityDelay']) ? $postdata['autoRotateInactivityDelay'] : null,
273
+ 'placeholder' => 2000,
274
+ 'have_tooltip' => true,
275
+ 'tooltip_text' => 'When someone clicks on the tour, auto-rotation stops. Here, set a time after which auto rotation will start again. Assign in milliseconds, where 1000 milliseconds = 1 second.',
276
+ ),
277
+ 'auto-rotation-stop-delay' => array(
278
+ 'class' => 'single-settings autorotationdata',
279
+ 'title' => 'Stop Auto-rotation after',
280
+ 'type' => 'number_field',
281
+ 'value' => isset($postdata['autoRotateStopDelay']) ? $postdata['autoRotateStopDelay'] : null,
282
+ 'placeholder' => 2000,
283
+ 'have_tooltip' => true,
284
+ 'tooltip_text' => 'Set a time after which auto rotation will stop. Assign in milliseconds, where 1000 milliseconds = 1 second.',
285
+ ),
286
+ );
287
+ }
288
+
289
+
290
+ /**
291
+ * Render Autorotation Data Wrapper Fields
292
+ * @param mixed $autorotation
293
+ * @param mixed $autorotationinactivedelay
294
+ * @param mixed $autorotationstopdelay
295
+ *
296
+ * @return void
297
+ * @since 8.0.0
298
+ */
299
+ public static function render_autorotation_data_wrapper_fields($postdata)
300
+ {
301
+ $fields = self::get_autorotation_data_wrapper_fields($postdata);
302
+
303
+ foreach($fields as $name => $val) {
304
+ self::{ 'render_' . $val['type'] }( $name, $val );
305
+ }
306
+ }
307
+
308
+
309
+ /**
310
+ * Render Tab Navigation
311
+ * @return void
312
+ * @since 8.0.0
313
+ */
314
+ public static function render_pano_tab_nav($postdata) {
315
+ $fields = self::get_navigation_fields();
316
+ ob_start();
317
+ ?>
318
+
319
+ <nav class="rex-pano-tab-nav rex-pano-nav-menu main-nav" id="wpvr-main-nav">
320
+ <ul>
321
+ <li class="logo"><img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/logo.png'; ?>" alt="logo" /></li>
322
+
323
+ <?php foreach($fields as $field) { ?>
324
+
325
+ <li class="<?= $field['class']; ?> <?= $field['active']; ?>" data-screen="<?= $field['screen']; ?>">
326
+ <span data-href="#<?= $field['href']; ?>">
327
+ <img src="<?= WPVR_PLUGIN_DIR_URL . $field['r_src']; ?>" alt="icon" class="regular" />
328
+ <img src="<?= WPVR_PLUGIN_DIR_URL . $field['h_src']; ?>" alt="icon" class="hover" />
329
+ <?= __($field['title'], 'wpvr'); ?> </span>
330
+ </li>
331
+
332
+ <?php }
333
+
334
+ //== Render Export Tab for Tour edit ==//
335
+ if(is_plugin_active( 'wpvr-pro/wpvr-pro.php' )) { if (isset($postdata['panoid'])) { ?>
336
+ <li class="export" data-screen="export">
337
+ <span data-href="#import">
338
+ <img src=" <?= WPVR_PLUGIN_DIR_URL . 'admin/icon/export-regular.png'; ?> " alt="icon" class="regular" />
339
+ <img src=" <?= WPVR_PLUGIN_DIR_URL . 'admin/icon/export-hover.png'; ?> " alt="icon" class="hover" />
340
+ <?= __('Export', 'wpvr-pro'); ?></span>
341
+ </li>
342
+ <?php } } ?>
343
+
344
+ </ul>
345
+ </nav>
346
+
347
+ <?php
348
+ ob_end_flush();
349
+ }
350
+
351
+
352
+ /**
353
+ * Initialise Advanced Settings Left Fields
354
+ * @return array
355
+ * @since 8.0.0
356
+ */
357
+ public static function get_advanced_settings_left_fields($postdata)
358
+ {
359
+ $fields = array(
360
+ 'diskeyboard' => array(
361
+ 'class' => 'single-settings compass',
362
+ 'title' => 'Keyboard Movement Control',
363
+ 'id' => 'wpvr_diskeyboard',
364
+ 'have_tooltip' => false,
365
+ 'tooltip_text' => '',
366
+ 'type' => 'checkbox'
367
+ ),
368
+ 'keyboardzoom' => array(
369
+ 'class' => 'single-settings',
370
+ 'title' => 'Keyboard Zoom Control',
371
+ 'id' => 'wpvr_keyboardzoom',
372
+ 'have_tooltip' => false,
373
+ 'tooltip_text' => '',
374
+ 'type' => 'checkbox'
375
+ ),
376
+ 'draggable' => array(
377
+ 'class' => 'single-settings',
378
+ 'title' => 'Mouse Drag Control',
379
+ 'id' => 'wpvr_draggable',
380
+ 'have_tooltip' => false,
381
+ 'tooltip_text' => '',
382
+ 'type' => 'checkbox'
383
+ ),
384
+ 'mouseZoom' => array(
385
+ 'class' => 'single-settings',
386
+ 'title' => 'Mouse Zoom Control',
387
+ 'id' => 'wpvr_mouseZoom',
388
+ 'have_tooltip' => false,
389
+ 'tooltip_text' => '',
390
+ 'type' => 'checkbox'
391
+ ),
392
+ 'gyro' => array(
393
+ 'class' => 'single-settings gyro',
394
+ 'title' => 'Gyroscope Control',
395
+ 'id' => 'wpvr_gyro',
396
+ 'have_tooltip' => false,
397
+ 'tooltip_text' => '',
398
+ 'type' => 'checkbox'
399
+ ),
400
+ 'deviceorientationcontrol' => array(
401
+ 'class' => 'single-settings orientation',
402
+ 'title' => 'Auto Gyroscope Support',
403
+ 'id' => 'wpvr_deviceorientationcontrol',
404
+ 'have_tooltip' => true,
405
+ 'tooltip_text' => 'If set to true, device orientation control will be used when the panorama is loaded, if the device supports it. If false, device orientation control needs to be activated by pressing a button. Defaults to false. Will work if gyroscope is enabled',
406
+ 'type' => 'checkbox'
407
+ ),
408
+ 'compass' => array(
409
+ 'class' => 'single-settings compass',
410
+ 'title' => 'Compass',
411
+ 'id' => 'wpvr_compass',
412
+ 'have_tooltip' => false,
413
+ 'tooltip_text' => '',
414
+ 'type' => 'checkbox'
415
+ ),
416
+ );
417
+ return apply_filters( 'modify_advanced_control_left_fields', $fields, $postdata );
418
+ }
419
+
420
+
421
+ /**
422
+ * Initialise Advanced Settings Right Fields
423
+ * @return array
424
+ * @since 8.0.0
425
+ */
426
+ public static function get_advanced_settings_right_fields($postdata)
427
+ {
428
+ $fields = array(
429
+ 'vrgallery' => array(
430
+ 'class' => 'single-settings gallery',
431
+ 'title' => 'Scene Gallery',
432
+ 'id' => 'wpvr_vrgallery',
433
+ 'type' => 'checkbox',
434
+ 'have_tooltip' => true,
435
+ 'tooltip_text' => 'Turning it On will display a gallery with all the scenes on your tour. By double clicking on a scene thumbnail on the gallery, you can move to that specific scene. The gallery will only show up on the front end and not on the preview.'
436
+ ),
437
+ 'vrgallery_title' => array(
438
+ 'class' => 'single-settings',
439
+ 'title' => 'Scene Titles on Gallery',
440
+ 'id' => 'wpvr_vrgallery_title',
441
+ 'type' => 'checkbox',
442
+ 'have_tooltip' => true,
443
+ 'tooltip_text' => 'Turning it on will display scene titles on each scene thumbnail inside the Scene Gallery. The Scene IDs will be used as the Scene Title.'
444
+ ),
445
+ 'bg_music' => array(
446
+ 'class' => 'single-settings',
447
+ 'title' => 'Tour Background Music',
448
+ 'id' => 'wpvr_bg_music',
449
+ 'type' => 'checkbox',
450
+ 'have_tooltip' => false,
451
+ 'tooltip_text' => ''
452
+ ),
453
+ 'cpLogoSwitch' => array(
454
+ 'class' => 'single-settings company-info',
455
+ 'title' => 'Add Company Information',
456
+ 'id' => 'wpvr_cpLogoSwitch',
457
+ 'type' => 'checkbox',
458
+ 'have_tooltip' => false,
459
+ 'tooltip_text' => ''
460
+ )
461
+ );
462
+ return apply_filters( 'modify_advanced_control_right_fields', $fields, $postdata );
463
+ }
464
+
465
+
466
+ /**
467
+ * Initialise Control Button Left Fields
468
+ * @return array
469
+ * @since 8.0.0
470
+ */
471
+ public static function get_control_button_left_fields($postdata) {
472
+ $fields = array(
473
+ 'panupControl' => array(
474
+ 'title' => 'Move Up',
475
+ 'icon' => 'move-up.jpg',
476
+ 'id' => 'wpvr_panupControl',
477
+ 'type' => 'checkbox'
478
+ ),
479
+ 'panDownControl' => array(
480
+ 'title' => 'Move Down',
481
+ 'icon' => 'move-down.jpg',
482
+ 'id' => 'wpvr_panDownControl',
483
+ 'type' => 'checkbox'
484
+ ),
485
+ 'panLeftControl' => array(
486
+ 'title' => 'Move Left',
487
+ 'icon' => 'move-left.jpg',
488
+ 'id' => 'wpvr_panLeftControl',
489
+ 'type' => 'checkbox'
490
+ ),
491
+ 'panRightControl' => array(
492
+ 'title' => 'Move Right',
493
+ 'icon' => 'move-right.jpg',
494
+ 'id' => 'wpvr_panRightControl',
495
+ 'type' => 'checkbox'
496
+ ),
497
+ 'panZoomInControl' => array(
498
+ 'title' => 'Zoom In',
499
+ 'icon' => 'zoom-in.jpg',
500
+ 'id' => 'wpvr_panZoomInControl',
501
+ 'type' => 'checkbox'
502
+ ),
503
+ );
504
+ return apply_filters( 'modify_control_button_left_fields', $fields, $postdata );
505
+ }
506
+
507
+
508
+ /**
509
+ * Initialise Control Button Left Fields
510
+ * @return array
511
+ * @since 8.0.0
512
+ */
513
+ public static function get_control_button_right_fields($postdata)
514
+ {
515
+ $fields = array(
516
+ 'panZoomOutControl' => array(
517
+ 'title' => 'Zoom Out',
518
+ 'icon' => 'zoom-out.jpg',
519
+ 'id' => 'wpvr_panZoomOutControl',
520
+ 'type' => 'checkbox'
521
+ ),
522
+ 'panFullscreenControl' => array(
523
+ 'title' => 'Full Screen',
524
+ 'icon' => 'full-screen.jpg',
525
+ 'id' => 'wpvr_panFullscreenControl',
526
+ 'type' => 'checkbox'
527
+ ),
528
+ 'gyroscope' => array(
529
+ 'title' => 'Gyroscope',
530
+ 'icon' => 'gryscop.jpg',
531
+ 'id' => 'wpvr_gyroscope',
532
+ 'type' => 'checkbox'
533
+ ),
534
+ 'backToHome' => array(
535
+ 'title' => 'Home',
536
+ 'icon' => 'home.jpg',
537
+ 'id' => 'wpvr_backToHome',
538
+ 'type' => 'checkbox'
539
+ )
540
+ );
541
+ return apply_filters( 'modify_control_button_right_fields', $fields, $postdata );
542
+ }
543
+
544
+
545
+ /**
546
+ * Initialize Scene setting left fields
547
+ * Panodata is empty
548
+ * @return array
549
+ * @since 8.0.0
550
+ */
551
+ public static function get_scene_left_fields_empty_panodata()
552
+ {
553
+ $fields = array(
554
+ 'dscene' => array(
555
+ 'class' => 'single-settings dscene',
556
+ 'title' => 'Set as Default',
557
+ 'type' => 'select',
558
+ 'select_class' => 'dscen',
559
+ 'selected' => 'off'
560
+ ),
561
+ 'scene-id' => array(
562
+ 'label_for' => 'scene-id',
563
+ 'title' => 'Scene ID',
564
+ 'input_class' => 'sceneid',
565
+ 'type' => 'text',
566
+ 'value' => '',
567
+ 'disabled' => '',
568
+ ),
569
+ 'scene-type' => array(
570
+ 'label_for' => 'scene-type',
571
+ 'title' => 'Scene Type',
572
+ 'input_class' => '',
573
+ 'type' => 'text',
574
+ 'value' => 'equirectangular',
575
+ 'disabled' => 'disabled',
576
+ ),
577
+ 'scene-attachment-url' => array(
578
+ 'title' => 'Scene Upload',
579
+ 'type' => 'upload',
580
+ 'value' => '',
581
+ 'display' => 'none'
582
+ )
583
+ );
584
+
585
+ return apply_filters( 'modify_scene_default_left_fields', $fields );
586
+ }
587
+
588
+
589
+ /**
590
+ * Initilize Scene Settings left Fields
591
+ * Panodata is not empty
592
+ * @param mixed $dscene
593
+ * @param mixed $scene_id
594
+ * @param mixed $scene_photo
595
+ *
596
+ * @return array
597
+ * @since 8.0.0
598
+ */
599
+ public static function get_scene_left_fields_with_panodata($pano_scene)
600
+ {
601
+ $fields = array(
602
+ 'dscene' => array(
603
+ 'class' => 'single-settings dscene',
604
+ 'title' => 'Set as Default',
605
+ 'type' => 'select',
606
+ 'select_class' => 'dscen',
607
+ 'selected' => $pano_scene['dscene']
608
+ ),
609
+ 'scene-id' => array(
610
+ 'label_for' => 'scene-id',
611
+ 'title' => 'Scene ID',
612
+ 'input_class' => 'sceneid',
613
+ 'type' => 'text',
614
+ 'value' => $pano_scene['scene-id'],
615
+ 'disabled' => '',
616
+ ),
617
+ 'scene-type' => array(
618
+ 'label_for' => 'scene-type',
619
+ 'title' => 'Scene Type',
620
+ 'input_class' => '',
621
+ 'type' => 'text',
622
+ 'value' => 'equirectangular',
623
+ 'disabled' => 'disabled',
624
+ ),
625
+ 'scene-attachment-url' => array(
626
+ 'title' => 'Scene Upload',
627
+ 'type' => 'upload',
628
+ 'value' => $pano_scene['scene-attachment-url'],
629
+ 'display' => 'block'
630
+ )
631
+ );
632
+
633
+ return apply_filters( 'modify_scene_left_fields', $fields, $pano_scene );
634
+ }
635
+
636
+
637
+ /**
638
+ * Initialize Hotspot Settings Left Fields
639
+ * @return array
640
+ *
641
+ * @since 8.0.0
642
+ */
643
+ public static function get_hotspot_left_fields($pano_hotspot)
644
+ {
645
+ $fields = array(
646
+ 'hotspot-title' => array(
647
+ 'title' => 'Hotspot ID',
648
+ 'value' => $pano_hotspot['hotspot-title'],
649
+ 'type' => 'text',
650
+ 'input_class' => '',
651
+ 'input_id' => 'hotspot-title'
652
+ ),
653
+ 'hotspot-pitch' => array(
654
+ 'title' => 'Pitch',
655
+ 'value' => $pano_hotspot['hotspot-pitch'],
656
+ 'type' => 'text',
657
+ 'input_class' => 'hotspot-pitch',
658
+ 'input_id' => ''
659
+ ),
660
+ 'hotspot-yaw' => array(
661
+ 'title' => 'Yaw',
662
+ 'value' => $pano_hotspot['hotspot-yaw'],
663
+ 'type' => 'text',
664
+ 'input_class' => 'hotspot-yaw',
665
+ 'input_id' => ''
666
+ ),
667
+ 'hotspot-customclass' => array(
668
+ 'title' => 'Hotspot Custom Icon Class',
669
+ 'value' => $pano_hotspot['hotspot-customclass'],
670
+ 'type' => 'text',
671
+ 'input_class' => '',
672
+ 'input_id' => 'hotspot-customclass'
673
+ ),
674
+ );
675
+ return apply_filters( 'modify_hotspot_left_fields', $fields, $pano_hotspot );
676
+ }
677
+
678
+
679
+ /**
680
+ * Initialize Hotspot Setting Right Fields
681
+ * @return array
682
+ *
683
+ * @since 8.0.0
684
+ */
685
+ public static function get_hotspot_right_fields()
686
+ {
687
+ $fields = array(
688
+ 'hotspot-type' => array(
689
+ 'title' => 'Hotspot-Type',
690
+ 'type' => 'info_type_select',
691
+ ),
692
+ 'hotspot-url' => array(
693
+ 'title' => 'URL',
694
+ 'type' => 'info_url',
695
+ 'value' => '',
696
+ 'display' => 'block',
697
+ ),
698
+ 'wpvr_url_open' => array(
699
+ 'title' => 'Open in same tab',
700
+ 'type' => 'same_tab_checkbox',
701
+ 'value' => 'off',
702
+ 'display' => 'flex'
703
+ ),
704
+ 'hotspot-content' => array(
705
+ 'class' => 'hotspot-content',
706
+ 'title' => 'On Click Content',
707
+ 'type' => 'textarea',
708
+ ),
709
+ 'hotspot-hover' => array(
710
+ 'class' => 'hotspot-hover',
711
+ 'title' => 'On Hover Content',
712
+ 'type' => 'textarea'
713
+ ),
714
+ 'hotspot-scene-list' => array(
715
+ 'title' => 'Select Target Scene from List',
716
+ 'type' => 'scene_select',
717
+ ),
718
+ 'hotspot-scene' => array(
719
+ 'title' => 'Target Scene ID',
720
+ 'display' => 'none',
721
+ 'input_class' => 'hotspotsceneinfodata',
722
+ 'type' => 'disabled_text',
723
+ 'value' => ''
724
+ )
725
+ );
726
+ return apply_filters( 'modify_hotspot_right_fields', $fields );
727
+ }
728
+
729
+
730
+ /**
731
+ * Initialize Hotspot Setting Info Fields
732
+ *
733
+ * @param mixed $hotspot_type
734
+ * @param mixed $hotspot_url
735
+ * @param mixed $hotspot_content
736
+ * @param mixed $hotspot_hover
737
+ *
738
+ * @return array
739
+ * @since 8.0.0
740
+ */
741
+ public static function get_hotspot_setting_info_fields($pano_hotspot)
742
+ {
743
+ $fields = array(
744
+ 'hotspot-type' => array(
745
+ 'title' => 'Hotspot-Type',
746
+ 'type' => 'info_type_select',
747
+ ),
748
+ 'hotspot-url' => array(
749
+ 'title' => 'URL',
750
+ 'type' => 'info_url',
751
+ 'value' => $pano_hotspot['hotspot-url'],
752
+ 'display' => 'block',
753
+ ),
754
+ 'wpvr_url_open' => array(
755
+ 'title' => 'Open in same tab',
756
+ 'type' => 'same_tab_checkbox',
757
+ 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off',
758
+ 'display' => 'flex',
759
+ ),
760
+ 'hotspot-content' => array(
761
+ 'class' => 'hotspot-content',
762
+ 'title' => 'On Click Content',
763
+ 'type' => 'info_textarea',
764
+ 'value' => $pano_hotspot['hotspot-content'],
765
+ 'display' => 'block',
766
+ ),
767
+ 'hotspot-hover' => array(
768
+ 'class' => 'hotspot-hover',
769
+ 'title' => 'On Hover Content',
770
+ 'type' => 'info_textarea',
771
+ 'value' => $pano_hotspot['hotspot-hover'],
772
+ 'display' => 'block',
773
+ ),
774
+ 'hotspot-scene-list' => array(
775
+ 'title' => 'Select Target Scene from List',
776
+ 'type' => 'scene_list',
777
+ 'display' => 'none',
778
+ ),
779
+ 'hotspot-scene' => array(
780
+ 'title' => 'Target Scene ID',
781
+ 'display' => 'none',
782
+ 'input_class' => 'hotspotsceneinfodata',
783
+ 'type' => 'disabled_text',
784
+ 'value' => ''
785
+ )
786
+ );
787
+ return apply_filters( 'modify_hotspot_right_fields', $fields );
788
+
789
+ }
790
+
791
+ /**
792
+ * Initialize Hotspot Setting Info Fields
793
+ *
794
+ * @param mixed $hotspot_type
795
+ * @param mixed $hotspot_url
796
+ * @param mixed $hotspot_content
797
+ * @param mixed $hotspot_hover
798
+ *
799
+ * @return array
800
+ * @since 8.0.0
801
+ */
802
+ public static function get_hotspot_setting_wc_product_fields($pano_hotspot)
803
+ {
804
+ $fields = array(
805
+ 'hotspot-type' => array(
806
+ 'title' => 'Hotspot-Type',
807
+ 'type' => 'wc_product_type',
808
+ ),
809
+ 'hotspot-product-id' => array(
810
+ 'title' => 'Select your form',
811
+ 'type' => 'wc_product_select',
812
+ 'class' => 'wpvr-product-search',
813
+ 'value' => $pano_hotspot
814
+ ),
815
+ 'hotspot-url' => array(
816
+ 'title' => 'URL',
817
+ 'type' => 'info_url',
818
+ 'value' => $pano_hotspot['hotspot-url'],
819
+ 'display' => 'none',
820
+ ),
821
+ 'wpvr_url_open' => array(
822
+ 'title' => 'Open in same tab',
823
+ 'type' => 'same_tab_checkbox',
824
+ 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off',
825
+ 'display' => 'none',
826
+ ),
827
+ 'hotspot-content' => array(
828
+ 'class' => 'hotspot-content',
829
+ 'title' => 'On Click Content',
830
+ 'type' => 'info_textarea',
831
+ 'value' => $pano_hotspot['hotspot-content'],
832
+ 'display' => 'none',
833
+ ),
834
+ 'hotspot-hover' => array(
835
+ 'class' => 'hotspot-hover',
836
+ 'title' => 'On Hover Content',
837
+ 'type' => 'info_textarea',
838
+ 'value' => $pano_hotspot['hotspot-hover'],
839
+ 'display' => 'block',
840
+ ),
841
+ 'hotspot-scene-list' => array(
842
+ 'title' => 'Select Target Scene from List',
843
+ 'type' => 'scene_list',
844
+ 'display' => 'none',
845
+ ),
846
+ 'hotspot-scene' => array(
847
+ 'title' => 'Target Scene ID',
848
+ 'display' => 'none',
849
+ 'input_class' => 'hotspotsceneinfodata',
850
+ 'type' => 'disabled_text',
851
+ 'value' => ''
852
+ )
853
+ );
854
+ return apply_filters( 'modify_hotspot_right_fields', $fields );
855
+
856
+ }
857
+ /**
858
+ * Initialize Hotspot Setting Fluent form field Fields
859
+ *
860
+ * @param mixed $hotspot_type
861
+ * @param mixed $hotspot_url
862
+ * @param mixed $hotspot_content
863
+ * @param mixed $hotspot_hover
864
+ *
865
+ * @return array
866
+ * @since 8.0.0
867
+ */
868
+ public static function get_hotspot_setting_fluent_form_fields($pano_hotspot)
869
+ {
870
+ $fields = array(
871
+ 'hotspot-type' => array(
872
+ 'title' => 'Hotspot-Type',
873
+ 'type' => 'fluent_form_type',
874
+ ),
875
+ 'fluent-form-id' => array(
876
+ 'title' => 'Select your form',
877
+ 'type' => 'fluent_form_select',
878
+ 'class' => 'wpvr-fluent-forms',
879
+ 'value' => $pano_hotspot
880
+ ),
881
+ 'hotspot-url' => array(
882
+ 'title' => 'URL',
883
+ 'type' => 'info_url',
884
+ 'value' => $pano_hotspot['hotspot-url'],
885
+ 'display' => 'none',
886
+ ),
887
+ 'wpvr_url_open' => array(
888
+ 'title' => 'Open in same tab',
889
+ 'type' => 'same_tab_checkbox',
890
+ 'value' => isset($pano_hotspot['wpvr_url_open'][0]) ? $pano_hotspot['wpvr_url_open'][0] : 'off',
891
+ 'display' => 'none',
892
+ ),
893
+ 'hotspot-content' => array(
894
+ 'class' => 'hotspot-content',
895
+ 'title' => 'On Click Content',
896
+ 'type' => 'info_textarea',
897
+ 'value' => $pano_hotspot['hotspot-content'],
898
+ 'display' => 'none',
899
+ ),
900
+ 'hotspot-hover' => array(
901
+ 'class' => 'hotspot-hover',
902
+ 'title' => 'On Hover Content',
903
+ 'type' => 'info_textarea',
904
+ 'value' => $pano_hotspot['hotspot-hover'],
905
+ 'display' => 'block',
906
+ ),
907
+ 'hotspot-scene-list' => array(
908
+ 'title' => 'Select Target Scene from List',
909
+ 'type' => 'scene_list',
910
+ 'display' => 'none',
911
+ ),
912
+ 'hotspot-scene' => array(
913
+ 'title' => 'Target Scene ID',
914
+ 'display' => 'none',
915
+ 'input_class' => 'hotspotsceneinfodata',
916
+ 'type' => 'disabled_text',
917
+ 'value' => ''
918
+ )
919
+ );
920
+ return apply_filters( 'modify_hotspot_right_fields', $fields );
921
+
922
+ }
923
+
924
+
925
+ /**
926
+ * Initializa Hotspot Setting Scene Fields
927
+ *
928
+ * @param mixed $hotspot_hover
929
+ * @param mixed $hotspot_target_scene
930
+ *
931
+ * @return array
932
+ * @since 8.0.0
933
+ */
934
+ public static function get_hotspot_setting_scene_fields($pano_hotspot)
935
+ {
936
+ $fields = array(
937
+ 'hotspot-type' => array(
938
+ 'title' => 'Hotspot-Type',
939
+ 'type' => 'scene_type_select',
940
+ ),
941
+ 'hotspot-url' => array(
942
+ 'title' => 'URL',
943
+ 'type' => 'info_url',
944
+ 'display' => 'none',
945
+ 'value' => '',
946
+ ),
947
+ 'wpvr_url_open' => array(
948
+ 'title' => 'Open in same tab',
949
+ 'type' => 'same_tab_checkbox',
950
+ 'value' => 'off',
951
+ 'display' => 'none',
952
+ ),
953
+ 'hotspot-content' => array(
954
+ 'class' => 'hotspot-content',
955
+ 'title' => 'On Click Content',
956
+ 'type' => 'scene_content',
957
+ 'display' => 'none',
958
+ ),
959
+ 'hotspot-hover' => array(
960
+ 'class' => 'hotspot-hover',
961
+ 'title' => 'On Hover Content',
962
+ 'type' => 'info_textarea',
963
+ 'value' => $pano_hotspot['hotspot-hover'],
964
+ 'display' => 'block',
965
+ ),
966
+ 'hotspot-scene-list' => array(
967
+ 'title' => 'Select Target Scene from List',
968
+ 'type' => 'scene_list',
969
+ 'display' => 'block',
970
+ ),
971
+ 'hotspot-scene' => array(
972
+ 'title' => 'Target Scene ID',
973
+ 'display' => 'block',
974
+ 'input_class' => 'hotspotsceneinfodata',
975
+ 'type' => 'disabled_text',
976
+ 'value' => $pano_hotspot['hotspot-scene']
977
+ ),
978
+ );
979
+ return apply_filters( 'modify_hotspot_setting_scene_fields', $fields, $pano_hotspot );
980
+ }
981
+
982
+
983
+ /**
984
+ * Return general feature navigation meta fields
985
+ *
986
+ * @return array
987
+ * @since 8.0.0
988
+ */
989
+ public static function get_general_navigation_meta_fields()
990
+ {
991
+ $fields = array(
992
+ array(
993
+ 'class' => 'gen-basic',
994
+ 'active' => 'active',
995
+ 'href' => 'gen-basic',
996
+ 'isPro' => false,
997
+ 'regular_icon' => 'admin/icon/basic-settings-regular.png',
998
+ 'hover_icon' => 'admin/icon/basic-settings-hover.png',
999
+ 'title' => 'Basic Settings'
1000
+ ),
1001
+ array(
1002
+ 'class' => 'gen-advanced',
1003
+ 'active' => '',
1004
+ 'href' => 'gen-advanced',
1005
+ 'isPro' => true,
1006
+ 'regular_icon' => 'admin/icon/advance-control-regular.png',
1007
+ 'hover_icon' => 'admin/icon/advance-control-hover.png',
1008
+ 'title' => 'Advanced Controls'
1009
+ ),
1010
+ array(
1011
+ 'class' => 'gen-control',
1012
+ 'active' => '',
1013
+ 'href' => 'gen-control',
1014
+ 'isPro' => true,
1015
+ 'regular_icon' => 'admin/icon/control-buttons-regular.png',
1016
+ 'hover_icon' => 'admin/icon/control-buttons-hover.png',
1017
+ 'title' => 'Control Buttons'
1018
+ )
1019
+ );
1020
+
1021
+ return apply_filters( 'make_is_pro_false', $fields );
1022
+ }
1023
+
1024
+
1025
+ /**
1026
+ * Render inner navigation bar for General tab
1027
+ *
1028
+ * @return void
1029
+ * @since 8.0.0
1030
+ */
1031
+ public static function render_general_inner_navigation()
1032
+ {
1033
+ ob_start();
1034
+ ?>
1035
+
1036
+ <ul class="inner-nav">
1037
+
1038
+ <?php
1039
+ $fields = WPVR_Meta_Field::get_general_navigation_meta_fields();
1040
+ foreach($fields as $field) { ?>
1041
+
1042
+ <li class="<?php echo $field['class']; ?> <?php echo $field['active']; ?>">
1043
+ <span data-href="#<?php echo $field['href']; ?>">
1044
+ <?php if($field['isPro'] == true) { ?>
1045
+ <span class="pro-tag">pro</span>
1046
+ <?php } ?>
1047
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . $field['regular_icon']; ?>" alt="icon" class="regular" />
1048
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL. $field['hover_icon']; ?>" alt="icon" class="hover" />
1049
+ <?php echo __($field['title'], 'wpvr');?></span>
1050
+ </li>
1051
+
1052
+ <?php } ?>
1053
+
1054
+ <li class="vr-documentation">
1055
+ <a href="https://rextheme.com/docs-category/wp-vr/" target="_blank"><?php echo __('Documentation ', 'wpvr'); ?></a>
1056
+ </li>
1057
+
1058
+ </ul>
1059
+
1060
+ <?php
1061
+ ob_end_flush();
1062
+ }
1063
+
1064
+
1065
+ /**
1066
+ * Render Hotspot Setting Left Fields
1067
+ * @return void
1068
+ *
1069
+ * @since 8.0.0
1070
+ */
1071
+ public static function render_hotspot_setting_left_fields($pano_hotspot)
1072
+ {
1073
+ $fields = self::get_hotspot_left_fields($pano_hotspot);
1074
+ foreach($fields as $name => $val) {
1075
+ self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1076
+ }
1077
+ }
1078
+
1079
+
1080
+ /**
1081
+ * Render Hotspot Setting Right Fileds
1082
+ * @return void
1083
+ *
1084
+ * @since 8.0.0
1085
+ */
1086
+ public static function render_hotspot_setting_right_fields()
1087
+ {
1088
+ $fields = self::get_hotspot_right_fields();
1089
+ foreach($fields as $name => $val) {
1090
+ self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1091
+ }
1092
+ }
1093
+
1094
+
1095
+ /**
1096
+ * Render Hotspot Setting When Hotspot-Type is Info
1097
+ *
1098
+ * @param mixed $hotspot_url
1099
+ * @param mixed $hotspot_content
1100
+ * @param mixed $hotspot_hover
1101
+ *
1102
+ * @return void
1103
+ * @since 8.0.0
1104
+ */
1105
+ public static function render_hotspot_setting_info_fields($pano_hotspot)
1106
+ {
1107
+ $fields = self::get_hotspot_setting_info_fields($pano_hotspot);
1108
+ foreach($fields as $name => $val) {
1109
+ self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1110
+ }
1111
+ }
1112
+
1113
+ /**
1114
+ * Render Hotspot Setting When Hotspot-Type is fluent form
1115
+ *
1116
+ * @param mixed $hotspot_hover
1117
+ * @param mixed $hotspot_target_scene
1118
+ *
1119
+ * @return void
1120
+ * @since 8.0.0
1121
+ */
1122
+ public static function render_hotspot_setting_fluent_form_fields($pano_hotspot)
1123
+ {
1124
+ $fields = self::get_hotspot_setting_fluent_form_fields($pano_hotspot);
1125
+ foreach($fields as $name => $val) {
1126
+ self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1127
+ }
1128
+ }
1129
+ /**
1130
+ * Render Hotspot Setting When Hotspot-Type is Woocommerce Product
1131
+ *
1132
+ * @param mixed $hotspot_hover
1133
+ * @param mixed $hotspot_target_scene
1134
+ *
1135
+ * @return void
1136
+ * @since 8.0.0
1137
+ */
1138
+ public static function render_hotspot_setting_wc_product_fields($pano_hotspot)
1139
+ {
1140
+ $fields = self::get_hotspot_setting_wc_product_fields($pano_hotspot);
1141
+ foreach($fields as $name => $val) {
1142
+ self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1143
+ }
1144
+ }
1145
+
1146
+
1147
+ /**
1148
+ * Render Hotspot Setting When Hotspot-Type is Scene
1149
+ *
1150
+ * @param mixed $hotspot_hover
1151
+ * @param mixed $hotspot_target_scene
1152
+ *
1153
+ * @return void
1154
+ * @since 8.0.0
1155
+ */
1156
+ public static function render_hotspot_setting_scene_fields($pano_hotspot)
1157
+ {
1158
+ $fields = self::get_hotspot_setting_scene_fields($pano_hotspot);
1159
+ foreach($fields as $name => $val) {
1160
+ self::{ 'render_hotspot_' . $val['type'] . '_field' }( $name, $val );
1161
+ }
1162
+ }
1163
+
1164
+
1165
+
1166
+ /**
1167
+ * Render Scene Setting Left fields
1168
+ * When Panodata is Empty
1169
+ * @return void
1170
+ * @since 8.0.0
1171
+ */
1172
+ public static function render_scene_left_fields_empty_panodata()
1173
+ {
1174
+ $fields = self::get_scene_left_fields_empty_panodata();
1175
+ foreach($fields as $name => $val) {
1176
+ self::{ 'render_scene_' . $val['type'] . '_field' }( $name, $val );
1177
+ }
1178
+
1179
+ }
1180
+
1181
+
1182
+ /**
1183
+ * Render Scene Setting Left Fields
1184
+ * When Panodata is not Empty
1185
+ * @param mixed $dscene
1186
+ * @param mixed $scene_id
1187
+ * @param mixed $scene_photo
1188
+ *
1189
+ * @return void
1190
+ * @since 8.0.0
1191
+ */
1192
+ public static function render_scene_left_fields_with_panodata($pano_scene)
1193
+ {
1194
+ $fields = self::get_scene_left_fields_with_panodata($pano_scene);
1195
+ foreach($fields as $name => $val) {
1196
+ self::{ 'render_scene_' . $val['type'] . '_field' }( $name, $val );
1197
+ }
1198
+ }
1199
+
1200
+
1201
+ /**
1202
+ * Initialize fields render method
1203
+ * @return void
1204
+ * @since 8.0.0
1205
+ */
1206
+ public static function render_advanced_settings_left_fields($postdata)
1207
+ {
1208
+ $fields = self::get_advanced_settings_left_fields($postdata);
1209
+ foreach($fields as $name => $val) {
1210
+ self::{ 'render_' . $val['type'] . '_field' }( $name, $val );
1211
+ }
1212
+ }
1213
+
1214
+
1215
+ /**
1216
+ * Initialize fields render method
1217
+ * @return void
1218
+ * @since 8.0.0
1219
+ */
1220
+ public static function render_advanced_settings_right_fields($postdata)
1221
+ {
1222
+ $fields = self::get_advanced_settings_right_fields($postdata);
1223
+ foreach($fields as $name => $val) {
1224
+ self::{ 'render_' . $val['type'] . '_field' }( $name, $val );
1225
+ }
1226
+ }
1227
+
1228
+
1229
+ /**
1230
+ * Initialize fields render method
1231
+ * @return void
1232
+ * @since 8.0.0
1233
+ */
1234
+ public static function render_control_button_left_fields($postdata)
1235
+ {
1236
+ $fields = self::get_control_button_left_fields($postdata);
1237
+ foreach($fields as $name => $val) {
1238
+ self::{ 'render_' . $val['type'] . '_with_icon' }( $name, $val );
1239
+ }
1240
+ }
1241
+
1242
+
1243
+ /**
1244
+ * Initialize fields render method
1245
+ * @return void
1246
+ * @since 8.0.0
1247
+ */
1248
+ public static function render_control_button_right_fields($postdata)
1249
+ {
1250
+ $fields = self::get_control_button_right_fields($postdata);
1251
+ foreach($fields as $name => $val) {
1252
+ self::{ 'render_' . $val['type'] . '_with_icon' }( $name, $val );
1253
+ }
1254
+ }
1255
+
1256
+
1257
+ /**
1258
+ * Initilize Video Meta Fields
1259
+ * @param mixed $postdata
1260
+ *
1261
+ * @return array
1262
+ * @since 8.0.0
1263
+ */
1264
+ public static function get__video_setting_fields($postdata)
1265
+ {
1266
+ $vidurl = '';
1267
+ if (isset($postdata['vidid'])) {
1268
+ $vidurl = $postdata['vidurl'];
1269
+ }
1270
+ $meta_fields = array(
1271
+ 'panovideo' => array(
1272
+ 'class' => 'single-settings videosetup',
1273
+ 'title' => 'Enable Video',
1274
+ 'type' => 'radio_button',
1275
+ 'lists' => array(
1276
+ array(
1277
+ 'input_class' => 'styled-radio video_off',
1278
+ 'input_id' => 'styled-radio',
1279
+ 'value' => 'off',
1280
+ 'checked' => isset($postdata['vidid']),
1281
+ 'label_value' => 'Off'
1282
+ ),
1283
+ array(
1284
+ 'input_class' => 'styled-radio video_on',
1285
+ 'input_id' => 'styled-radio-0',
1286
+ 'value' => 'on',
1287
+ 'checked' => isset($postdata['vidid']),
1288
+ 'label_value' => 'On'
1289
+ )
1290
+ ),
1291
+
1292
+ ),
1293
+ 'video-attachment-url' => array(
1294
+ 'class' => 'video-setting',
1295
+ 'title' => 'Upload or Add Link',
1296
+ 'placeholder' => 'Paste Youtube or Vimeo link or upload',
1297
+ 'input_class' => 'video-attachment-url',
1298
+ 'type' => 'video_text_input',
1299
+ 'value' => $vidurl
1300
+ )
1301
+ );
1302
+ return apply_filters( 'extend_video_meta_fields', $meta_fields, $postdata, $vidurl );
1303
+ }
1304
+
1305
+
1306
+ /**
1307
+ * Render Video Settings Meta Fields
1308
+ * @param mixed $postdata
1309
+ *
1310
+ * @return void
1311
+ * @since 8.0.0
1312
+ */
1313
+ public static function render_video_setting_meta_fields($postdata)
1314
+ {
1315
+ $fields = self::get__video_setting_fields($postdata);
1316
+
1317
+ foreach($fields as $name => $val) {
1318
+ self::{ 'render_' . $val['type'] }( $name, $val );
1319
+ }
1320
+
1321
+ }
1322
+
1323
+
1324
+ /**
1325
+ * Render Scene Settings Select Field
1326
+ * @param mixed $name input name
1327
+ * @param mixed $val options
1328
+ *
1329
+ * @return void
1330
+ * @since 8.0.0
1331
+ */
1332
+ public static function render_scene_select_field($name, $val)
1333
+ {
1334
+ extract($val);
1335
+ ob_start();
1336
+ ?>
1337
+ <div class="<?= $class; ?>">
1338
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1339
+ <select class="<?= $select_class; ?>" name="<?= $name; ?>">
1340
+ <option value="on" <?php selected( $selected, 'on' ); ?> > Yes</option>
1341
+ <option value="off" <?php selected( $selected, 'off' ); ?> > No</option>
1342
+ </select>
1343
+ </div>
1344
+ <?php
1345
+ ob_end_flush();
1346
+ }
1347
+
1348
+
1349
+ /**
1350
+ * Render Scene Type selection field on Scene tab content
1351
+ *
1352
+ * @param mixed $name
1353
+ * @param mixed $val
1354
+ *
1355
+ * @return void
1356
+ * @since 8.0.0
1357
+ */
1358
+ public static function render_scene_type_select_field($name, $val)
1359
+ {
1360
+ extract($val);
1361
+ ob_start();
1362
+ ?>
1363
+ <div class="scene-setting">
1364
+ <label for="scene-type"><?= __($title .': ', 'wpvr'); ?></label>
1365
+ <select class="wpvr-pro-select-scene-type" name="scene-type" id="">
1366
+ <option value="equirectangular" <?= $selected == 'equirectangular' ? 'selected' : '' ?> >Equirectangular</option>
1367
+ <option value="cubemap" <?= $selected == 'cubemap' ? 'selected' : '' ?> >Cubemap</option>
1368
+ <select>
1369
+ </div>
1370
+ <?php
1371
+ ob_end_flush();
1372
+ }
1373
+
1374
+
1375
+ /**
1376
+ * Render Scene Settings Text Field
1377
+ * @param mixed $name input name
1378
+ * @param mixed $val options
1379
+ *
1380
+ * @return void
1381
+ * @since 8.0.0
1382
+ */
1383
+ public static function render_scene_text_field($name, $val)
1384
+ {
1385
+ extract($val);
1386
+ ob_start();
1387
+ ?>
1388
+ <div class=scene-setting>
1389
+ <label for="<?= $label_for; ?>"><?= __($title .': ', 'wpvr'); ?></label>
1390
+ <input type="text" class="<?= $input_class; ?>" name="<?= $name; ?>" value="<?= $value; ?>" <?= $disabled; ?> />
1391
+ </div>
1392
+ <?php
1393
+ ob_end_flush();
1394
+ }
1395
+
1396
+
1397
+ /**
1398
+ * Render Scene Settings Upload Field
1399
+ * @param mixed $name input name
1400
+ * @param mixed $val options
1401
+ *
1402
+ * @return void
1403
+ * @since 8.0.0
1404
+ */
1405
+ public static function render_scene_upload_field($name, $val)
1406
+ {
1407
+ extract($val);
1408
+ ob_start();
1409
+ ?>
1410
+ <div class=scene-setting>
1411
+ <label for="scene-upload"><?= __($title .': ', 'wpvr'); ?></label>
1412
+ <div class="form-group">
1413
+ <img src="<?= $value; ?>" style="display: <?= $display; ?>;"><br>
1414
+ <input type="button" class="scene-upload" data-info="" value="Upload"/>
1415
+ <input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="<?= $value; ?>">
1416
+ </div>
1417
+ </div>
1418
+ <?php
1419
+ ob_end_flush();
1420
+ }
1421
+
1422
+
1423
+ /**
1424
+ * Render Scene upload wrapper fields for pro version
1425
+ *
1426
+ * @param mixed $name
1427
+ * @param mixed $val
1428
+ *
1429
+ * @return void
1430
+ * @since 8.0.0
1431
+ */
1432
+ public static function render_scene_upload_wrapper_field($name, $val)
1433
+ {
1434
+ extract($val);
1435
+ ob_start();
1436
+ ?>
1437
+ <div class="scene-setting scene-upload-wrapper">
1438
+ <?php
1439
+ foreach($wrappers as $key => $val) {
1440
+ self::{ 'render_scene_' . $key }( $key, $val );
1441
+ }
1442
+ ?>
1443
+ </div>
1444
+ <?php
1445
+ ob_end_flush();
1446
+ }
1447
+
1448
+
1449
+ /**
1450
+ * Render equirectangular scene upload section for pro version
1451
+ *
1452
+ * @param mixed $key
1453
+ * @param mixed $val
1454
+ *
1455
+ * @return void
1456
+ * @since 8.0.0
1457
+ */
1458
+ public static function render_scene_equirectangular_upload($key, $val)
1459
+ {
1460
+ extract($val);
1461
+ ob_start();
1462
+ ?>
1463
+ <div class="equirectangular-upload" style="display:<?= $display?>;">
1464
+ <label for="scene-upload"><?= __('Scene Upload: ', 'wpvr-pro')?></label>
1465
+ <div class="form-group">
1466
+ <img src="<?= $value?>" style="display: <?= $img_display?>;"><br>
1467
+ <input type="button" class="scene-upload" data-info="" value="Upload"/>
1468
+ <input type="hidden" name="scene-attachment-url" class="scene-attachment-url" value="<?= $value?>">
1469
+ </div>
1470
+
1471
+ <div class="field-tooltip">
1472
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'?>" alt="icon" />
1473
+ <span><?= __('You can use any image size but maximum image upload size recommended to support all device is 4096x2000 px for perfect responsive view. To check 360 view, click on preview button and check tour preview metabox.', 'wpvr') ?></span>
1474
+ </div>
1475
+ </div>
1476
+ <?php
1477
+ ob_end_flush();
1478
+ }
1479
+
1480
+
1481
+ /**
1482
+ * Render cubemap scene upload section for pro version
1483
+ *
1484
+ * @param mixed $key
1485
+ * @param mixed $val
1486
+ *
1487
+ * @return void
1488
+ * @since 8.0.0
1489
+ */
1490
+ public static function render_scene_cubemap_upload($key, $val)
1491
+ {
1492
+ extract($val);
1493
+ ob_start();
1494
+ ?>
1495
+ <div class="cubemap-upload" style="display:<?= $display?>;">
1496
+ <?php
1497
+ foreach($cubemaps as $cubemap){ extract($cubemap) ?>
1498
+ <div class="<?= $class ?>">
1499
+ <label for="scene-upload"><?= __($title , 'wpvr-pro') ?></label>
1500
+ <div class="form-group">
1501
+ <img src="<?= $value ?>" style="display: block;"><br>
1502
+ <input type="button" class="scene-upload" data-info="" value="Upload"/>
1503
+ <input type="hidden" name="<?= $name ?>" class="scene-attachment-url" value="<?= $value ?>">
1504
+ </div>
1505
+
1506
+ <div class="field-tooltip">
1507
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
1508
+ <span><?= __('You can use any image size but maximum image upload size recommended to support all device is 4096x2000 px for perfect responsive view. To check 360 view, click on preview button and check tour preview metabox.', 'wpvr') ?></span>
1509
+ </div>
1510
+ </div>
1511
+ <?php }
1512
+ ?>
1513
+ </div>
1514
+ <?php
1515
+ ob_end_flush();
1516
+
1517
+ }
1518
+
1519
+
1520
+ /**
1521
+ * Render Radio Button Field
1522
+ * @param mixed $name input name
1523
+ * @param mixed $val options
1524
+ *
1525
+ * @return void
1526
+ * @since 8.0.0
1527
+ */
1528
+ public static function render_radio_button($name, $val)
1529
+ {
1530
+ extract( $val );
1531
+ ob_start();
1532
+ ?>
1533
+ <div class="<?= $class; ?>">
1534
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1535
+ <ul>
1536
+
1537
+ <?php foreach($lists as $list) { extract( $list ); ?>
1538
+ <li class="radio-btn">
1539
+ <input class="<?= $input_class; ?>" id="<?= $input_id; ?>" type="radio" name="<?= $name; ?>" value="<?= $value; ?>" <?php if(empty($checked) && $value == 'off') { echo 'checked'; } ;?> <?php if(!empty($checked) && $value == 'on') { echo 'checked'; };?> >
1540
+ <label for="<?= $input_id; ?>"><?= $label_value; ?></label>
1541
+ </li>
1542
+
1543
+ <?php } ?>
1544
+
1545
+ </ul>
1546
+ </div>
1547
+ <?php
1548
+ ob_end_flush();
1549
+ }
1550
+
1551
+
1552
+ /**
1553
+ * Render Radio Button Field for pro version
1554
+ * @param mixed $name input name
1555
+ * @param mixed $val options
1556
+ *
1557
+ * @return void
1558
+ * @since 8.0.0
1559
+ */
1560
+ public static function render_pro_radio_button($name, $val)
1561
+ {
1562
+ extract( $val );
1563
+ ob_start();
1564
+ ?>
1565
+ <div class="<?= $class; ?>">
1566
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1567
+ <ul>
1568
+
1569
+ <?php foreach($lists as $list) { extract( $list ); ?>
1570
+ <li class="radio-btn">
1571
+ <input class="<?= $input_class; ?>" id="<?= $input_id; ?>" type="radio" name="<?= $name; ?>" value="<?= $value; ?>" <?php if(($checked == 'off' || empty($checked)) && $value == 'off') { echo 'checked'; } ;?> <?php if($checked == 'on' && $value == 'on') { echo 'checked'; };?> >
1572
+ <label for="<?= $input_id; ?>"><?= $label_value; ?></label>
1573
+ </li>
1574
+
1575
+ <?php } ?>
1576
+
1577
+ </ul>
1578
+ </div>
1579
+ <?php
1580
+ ob_end_flush();
1581
+ }
1582
+
1583
+
1584
+ /**
1585
+ * Render Video Text Input Field
1586
+ * @param mixed $name input name
1587
+ * @param mixed $val options
1588
+ *
1589
+ * @return void
1590
+ * @since 8.0.0
1591
+ */
1592
+ public static function render_video_text_input($name, $val)
1593
+ {
1594
+ extract( $val );
1595
+ ob_start();
1596
+ ?>
1597
+ <div class="<?= $class; ?>" style="display:none;">
1598
+ <div class="single-settings">
1599
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1600
+ <div class="form-group">
1601
+ <input type="text" placeholder="<?= $placeholder; ?>" name="<?= $name; ?>" class="<?= $input_class; ?>" value="<?= $value; ?>">
1602
+ <input type="button" class="video-upload" data-info="" value="Upload"/>
1603
+ </div>
1604
+ </div>
1605
+ </div>
1606
+ <?php
1607
+
1608
+ ob_end_flush();
1609
+
1610
+ }
1611
+
1612
+ /**
1613
+ * Render Checkbox Field
1614
+ *
1615
+ * @param string $name input name
1616
+ * @param string $val options
1617
+ *
1618
+ * @return void
1619
+ * @since 8.0.0
1620
+ */
1621
+ public static function render_checkbox_field($name, $val)
1622
+ {
1623
+ extract( $val );
1624
+ ob_start();
1625
+ ?>
1626
+ <div class="<?= $class;?>">
1627
+ <span><?= __($title.': ', 'wpvr'); ?></span>
1628
+
1629
+ <span class="wpvr-switcher">
1630
+ <input id="<?= $id;?>" class="vr-switcher-check" value="off" name="<?= $name;?>" type="checkbox" disabled />
1631
+ <label for="<?= $id;?>" title="Pro Feature"></label>
1632
+ </span>
1633
+ <?php if($have_tooltip) {?>
1634
+ <div class="field-tooltip">
1635
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
1636
+ <span><?= __($tooltip_text, 'wpvr'); ?></span>
1637
+ </div>
1638
+ <?php } ?>
1639
+ </div>
1640
+ <?php
1641
+ ob_end_flush();
1642
+ }
1643
+
1644
+
1645
+ /**
1646
+ * Render checkbox for advanced control pro version meta fields
1647
+ *
1648
+ * @param mixed $name
1649
+ * @param mixed $val
1650
+ *
1651
+ * @return void
1652
+ * @since 8.0.0
1653
+ */
1654
+ public static function render_pro_checkbox_field($name, $val)
1655
+ {
1656
+ extract($val);
1657
+ ob_start();
1658
+ ?>
1659
+ <div class="<?= $class; ?>">
1660
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1661
+
1662
+ <span class="wpvr-switcher">
1663
+ <input id="<?= $id; ?>" class="vr-switcher-check" value="<?= $value?>" name="<?= $name; ?>" type="checkbox" <?php if($value == 'on') { echo'checked'; } ?> />
1664
+ <label for="<?= $id; ?>"></label>
1665
+ </span>
1666
+ <?php if($have_tooltip) { ?>
1667
+ <div class="field-tooltip">
1668
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
1669
+ <span><?= __($tooltip_text, 'wpvr'); ?></span>
1670
+ </div>
1671
+ <?php } ?>
1672
+ </div>
1673
+ <?php
1674
+ ob_end_flush();
1675
+ }
1676
+
1677
+
1678
+ public static function render_explainer_info_wrapper_field($name, $val)
1679
+ {
1680
+ extract($val);
1681
+ ob_start();
1682
+ ?>
1683
+ <div class="explainer-info-wrapper">
1684
+ <div class="single-settings cp-details">
1685
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1686
+ <textarea rows="5" cols="40" name="explaine-content" id="explaine-content"><?= $value?></textarea>
1687
+ </div>
1688
+ </div>
1689
+ <?php
1690
+ ob_end_flush();
1691
+ }
1692
+
1693
+
1694
+ /**
1695
+ * Render checkbox for advanced control pro version meta fields
1696
+ *
1697
+ * @param mixed $name
1698
+ * @param mixed $val
1699
+ *
1700
+ * @return void
1701
+ * @since 8.0.0
1702
+ */
1703
+ public static function render_pro_inner_checkbox_field($name, $val)
1704
+ {
1705
+ extract($val);
1706
+ ob_start();
1707
+ ?>
1708
+ <div class="<?= $root_class; ?>">
1709
+ <div class="<?= $class; ?>">
1710
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1711
+
1712
+ <span class="wpvr-switcher">
1713
+ <input id="<?= $id; ?>" class="vr-switcher-check" value="<?= $value; ?>" name="<?= $name; ?>" type="checkbox" <?php if($value == 'on') { echo 'checked'; } else { echo ''; } ?> />
1714
+ <label for="<?= $id; ?>"></label>
1715
+ </span>
1716
+
1717
+ <?php if($have_tooltip) { ?>
1718
+ <div class="field-tooltip">
1719
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
1720
+ <span><?= __($tooltip_text, 'wpvr'); ?></span>
1721
+ </div>
1722
+ <?php } ?>
1723
+ </div>
1724
+ </div>
1725
+ <?php
1726
+ ob_end_flush();
1727
+ }
1728
+
1729
+
1730
+ /**
1731
+ * Render background music field on Advanced Controls section
1732
+ *
1733
+ * @param mixed $name
1734
+ * @param mixed $val
1735
+ *
1736
+ * @return void
1737
+ * @since 8.0.0
1738
+ */
1739
+ public static function render_bg_music_content_field($name, $val)
1740
+ {
1741
+ extract($val);
1742
+ ob_start();
1743
+ ?>
1744
+ <div class="bg-music-content" style="display:none">
1745
+ <?php
1746
+ foreach($inner_fields as $name => $val) {
1747
+ self::{ 'render_' . $val['type'] . '_field' }( $name, $val );
1748
+ }
1749
+ ?>
1750
+ </div>
1751
+ <?php
1752
+ ob_end_flush();
1753
+ }
1754
+
1755
+
1756
+ /**
1757
+ * Render Upload or Set Audio Link field on Advanced Controls section
1758
+ *
1759
+ * @param mixed $name
1760
+ * @param mixed $val
1761
+ *
1762
+ * @return void
1763
+ * @since 8.0.0
1764
+ */
1765
+ public static function render_upload_audio_link_field($name, $val)
1766
+ {
1767
+ extract($val);
1768
+ ob_start();
1769
+ ?>
1770
+ <div class="single-settings audio-setting">
1771
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1772
+ <img class="audio-img" src="<?= $value; ?>" style="display: none;">
1773
+ <input type="text" name="<?= $name; ?>" class="audio-attachment-url" value="<?= $value; ?>">
1774
+ <button type="button" class="audio-upload" data-info=""><img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/upload.png' ?>" alt="icon" /></button>
1775
+ </div>
1776
+ <?php
1777
+ ob_end_flush();
1778
+ }
1779
+
1780
+
1781
+ /**
1782
+ * Render Add Company information field on Advanced Controls section
1783
+ *
1784
+ * @param mixed $name
1785
+ * @param mixed $val
1786
+ *
1787
+ * @return void
1788
+ * @since 8.0.0
1789
+ */
1790
+ public static function render_company_info_wrapper_field($name, $val)
1791
+ {
1792
+ extract($val);
1793
+ ob_start();
1794
+ ?>
1795
+ <div class="company-info-wrapper">
1796
+ <div class="single-settings cp-logo-area">
1797
+ <span class="logo-title"><?= __($title .': ', 'wpvr'); ?>
1798
+ <span class="hints"><?= __('You can add any logo size. But recommended size is below 100x100 px for perfect look.', 'wpvr-pro') ?></span>
1799
+ </span>
1800
+
1801
+ <div class="form-group">
1802
+ <input type="text" name="cp-logo-attachment-url" class="cp-logo-attachment-url" value="<?= $value ?>">
1803
+ <input type="button" class="cp-logo-upload" id="cp-logo-upload" data-info="" value="Upload"/>
1804
+
1805
+ <div class="logo-upload-frame" >
1806
+ <label for="cp-logo-upload">
1807
+ <img class="cp-logo-img" src="<?= $value ?>">
1808
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/uplad-icon.png' ?>" class="placeholder-icon" alt="icon" style="display: <?php if($value != null) { echo 'none'; } ?>;" />
1809
+ </label>
1810
+ </div>
1811
+ </div>
1812
+ </div>
1813
+ <div class="single-settings cp-details">
1814
+ <span><?= __('Company Details : ', 'wpvr-pro') ?></span>
1815
+ <textarea rows="5" cols="40" name="cp-logo-content" id="cp-logo-content"><?= $cpLogoContent;?></textarea>
1816
+ </div>
1817
+ </div>
1818
+ <?php
1819
+ ob_end_flush();
1820
+ }
1821
+
1822
+
1823
+ /**
1824
+ * Render text input fields while ro version is active
1825
+ *
1826
+ * @param mixed $name
1827
+ * @param mixed $val
1828
+ *
1829
+ * @return void
1830
+ * @since 8.0.0
1831
+ */
1832
+ public static function render_pro_input_field($name, $val)
1833
+ {
1834
+ extract($val);
1835
+ ob_start();
1836
+ ?>
1837
+ <div class="<?= $class ?>" >
1838
+ <span><?= __($title .': ', 'wpvr'); ?></span>
1839
+ <input type="text" class="<?= $input_class ?>" name="<?= $name ?>" placeholder="<?= $placeholder ?>" value="<?= $value ?>" />
1840
+
1841
+ <div class="field-tooltip">
1842
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
1843
+ <span><?= __($tooltip_text, 'wpvr'); ?></span>
1844
+ </div>
1845
+ </div>
1846
+ <?php
1847
+ ob_end_flush();
1848
+ }
1849
+
1850
+
1851
+
1852
+ /**
1853
+ * Render Checkbox Field With Icon
1854
+ *
1855
+ * @param string $name input name
1856
+ * @param string $val options
1857
+ *
1858
+ * @return void
1859
+ * @since 8.0.0
1860
+ */
1861
+ public static function render_checkbox_with_icon($name, $val)
1862
+ {
1863
+ extract( $val );
1864
+ ob_start();
1865
+ ?>
1866
+ <div class="single-settings controls custom-data-set">
1867
+ <span><?= __($title . ': ', 'wpvr'); ?></span>
1868
+
1869
+ <div class="color-icon">
1870
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/'. $icon; ?>" alt="icon" />
1871
+ </div>
1872
+
1873
+ <span class="wpvr-switcher">
1874
+ <input id="<?= $id; ?>" class="vr-switcher-check" value="off" name="<?= $name; ?>" type="checkbox" disabled />
1875
+ <label for="<?= $id; ?>" title="Pro Feature"></label>
1876
+ </span>
1877
+
1878
+ </div>
1879
+ <?php
1880
+ ob_end_flush();
1881
+ }
1882
+
1883
+
1884
+ /**
1885
+ * Render checkbox fields on Control Buttons section while pro version is active
1886
+ *
1887
+ * @param mixed $name
1888
+ * @param mixed $val
1889
+ *
1890
+ * @return void
1891
+ * @since 8.0.0
1892
+ */
1893
+ public static function render_pro_checkbox_with_icon($name, $val)
1894
+ {
1895
+ extract( $val );
1896
+ ob_start();
1897
+ ?>
1898
+ <div class="single-settings controls custom-data-set">
1899
+ <span><?= __($title . ': ', 'wpvr'); ?></span>
1900
+
1901
+ <div class="color-icon">
1902
+ <div class="colors">
1903
+ <input type="color" class="<?= $color_name; ?>" name="<?= $color_name; ?>" value="<?= $color_value; ?>" />
1904
+ <input type="hidden" class="<?= $icon_name ?> icon-found-value" name="<?= $icon_name ?>" value="<?= $color_value; ?>" />
1905
+ </div>
1906
+
1907
+ <div class="icons">
1908
+ <select class="<?= $icon_select_class ?>" name="<?= $icon_select_name ?>">
1909
+ <?php
1910
+ foreach ($custom_icons as $cikey => $civalue) {
1911
+ if ($cikey == $icon) { ?>
1912
+ <option value="<?= $cikey ?>" selected> <?= $civalue ?></option>
1913
+ <?php } else { ?>
1914
+ <option value="<?= $cikey ?>"> <?= $civalue ?></option>
1915
+ <?php }
1916
+ }
1917
+ ?>
1918
+ </select>
1919
+ </div>
1920
+ </div>
1921
+
1922
+ <span class="wpvr-switcher">
1923
+ <input id="<?= $id; ?>" class="vr-switcher-check" value="<?= $value ?>" name="<?= $name; ?>" type="checkbox" <?php if($value == 'on') { echo 'checked'; } ?> />
1924
+ <label for="<?= $id; ?>"></label>
1925
+ </span>
1926
+ </div>
1927
+ <?php
1928
+ ob_end_flush();
1929
+ }
1930
+
1931
+
1932
+ /**
1933
+ * Render Basic Setting Preview Image
1934
+ * @param mixed $name input name
1935
+ * @param mixed $val options
1936
+ *
1937
+ * @return void
1938
+ * @since 8.0.0
1939
+ */
1940
+ public static function render_preview_image($name, $val)
1941
+ {
1942
+ extract( $val );
1943
+ ob_start();
1944
+ ?>
1945
+ <div class="<?= $class; ?>">
1946
+ <span><?= __($title.' : ', 'wpvr'); ?></span>
1947
+ <div class="form-group">
1948
+ <input type="text" name="<?= $name; ?>" class="preview-attachment-url" value="<?= $value;?>">
1949
+ <input type="button" class="preview-upload" id="vr-preview-img" data-info="" value="Upload"/>
1950
+ <div class="img-upload-frame <?php if(!empty($value)) { echo 'img-uploaded'; } ?>" style="background-image: url(<?= $value; ?>)">
1951
+ <span class="remove-attachment">x</span>
1952
+ <label for="vr-preview-img">
1953
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/uplad-icon.png'; ?>" alt="preview img" />
1954
+ <span><?= __('Click to Upload an Image ', 'wpvr'); ?></span>
1955
+ </label>
1956
+ </div>
1957
+ </div>
1958
+ <?php if(!empty($value)) { ?>
1959
+ <span class="hints"><?= __('This option will not work if the "Tour Autoload" is turned on.', 'wpvr'); ?></span>
1960
+ <?php } ?>
1961
+ </div>
1962
+ <?php
1963
+ ob_end_flush();
1964
+ }
1965
+
1966
+
1967
+ /**
1968
+ * Render Basic Setting Preview Message
1969
+ * @param mixed $name input name
1970
+ * @param mixed $val options
1971
+ *
1972
+ * @return void
1973
+ * @since 8.0.0
1974
+ */
1975
+ public static function render_preview_image_msg($name, $val)
1976
+ {
1977
+ extract( $val );
1978
+ ob_start();
1979
+ ?>
1980
+ <div class="<?= $class; ?>">
1981
+ <span><?= __($title.': ', 'wpvr'); ?></span>
1982
+ <input class="previewtext" type="text" name="<?= $name; ?>" value="<?= $value; ?>"/>
1983
+ </div>
1984
+ <?php
1985
+ ob_end_flush();
1986
+ }
1987
+
1988
+
1989
+ /**
1990
+ * Render Basc Setting Checkbox
1991
+ * @param mixed $name input name
1992
+ * @param mixed $val options
1993
+ *
1994
+ * @return void
1995
+ * @since 8.0.0
1996
+ */
1997
+ public static function render_basic_setting_checkbox($name, $val)
1998
+ {
1999
+ extract( $val );
2000
+ ob_start();
2001
+ ?>
2002
+ <div class="<?= $class; ?>">
2003
+ <span><?= __($title.': ', 'wpvr'); ?></span>
2004
+
2005
+ <span class="wpvr-switcher">
2006
+ <input id="<?= $id;?>" class="vr-switcher-check" name="<?= $name; ?>" type="checkbox" value="1" <?php checked( $checked, 1 ); ?> />
2007
+ <label for="<?= $id;?>"></label>
2008
+ </span>
2009
+
2010
+ <?php if($have_tooltip) {?>
2011
+ <div class="field-tooltip">
2012
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2013
+ <span><?= __($tooltip_text, 'wpvr'); ?></span>
2014
+ </div>
2015
+ <?php } ?>
2016
+ </div>
2017
+ <?php
2018
+ ob_end_flush();
2019
+ }
2020
+
2021
+
2022
+ /**
2023
+ * Render Numder Input Field
2024
+ * @param mixed $name input name
2025
+ * @param mixed $val options
2026
+ *
2027
+ * @return void
2028
+ * @since 8.0.0
2029
+ */
2030
+ public static function render_number_field($name, $val)
2031
+ {
2032
+ extract( $val );
2033
+ ob_start();
2034
+ ?>
2035
+ <div class="<?= $class; ?>">
2036
+ <span><?= __($title.': ', 'wpvr'); ?></span>
2037
+ <input type="number" name="<?= $name; ?>" value="<?= $value; ?>" placeholder="<?= $placeholder;?>" />
2038
+
2039
+ <?php if($have_tooltip) {?>
2040
+ <div class="field-tooltip">
2041
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png'; ?>" alt="icon" />
2042
+ <span><?= __($tooltip_text, 'wpvr'); ?></span>
2043
+ </div>
2044
+ <?php } ?>
2045
+ </div>
2046
+ <?php
2047
+ ob_end_flush();
2048
+ }
2049
+
2050
+
2051
+ /**
2052
+ * Render Hotspot Setting Text Fields
2053
+ * @param mixed $name input field name
2054
+ * @param mixed $val options
2055
+ *
2056
+ * @return void
2057
+ * @since 8.0.0
2058
+ */
2059
+ public static function render_hotspot_text_field($name, $val)
2060
+ {
2061
+ extract($val);
2062
+ ob_start();
2063
+ ?>
2064
+
2065
+ <div class="hotspot-setting">
2066
+ <label for="<?= $input_id;?>"><?= __($title.': ', 'wpvr'); ?></label>
2067
+ <input type="text" id="<?= $input_id;?>" value="<?= $value;?>" class="<?= $input_class;?>" name="<?= $name;?>"/>
2068
+ </div>
2069
+
2070
+ <?php
2071
+ ob_end_flush();
2072
+ }
2073
+
2074
+
2075
+ /**
2076
+ * Render checkbox for same tab feature on hotspot
2077
+ *
2078
+ * @param mixed $name
2079
+ * @param mixed $val
2080
+ *
2081
+ * @return void
2082
+ * @since 8.0.0
2083
+ */
2084
+ public static function render_hotspot_same_tab_checkbox_field($name, $val)
2085
+ {
2086
+ extract($val);
2087
+ ob_start();
2088
+ ?>
2089
+
2090
+ <div class="single-settings s_tab" style="display:<?= $display ?>;">
2091
+ <span><?= __($title.': ', 'wpvr'); ?></span>
2092
+ <label class="wpvr-switcher-v2">
2093
+ <input type="checkbox" class="wpvr_url_open" name="<?= $name;?>" value="<?= $value;?>" <?php if($value == 'on') { echo 'checked'; } ?> >
2094
+ <span class="switcher-box"></span>
2095
+ </label>
2096
+ </div>
2097
+
2098
+ <?php
2099
+ ob_end_flush();
2100
+ }
2101
+
2102
+
2103
+ /**
2104
+ * Render Hotspot Setting Pro Version Text Fields
2105
+ * @param mixed $name input field name
2106
+ * @param mixed $val options
2107
+ *
2108
+ * @return void
2109
+ * @since 8.0.0
2110
+ */
2111
+ public static function render_hotspot_pro_text_field($name, $val)
2112
+ {
2113
+ extract($val);
2114
+ ob_start();
2115
+ ?>
2116
+
2117
+ <div class="hotspot-scene" style="display:none;" >
2118
+ <label for="<?= $name;?>"><?= __($title.': ', 'wpvr'); ?></label>
2119
+ <input class="<?= $name;?>" type="text" name="<?= $name;?>"/>
2120
+ </div>
2121
+
2122
+ <?php
2123
+ ob_end_flush();
2124
+ }
2125
+
2126
+
2127
+ /**
2128
+ * Render Hotspot Setting Terget Scene related text fields
2129
+ * @param mixed $name input field name
2130
+ * @param mixed $val options
2131
+ *
2132
+ * @return void
2133
+ * @since 8.0.0
2134
+ */
2135
+ public static function render_hotspot_terget_scene_pro_text_field($name, $val)
2136
+ {
2137
+ extract($val);
2138
+ ob_start();
2139
+ ?>
2140
+
2141
+ <div class="hotspot-scene" style="display:block;" >
2142
+ <label for="<?= $name;?>"><?= __($title.': ', 'wpvr'); ?></label>
2143
+ <input class="<?= $name;?>" type="text" name="<?= $name;?>" value="<?= $value ?>" />
2144
+ </div>
2145
+
2146
+ <?php
2147
+ ob_end_flush();
2148
+ }
2149
+
2150
+
2151
+ /**
2152
+ * Render Hotspot Info Type Selct Field
2153
+ * @param mixed $name input field name
2154
+ * @param mixed $val options
2155
+ *
2156
+ * @return void
2157
+ * @since 8.0.0
2158
+ */
2159
+ public static function render_hotspot_info_type_select_field($name, $val)
2160
+ {
2161
+ extract($val);
2162
+ $default_type = apply_filters('wpvr_hotspot_types', array(
2163
+ 'info' => __('Info', 'wpvr-pro'),
2164
+ 'scene' => __('Scene', 'wpvr-pro'),
2165
+ ));
2166
+ ob_start();
2167
+ ?>
2168
+
2169
+ <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
2170
+ <select name="<?= $name;?>">
2171
+ <?php
2172
+ $hotspot_type = 'info';
2173
+ foreach ($default_type as $key => $value) {
2174
+ echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
2175
+ } ?>
2176
+ </select>
2177
+
2178
+ <?php
2179
+ do_action('hotspot_info_before_hover_content', 'info', array());
2180
+ ob_end_flush();
2181
+ }
2182
+
2183
+
2184
+ /**
2185
+ * Render Hotspot Scene Type Selct Field
2186
+ * @param mixed $name input field name
2187
+ * @param mixed $val options
2188
+ *
2189
+ * @return void
2190
+ * @since 8.0.0
2191
+ */
2192
+ public static function render_hotspot_scene_type_select_field($name, $val)
2193
+ {
2194
+ extract($val);
2195
+ $default_type = apply_filters('wpvr_hotspot_types', array(
2196
+ 'info' => __('Info', 'wpvr-pro'),
2197
+ 'scene' => __('Scene', 'wpvr-pro'),
2198
+ ));
2199
+ ob_start();
2200
+ ?>
2201
+
2202
+ <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
2203
+ <select class="trtr" name="<?= $name;?>">
2204
+ <?php
2205
+ $hotspot_type = 'scene';
2206
+ foreach ($default_type as $key => $value) {
2207
+ echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
2208
+ } ?>
2209
+ </select>
2210
+
2211
+ <?php
2212
+ do_action('hotspot_info_before_hover_content', 'scene', array());
2213
+ ob_end_flush();
2214
+ }
2215
+
2216
+
2217
+ /**
2218
+ * Render Hotspot Info Type URL field
2219
+ * @param mixed $name input field name
2220
+ * @param mixed $val options
2221
+ *
2222
+ * @return void
2223
+ * @since 8.0.o
2224
+ */
2225
+ public static function render_hotspot_info_url_field($name, $val)
2226
+ {
2227
+ extract($val);
2228
+ ob_start();
2229
+ ?>
2230
+
2231
+ <div class="hotspot-url" style="display:<?= $display;?>;">
2232
+ <label for="hotspot-url"><?= __($title .': ', 'wpvr'); ?></label>
2233
+ <input type="url" name="<?= $name;?>" value="<?= $value;?>" />
2234
+ </div>
2235
+
2236
+ <?php
2237
+ ob_end_flush();
2238
+ }
2239
+
2240
+
2241
+ /**
2242
+ * Render Hotspot Textarea Field
2243
+ * @param mixed $name input field name
2244
+ * @param mixed $val options
2245
+ *
2246
+ * @return void
2247
+ * @since 8.0.0
2248
+ */
2249
+ public static function render_hotspot_textarea_field($name, $val)
2250
+ {
2251
+ extract($val);
2252
+ ob_start();
2253
+ ?>
2254
+
2255
+ <div class="<?= $class;?>">
2256
+ <label for="hotspot-content"><?= __($title .': ', 'wpvr'); ?></label>
2257
+ <textarea name="<?= $name;?>"></textarea>
2258
+ </div>
2259
+
2260
+ <?php
2261
+ ob_end_flush();
2262
+ }
2263
+
2264
+
2265
+ /**
2266
+ * Render Hotspot Info Type Textarea Field
2267
+ * @param mixed $name input field name
2268
+ * @param mixed $val options
2269
+ *
2270
+ * @return void
2271
+ * @since 8.0.0
2272
+ */
2273
+ public static function render_hotspot_info_textarea_field($name, $val)
2274
+ {
2275
+ extract($val);
2276
+ ob_start();
2277
+ ?>
2278
+
2279
+ <div class="<?= $class;?>" style="display:<?= $display;?>;">
2280
+ <label for="hotspot-content"><?= __($title .': ', 'wpvr'); ?></label>
2281
+ <textarea name="<?= $name;?>"><?= $value;?></textarea>
2282
+ </div>
2283
+
2284
+ <?php
2285
+ ob_end_flush();
2286
+ }
2287
+
2288
+
2289
+ /**
2290
+ * Render Hotspot Scene Type Textarea Field
2291
+ * @param mixed $name input field name
2292
+ * @param mixed $val options
2293
+ *
2294
+ * @return void
2295
+ * @since 8.0.0
2296
+ */
2297
+ public static function render_hotspot_scene_content_field($name, $val)
2298
+ {
2299
+ extract($val);
2300
+ ob_start();
2301
+ ?>
2302
+
2303
+ <div class="<?= $class;?>" style="display:<?= $display;?>;">
2304
+ <label for="hotspot-content"><?= __($title .': ', 'wpvr'); ?></label>
2305
+ <textarea name="<?= $name;?>"></textarea>
2306
+ </div>
2307
+
2308
+ <?php
2309
+ ob_end_flush();
2310
+ }
2311
+
2312
+
2313
+ /**
2314
+ * Render Hotspot Scene Select Field
2315
+ * @param mixed $name input field name
2316
+ * @param mixed $val options
2317
+ *
2318
+ * @return void
2319
+ */
2320
+ public static function render_hotspot_scene_select_field($name, $val)
2321
+ {
2322
+ extract($val);
2323
+ ob_start();
2324
+ ?>
2325
+
2326
+ <div class="hotspot-scene" style="display:none;" >
2327
+ <label for="hotspot-scene"><?= __($title .': ', 'wpvr'); ?></label>
2328
+ <select class="hotspotscene" name="<?= $name;?>">
2329
+ <option value="none" selected> None</option>
2330
+ </select>
2331
+ </div>
2332
+
2333
+ <?php
2334
+ ob_end_flush();
2335
+ }
2336
+
2337
+
2338
+ /**
2339
+ * Render Hotspot Scene List Select Field
2340
+ * @param mixed $name input field name
2341
+ * @param mixed $val options
2342
+ *
2343
+ * @return void
2344
+ */
2345
+ public static function render_hotspot_scene_list_field($name, $val)
2346
+ {
2347
+ extract($val);
2348
+ ob_start();
2349
+ ?>
2350
+
2351
+ <div class="hotspot-scene" style="display:<?= $display;?>;" >
2352
+ <label for="hotspot-scene"><?= __($title .': ', 'wpvr'); ?></label>
2353
+ <select class="hotspotscene" name="<?= $name;?>">
2354
+ <option value="none" selected> None</option>
2355
+ </select>
2356
+ </div>
2357
+
2358
+ <?php
2359
+ ob_end_flush();
2360
+ }
2361
+
2362
+
2363
+ /**
2364
+ * Render Hotspot Disabled Select Field
2365
+ * @param mixed $name input field name
2366
+ * @param mixed $val options
2367
+ *
2368
+ * @return void
2369
+ * @since 8.0.0
2370
+ */
2371
+ public static function render_hotspot_disabled_text_field($name, $val)
2372
+ {
2373
+ extract($val);
2374
+ ob_start();
2375
+ ?>
2376
+
2377
+ <div class="hotspot-scene" style="display:<?= $display;?>;" >
2378
+ <label for="hotspot-scene"><?= __($title .': ', 'wpvr'); ?></label>
2379
+ <input class="<?= $input_class;?>" type="text" value="<?= $value;?>" name="<?= $name;?>" disabled/>
2380
+ </div>
2381
+
2382
+ <?php
2383
+ ob_end_flush();
2384
+ }
2385
+
2386
+
2387
+ /**
2388
+ * Render Hotspot Custom Icon Field
2389
+ * @param mixed $name input field name
2390
+ * @param mixed $val options
2391
+ *
2392
+ * @return void
2393
+ * @since 8.0.0
2394
+ */
2395
+ public static function render_hotspot_custom_icon_field($name, $val)
2396
+ {
2397
+ extract($val);
2398
+ ob_start();
2399
+ ?>
2400
+
2401
+ <div class="hotspot-setting custom-icon">
2402
+ <label for="hotspot-customclass-pro"><?= __($title .': ', 'wpvr'); ?></label>
2403
+ <select class="hotspot-customclass-pro-select" name="<?= $name;?>">
2404
+ <?php
2405
+ foreach ($custom_icons as $cikey => $civalue) {
2406
+ if ($cikey == $hotspot_custom_class_pro) { ?>
2407
+ <option value="<?= $cikey ?>" selected> <?= $civalue ?></option>
2408
+ <?php } else { ?>
2409
+ <option value="<?= $cikey ?>"> <?= $civalue ?></option>
2410
+ <?php }
2411
+ }
2412
+ ?>
2413
+ </select>
2414
+ <span class="change-icon"><i class="<?= $hotspot_custom_class_pro ?>"></i></span>
2415
+ <div class="field-tooltip">
2416
+ <img src="<?= WPVR_PLUGIN_DIR_URL . 'admin/icon/question.png' ?>" alt="icon" />
2417
+ <span><?= __('Custom icons will only show on frontend. Hotspot custom icons only works with fontawesome 5. If you are using any different version of fontawesome under theme or any plugin, you may deactivate fontawesome from WP VR. Go to "Get Started menu" and select "Role" and check fontawesome disable switch. Now put your desired any icon class under "Hotspot custom icon class" field. It will appear on the frontend.', 'wpvr') ?></span>
2418
+ </div>
2419
+ </div>
2420
+
2421
+ <?php
2422
+ ob_end_flush();
2423
+ }
2424
+
2425
+
2426
+ /**
2427
+ * Render Hotspot Custom Icon Color Field
2428
+ * @param mixed $name input field name
2429
+ * @param mixed $val options
2430
+ *
2431
+ * @return void
2432
+ * @since 8.0.0
2433
+ */
2434
+ public static function render_hotspot_custom_icon_color_field($name, $val)
2435
+ {
2436
+ extract($val);
2437
+ ob_start();
2438
+ ?>
2439
+
2440
+ <div class="hotspot-setting hotspot-icon">
2441
+ <label for="hotspot-customclass-color"><?= __($title .': ', 'wpvr'); ?></label>
2442
+ <input type="color" class="hotspot-customclass-color" name="hotspot-customclass-color" value="<?= $value;?>" />
2443
+ <input type="hidden" class="hotspot-customclass-color-icon-value" name="<?= $name;?>" value="<?= $value;?>" />
2444
+ </div>
2445
+
2446
+ <?php
2447
+ ob_end_flush();
2448
+ }
2449
+
2450
+
2451
+ /**
2452
+ * Render Hotspot Animation Field
2453
+ * @param mixed $name input field name
2454
+ * @param mixed $val options
2455
+ *
2456
+ * @return void
2457
+ * @since 8.0.0
2458
+ */
2459
+ public static function render_hotspot_animation_field($name, $val)
2460
+ {
2461
+ extract($val);
2462
+ ob_start();
2463
+ ?>
2464
+
2465
+ <div class="hotspot-setting">
2466
+ <label for="hotspot-blink"><?= __($title .': ', 'wpvr'); ?></label>
2467
+ <select name="<?= $name;?>" class="hotspot-blink" >
2468
+ <option value="on" <?php if($selected == 'on') { echo 'selected'; } ?> > On</option>
2469
+ <option value="off" <?php if($selected == 'off') { echo 'selected'; } ?> > Off</option>
2470
+ </select>
2471
+ </div>
2472
+
2473
+ <?php
2474
+ ob_end_flush();
2475
+ }
2476
+
2477
+ /**
2478
+ * Render Fluent form Field
2479
+ * @param mixed $name input field name
2480
+ * @param mixed $val options
2481
+ *
2482
+ * @return void
2483
+ * @since 8.0.0
2484
+ */
2485
+ public static function render_hotspot_fluent_form_type_field($name , $val){
2486
+ extract($val);
2487
+ $default_type = apply_filters('wpvr_hotspot_types', array(
2488
+ 'info' => __('Info', 'wpvr-pro'),
2489
+ 'scene' => __('Scene', 'wpvr-pro'),
2490
+ ));
2491
+ ob_start();
2492
+ ?>
2493
+
2494
+ <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
2495
+ <select name="<?= $name;?>">
2496
+ <?php
2497
+ $hotspot_type = 'fluent_form';
2498
+ foreach ($default_type as $key => $value) {
2499
+ echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
2500
+ } ?>
2501
+ </select>
2502
+
2503
+ <?php
2504
+ ob_end_flush();
2505
+ }
2506
+
2507
+ /**
2508
+ * Render Hotspot Fluent form id
2509
+ * @param mixed $name input field name
2510
+ * @param mixed $val options
2511
+ *
2512
+ * @return void
2513
+ * @since 8.0.0
2514
+ */
2515
+ public static function render_hotspot_fluent_form_select_field($name , $val){
2516
+ extract($val);
2517
+ do_action("hotspot_info_before_hover_content","fluent_form",$value);
2518
+ }
2519
+ /**
2520
+ * Render woocommerce Field
2521
+ * @param mixed $name input field name
2522
+ * @param mixed $val options
2523
+ *
2524
+ * @return void
2525
+ * @since 8.0.0
2526
+ */
2527
+ public static function render_hotspot_wc_product_type_field($name , $val){
2528
+ extract($val);
2529
+ $default_type = apply_filters('wpvr_hotspot_types', array(
2530
+ 'info' => __('Info', 'wpvr-pro'),
2531
+ 'scene' => __('Scene', 'wpvr-pro'),
2532
+ ));
2533
+ ob_start();
2534
+ ?>
2535
+
2536
+ <label for="hotspot-type"><?= __($title .': ', 'wpvr'); ?></label>
2537
+ <select name="<?= $name;?>">
2538
+ <?php
2539
+ $hotspot_type = 'wc_product';
2540
+ foreach ($default_type as $key => $value) {
2541
+ echo sprintf("<option %s value='%s'>%s</option>\n", selected($key, $hotspot_type, false), esc_attr($key), esc_attr($value));
2542
+ } ?>
2543
+ </select>
2544
+
2545
+ <?php
2546
+ ob_end_flush();
2547
+ }
2548
+
2549
+ /**
2550
+ * Render Hotspot Woocommerce Product
2551
+ * @param mixed $name input field name
2552
+ * @param mixed $val options
2553
+ *
2554
+ * @return void
2555
+ * @since 8.0.0
2556
+ */
2557
+ public static function render_hotspot_wc_product_select_field($name , $val){
2558
+ extract($val);
2559
+ do_action("hotspot_info_before_hover_content","wc_product",$value);
2560
+ }
2561
+
2562
+
2563
+ }
admin/classes/class-wpvr-post-type.php ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ /**
4
+ * Define the custom post type
5
+ *
6
+ *
7
+ * @link http://rextheme.com/
8
+ * @since 8.0.0
9
+ *
10
+ * @package Wpvr
11
+ * @subpackage Wpvr/includes/classes
12
+ */
13
+
14
+
15
+ class WPVR_Post_Type {
16
+
17
+ /**
18
+ * The ID of this plugin.
19
+ *
20
+ * @since 8.0.0
21
+ * @access private
22
+ * @var string $plugin_name The ID of this plugin.
23
+ */
24
+ private $plugin_name;
25
+
26
+ /**
27
+ * The version of this plugin.
28
+ *
29
+ * @since 8.0.0
30
+ * @access private
31
+ * @var string $version The current version of this plugin.
32
+ */
33
+ private $version;
34
+
35
+ /**
36
+ * The post type of this plugin.
37
+ *
38
+ * @since 8.0.0
39
+ */
40
+ private $post_type;
41
+
42
+ /**
43
+ * Initialize the class and set its properties.
44
+ *
45
+ * @since 8.0.0
46
+ * @param string $plugin_name The name of this plugin.
47
+ * @param string $version The version of this plugin.
48
+ */
49
+ public function __construct($plugin_name, $version, $post_type) {
50
+
51
+ $this->plugin_name = $plugin_name;
52
+ $this->version = $version;
53
+ $this->post_type = $post_type;
54
+
55
+ // Register the post type
56
+ add_action('init', array($this, 'register'));
57
+
58
+ // Admin set post columns
59
+ add_filter('manage_edit-' . $this->post_type . '_columns', array($this, 'set_columns')) ;
60
+
61
+ // Set messages
62
+ add_filter('post_updated_messages', array($this, 'wpvr_post_updated_messages') );
63
+
64
+ // Admin edit post columns
65
+ add_filter('manage_' . $this->post_type . '_posts_custom_column', array($this, 'edit_columns'));
66
+
67
+ }
68
+
69
+ /**
70
+ * Register the custom post type
71
+ *
72
+ * @since 8.0.0
73
+ */
74
+ public function register()
75
+ {
76
+ $labels = array(
77
+ 'name' => __('Tours', $this->plugin_name),
78
+ 'singular_name' => __('Tours', $this->plugin_name),
79
+ 'add_new' => __('Add New Tour', $this->plugin_name),
80
+ 'add_new_item' => __('Add New Tour', $this->plugin_name),
81
+ 'edit_item' => __('Edit Tour', $this->plugin_name),
82
+ 'new_item' => __('New Tour', $this->plugin_name),
83
+ 'view_item' => __('View Tour', $this->plugin_name),
84
+ 'search_items' => __('Search Wpvr Tour', $this->plugin_name),
85
+ 'not_found' => __('No Wpvr Tour found', $this->plugin_name),
86
+ 'not_found_in_trash'=> __('No Wpvr Tour found in Trash', $this->plugin_name),
87
+ 'parent_item_colon' => '',
88
+ 'all_items' => __('All Tours', $this->plugin_name),
89
+ 'menu_name' => __('WP VR', $this->plugin_name),
90
+ );
91
+
92
+ $args = array(
93
+ 'labels' => $labels,
94
+ 'public' => false,
95
+ 'show_ui' => true,
96
+ 'show_in_menu' => false,
97
+ 'menu_position' => 100,
98
+ 'supports' => array( 'title' ),
99
+ 'menu_icon' => plugins_url(). '/wpvr/images/icon.png',
100
+ 'capabilities' => array(
101
+ 'edit_post' => 'edit_wpvr_tour',
102
+ 'edit_posts' => 'edit_wpvr_tours',
103
+ 'edit_others_posts' => 'edit_other_wpvr_tours',
104
+ 'publish_posts' => 'publish_wpvr_tours',
105
+ 'read_post' => 'read_wpvr_tour',
106
+ 'read_private_posts' => 'read_private_wpvr_tours',
107
+ 'delete_post' => 'delete_wpvr_tour'
108
+ ),
109
+ 'map_meta_cap' => true,
110
+ );
111
+
112
+ /**
113
+ * Documentation : https://codex.wordpress.org/Function_Reference/register_post_type
114
+ */
115
+ register_post_type($this->post_type, $args);
116
+ }
117
+
118
+ /**
119
+ * @param $columns
120
+ * @return mixed
121
+ *
122
+ * Choose the columns you want in
123
+ * the admin table for this post
124
+ * @since 8.0.0
125
+ */
126
+ public function set_columns($columns) {
127
+ // Set/unset post type table columns
128
+ $columns = array(
129
+ 'cb' => '<input type="checkbox" />',
130
+ 'title' => __('Title', $this->plugin_name),
131
+ 'shortcode' => __('Shortcodes', $this->plugin_name),
132
+ 'author' => __('Author', $this->plugin_name),
133
+ 'date' => __('Date', $this->plugin_name)
134
+ );
135
+ return $columns;
136
+ }
137
+
138
+ /**
139
+ * @param $column
140
+ * @param $post_id
141
+ *
142
+ * Edit the contents of each column in
143
+ * the admin table for this post
144
+ * @since 8.0.0
145
+ */
146
+ public function edit_columns($column) {
147
+ // Post type table column content
148
+ $post = get_post();
149
+
150
+ switch ($column) {
151
+ case 'shortcode':
152
+ echo '<code>[wpvr id="' . $post->ID . '"]</code>';
153
+ break;
154
+ default:
155
+ break;
156
+ }
157
+ }
158
+
159
+ /**
160
+ * Sets the messages for the custom post type
161
+ *
162
+ * @since 8.0.0
163
+ */
164
+ public function wpvr_post_updated_messages($messages)
165
+ {
166
+ $messages[$this->post_type][1] = __('WP VR item updated.', $this->plugin_name);
167
+ $messages[$this->post_type][4] = __('WP VR item updated.', $this->plugin_name);
168
+
169
+ return $messages;
170
+ }
171
+
172
+ }
admin/classes/class-wpvr-scene.php ADDED
@@ -0,0 +1,1772 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing Scene tab on Setup meta box
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Scene {
14
+
15
+ /**
16
+ * Instance of WPVR_Hotspot class
17
+ *
18
+ * @var object
19
+ * @since 8.0.0
20
+ */
21
+ protected $hotspot;
22
+
23
+ /**
24
+ * Instance of WPVR_Format class
25
+ *
26
+ * @var object
27
+ * @since 8.0.0
28
+ */
29
+ protected $format;
30
+
31
+ /**
32
+ * Instance of WPVR_Validator class
33
+ *
34
+ * @var object
35
+ * @since 8.0.0
36
+ */
37
+ private $validator;
38
+
39
+ /**
40
+ * Number of scene or hotspot item
41
+ *
42
+ * @var integer
43
+ * @since 8.0.0
44
+ */
45
+ protected $data_limit;
46
+
47
+ /**
48
+ * Pro version license status
49
+ *
50
+ * @var string
51
+ * @since 8.0.0
52
+ */
53
+ protected $status;
54
+
55
+
56
+ function __construct()
57
+ {
58
+ $this->hotspot = new WPVR_Hotspot();
59
+ $this->format = new WPVR_Format();
60
+ $this->validator = new WPVR_Validator();
61
+
62
+ $this->status = apply_filters( 'check_pro_license_status', $this->status );
63
+
64
+ if ($this->status !== false && $this->status == 'valid') {
65
+ $this->data_limit = 999999999;
66
+ } else {
67
+ $this->data_limit = 5;
68
+ }
69
+ }
70
+
71
+
72
+ /**
73
+ * Render Scene Settings Content
74
+ *
75
+ * @param array $postdata
76
+ *
77
+ * @return void
78
+ * @since 8.0.0
79
+ */
80
+ public function render_scene($postdata)
81
+ {
82
+ ob_start();
83
+ ?>
84
+
85
+ <!-- Scene and Hotspot repeater -->
86
+ <div class="scene-setup rex-pano-sub-tabs" data-limit="<?= $this->data_limit + 1;?>">
87
+ <?php $this->render_scene_repeater_list($postdata); ?>
88
+ </div>
89
+
90
+ <?php
91
+ ob_end_flush();
92
+ }
93
+
94
+
95
+ /**
96
+ * Render scene setup data repeater list
97
+ *
98
+ * @param array $postdata
99
+ *
100
+ * @return void
101
+ * @since 8.0.0
102
+ */
103
+ private function render_scene_repeater_list($postdata)
104
+ {
105
+ ob_start();
106
+ ?>
107
+ <nav class="rex-pano-tab-nav rex-pano-nav-menu scene-nav">
108
+ <?php $this->render_nav_menu($postdata); // Will render scene navigation bar ?>
109
+ </nav>
110
+
111
+ <div data-repeater-list="scene-list" class="rex-pano-tab-content">
112
+
113
+ <!-- Default empty repeater -->
114
+ <div data-repeater-item class="single-scene rex-pano-tab" data-title="0" id="scene-0">
115
+ <?php $this->render_default_repeater_item(); ?>
116
+ </div>
117
+ <!-- Empty repeater end -->
118
+
119
+ <?php $s = 1; $firstvalue = reset($postdata['panodata']["scene-list"]);
120
+ foreach ($postdata['panodata']["scene-list"] as $pano_scene) { ?>
121
+
122
+ <div data-repeater-item class="single-scene rex-pano-tab <?php if($pano_scene['scene-id'] == $firstvalue['scene-id']) { echo 'active'; }; ?>" data-title="1" id="scene-<?php echo $s;?>">
123
+ <?php $this->render_repeater_item_with_panodata($pano_scene, $s); ?>
124
+ </div>
125
+
126
+ <?php $s++; } ?>
127
+ </div>
128
+ <?php
129
+ ob_end_flush();
130
+ }
131
+
132
+
133
+ /**
134
+ * Render scene nav menu
135
+ *
136
+ * @param array $postdata
137
+ *
138
+ * @return void
139
+ * @since 8.0.0
140
+ */
141
+ private function render_nav_menu($postdata)
142
+ {
143
+ ob_start();
144
+ ?>
145
+ <ul>
146
+ <?php $i = 1; $firstvalue = reset($postdata['panodata']["scene-list"]);
147
+ foreach ($postdata['panodata']["scene-list"] as $pano_scene) { ?>
148
+
149
+ <li class="<?php if ($pano_scene['scene-id'] == $firstvalue['scene-id']) {echo 'active';};?>">
150
+ <span data-index="<?php echo $i;?>" data-href="#scene-<?php echo $i;?>">
151
+ <i class="fa fa-image"></i>
152
+ </span>
153
+ </li>
154
+
155
+ <?php $i++; } ?>
156
+ <li class="add" data-repeater-create><span><i class="fa fa-plus-circle"></i></span></li>
157
+ </ul>
158
+ <?php
159
+ ob_end_flush();
160
+ }
161
+
162
+
163
+ /**
164
+ * Render repeater item for default scene
165
+ *
166
+ * @param int $data_limit
167
+ *
168
+ * @return void
169
+ * @since 8.0.0
170
+ */
171
+ private function render_default_repeater_item()
172
+ {
173
+ ob_start();
174
+ ?>
175
+ <div class="active_scene_id"><p></p></div>
176
+ <div class="scene-content">
177
+ <?php $this->render_default_repeater_item_scene_content(); ?>
178
+ </div>
179
+
180
+ <!-- hotspot setup -->
181
+ <div class="hotspot-setup rex-pano-sub-tabs" data-limit="<?= $this->data_limit;?>">
182
+ <?php $this->hotspot->render_hotspot($s = 0, $h =1)?>
183
+ </div>
184
+ <button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>
185
+ <?php
186
+ ob_end_flush();
187
+ }
188
+
189
+
190
+ /**
191
+ * Render repeater items while scene has panaromic data
192
+ *
193
+ * @param array $pano_scene
194
+ * @param int $s scene number increment var
195
+ *
196
+ * @return void
197
+ * @since 8.0.0
198
+ */
199
+ private function render_repeater_item_with_panodata($pano_scene, $s)
200
+ {
201
+ ob_start();
202
+ ?>
203
+ <div class="active_scene_id"><p></p></div>
204
+ <div class="scene-content">
205
+ <!--
206
+ - Render repeater item scene content
207
+ - If scene has panaromic data
208
+ -->
209
+ <?php $this->render_repeater_scene_content_with_data($pano_scene); ?>
210
+ </div>
211
+ <!--
212
+ - Render repeater item hotspot content
213
+ -->
214
+ <?php $this->render_repeater_item_hotspot_content($pano_scene, $s); ?>
215
+
216
+ <button data-repeater-delete type="button" title="Delete Scene" class="delete-scene"><i class="far fa-trash-alt"></i></button>
217
+ <?php
218
+ ob_end_flush();
219
+ }
220
+
221
+
222
+ /**
223
+ * Render scene content for default repeater item
224
+ *
225
+ * @return void
226
+ * @since 8.0.0
227
+ */
228
+ private function render_default_repeater_item_scene_content()
229
+ {
230
+ ob_start();
231
+ ?>
232
+
233
+ <h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>
234
+
235
+ <div class="scene-left">
236
+ <?php WPVR_Meta_Field::render_scene_left_fields_empty_panodata(); ?>
237
+ </div>
238
+
239
+ <div class="scene-right">
240
+ <?php do_action( 'wpvr_pro_scene_empty_right_fields' ) ?>
241
+ </div>
242
+
243
+ <?php
244
+ ob_end_flush();
245
+ }
246
+
247
+
248
+ /**
249
+ * Render repeater item scene content is scene has panaromic data
250
+ *
251
+ * @param mixed $dscene
252
+ * @param mixed $scene_id
253
+ * @param mixed $scene_photo
254
+ *
255
+ * @return void
256
+ * @since 8.0.0
257
+ */
258
+ private function render_repeater_scene_content_with_data($pano_scene)
259
+ {
260
+ ob_start();
261
+ ?>
262
+ <h6 class="title"><i class="fa fa-cog"></i> Scene Setting </h6>
263
+
264
+ <div class="scene-left">
265
+ <?php WPVR_Meta_Field::render_scene_left_fields_with_panodata($pano_scene) ;?>
266
+ </div>
267
+
268
+ <div class="scene-right">
269
+ <?php do_action( 'wpvr_pro_scene_right_fields', $pano_scene ) ?>
270
+ </div>
271
+
272
+ <?php
273
+ ob_end_flush();
274
+ }
275
+
276
+
277
+ /**
278
+ * Render repeater item hotspot content
279
+ *
280
+ * @param array $pano_hotspots
281
+ * @param int $data_limit
282
+ * @param int $s
283
+ *
284
+ * @return void
285
+ * @since 8.0.0
286
+ */
287
+ private function render_repeater_item_hotspot_content($pano_scene, $s)
288
+ {
289
+ if (!empty($pano_scene['hotspot-list'])) { ?>
290
+ <div class="hotspot-setup rex-pano-sub-tabs" data-limit="<?= $this->data_limit;?>">
291
+
292
+ <?php $this->hotspot->render_hotspot_with_panodata($pano_scene['hotspot-list'], $s); //Render hotspot while scene has hotspot data ?>
293
+
294
+ </div>
295
+ <?php } else { ?>
296
+ <div class="hotspot-setup rex-pano-sub-tabs" data-limit="<?= $this->data_limit;?>">
297
+
298
+ <?php $this->hotspot->render_hotspot($s, $h = 1); //Render hotspot while scene has no hotspot data ?>
299
+
300
+ </div>
301
+ <?php }
302
+ }
303
+
304
+
305
+ /**
306
+ * Update post meta data
307
+ *
308
+ * @param integer $postid
309
+ * @param integer $panoid
310
+ *
311
+ * @return void
312
+ * @since 8.0.0
313
+ */
314
+ public function wpvr_update_meta_box($postid, $panoid)
315
+ {
316
+ $panodata = $this->format->prepare_panodata($_POST['panodata']);
317
+ $default_scene = $this->format->prepare_default_scene($panodata);
318
+ $previewtext = $this->validator->preview_text_validation($_POST['previewtext']);
319
+
320
+ $gzoom = $this->format->set_pro_checkbox_value(@$_POST['gzoom']);
321
+ $default_global_zoom = '';
322
+ $max_global_zoom = '';
323
+ $min_global_zoom = '';
324
+ if ($gzoom == 'on') {
325
+ $default_global_zoom = $_POST['dzoom'];
326
+ $max_global_zoom = $_POST['maxzoom'];
327
+ $min_global_zoom = $_POST['minzoom'];
328
+ }
329
+
330
+ $custom_control = isset($_POST['customcontrol']) ? $_POST['customcontrol'] : null;
331
+
332
+ $vrgallery = $this->format->set_checkbox_value(@$_POST['vrgallery']);
333
+ $vrgallery_title = $this->format->set_checkbox_value(@$_POST['vrgallery_title']);
334
+ $vrgallery_display = $this->format->set_checkbox_value(@$_POST['vrgallery_display']);
335
+
336
+ $mouseZoom = $this->format->set_pro_checkbox_value(@$_POST['mouseZoom']);
337
+ $draggable = $this->format->set_pro_checkbox_value(@$_POST['draggable']);
338
+ $diskeyboard = $this->format->set_pro_checkbox_value(@$_POST['diskeyboard']);
339
+ $keyboardzoom = $this->format->set_checkbox_value(@$_POST['keyboardzoom']);
340
+ $compass = $this->format->set_checkbox_on_value(@$_POST['compass']);
341
+ //===Gyroscopre control===//
342
+ $gyro = $this->format->set_pro_checkbox_value(@$_POST['gyro']);
343
+ if ($gyro == 'on') {
344
+ if (!is_ssl()) {
345
+ wp_send_json_error('<p><span>Warning:</span> Please add SSL to enable Gyroscope for WP VR. </p>');
346
+ die();
347
+ }
348
+ $gyro = true;
349
+ $deviceorientationcontrol = $this->format->set_checkbox_value(@$_POST['deviceorientationcontrol']);
350
+ } else {
351
+ $gyro = false;
352
+ $deviceorientationcontrol = false;
353
+ }
354
+ //===Gyroscopre control===//
355
+
356
+ $autoload = $this->format->set_checkbox_value($_POST['autoload']);
357
+ $control = $this->format->set_checkbox_value($_POST['control']);
358
+
359
+ $scene_fade_duration = $_POST['scenefadeduration'];
360
+ $preview = esc_url($_POST['preview']);
361
+ $rotation = sanitize_text_field($_POST['rotation']);
362
+ $autorotation = sanitize_text_field($_POST['autorotation']);
363
+
364
+ $autorotationinactivedelay = sanitize_text_field($_POST['autorotationinactivedelay']);
365
+ $autorotationstopdelay = sanitize_text_field($_POST['autorotationstopdelay']);
366
+
367
+ $this->validator->basic_setting_validation($autorotationinactivedelay, $autorotationstopdelay); // Basic setting error control and validation //
368
+
369
+ //===Company Logo===//
370
+ $cpLogoSwitch = isset($_POST['cpLogoSwitch']) ? $_POST['cpLogoSwitch'] : 'off';
371
+ $cpLogoImg = isset($_POST['cpLogoImg']) ? $_POST['cpLogoImg'] : '';
372
+ $cpLogoContent = isset($_POST['cpLogoContent']) ? sanitize_text_field($_POST['cpLogoContent']) : '';
373
+ //===Company Logo===//
374
+
375
+ //===Explainer video===//
376
+ $explainerSwitch = isset($_POST['explainerSwitch']) ? $_POST['explainerSwitch'] : 'off';
377
+ $explainerContent = '';
378
+ $explainerContent = isset($_POST['explainerContent']) ? $_POST['explainerContent'] : '';
379
+ //===Explainer video===//
380
+
381
+ $scene_fade_duration = '';
382
+ $scene_fade_duration = $_POST['scenefadeduration'];
383
+
384
+ $this->validator->scene_validation($panodata); // Scene content error control and validation //
385
+
386
+ $this->validator->empty_scene_validation($panodata); // Empty scene content error control and validation //
387
+
388
+ $this->validator->duplicate_hotspot_validation($panodata); // Duplicate error control and validation //
389
+
390
+ $panodata = $this->format->remove_empty_scene_and_hotspot($panodata); // Remove Empty scene and hotspot //
391
+
392
+ //===audio===//
393
+ $bg_music = isset($_POST['bg_music']) ? sanitize_text_field($_POST['bg_music']) : 'off';
394
+ $bg_music_url = isset($_POST['bg_music_url']) ? esc_url_raw($_POST['bg_music_url']) : '';
395
+ $autoplay_bg_music = isset($_POST['autoplay_bg_music']) ? sanitize_text_field($_POST['autoplay_bg_music']) : 'off';
396
+ $loop_bg_music = isset($_POST['loop_bg_music']) ? sanitize_text_field($_POST['loop_bg_music']) : 'off';
397
+ if ($bg_music == 'on') {
398
+ if (empty($bg_music_url)) {
399
+ wp_send_json_error('<p><span>Warning:</span> Please add an audio file as you enabled audio for this tour </p>');
400
+ die();
401
+ }
402
+ }
403
+ //===audio===//
404
+
405
+ $advanced_control = array(
406
+ 'keyboardzoom' => $keyboardzoom,
407
+ 'diskeyboard' => $diskeyboard,
408
+ 'draggable' => $draggable,
409
+ 'mouseZoom' => $mouseZoom,
410
+ 'gyro' => $gyro,
411
+ 'deviceorientationcontrol' => $deviceorientationcontrol,
412
+ 'compass' => $compass,
413
+ 'vrgallery' => $vrgallery,
414
+ 'vrgallery_title' => $vrgallery_title,
415
+ 'vrgallery_display' => $vrgallery_display,
416
+ 'bg_music' => $bg_music,
417
+ 'bg_music_url' => $bg_music_url,
418
+ 'autoplay_bg_music' => $autoplay_bg_music,
419
+ 'loop_bg_music' => $loop_bg_music,
420
+ 'cpLogoSwitch' => $cpLogoSwitch,
421
+ 'cpLogoImg' => $cpLogoImg,
422
+ 'cpLogoContent' => $cpLogoContent,
423
+ 'hfov' => $default_global_zoom,
424
+ 'maxHfov' => $max_global_zoom,
425
+ 'minHfov' => $min_global_zoom,
426
+ 'explainerSwitch' => $explainerSwitch,
427
+ 'explainerContent' => $explainerContent,
428
+ );
429
+
430
+ $pano_array = array();
431
+ $pano_array = array(
432
+ __("panoid") => $panoid,
433
+ __("autoLoad") => $autoload,
434
+ __("showControls") => $control,
435
+ __("customcontrol") => $custom_control,
436
+ __("autoRotate") => $autorotation,
437
+ __("autoRotateInactivityDelay") => $autorotationinactivedelay,
438
+ __("autoRotateStopDelay") => $autorotationstopdelay,
439
+ __("preview") => $preview,
440
+ __("defaultscene") => $default_scene,
441
+ __("scenefadeduration") => $scene_fade_duration,
442
+ __("panodata") => $panodata,
443
+ __("previewtext") => $previewtext);
444
+ $pano_array = apply_filters( 'prepare_scene_pano_array_with_pro_version', $pano_array, $_POST, $advanced_control );
445
+ $pano_array = $this->format->prepare_rotation_wrapper_data($pano_array, $rotation); // Prepare tour rotation wrapper data //
446
+
447
+ update_post_meta($postid, 'panodata', $pano_array);
448
+ die();
449
+
450
+ }
451
+
452
+
453
+ /**
454
+ * Responsible for showing Scene Preview
455
+ *
456
+ * @param string $panoid
457
+ * @param string $panovideo
458
+ *
459
+ * @return wp_send_json_success
460
+ * @since 8.0.0
461
+ */
462
+ public function wpvr_scene_preview($panoid, $panovideo)
463
+ {
464
+ $panodata = $this->format->prepare_panodata($_POST['panodata']);
465
+
466
+ $control = $this->format->set_checkbox_value($_POST['control']);
467
+ $autoload = $this->format->set_checkbox_value($_POST['autoload']);
468
+
469
+ $compass = $this->format->set_checkbox_on_value(@$_POST['compass']);
470
+ $mouseZoom = $this->format->set_pro_checkbox_value(@$_POST['mouseZoom']);
471
+ $draggable = $this->format->set_checkbox_value(@$_POST['draggable']);
472
+ $gzoom = $this->format->set_pro_checkbox_value(@$_POST['gzoom']);
473
+ $diskeyboard = $this->format->set_checkbox_value(@$_POST['diskeyboard']);
474
+ $keyboardzoom = $this->format->set_checkbox_value(@$_POST['keyboardzoom']);
475
+
476
+ $scene_fade_duration = sanitize_text_field($_POST['scenefadeduration']);
477
+ $preview = esc_url($_POST['preview']);
478
+
479
+ $default_scene = '';
480
+
481
+ $rotation = sanitize_text_field($_POST['rotation']);
482
+ $autorotation = sanitize_text_field($_POST['autorotation']);
483
+ $autorotationinactivedelay = sanitize_text_field($_POST['autorotationinactivedelay']);
484
+ $autorotationstopdelay = sanitize_text_field($_POST['autorotationstopdelay']);
485
+
486
+ $default_global_zoom = '';
487
+ $max_global_zoom = '';
488
+ $min_global_zoom = '';
489
+ if ($gzoom == 'on') {
490
+ $default_global_zoom = $_POST['dzoom'];
491
+ $max_global_zoom = $_POST['maxzoom'];
492
+ $min_global_zoom = $_POST['minzoom'];
493
+ }
494
+
495
+ $default_scene = $this->format->prepare_default_scene($panodata);
496
+
497
+ $this->validator->basic_setting_validation($autorotationinactivedelay, $autorotationstopdelay); // Basic setting error control and validation //
498
+
499
+ $this->validator->scene_validation($panodata); // Scene content error control and validation //
500
+
501
+ $this->validator->empty_scene_validation($panodata); // Empty scene content error control and validation //
502
+
503
+ $this->validator->duplicate_hotspot_validation($panodata);
504
+
505
+ $default_data = array();
506
+ if ($gzoom == 'on') {
507
+ $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration, "hfov" => $default_global_zoom, "maxHfov" => $max_global_zoom, "minHfov" => $min_global_zoom);
508
+ } else {
509
+ $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration);
510
+ }
511
+
512
+ $scene_data = $this->format->prepare_scene_data_for_preview($panodata);
513
+
514
+
515
+ $pano_id_array = array();
516
+ $pano_id_array = array("panoid" => $panoid);
517
+ $pano_response = array();
518
+ $pano_response = array("autoLoad" => $autoload, "defaultZoom" => $default_global_zoom, "minZoom" => $min_global_zoom, "maxZoom" => $max_global_zoom, "showControls" => $control, "compass" => $compass, "mouseZoom" => $mouseZoom, "draggable" => $draggable, "disableKeyboardCtrl" => $diskeyboard, 'keyboardZoom' => $keyboardzoom, "preview" => $preview, "autoRotate" => $autorotation, "autoRotateInactivityDelay" => $autorotationinactivedelay, "autoRotateStopDelay" => $autorotationstopdelay, "default" => $default_data, "scenes" => $scene_data);
519
+
520
+ $pano_response = $this->format->prepare_rotation_wrapper_data($pano_response, $rotation);
521
+
522
+ $response = array();
523
+ $response = array($pano_id_array, $pano_response, $panovideo);
524
+ wp_send_json_success($response);
525
+ }
526
+
527
+
528
+ /**
529
+ * Render shortcode for scene and hotspot post data
530
+ *
531
+ * @param array $postdata
532
+ * @param string $panoid
533
+ * @param integer $id
534
+ * @param mixed $radius
535
+ * @param mixed $width
536
+ * @param mixed $height
537
+ *
538
+ * @return string
539
+ * @since 8.0.0
540
+ */
541
+ public function render_scene_shortcode($postdata, $panoid, $id, $radius, $width, $height, $mobile_height)
542
+ {
543
+ $control = false;
544
+ if (isset($postdata['showControls'])) {
545
+ $control = $postdata['showControls'];
546
+ }
547
+
548
+ if ($control) {
549
+ if (isset($postdata['customcontrol'])) {
550
+ $custom_control = $postdata['customcontrol'];
551
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on" || $custom_control['gyroscopeSwitch'] == "on" || $custom_control['backToHomeSwitch'] == "on") {
552
+ $control = false;
553
+ }
554
+ }
555
+ }
556
+
557
+ $vrgallery = false;
558
+ if (isset($postdata['vrgallery'])) {
559
+ $vrgallery = $postdata['vrgallery'];
560
+ }
561
+
562
+ $vrgallery_title = false;
563
+ if (isset($postdata['vrgallery_title'])) {
564
+ $vrgallery_title = $postdata['vrgallery_title'];
565
+ }
566
+
567
+ $vrgallery_display = false;
568
+ if (isset($postdata['vrgallery_display'])) {
569
+ $vrgallery_display = $postdata['vrgallery_display'];
570
+ }
571
+
572
+ $gyro = false;
573
+ $gyro_orientation = false;
574
+ if (isset($postdata['gyro'])) {
575
+ $gyro = $postdata['gyro'];
576
+ if (isset($postdata['deviceorientationcontrol'])) {
577
+ $gyro_orientation = $postdata['deviceorientationcontrol'];
578
+ }
579
+ }
580
+
581
+ $compass = false;
582
+ $audio_right = "5px";
583
+ if (isset($postdata['compass'])) {
584
+ $compass = $postdata['compass'] == 'on' || $postdata['compass'] != null ? true : false;
585
+ if ($compass) {
586
+ $audio_right = "60px";
587
+ }
588
+ }
589
+
590
+ //===explainer handle===//
591
+
592
+ $explainer_right = "10px";
593
+ if ((isset($postdata['compass']) && $postdata['compass'] == true) && (isset($postdata['bg_music']) && $postdata['bg_music'] == 'on')) {
594
+ $explainer_right = "90px";
595
+ } elseif (isset($postdata['compass']) && $postdata['compass'] == true) {
596
+ $explainer_right = "60px";
597
+ } elseif (isset($postdata['bg_music']) && $postdata['bg_music'] == "on") {
598
+ $explainer_right = "30px";
599
+ }
600
+
601
+ //===explainer handle===//
602
+
603
+ $mouseZoom = true;
604
+ if (isset($postdata['mouseZoom'])) {
605
+ $mouseZoom = $postdata['mouseZoom'];
606
+ }
607
+
608
+ $draggable = true;
609
+ if (isset($postdata['draggable'])) {
610
+ $draggable = $postdata['draggable'] == 'off' || $postdata['draggable'] == null ? false : true;
611
+ }
612
+
613
+ $diskeyboard = false;
614
+ if (isset($postdata['diskeyboard'])) {
615
+ $diskeyboard = $postdata['diskeyboard'] == 'off' || $postdata['diskeyboard'] == null ? false : true;
616
+ }
617
+
618
+ $keyboardzoom = true;
619
+ if (isset($postdata['keyboardzoom'])) {
620
+ $keyboardzoom = $postdata['keyboardzoom'];
621
+ }
622
+
623
+ $autoload = false;
624
+
625
+ if (isset($postdata['autoLoad'])) {
626
+ $autoload = $postdata['autoLoad'];
627
+ }
628
+
629
+ $default_scene = '';
630
+ if (isset($postdata['defaultscene'])) {
631
+ $default_scene = $postdata['defaultscene'];
632
+ }
633
+
634
+ $default_global_zoom = '';
635
+ if (isset($postdata['hfov'])) {
636
+ $default_global_zoom = $postdata['hfov'];
637
+ }
638
+
639
+ $max_global_zoom = '';
640
+ if (isset($postdata['maxHfov'])) {
641
+ $max_global_zoom = $postdata['maxHfov'];
642
+ }
643
+
644
+ $min_global_zoom = '';
645
+ if (isset($postdata['minHfov'])) {
646
+ $min_global_zoom = $postdata['minHfov'];
647
+ }
648
+
649
+ $preview = '';
650
+ if (isset($postdata['preview'])) {
651
+ $preview = $postdata['preview'];
652
+ }
653
+
654
+ $autorotation = '';
655
+ if (isset($postdata["autoRotate"])) {
656
+ $autorotation = $postdata["autoRotate"];
657
+ }
658
+ $autorotationinactivedelay = '';
659
+ if (isset($postdata["autoRotateInactivityDelay"])) {
660
+ $autorotationinactivedelay = $postdata["autoRotateInactivityDelay"];
661
+ }
662
+ $autorotationstopdelay = '';
663
+ if (isset($postdata["autoRotateStopDelay"])) {
664
+ $autorotationstopdelay = $postdata["autoRotateStopDelay"];
665
+ }
666
+
667
+ $scene_fade_duration = '';
668
+ if (isset($postdata['scenefadeduration'])) {
669
+ $scene_fade_duration = $postdata['scenefadeduration'];
670
+ }
671
+
672
+ $panodata = '';
673
+ if (isset($postdata['panodata'])) {
674
+ $panodata = $postdata['panodata'];
675
+ }
676
+
677
+ $hotspoticoncolor = '#00b4ff';
678
+ $hotspotblink = 'on';
679
+ $default_data = array();
680
+ if ($default_global_zoom != '' && $max_global_zoom != '' && $min_global_zoom != '') {
681
+ $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration, "hfov" => $default_global_zoom, "maxHfov" => $max_global_zoom, "minHfov" => $min_global_zoom);
682
+ } else {
683
+ $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration);
684
+ }
685
+
686
+ $scene_data = array();
687
+
688
+ if (!empty($panodata["scene-list"])) {
689
+ foreach ($panodata["scene-list"] as $panoscenes) {
690
+ $scene_ititle = '';
691
+ if (isset($panoscenes["scene-ititle"])) {
692
+ $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
693
+ }
694
+
695
+ $scene_author = '';
696
+ if (isset($panoscenes["scene-author"])) {
697
+ $scene_author = sanitize_text_field($panoscenes["scene-author"]);
698
+ }
699
+
700
+ $scene_author_url = '';
701
+ if (isset($panoscenes["scene-author-url"])) {
702
+ $scene_author_url = sanitize_text_field($panoscenes["scene-author-url"]);
703
+ }
704
+
705
+ $scene_vaov = 180;
706
+ if (isset($panoscenes["scene-vaov"])) {
707
+ $scene_vaov = (float)$panoscenes["scene-vaov"];
708
+ }
709
+
710
+ $scene_haov = 360;
711
+ if (isset($panoscenes["scene-haov"])) {
712
+ $scene_haov = (float)$panoscenes["scene-haov"];
713
+ }
714
+
715
+
716
+ $scene_vertical_offset = 0;
717
+ if (isset($panoscenes["scene-vertical-offset"])) {
718
+ $scene_vertical_offset = (float)$panoscenes["scene-vertical-offset"];
719
+ }
720
+
721
+ $default_scene_pitch = null;
722
+ if (isset($panoscenes["scene-pitch"])) {
723
+ $default_scene_pitch = (float)$panoscenes["scene-pitch"];
724
+ }
725
+
726
+ $default_scene_yaw = null;
727
+ if (isset($panoscenes["scene-yaw"])) {
728
+ $default_scene_yaw = (float)$panoscenes["scene-yaw"];
729
+ }
730
+
731
+ $scene_max_pitch = '';
732
+ if (isset($panoscenes["scene-maxpitch"])) {
733
+ $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
734
+ }
735
+
736
+
737
+ $scene_min_pitch = '';
738
+ if (isset($panoscenes["scene-minpitch"])) {
739
+ $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
740
+ }
741
+
742
+
743
+ $scene_max_yaw = '';
744
+ if (isset($panoscenes["scene-maxyaw"])) {
745
+ $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
746
+ }
747
+
748
+
749
+ $scene_min_yaw = '';
750
+ if (isset($panoscenes["scene-minyaw"])) {
751
+ $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
752
+ }
753
+
754
+ $default_zoom = 100;
755
+ if (isset($panoscenes["scene-zoom"]) && $panoscenes["scene-zoom"] != "") {
756
+ $default_zoom = $panoscenes["scene-zoom"];
757
+ } else {
758
+ if ($default_global_zoom != '') {
759
+ $default_zoom = (int)$default_global_zoom;
760
+ }
761
+ }
762
+
763
+
764
+ $max_zoom = 120;
765
+ if (isset($panoscenes["scene-maxzoom"]) && $panoscenes["scene-maxzoom"] != '') {
766
+ $max_zoom = (int)$panoscenes["scene-maxzoom"];
767
+ } else {
768
+ if ($max_global_zoom != '') {
769
+ $max_zoom = (int)$max_global_zoom;
770
+ }
771
+ }
772
+
773
+
774
+
775
+ $min_zoom = 50;
776
+ if (isset($panoscenes["scene-minzoom"]) && $panoscenes["scene-minzoom"] != '') {
777
+ $min_zoom = (int)$panoscenes["scene-minzoom"];
778
+ } else {
779
+ if ($min_global_zoom != '') {
780
+ $min_zoom = (int)$min_global_zoom;
781
+ }
782
+ }
783
+
784
+
785
+ $hotspot_datas = array();
786
+ if (isset($panoscenes["hotspot-list"])) {
787
+ $hotspot_datas = $panoscenes["hotspot-list"];
788
+ }
789
+
790
+ $hotspots = array();
791
+
792
+
793
+ foreach ($hotspot_datas as $hotspot_data) {
794
+ $status = get_option('wpvr_edd_license_status');
795
+ if ($status !== false && $status == 'valid') {
796
+ if (isset($hotspot_data["hotspot-customclass-pro"]) && $hotspot_data["hotspot-customclass-pro"] != 'none') {
797
+ $hotspot_data["hotspot-customclass"] = $hotspot_data["hotspot-customclass-pro"];
798
+ $hotspoticoncolor = $hotspot_data["hotspot-customclass-color-icon-value"];
799
+ }
800
+ if (isset($hotspot_data['hotspot-blink'])) {
801
+ $hotspotblink = $hotspot_data['hotspot-blink'];
802
+ }
803
+ }
804
+ $hotspot_scene_pitch = '';
805
+ if (isset($hotspot_data["hotspot-scene-pitch"])) {
806
+ $hotspot_scene_pitch = $hotspot_data["hotspot-scene-pitch"];
807
+ }
808
+ $hotspot_scene_yaw = '';
809
+ if (isset($hotspot_data["hotspot-scene-yaw"])) {
810
+ $hotspot_scene_yaw = $hotspot_data["hotspot-scene-yaw"];
811
+ }
812
+
813
+ $hotspot_type = $hotspot_data["hotspot-type"] !== 'scene' ? 'info' : $hotspot_data["hotspot-type"];
814
+ $hotspot_content = '';
815
+
816
+ ob_start();
817
+ do_action('wpvr_hotspot_content', $hotspot_data);
818
+ $hotspot_content = ob_get_clean();
819
+
820
+ if (!$hotspot_content) {
821
+ $hotspot_content = $hotspot_data["hotspot-content"];
822
+ }
823
+
824
+ if (isset($hotspot_data["wpvr_url_open"][0])) {
825
+ $wpvr_url_open = $hotspot_data["wpvr_url_open"][0];
826
+ } else {
827
+ $wpvr_url_open = "off";
828
+ }
829
+
830
+ $hotspot_info = array(
831
+ "text" => $hotspot_data["hotspot-title"],
832
+ "pitch" => $hotspot_data["hotspot-pitch"],
833
+ "yaw" => $hotspot_data["hotspot-yaw"],
834
+ "type" => $hotspot_type,
835
+ "cssClass" => $hotspot_data["hotspot-customclass"],
836
+ "URL" => $hotspot_data["hotspot-url"],
837
+ "wpvr_url_open" => $wpvr_url_open,
838
+ "clickHandlerArgs" => $hotspot_content,
839
+ "createTooltipArgs" => $hotspot_data["hotspot-hover"],
840
+ "sceneId" => $hotspot_data["hotspot-scene"],
841
+ "targetPitch" => (float)$hotspot_scene_pitch,
842
+ "targetYaw" => (float)$hotspot_scene_yaw,
843
+ 'hotspot_type' => $hotspot_data['hotspot-type'],
844
+ 'hotspot_target' => 'notBlank'
845
+ );
846
+
847
+ $hotspot_info['URL'] = ($hotspot_data['hotspot-type'] === 'fluent_form' || $hotspot_data['hotspot-type'] === 'wc_product') ? '' : $hotspot_info['URL'];
848
+
849
+ if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
850
+ unset($hotspot_info["cssClass"]);
851
+ }
852
+ if (empty($hotspot_data["hotspot-scene"])) {
853
+ unset($hotspot_info['targetPitch']);
854
+ unset($hotspot_info['targetYaw']);
855
+ }
856
+ array_push($hotspots, $hotspot_info);
857
+ }
858
+
859
+ $device_scene = $panoscenes['scene-attachment-url'];
860
+ $mobile_media_resize = get_option('mobile_media_resize');
861
+ $file_accessible = ini_get('allow_url_fopen');
862
+
863
+ if ($mobile_media_resize == "true") {
864
+ if ($file_accessible == "1") {
865
+ $image_info = getimagesize($device_scene);
866
+ if ($image_info[0] > 4096) {
867
+ $src_to_id_for_mobile = '';
868
+ $src_to_id_for_desktop = '';
869
+ if (wpvr_isMobileDevice()) {
870
+ $src_to_id_for_mobile = attachment_url_to_postid($panoscenes['scene-attachment-url']);
871
+ if ($src_to_id_for_mobile) {
872
+ $mobile_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'wpvr_mobile');
873
+ if ($mobile_scene[3]) {
874
+ $device_scene = $mobile_scene[0];
875
+ }
876
+ }
877
+ } else {
878
+ $src_to_id_for_desktop = attachment_url_to_postid($panoscenes['scene-attachment-url']);
879
+ if ($src_to_id_for_desktop) {
880
+ $desktop_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'full');
881
+ if ($desktop_scene[0]) {
882
+ $device_scene = $desktop_scene[0];
883
+ }
884
+ }
885
+ }
886
+ }
887
+ }
888
+ }
889
+
890
+ $scene_info = array();
891
+
892
+ if ($panoscenes["scene-type"] == 'cubemap') {
893
+ $pano_attachment = array(
894
+ $panoscenes["scene-attachment-url-face0"],
895
+ $panoscenes["scene-attachment-url-face1"],
896
+ $panoscenes["scene-attachment-url-face2"],
897
+ $panoscenes["scene-attachment-url-face3"],
898
+ $panoscenes["scene-attachment-url-face4"],
899
+ $panoscenes["scene-attachment-url-face5"]
900
+ );
901
+
902
+ $scene_info = array("type" => $panoscenes["scene-type"], "cubeMap" => $pano_attachment, "pitch" => $default_scene_pitch, "maxPitch" => $scene_max_pitch, "minPitch" => $scene_min_pitch, "maxYaw" => $scene_max_yaw, "minYaw" => $scene_min_yaw, "yaw" => $default_scene_yaw, "hfov" => $default_zoom, "maxHfov" => $max_zoom, "minHfov" => $min_zoom, "title" => $scene_ititle, "author" => $scene_author, "authorURL" => $scene_author_url, "vaov" => $scene_vaov, "haov" => $scene_haov, "vOffset" => $scene_vertical_offset, "hotSpots" => $hotspots);
903
+ } else {
904
+ $scene_info = array("type" => $panoscenes["scene-type"], "panorama" => $device_scene, "pitch" => $default_scene_pitch, "maxPitch" => $scene_max_pitch, "minPitch" => $scene_min_pitch, "maxYaw" => $scene_max_yaw, "minYaw" => $scene_min_yaw, "yaw" => $default_scene_yaw, "hfov" => $default_zoom, "maxHfov" => $max_zoom, "minHfov" => $min_zoom, "title" => $scene_ititle, "author" => $scene_author, "authorURL" => $scene_author_url, "vaov" => $scene_vaov, "haov" => $scene_haov, "vOffset" => $scene_vertical_offset, "hotSpots" => $hotspots);
905
+ }
906
+
907
+
908
+ if (isset($panoscenes["ptyscene"])) {
909
+ if ($panoscenes["ptyscene"] == "off") {
910
+ unset($scene_info['pitch']);
911
+ unset($scene_info['yaw']);
912
+ }
913
+ }
914
+
915
+ if (empty($panoscenes["scene-ititle"])) {
916
+ unset($scene_info['title']);
917
+ }
918
+ if (empty($panoscenes["scene-author"])) {
919
+ unset($scene_info['author']);
920
+ }
921
+ if (empty($panoscenes["scene-author-url"])) {
922
+ unset($scene_info['authorURL']);
923
+ }
924
+
925
+ if (empty($scene_vaov)) {
926
+ unset($scene_info['vaov']);
927
+ }
928
+
929
+ if (empty($scene_haov)) {
930
+ unset($scene_info['haov']);
931
+ }
932
+
933
+ if (empty($scene_vertical_offset)) {
934
+ unset($scene_info['vOffset']);
935
+ }
936
+
937
+ if (isset($panoscenes["cvgscene"])) {
938
+ if ($panoscenes["cvgscene"] == "off") {
939
+ unset($scene_info['maxPitch']);
940
+ unset($scene_info['minPitch']);
941
+ }
942
+ }
943
+ if (empty($panoscenes["scene-maxpitch"])) {
944
+ unset($scene_info['maxPitch']);
945
+ }
946
+
947
+ if (empty($panoscenes["scene-minpitch"])) {
948
+ unset($scene_info['minPitch']);
949
+ }
950
+
951
+ if (isset($panoscenes["chgscene"])) {
952
+ if ($panoscenes["chgscene"] == "off") {
953
+ unset($scene_info['maxYaw']);
954
+ unset($scene_info['minYaw']);
955
+ }
956
+ }
957
+ if (empty($panoscenes["scene-maxyaw"])) {
958
+ unset($scene_info['maxYaw']);
959
+ }
960
+
961
+ if (empty($panoscenes["scene-minyaw"])) {
962
+ unset($scene_info['minYaw']);
963
+ }
964
+
965
+ // if (isset($panoscenes["czscene"])) {
966
+ // if ($panoscenes["czscene"] == "off") {
967
+ // unset($scene_info['hfov']);
968
+ // unset($scene_info['maxHfov']);
969
+ // unset($scene_info['minHfov']);
970
+ // }
971
+ // }
972
+
973
+ $scene_array = array();
974
+ $scene_array = array(
975
+ $panoscenes["scene-id"] => $scene_info
976
+ );
977
+ $scene_data[$panoscenes["scene-id"]] = $scene_info;
978
+ }
979
+ }
980
+
981
+ $pano_id_array = array();
982
+ $pano_id_array = array("panoid" => $panoid);
983
+ $pano_response = array();
984
+ $pano_response = array("autoLoad" => $autoload, "showControls" => $control, "orientationSupport" => 'false', "compass" => $compass, 'orientationOnByDefault' => $gyro_orientation, "mouseZoom" => $mouseZoom, "draggable" => $draggable, 'disableKeyboardCtrl' => $diskeyboard, 'keyboardZoom' => $keyboardzoom, "preview" => $preview, "autoRotate" => $autorotation, "autoRotateInactivityDelay" => $autorotationinactivedelay, "autoRotateStopDelay" => $autorotationstopdelay, "default" => $default_data, "scenes" => $scene_data);
985
+ if (empty($autorotation)) {
986
+ unset($pano_response['autoRotate']);
987
+ unset($pano_response['autoRotateInactivityDelay']);
988
+ unset($pano_response['autoRotateStopDelay']);
989
+ }
990
+ if (empty($autorotationinactivedelay)) {
991
+ unset($pano_response['autoRotateInactivityDelay']);
992
+ }
993
+ if (empty($autorotationstopdelay)) {
994
+ unset($pano_response['autoRotateStopDelay']);
995
+ }
996
+ $response = array();
997
+ $response = array($pano_id_array, $pano_response);
998
+ if (!empty($response)) {
999
+ $response = json_encode($response);
1000
+ }
1001
+
1002
+
1003
+ if (empty($width)) {
1004
+ $width = '600px';
1005
+ }
1006
+ if (empty($height)) {
1007
+ $height = '400px';
1008
+ }
1009
+ $foreground_color = '#fff';
1010
+ $pulse_color = wpvr_hex2rgb($hotspoticoncolor);
1011
+ $rgb = wpvr_HTMLToRGB($hotspoticoncolor);
1012
+ $hsl = wpvr_RGBToHSL($rgb);
1013
+ if ($hsl->lightness > 200) {
1014
+ $foreground_color = '#000000';
1015
+ } else {
1016
+ $foreground_color = '#fff';
1017
+ }
1018
+ $html = '';
1019
+
1020
+ $html .= '<style>';
1021
+ if ($width == 'embed') {
1022
+ $html .= 'body{
1023
+ overflow: hidden;
1024
+ }';
1025
+ }
1026
+ $html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas,
1027
+ #' . $panoid . ' div.pnlm-hotspot-base.fab,
1028
+ #' . $panoid . ' div.pnlm-hotspot-base.fa,
1029
+ #' . $panoid . ' div.pnlm-hotspot-base.far {
1030
+ display: block !important;
1031
+ background-color: ' . $hotspoticoncolor . ';
1032
+ color: ' . $foreground_color . ';
1033
+ border-radius: 100%;
1034
+ width: 30px;
1035
+ height: 30px;
1036
+ animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
1037
+ }';
1038
+ if ($hotspotblink == 'on') {
1039
+ $html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
1040
+ 0% {
1041
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1042
+ }
1043
+ 100% {
1044
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1045
+ }
1046
+ }
1047
+ @keyframes icon-pulse' . $panoid . ' {
1048
+ 0% {
1049
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1050
+ }
1051
+ 100% {
1052
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1053
+ }
1054
+ }';
1055
+ }
1056
+
1057
+ $status = get_option('wpvr_edd_license_status');
1058
+ if ($status !== false && $status == 'valid') {
1059
+ if (!$gyro) {
1060
+ $html .= '#' . $panoid . ' div.pnlm-orientation-button {
1061
+ display: none;
1062
+ }';
1063
+ }
1064
+ } else {
1065
+ $html .= '#' . $panoid . ' div.pnlm-orientation-button {
1066
+ display: none;
1067
+ }';
1068
+ }
1069
+
1070
+ $html .= '</style>';
1071
+
1072
+ if ($width == 'fullwidth') {
1073
+ if (wpvr_isMobileDevice()) {
1074
+ if ($radius) {
1075
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style="text-align:center; border-radius:' . $radius . '; direction:ltr;">';
1076
+ } else {
1077
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style="text-align:center;">';
1078
+ }
1079
+ } else {
1080
+ if ($radius) {
1081
+ $html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . '; border-radius:' . $radius . '; direction:ltr;" >';
1082
+ } else {
1083
+ $html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . '; direction:ltr;" >';
1084
+ }
1085
+ }
1086
+ } elseif ($width == 'embed') {
1087
+ $html .= '<div id="pano' . $id . '" class="pano-wrap vrembed" style=" text-align:center; direction:ltr;" >';
1088
+ } else {
1089
+ // $browser_width = "<script>document.write(screen.width);</script>";
1090
+
1091
+ if (wpvr_isMobileDevice()) {
1092
+ if ($radius) {
1093
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $mobile_height . '!important; margin: 0 auto; border-radius:' . $radius . '; direction:ltr;">';
1094
+ } else {
1095
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $mobile_height . '!important; margin: 0 auto; direction:ltr;">';
1096
+ }
1097
+ } else {
1098
+ if ($radius) {
1099
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; border-radius:' . $radius . '; direction:ltr;">';
1100
+ } else {
1101
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; direction:ltr;">';
1102
+ }
1103
+ }
1104
+ }
1105
+
1106
+ //===company logo===//
1107
+ if (isset($postdata['cpLogoSwitch'])) {
1108
+ $cpLogoImg = $postdata['cpLogoImg'];
1109
+ $cpLogoContent = $postdata['cpLogoContent'];
1110
+ if ($postdata['cpLogoSwitch'] == 'on') {
1111
+ $html .= '<div id="cp-logo-controls">';
1112
+ $html .= '<div class="cp-logo-ctrl" id="cp-logo">';
1113
+ if ($cpLogoImg) {
1114
+ $html .= '<img src="' . $cpLogoImg . '" alt="Company Logo">';
1115
+ }
1116
+
1117
+ if ($cpLogoContent) {
1118
+ $html .= '<div class="cp-info">' . $cpLogoContent . '</div>';
1119
+ }
1120
+ $html .= '</div>';
1121
+ $html .= '</div>';
1122
+ }
1123
+ }
1124
+ //===company logo ends===//
1125
+
1126
+ //===Background Tour===//
1127
+ if (isset($postdata['bg_tour_enabler'])) {
1128
+
1129
+ $bg_tour_enabler = $postdata['bg_tour_enabler'];
1130
+ if ($bg_tour_enabler == 'on') {
1131
+ $bg_tour_navmenu = $postdata['bg_tour_navmenu'];
1132
+ $bg_tour_title = $postdata['bg_tour_title'];
1133
+ $bg_tour_subtitle = $postdata['bg_tour_subtitle'];
1134
+
1135
+ if ($bg_tour_navmenu == 'on') {
1136
+ $menuLocations = get_nav_menu_locations();
1137
+ if (!empty($menuLocations['primary'])) {
1138
+ $menuID = $menuLocations['primary'];
1139
+ $primaryNav = wp_get_nav_menu_items($menuID);
1140
+ $html .= '<ul class="wpvr-navbar-container">';
1141
+ foreach ($primaryNav as $primaryNav_key => $primaryNav_value) {
1142
+ if ($primaryNav_value->menu_item_parent == "0") {
1143
+ $html .= '<li>';
1144
+ $html .= '<a href="' . $primaryNav_value->url . '">' . $primaryNav_value->title . '</a>';
1145
+ $html .= '<ul class="wpvr-navbar-dropdown">';
1146
+ foreach ($primaryNav as $pm_key => $pm_value) {
1147
+ if ($pm_value->menu_item_parent == $primaryNav_value->ID) {
1148
+ $html .= '<li>';
1149
+ $html .= '<a href="' . $pm_value->url . '">' . $pm_value->title . '</a>';
1150
+ $html .= '</li>';
1151
+ }
1152
+ }
1153
+ $html .= '</ul>';
1154
+ $html .= '</li>';
1155
+ }
1156
+ }
1157
+ $html .= '</ul>';
1158
+ }
1159
+ }
1160
+
1161
+ $html .= '<div class="wpvr-home-content">';
1162
+ $html .= '<div class="wpvr-home-title">' . $bg_tour_title . '</div>';
1163
+ $html .= '<div class="wpvr-home-subtitle">' . $bg_tour_subtitle . '</div>';
1164
+ $html .= '</div>';
1165
+ }
1166
+ }
1167
+ //===Background Tour End===//
1168
+
1169
+ //===Custom Control===//
1170
+ if (isset($custom_control)) {
1171
+ if ($custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" || $custom_control['gyroscopeSwitch'] == "on" || $custom_control['backToHomeSwitch'] == "on") {
1172
+ $html .= '<div id="zoom-in-out-controls' . $id . '" class="zoom-in-out-controls">';
1173
+
1174
+ if ($custom_control['backToHomeSwitch'] == "on") {
1175
+ $html .= '<div class="ctrl" id="backToHome' . $id . '"><i class="' . $custom_control['backToHomeIcon'] . '" style="color:' . $custom_control['backToHomeColor'] . ';"></i></div>';
1176
+ }
1177
+
1178
+ if ($custom_control['panZoomInSwitch'] == "on") {
1179
+ $html .= '<div class="ctrl" id="zoom-in' . $id . '"><i class="' . $custom_control['panZoomInIcon'] . '" style="color:' . $custom_control['panZoomInColor'] . ';"></i></div>';
1180
+ }
1181
+
1182
+ if ($custom_control['panZoomOutSwitch'] == "on") {
1183
+ $html .= '<div class="ctrl" id="zoom-out' . $id . '"><i class="' . $custom_control['panZoomOutIcon'] . '" style="color:' . $custom_control['panZoomOutColor'] . ';"></i></div>';
1184
+ }
1185
+ if ($custom_control['gyroscopeSwitch'] == "on") {
1186
+ $html .= '<div class="ctrl" id="gyroscope' . $id . '" ><i class="' . $custom_control['gyroscopeIcon'] . '" id="' . $custom_control['gyroscopeIcon'] . '" style="color:' . $custom_control['gyroscopeColor'] . ';"></i></div>';
1187
+ }
1188
+ $html .= '</div>';
1189
+ }
1190
+ //===zoom in out Control===//
1191
+
1192
+ if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on") {
1193
+ //===Custom Control===//
1194
+ $html .= '<div class="controls" id="controls' . $id . '">';
1195
+
1196
+ if ($custom_control['panupSwitch'] == "on") {
1197
+ $html .= '<div class="ctrl pan-up" id="pan-up' . $id . '"><i class="' . $custom_control['panupIcon'] . '" style="color:' . $custom_control['panupColor'] . ';"></i></div>';
1198
+ }
1199
+
1200
+ if ($custom_control['panDownSwitch'] == "on") {
1201
+ $html .= '<div class="ctrl pan-down" id="pan-down' . $id . '"><i class="' . $custom_control['panDownIcon'] . '" style="color:' . $custom_control['panDownColor'] . ';"></i></div>';
1202
+ }
1203
+
1204
+ if ($custom_control['panLeftSwitch'] == "on") {
1205
+ $html .= '<div class="ctrl pan-left" id="pan-left' . $id . '"><i class="' . $custom_control['panLeftIcon'] . '" style="color:' . $custom_control['panLeftColor'] . ';"></i></div>';
1206
+ }
1207
+
1208
+ if ($custom_control['panRightSwitch'] == "on") {
1209
+ $html .= '<div class="ctrl pan-right" id="pan-right' . $id . '"><i class="' . $custom_control['panRightIcon'] . '" style="color:' . $custom_control['panRightColor'] . ';"></i></div>';
1210
+ }
1211
+
1212
+ if ($custom_control['panFullscreenSwitch'] == "on") {
1213
+ $html .= '<div class="ctrl fullscreen" id="fullscreen' . $id . '"><i class="' . $custom_control['panFullscreenIcon'] . '" style="color:' . $custom_control['panFullscreenColor'] . ';"></i></div>';
1214
+ }
1215
+ $html .= '</div>';
1216
+ }
1217
+ //===explainer button===//
1218
+ $explainerControlSwitch = '';
1219
+ if (isset($custom_control['explainerSwitch'])) {
1220
+ $explainerControlSwitch = $custom_control['explainerSwitch'];
1221
+ }
1222
+ if ($explainerControlSwitch == "on") {
1223
+ $html .= '<div class="explainer_button" id="explainer_button_' . $id . '" style="right:' . $explainer_right . '">';
1224
+ $html .= '<div class="ctrl" id="explainer_target_' . $id . '"><i class="' . $custom_control['explainerIcon'] . '" style="color:' . $custom_control['explainerColor'] . ';"></i></div>';
1225
+ $html .= '</div>';
1226
+ }
1227
+
1228
+ //===explainer button===//
1229
+ }
1230
+ //===Custom Control===//
1231
+
1232
+ if ($vrgallery) {
1233
+ //===Carousal setup===//
1234
+ $html .= '<div id="vrgcontrols' . $id . '" class="vrgcontrols">';
1235
+
1236
+ $html .= '<div class="vrgctrl' . $id . ' vrbounce">';
1237
+ $html .= '</div>';
1238
+ $html .= '</div>';
1239
+
1240
+ $html .= '<div id="sccontrols' . $id . '" class="scene-gallery vrowl-carousel owl-theme">';
1241
+ if (isset($panodata["scene-list"])) {
1242
+ foreach ($panodata["scene-list"] as $panoscenes) {
1243
+ $scene_key = $panoscenes['scene-id'];
1244
+ if ($vrgallery_title == 'on') {
1245
+ $scene_key_title = $panoscenes['scene-ititle'];
1246
+ // $scene_key_title = $panoscenes['scene-id'];
1247
+ } else {
1248
+ $scene_key_title = "";
1249
+ }
1250
+ if ($panoscenes['scene-type'] == 'cubemap') {
1251
+ $img_src_url = $panoscenes['scene-attachment-url-face0'];
1252
+ } else {
1253
+ $img_src_url = $panoscenes['scene-attachment-url'];
1254
+ }
1255
+ $src_to_id = attachment_url_to_postid($img_src_url);
1256
+ $thumbnail_array = wp_get_attachment_image_src($src_to_id, 'thumbnail');
1257
+ if ($thumbnail_array) {
1258
+ $thumbnail = $thumbnail_array[0];
1259
+ } else {
1260
+ $thumbnail = $img_src_url;
1261
+ }
1262
+
1263
+ $html .= '<ul style="width:150px;"><li title="Double click to view scene">' . $scene_key_title . '<img class="scctrl" id="' . $scene_key . '_gallery_' . $id . '" src="' . $thumbnail . '"></li></ul>';
1264
+ }
1265
+ }
1266
+
1267
+ $html .= '</div>';
1268
+
1269
+ $html .= '
1270
+ <div class="owl-nav wpvr_slider_nav">
1271
+ <button type="button" role="presentation" class="owl-prev wpvr_owl_prev">
1272
+ <div class="nav-btn prev-slide"><i class="fa fa-angle-left"></i></div>
1273
+ </button>
1274
+ <button type="button" role="presentation" class="owl-next wpvr_owl_next">
1275
+ <div class="nav-btn next-slide"><i class="fa fa-angle-right"></i></div>
1276
+ </button>
1277
+ </div>
1278
+ ';
1279
+
1280
+ //===Carousal setup end===//
1281
+ }
1282
+
1283
+ if (isset($postdata['bg_music'])) {
1284
+ $bg_music = $postdata['bg_music'];
1285
+ $bg_music_url = $postdata['bg_music_url'];
1286
+ $autoplay_bg_music = $postdata['autoplay_bg_music'];
1287
+ $loop_bg_music = $postdata['loop_bg_music'];
1288
+ $bg_loop = '';
1289
+ if ($loop_bg_music == 'on') {
1290
+ $bg_loop = 'loop';
1291
+ }
1292
+
1293
+ if ($bg_music == 'on') {
1294
+ $html .= '<div id="adcontrol' . $id . '" class="adcontrol" style="right:' . $audio_right . '">';
1295
+ $html .= '<audio id="vrAudio' . $id . '" class="vrAudioDefault" data-autoplay="' . $autoplay_bg_music . '" onended="audionEnd' . $id . '()" ' . $bg_loop . '>
1296
+ <source src="' . $bg_music_url . '" type="audio/mpeg">
1297
+ Your browser does not support the audio element.
1298
+ </audio>
1299
+ <button onclick="playPause' . $id . '()" class="ctrl audio_control" data-play="' . $autoplay_bg_music . '" data-play="' . $autoplay_bg_music . '" id="audio_control' . $id . '"><i id="vr-volume' . $id . '" class="wpvrvolumeicon' . $id . ' fas fa-volume-up" style="color:#fff;"></i></button>
1300
+ ';
1301
+ $html .= '</div>';
1302
+ }
1303
+ }
1304
+
1305
+ //===Explainer video section===//
1306
+ $explainerContent = "";
1307
+ if (isset($postdata['explainerContent'])) {
1308
+ $explainerContent = $postdata['explainerContent'];
1309
+ }
1310
+ $html .= '<div class="explainer" id="explainer' . $id . '" style="display: none">';
1311
+ $html .= '<span class="close-explainer-video"><i class="fa fa-times"></i></span>';
1312
+ $html .= '' . $explainerContent . '';
1313
+ $html .= '</div>';
1314
+ //===Explainer video section End===//
1315
+
1316
+
1317
+ $html .= '<div class="wpvr-hotspot-tweak-contents-wrapper" style="display: none">';
1318
+ $html .= '<i class="fa fa-times cross" data-id="' . $id . '"></i>';
1319
+ $html .= '<div class="wpvr-hotspot-tweak-contents-flex">';
1320
+ $html .= '<div class="wpvr-hotspot-tweak-contents">';
1321
+ ob_start();
1322
+ do_action('wpvr_hotspot_tweak_contents', $scene_data);
1323
+ $hotspot_content = ob_get_clean();
1324
+ $html .= $hotspot_content;
1325
+ $html .= '</div>';
1326
+ $html .= '</div>';
1327
+ $html .= '</div>';
1328
+
1329
+ $html .= '<div class="custom-ifram-wrapper" style="display: none;">';
1330
+ $html .= '<i class="fa fa-times cross" data-id="' . $id . '"></i>';
1331
+
1332
+ $html .= '<div class="custom-ifram-flex">';
1333
+ $html .= '<div class="custom-ifram">';
1334
+ $html .= '</div>';
1335
+ $html .= '</div>';
1336
+ $html .= '</div>';
1337
+
1338
+ $html .= '</div>';
1339
+
1340
+
1341
+
1342
+ //script started
1343
+ $html .= '<script>';
1344
+ if (isset($postdata['bg_music'])) {
1345
+ if ($bg_music == 'on') {
1346
+ $html .= '
1347
+ var x' . $id . ' = document.getElementById("vrAudio' . $id . '");
1348
+
1349
+ var playing' . $id . ' = false;
1350
+
1351
+ function playPause' . $id . '() {
1352
+
1353
+ if (playing' . $id . ') {
1354
+ jQuery("#vr-volume' . $id . '").removeClass("fas fa-volume-up");
1355
+ jQuery("#vr-volume' . $id . '").addClass("fas fa-volume-mute");
1356
+ x' . $id . '.pause();
1357
+ jQuery("#audio_control' . $id . '").attr("data-play", "off");
1358
+ playing' . $id . ' = false;
1359
+
1360
+ }
1361
+ else {
1362
+ jQuery("#vr-volume' . $id . '").removeClass("fas fa-volume-mute");
1363
+ jQuery("#vr-volume' . $id . '").addClass("fas fa-volume-up");
1364
+ x' . $id . '.play();
1365
+ jQuery("#audio_control' . $id . '").attr("data-play", "on");
1366
+ playing' . $id . ' = true;
1367
+ }
1368
+ }
1369
+
1370
+ function audionEnd' . $id . '() {
1371
+ playing' . $id . ' = false;
1372
+ jQuery("#vr-volume' . $id . '").removeClass("fas fa-volume-up");
1373
+ jQuery("#vr-volume' . $id . '").addClass("fas fa-volume-mute");
1374
+ jQuery("#audio_control' . $id . '").attr("data-play", "off");
1375
+ }
1376
+ ';
1377
+
1378
+ if ($autoplay_bg_music == 'on') {
1379
+ $html .= '
1380
+ document.getElementById("pano' . $id . '").addEventListener("click", musicPlay' . $id . ');
1381
+ function musicPlay' . $id . '() {
1382
+ playing' . $id . ' = true;
1383
+ document.getElementById("vrAudio' . $id . '").play();
1384
+ document.getElementById("pano' . $id . '").removeEventListener("click", musicPlay' . $id . ');
1385
+ }
1386
+ ';
1387
+ }
1388
+ }
1389
+ }
1390
+ $html .= 'jQuery(document).ready(function() {';
1391
+ $html .= 'var response = ' . $response . ';';
1392
+ $html .= 'var scenes = response[1];';
1393
+ $html .= 'if(scenes) {';
1394
+ $html .= 'var scenedata = scenes.scenes;';
1395
+ $html .= 'for(var i in scenedata) {';
1396
+ $html .= 'var scenehotspot = scenedata[i].hotSpots;';
1397
+ $html .= 'for(var i = 0; i < scenehotspot.length; i++) {';
1398
+ $html .= 'if(scenehotspot[i]["clickHandlerArgs"] != "") {';
1399
+
1400
+ $html .= 'scenehotspot[i]["clickHandlerFunc"] = wpvrhotspot;';
1401
+ $html .= '}';
1402
+
1403
+ if (wpvr_isMobileDevice() && get_option('dis_on_hover') == "true") {
1404
+ } else {
1405
+ $html .= 'if(scenehotspot[i]["createTooltipArgs"] != "") {';
1406
+ $html .= 'scenehotspot[i]["createTooltipFunc"] = wpvrtooltip;';
1407
+ $html .= '}';
1408
+ }
1409
+
1410
+ $html .= '}';
1411
+ $html .= '}';
1412
+ $html .= '}';
1413
+ $html .= 'var panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);';
1414
+ $html .= 'panoshow' . $id . '.on("load", function (){
1415
+ setTimeout(() => {
1416
+ window.dispatchEvent(new Event("resize"));
1417
+ }, 200);
1418
+ if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1419
+ jQuery("#controls' . $id . '").css("bottom", "55px");
1420
+ }
1421
+ else {
1422
+ jQuery("#controls' . $id . '").css("bottom", "5px");
1423
+ }
1424
+ });';
1425
+
1426
+ $html .= 'panoshow' . $id . '.on("render", function (){
1427
+ window.dispatchEvent(new Event("resize"));
1428
+ });';
1429
+
1430
+ $html .= '
1431
+ if (scenes.autoRotate) {
1432
+ panoshow' . $id . '.on("load", function (){
1433
+ setTimeout(function(){ panoshow' . $id . '.startAutoRotate(scenes.autoRotate, 0); }, 3000);
1434
+ });
1435
+ panoshow' . $id . '.on("scenechange", function (){
1436
+ setTimeout(function(){ panoshow' . $id . '.startAutoRotate(scenes.autoRotate, 0); }, 3000);
1437
+ });
1438
+ }
1439
+ ';
1440
+ $html .= 'var touchtime = 0;';
1441
+ if ($vrgallery) {
1442
+ if (isset($panodata["scene-list"])) {
1443
+ foreach ($panodata["scene-list"] as $panoscenes) {
1444
+ $scene_key = $panoscenes['scene-id'];
1445
+ $scene_key_gallery = $panoscenes['scene-id'] . '_gallery_' . $id;
1446
+ $img_src_url = $panoscenes['scene-attachment-url'];
1447
+ // $html .= 'document.getElementById("'.$scene_key_gallery.'").addEventListener("click", function(e) { ';
1448
+ // $html .= 'if (touchtime == 0) {';
1449
+ // $html .= 'touchtime = new Date().getTime();';
1450
+ // $html .= '} else {';
1451
+ // $html .= 'if (((new Date().getTime()) - touchtime) < 800) {';
1452
+ // $html .= 'panoshow'.$id.'.loadScene("'.$scene_key.'");';
1453
+ // $html .= 'touchtime = 0;';
1454
+ // $html .= '} else {';
1455
+ // $html .= 'touchtime = new Date().getTime();';
1456
+ // $html .= '}';
1457
+ // $html .= '}';
1458
+ // $html .= '});';
1459
+ $html .= '
1460
+ jQuery(document).on("click","#' . $scene_key_gallery . '",function() {
1461
+ panoshow' . $id . '.loadScene("' . $scene_key . '");
1462
+ });
1463
+ ';
1464
+ }
1465
+ }
1466
+ }
1467
+
1468
+ //===Custom Control===//
1469
+ if (isset($custom_control)) {
1470
+ if ($custom_control['panupSwitch'] == "on") {
1471
+ $html .= 'document.getElementById("pan-up' . $id . '").addEventListener("click", function(e) {';
1472
+ $html .= 'panoshow' . $id . '.setPitch(panoshow' . $id . '.getPitch() + 10);';
1473
+ $html .= '});';
1474
+ }
1475
+
1476
+ if ($custom_control['panDownSwitch'] == "on") {
1477
+ $html .= 'document.getElementById("pan-down' . $id . '").addEventListener("click", function(e) {';
1478
+ $html .= 'panoshow' . $id . '.setPitch(panoshow' . $id . '.getPitch() - 10);';
1479
+ $html .= '});';
1480
+ }
1481
+
1482
+ if ($custom_control['panLeftSwitch'] == "on") {
1483
+ $html .= 'document.getElementById("pan-left' . $id . '").addEventListener("click", function(e) {';
1484
+ $html .= 'panoshow' . $id . '.setYaw(panoshow' . $id . '.getYaw() - 10);';
1485
+ $html .= '});';
1486
+ }
1487
+
1488
+ if ($custom_control['panRightSwitch'] == "on") {
1489
+ $html .= 'document.getElementById("pan-right' . $id . '").addEventListener("click", function(e) {';
1490
+ $html .= 'panoshow' . $id . '.setYaw(panoshow' . $id . '.getYaw() + 10);';
1491
+ $html .= '});';
1492
+ }
1493
+
1494
+ if ($custom_control['panZoomInSwitch'] == "on") {
1495
+ $html .= 'document.getElementById("zoom-in' . $id . '").addEventListener("click", function(e) {';
1496
+ $html .= 'panoshow' . $id . '.setHfov(panoshow' . $id . '.getHfov() - 10);';
1497
+ $html .= '});';
1498
+ }
1499
+
1500
+ if ($custom_control['panZoomOutSwitch'] == "on") {
1501
+ $html .= 'document.getElementById("zoom-out' . $id . '").addEventListener("click", function(e) {';
1502
+ $html .= 'panoshow' . $id . '.setHfov(panoshow' . $id . '.getHfov() + 10);';
1503
+ $html .= '});';
1504
+ }
1505
+
1506
+ if ($custom_control['panFullscreenSwitch'] == "on") {
1507
+ $html .= 'document.getElementById("fullscreen' . $id . '").addEventListener("click", function(e) {';
1508
+ $html .= 'panoshow' . $id . '.toggleFullscreen();';
1509
+ $html .= '});';
1510
+ }
1511
+
1512
+ if ($custom_control['backToHomeSwitch'] == "on") {
1513
+ $html .= 'document.getElementById("backToHome' . $id . '").addEventListener("click", function(e) {';
1514
+ $html .= 'panoshow' . $id . '.loadScene("' . $default_scene . '");';
1515
+ $html .= '});';
1516
+ }
1517
+
1518
+ if ($custom_control['gyroscopeSwitch'] == "on") {
1519
+ $html .= 'document.getElementById("gyroscope' . $id . '").addEventListener("click", function(e) {';
1520
+ $html .= '
1521
+ if (panoshow' . $id . '.isOrientationActive()) {
1522
+ panoshow' . $id . '.stopOrientation();
1523
+ document.getElementById("' . $custom_control['gyroscopeIcon'] . '").style.color = "red";
1524
+ }
1525
+ else {
1526
+ panoshow' . $id . '.startOrientation();
1527
+ document.getElementById("' . $custom_control['gyroscopeIcon'] . '").style.color = "' . $custom_control['gyroscopeColor'] . '";
1528
+ }
1529
+
1530
+ ';
1531
+ $html .= '});';
1532
+ }
1533
+ }
1534
+
1535
+ $angle_up = '<i class="fa fa-angle-up"></i>';
1536
+ $angle_down = '<i class="fa fa-angle-down"></i>';
1537
+ $sin_qout = "'";
1538
+
1539
+ //===Explainer Script===//
1540
+
1541
+ if ($autoplay_bg_music == 'on') {
1542
+
1543
+ $html .= '
1544
+ jQuery(document).on("click","#explainer_button_' . $id . '",function() {
1545
+ jQuery("#explainer' . $id . '").slideToggle();
1546
+
1547
+ playing' . $id . ' = false;
1548
+ var x' . $id . ' = document.getElementById("vrAudio' . $id . '");
1549
+ jQuery("#vr-volume' . $id . '").removeClass("fas fa-volume-up");
1550
+ jQuery("#vr-volume' . $id . '").addClass("fas fa-volume-mute");
1551
+ x' . $id . '.pause();
1552
+ });
1553
+
1554
+ jQuery(document).on("click",".close-explainer-video",function() {
1555
+ jQuery(this).parent(".explainer").hide();
1556
+ var el_src = jQuery(".vr-iframe").attr("src");
1557
+ jQuery(".vr-iframe").attr("src", el_src);
1558
+ });
1559
+
1560
+ ';
1561
+ } else {
1562
+ $html .= '
1563
+ jQuery(document).on("click","#explainer_button_' . $id . '",function() {
1564
+ jQuery("#explainer' . $id . '").slideToggle();
1565
+ });
1566
+
1567
+ jQuery(document).on("click",".close-explainer-video",function() {
1568
+ jQuery(this).parent(".explainer").hide();
1569
+ var el_src = jQuery(".vr-iframe").attr("src");
1570
+ jQuery(".vr-iframe").attr("src", el_src);
1571
+ });
1572
+
1573
+ ';
1574
+ }
1575
+
1576
+ //===Explainer Script End===//
1577
+
1578
+ if ($vrgallery_display) {
1579
+
1580
+ if (!$autoload) {
1581
+ $html .= '
1582
+ jQuery(document).ready(function($){
1583
+ jQuery("#sccontrols' . $id . '").hide();
1584
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_up . $sin_qout . ');
1585
+ jQuery("#sccontrols' . $id . '").hide();
1586
+ jQuery(".wpvr_slider_nav").hide();
1587
+ });
1588
+ ';
1589
+
1590
+ $html .= '
1591
+ var slide' . $id . ' = "down";
1592
+ jQuery(document).on("click","#vrgcontrols' . $id . '",function() {
1593
+
1594
+ if (slide' . $id . ' == "up") {
1595
+ jQuery(".vrgctrl' . $id . '").empty();
1596
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_up . $sin_qout . ');
1597
+ slide' . $id . ' = "down";
1598
+ }
1599
+ else {
1600
+ jQuery(".vrgctrl' . $id . '").empty();
1601
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_down . $sin_qout . ');
1602
+ slide' . $id . ' = "up";
1603
+ }
1604
+ jQuery(".wpvr_slider_nav").slideToggle();
1605
+ jQuery("#sccontrols' . $id . '").slideToggle();
1606
+ });
1607
+ ';
1608
+ } else {
1609
+ $html .= '
1610
+ jQuery(document).ready(function($){
1611
+ jQuery("#sccontrols' . $id . '").show();
1612
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_down . $sin_qout . ');
1613
+ jQuery(".wpvr_slider_nav").show();
1614
+ });
1615
+ ';
1616
+
1617
+ $html .= '
1618
+ var slide' . $id . ' = "down";
1619
+ jQuery(document).on("click","#vrgcontrols' . $id . '",function() {
1620
+
1621
+ if (slide' . $id . ' == "up") {
1622
+ jQuery(".vrgctrl' . $id . '").empty();
1623
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_down . $sin_qout . ');
1624
+ slide' . $id . ' = "down";
1625
+ }
1626
+ else {
1627
+ jQuery(".vrgctrl' . $id . '").empty();
1628
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_up . $sin_qout . ');
1629
+ slide' . $id . ' = "up";
1630
+ }
1631
+ jQuery(".wpvr_slider_nav").slideToggle();
1632
+ jQuery("#sccontrols' . $id . '").slideToggle();
1633
+ });
1634
+ ';
1635
+ }
1636
+ } else {
1637
+ $html .= '
1638
+ jQuery(document).ready(function($){
1639
+ jQuery("#sccontrols' . $id . '").hide();
1640
+ jQuery(".wpvr_slider_nav").hide();
1641
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_up . $sin_qout . ');
1642
+ });
1643
+ ';
1644
+
1645
+ $html .= '
1646
+ var slide' . $id . ' = "down";
1647
+ jQuery(document).on("click","#vrgcontrols' . $id . '",function() {
1648
+
1649
+ if (slide' . $id . ' == "up") {
1650
+ jQuery(".vrgctrl' . $id . '").empty();
1651
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_up . $sin_qout . ');
1652
+ slide' . $id . ' = "down";
1653
+ }
1654
+ else {
1655
+ jQuery(".vrgctrl' . $id . '").empty();
1656
+ jQuery(".vrgctrl' . $id . '").html(' . $sin_qout . $angle_down . $sin_qout . ');
1657
+ slide' . $id . ' = "up";
1658
+ }
1659
+ jQuery(".wpvr_slider_nav").slideToggle();
1660
+ jQuery("#sccontrols' . $id . '").slideToggle();
1661
+ });
1662
+ ';
1663
+ }
1664
+
1665
+
1666
+
1667
+
1668
+ if (!$autoload) {
1669
+ $html .= '
1670
+ jQuery(document).ready(function(){
1671
+ jQuery("#controls' . $id . '").hide();
1672
+ jQuery("#zoom-in-out-controls' . $id . '").hide();
1673
+ jQuery("#adcontrol' . $id . '").hide();
1674
+ jQuery("#pano' . $id . '").find(".pnlm-panorama-info").hide();
1675
+ });
1676
+
1677
+ ';
1678
+
1679
+ if ($vrgallery_display) {
1680
+ $html .= 'var load_once = "true";';
1681
+ $html .= 'panoshow' . $id . '.on("load", function (){
1682
+ if (load_once == "true") {
1683
+ load_once = "false";
1684
+ jQuery("#sccontrols' . $id . '").slideToggle();
1685
+ }
1686
+ });';
1687
+ }
1688
+
1689
+ $html .= 'panoshow' . $id . '.on("load", function (){
1690
+ jQuery("#controls' . $id . '").show();
1691
+ jQuery("#zoom-in-out-controls' . $id . '").show();
1692
+ jQuery("#adcontrol' . $id . '").show();
1693
+ jQuery("#pano' . $id . '").find(".pnlm-panorama-info").show();
1694
+ });';
1695
+ }
1696
+
1697
+ //==Old code working properly==//
1698
+
1699
+ $previeword = "Click to Load Panorama";
1700
+ if (isset($postdata['previewtext']) && $postdata['previewtext'] != '') {
1701
+ $previeword = $postdata['previewtext'];
1702
+ }
1703
+ $html .= '
1704
+ jQuery(".elementor-tab-title").click(function(){
1705
+ var element_id;
1706
+ var pano_id;
1707
+ var element_id = this.id;
1708
+ element_id = element_id.split("-");
1709
+ element_id = element_id[3];
1710
+ jQuery("#elementor-tab-content-"+element_id).children("div").addClass("awwww");
1711
+ var pano_id = jQuery(".awwww").attr("id");
1712
+ jQuery("#elementor-tab-content-"+element_id).children("div").removeClass("awwww");
1713
+ if (pano_id != undefined) {
1714
+ pano_id = pano_id.split("o");
1715
+ pano_id = pano_id[1];
1716
+ if (pano_id == "' . $id . '") {
1717
+ jQuery("#pano' . $id . '").children(".pnlm-render-container").remove();
1718
+ jQuery("#pano' . $id . '").children(".pnlm-ui").remove();
1719
+ panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);
1720
+ jQuery("#pano' . $id . '").children(".pnlm-ui").find(".pnlm-load-button p").text("' . $previeword . '")
1721
+ setTimeout(function() {
1722
+ // panoshow' . $id . '.loadScene("' . $default_scene . '");
1723
+ window.dispatchEvent(new Event("resize"));
1724
+ if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1725
+ jQuery("#controls' . $id . '").css("bottom", "55px");
1726
+ }
1727
+ else {
1728
+ jQuery("#controls' . $id . '").css("bottom", "5px");
1729
+ }
1730
+
1731
+ }, 200);
1732
+ }
1733
+ }
1734
+ });
1735
+ ';
1736
+ $html .= '
1737
+ jQuery(".geodir-tab-head dd, #vr-tour-tab").click(function(){
1738
+ jQuery("#pano' . $id . '").children(".pnlm-render-container").remove();
1739
+ jQuery("#pano' . $id . '").children(".pnlm-ui").remove();
1740
+ panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);
1741
+ setTimeout(function() {
1742
+ panoshow' . $id . '.loadScene("' . $default_scene . '");
1743
+ window.dispatchEvent(new Event("resize"));
1744
+ if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1745
+ jQuery("#controls' . $id . '").css("bottom", "55px");
1746
+ }
1747
+ else {
1748
+ jQuery("#controls' . $id . '").css("bottom", "5px");
1749
+ }
1750
+ }, 200);
1751
+ });
1752
+ ';
1753
+ if (isset($postdata['previewtext']) && $postdata['previewtext'] != '') {
1754
+ $html .= '
1755
+ jQuery("#pano' . $id . '").children(".pnlm-ui").find(".pnlm-load-button p").text("' . $postdata['previewtext'] . '")
1756
+ ';
1757
+ }
1758
+
1759
+ if ($default_global_zoom != '' || $max_global_zoom != '' || $min_global_zoom != '') {
1760
+ $html .= '
1761
+ jQuery(".globalzoom").val("on").change();
1762
+ ';
1763
+ }
1764
+
1765
+
1766
+ $html .= '});';
1767
+ $html .= '</script>';
1768
+ //script end
1769
+
1770
+ return $html;
1771
+ }
1772
+ }
admin/classes/class-wpvr-shortcode.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing shortcode content on Setup metabox
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 1.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Shortcode_TEST {
14
+
15
+ function __construct()
16
+ {
17
+ }
18
+
19
+ /**
20
+ * Render shortcode content on metabox
21
+ * @return null
22
+ */
23
+ public function render_shortcode()
24
+ {
25
+ ob_start();
26
+ ?>
27
+
28
+ <?php
29
+ $post = get_post();
30
+ $id = $post->ID;
31
+ ?>
32
+ <h4 class="area-title"><?php echo __('Using this Tour', 'wpvr'); ?></h4>
33
+
34
+ <div class="shortcode-wrapper">
35
+ <div class="single-shortcode classic">
36
+ <span class="shortcode-title"><?php echo __('For Classic Editor:', 'wpvr'); ?></span>
37
+
38
+ <div class="field-wapper">
39
+ <span><?php echo __('To use this WP VR tour in your posts or pages use the following shortcode ', 'wpvr'); ?></span>
40
+
41
+ <div class="shortcode-field">
42
+ <p class="copycode" id="copy-shortcode-video">[wpvr id="<?php echo $id; ?>"]</p>
43
+ <span id="wpvr-copy-shortcode-video" class="wpvr-copy-shortcode">
44
+ <img src=" <?php echo WPVR_PLUGIN_DIR_URL; ?>admin/icon/copy.png" alt="icon" />
45
+ </span>
46
+ </div>
47
+
48
+ <span id="wpvr-copied-notice-video" class="wpvr-copied-notice"></span>
49
+
50
+ </div>
51
+ </div>
52
+ </div>
53
+
54
+ <?php
55
+ ob_end_flush();
56
+ }
57
+
58
+ }
admin/classes/class-wpvr-streetview.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing streetview content on Setup metabox
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_StreetView {
14
+
15
+ /**
16
+ * Instance of WPVR_Validator class
17
+ *
18
+ * @var object
19
+ * @since 8.0.0
20
+ */
21
+ protected $validator;
22
+
23
+ function __construct()
24
+ {
25
+ $this->validator = new WPVR_Validator();
26
+ }
27
+
28
+
29
+ /**
30
+ * Render shortcode while post has streetview data
31
+ *
32
+ * @param array $postdata
33
+ *
34
+ * @return array
35
+ * @since 8.0.0
36
+ */
37
+ public function render_streetview_shortcode($postdata, $width, $height)
38
+ {
39
+ if (empty($width)) {
40
+ $width = '600px';
41
+ }
42
+ if (empty($height)) {
43
+ $height = '400px';
44
+ }
45
+ $streetviewurl = $postdata['streetviewurl'];
46
+ $html = '';
47
+ $html .= '<div class="vr-streetview" style="text-align: center; max-width:100%; width:'.$width.'; height:'.$height.'; margin: 0 auto;">';
48
+ $html .= '<iframe src="'.$streetviewurl.'" frameborder="0" style="border:0; width:100px; height:100%;" allowfullscreen=""></iframe>';
49
+ $html .= '</div>';
50
+ return $html;
51
+ }
52
+
53
+ }
admin/classes/class-wpvr-video.php ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing Video tab content on Setup metabox
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 1.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Video {
14
+
15
+ /**
16
+ * Instance of WPVR_Format class
17
+ */
18
+ protected $format;
19
+
20
+ /**
21
+ * Instance of WPVR_Validation class
22
+ */
23
+ protected $validator;
24
+
25
+
26
+ function __construct()
27
+ {
28
+ $this->format = new WPVR_Format();
29
+
30
+ $this->validator = new WPVR_Validator();
31
+ }
32
+
33
+
34
+ /**
35
+ * Render Video Tab Content
36
+ * @param mixed $postdata
37
+ *
38
+ * @return void
39
+ * @since 8.0.0
40
+ */
41
+ public function render_video($postdata)
42
+ {
43
+ ob_start();
44
+ ?>
45
+
46
+ <h6 class="title"><?php echo __('Video Settings : ', 'wpvr'); ?></h6>
47
+
48
+ <?php
49
+ WPVR_Meta_Field::render_video_setting_meta_fields($postdata);
50
+ ob_end_flush();
51
+ }
52
+
53
+
54
+ /**
55
+ * Update post meta data
56
+ *
57
+ * @param integer $postid
58
+ * @param integer $panoid
59
+ *
60
+ * @return void
61
+ * @since 8.0.0
62
+ */
63
+ public function wpvr_update_meta_box($postid, $panoid)
64
+ {
65
+ $vidid = 'vid' . $postid;
66
+ $videourl = esc_url_raw($_POST['videourl']);
67
+
68
+ $videodata = $this->format->prepare_video_settings_data();
69
+ $vidtype = '';
70
+
71
+ $this->validator->empty_video_validation($videourl);
72
+
73
+ if (strpos($videourl, 'youtube') > 0) {
74
+ $vidtype = 'youtube';
75
+ $html = $this->format->prepare_youtube_video_meta_data($videourl, $videodata);
76
+ } elseif (strpos($videourl, 'youtu.be') > 0) {
77
+ $vidtype = 'youtube';
78
+ $html = $this->format->prepare_youtu_be_video_meta_data($videourl, $videodata);
79
+ } elseif (strpos($videourl, 'vimeo') > 0) {
80
+ $vidtype = 'vimeo';
81
+ $html = $this->format->prepare_vimeo_video_meta_data($videourl, $videodata);
82
+ } else {
83
+ $vidtype = 'selfhost';
84
+ $html = $this->format->prepare_selfhost_video_meta_data($videourl, $vidid, $videodata);
85
+ }
86
+
87
+ $videoarray = array();
88
+ $videoarray = array(
89
+ __("panoid") => $panoid,
90
+ __("panoviddata") => $html,
91
+ __("vidid") => $vidid,
92
+ __("vidurl") => $videourl,
93
+ __("vidtype") => $vidtype,
94
+ __("autoplay") => $videodata['autoplay'],
95
+ __("loop") => $videodata['loop']
96
+ );
97
+ update_post_meta($postid, 'panodata', $videoarray);
98
+ die();
99
+ }
100
+
101
+
102
+ /**
103
+ * Video Tour Preview
104
+ *
105
+ * @param mixed $panoid
106
+ *
107
+ * @return wp_send_json_response
108
+ * @since 8.0.0
109
+ */
110
+ public function wpvr_video_preview($panoid)
111
+ {
112
+ $randid = rand(1000, 1000000);
113
+ $vidid = 'vid' . $randid;
114
+ $videourl = esc_url_raw($_POST['videourl']);
115
+ $videodata = $this->format->prepare_video_settings_data();
116
+ $vidtype = '';
117
+
118
+ $this->validator->empty_video_validation($videourl);
119
+
120
+ if (strpos($videourl, 'youtube') > 0) {
121
+ $vidtype = 'youtube';
122
+ $html = $this->format->prepare_youtube_video_preview($videourl, $videodata);
123
+ } elseif (strpos($videourl, 'youtu.be') > 0) {
124
+ $vidtype = 'youtube';
125
+ $html = $this->format->prepare_youtu_be_video_meta_data($videourl, $videodata);
126
+ } elseif (strpos($videourl, 'vimeo') > 0) {
127
+ $vidtype = 'vimeo';
128
+ $html = $this->format->prepare_vimeo_video_meta_data($videourl, $videodata);
129
+ } else {
130
+ $vidtype = 'selfhost';
131
+ $html = $this->format->prepare_selfhost_video_meta_data($videourl, $vidid, $videodata);
132
+ }
133
+
134
+ $response = array();
135
+ $response = array(__("panoid") => $panoid, __("panodata") => $html, __("vidid") => $vidid, __("vidtype") => $vidtype);
136
+ wp_send_json_success($response);
137
+ }
138
+
139
+
140
+ /**
141
+ * Render shortcode while postdata has video data
142
+ *
143
+ * @param array $postdata
144
+ * @param integer $id
145
+ *
146
+ * @return string
147
+ * @since 8.0.0
148
+ */
149
+ public function render_video_shortcode($postdata, $id, $width, $height, $radius)
150
+ {
151
+ if (empty($width)) {
152
+ $width = '600px';
153
+ }
154
+ if (empty($height)) {
155
+ $height = '400px';
156
+ }
157
+
158
+ $autoplay = 'off';
159
+ if (isset($postdata['autoplay'])) {
160
+ $autoplay = $postdata['autoplay'];
161
+ }
162
+
163
+ $loop = 'off';
164
+ if (isset($postdata['loop'])) {
165
+ $loop = $postdata['loop'];
166
+ }
167
+
168
+ if (strpos($postdata['vidurl'], 'youtube') > 0 || strpos($postdata['vidurl'], 'youtu') > 0) {
169
+ $html = $this->format->preapre_youtube_video_shortcode_data($postdata, $width, $height, $autoplay, $loop, $radius);
170
+ } elseif (strpos($postdata['vidurl'], 'vimeo') > 0) {
171
+ $html = $this->format->prepare_vimeo_video_shortcode_data($postdata, $width, $height, $autoplay, $loop, $radius);
172
+ } else {
173
+ $html = $this->format->prepare_regular_video_shortcode_data($id, $postdata, $width, $height, $radius);
174
+ }
175
+ return $html;
176
+ }
177
+
178
+ }
admin/css/wpvr-admin.css CHANGED
@@ -661,9 +661,10 @@ div.custom-tooltip:hover span:after {
661
  .wpvr-switcher input:disabled+label {
662
  cursor: not-allowed;
663
  }
664
- /*-----------/switcher style------- */
665
 
666
 
 
 
667
  /*-----------switcher-v2 style------- */
668
  .wpvr-switcher-v2 {
669
  margin-bottom: 0!important;
@@ -716,7 +717,6 @@ div.custom-tooltip:hover span:after {
716
  }
717
  /*-----------end switcher-v2 style------- */
718
 
719
-
720
  .pano-setup {
721
  position: relative;
722
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
@@ -824,7 +824,7 @@ div.custom-tooltip:hover span:after {
824
  .pano-alert {
825
  position: absolute;
826
  top: 50%;
827
- left: 62%;
828
  display: none;
829
  -webkit-transform: translate(-50%, -50%);
830
  -ms-transform: translate(-50%, -50%);
@@ -1448,7 +1448,7 @@ div.custom-tooltip:hover span:after {
1448
  .wpvr-use-shortcode {
1449
  background: #fff;
1450
  border-radius: 5px;
1451
- margin-top: 20px;
1452
  width: 100%;
1453
  }
1454
 
@@ -1463,6 +1463,12 @@ div.custom-tooltip:hover span:after {
1463
  }
1464
 
1465
  .wpvr-use-shortcode .shortcode-wrapper {
 
 
 
 
 
 
1466
  padding: 0 20px 20px 20px;
1467
  display: flex;
1468
  flex-flow: row wrap;
@@ -1471,7 +1477,16 @@ div.custom-tooltip:hover span:after {
1471
  .wpvr-use-shortcode .single-shortcode {
1472
  width: 100%;
1473
  flex: 1;
1474
- background: #f6f6f8;
 
 
 
 
 
 
 
 
 
1475
  padding: 12px 15px 15px 15px;
1476
  border-radius: 5px;
1477
  margin-top: 20px;
@@ -1503,6 +1518,18 @@ div.custom-tooltip:hover span:after {
1503
  }
1504
 
1505
  .wpvr-use-shortcode .single-shortcode .shortcode-field {
 
 
 
 
 
 
 
 
 
 
 
 
1506
  background: #fff;
1507
  display: inline-flex;
1508
  align-items: center;
@@ -1520,6 +1547,13 @@ div.custom-tooltip:hover span:after {
1520
  word-break: break-all;
1521
  }
1522
 
 
 
 
 
 
 
 
1523
  .wpvr-use-shortcode .single-shortcode .shortcode-field .wpvr-copy-shortcode {
1524
  background: #201cfe;
1525
  width: 36px;
@@ -2021,6 +2055,20 @@ div.custom-tooltip:hover span:after {
2021
  border-radius: 4px;
2022
  }
2023
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2024
  .rex-pano-tab .video-setting .single-settings input.video-upload:hover,
2025
  .single-scene .scene-setting input.scene-upload:hover {
2026
  background: #3869f3;
@@ -2050,6 +2098,7 @@ div.custom-tooltip:hover span:after {
2050
 
2051
 
2052
  /*--------------------hotspot style-------------------*/
 
2053
  .clearfix::before,
2054
  .clearfix::after {
2055
  content: " ";
@@ -2144,24 +2193,6 @@ button.delete-scene {
2144
  }
2145
 
2146
 
2147
- /* ---insert link modal style---- */
2148
- .hotspot-setting .note-modal-footer {
2149
- height: auto;
2150
- padding: 10px 30px 30px;
2151
- text-align: left;
2152
- }
2153
- .hotspot-setting .note-modal-footer input.btn {
2154
- float: none;
2155
- text-align: left;
2156
- background: #3869f3;
2157
- color: #fff;
2158
- border: none;
2159
- font-weight: 500;
2160
- padding: 11px 22px;
2161
- border-radius: 5px;
2162
- }
2163
-
2164
-
2165
  /* ---------background tour style---------- */
2166
  .rex-pano-tab-content .background-tour .content-wrapper {
2167
  display: flex;
@@ -2253,6 +2284,28 @@ button.delete-scene {
2253
  }
2254
 
2255
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2256
  /*--------preview-btn-area---------*/
2257
 
2258
  .preview-btn-wrapper {
@@ -2286,6 +2339,23 @@ button.delete-scene {
2286
  display: block;
2287
  }
2288
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2289
  .video-setting button#videopreview:hover,
2290
  .preview-btn-area #panolenspreview:hover {
2291
  background: #3869f3;
@@ -2660,7 +2730,7 @@ button.delete-scene {
2660
  }
2661
  .rex-pano-tabs .rex-pano-tab-nav.main-nav li span {
2662
  height: 80px;
2663
- padding: 0 15px;
2664
  }
2665
  .rex-pano-tabs .rex-pano-tab-nav.main-nav li.logo {
2666
  height: 76px;
@@ -3395,7 +3465,9 @@ button.delete-scene {
3395
  display: flex;
3396
  margin-bottom: 28px;
3397
  }
3398
-
 
 
3399
  .rex-onboarding .wpvr-settings .wpvr_role-container ul li:last-child {
3400
  margin-bottom: 0;
3401
  }
661
  .wpvr-switcher input:disabled+label {
662
  cursor: not-allowed;
663
  }
 
664
 
665
 
666
+ /*-----------/switcher style------- */
667
+
668
  /*-----------switcher-v2 style------- */
669
  .wpvr-switcher-v2 {
670
  margin-bottom: 0!important;
717
  }
718
  /*-----------end switcher-v2 style------- */
719
 
 
720
  .pano-setup {
721
  position: relative;
722
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
824
  .pano-alert {
825
  position: absolute;
826
  top: 50%;
827
+ left: 50%;
828
  display: none;
829
  -webkit-transform: translate(-50%, -50%);
830
  -ms-transform: translate(-50%, -50%);
1448
  .wpvr-use-shortcode {
1449
  background: #fff;
1450
  border-radius: 5px;
1451
+ margin-top: 0px;
1452
  width: 100%;
1453
  }
1454
 
1463
  }
1464
 
1465
  .wpvr-use-shortcode .shortcode-wrapper {
1466
+ /* padding: 0 20px 20px 20px; */
1467
+ display: flex;
1468
+ flex-flow: row wrap;
1469
+ }
1470
+
1471
+ .wpvr-use-shortcode .wpvr-shortcode-wrapper {
1472
  padding: 0 20px 20px 20px;
1473
  display: flex;
1474
  flex-flow: row wrap;
1477
  .wpvr-use-shortcode .single-shortcode {
1478
  width: 100%;
1479
  flex: 1;
1480
+ background: #ffffff;
1481
+ padding: 0px 0px 5px 0px;
1482
+ border-radius: 5px;
1483
+ margin-top: 20px;
1484
+ }
1485
+
1486
+ .wpvr-use-shortcode .wpvr-single-shortcode {
1487
+ width: 100%;
1488
+ flex: 1;
1489
+ background: #f6f6f6;
1490
  padding: 12px 15px 15px 15px;
1491
  border-radius: 5px;
1492
  margin-top: 20px;
1518
  }
1519
 
1520
  .wpvr-use-shortcode .single-shortcode .shortcode-field {
1521
+ background: #f6f6f8;
1522
+ display: inline-flex;
1523
+ align-items: center;
1524
+ justify-content: space-between;
1525
+ padding: 4px 10px;
1526
+ border-radius: 5px;
1527
+ float: right;
1528
+ /* margin-top: 10px;
1529
+ min-width: 183px; */
1530
+ }
1531
+
1532
+ .wpvr-use-shortcode .wpvr-single-shortcode .wpvr-shortcode-field {
1533
  background: #fff;
1534
  display: inline-flex;
1535
  align-items: center;
1547
  word-break: break-all;
1548
  }
1549
 
1550
+ .wpvr-use-shortcode .wpvr-single-shortcode .wpvr-shortcode-field p {
1551
+ margin: 0;
1552
+ font-size: 16px;
1553
+ font-weight: 500;
1554
+ word-break: break-all;
1555
+ }
1556
+
1557
  .wpvr-use-shortcode .single-shortcode .shortcode-field .wpvr-copy-shortcode {
1558
  background: #201cfe;
1559
  width: 36px;
2055
  border-radius: 4px;
2056
  }
2057
 
2058
+ .rex-pano-tab .wpvr_continue_guide {
2059
+ margin-top: 13px;
2060
+ line-height: 1;
2061
+ font-weight: 700;
2062
+ text-transform: capitalize;
2063
+ cursor: pointer;
2064
+ display: block;
2065
+ text-align: right;
2066
+ }
2067
+
2068
+ .rex-pano-tab .wpvr_continue_guide:hover {
2069
+ text-decoration: underline;
2070
+ }
2071
+
2072
  .rex-pano-tab .video-setting .single-settings input.video-upload:hover,
2073
  .single-scene .scene-setting input.scene-upload:hover {
2074
  background: #3869f3;
2098
 
2099
 
2100
  /*--------------------hotspot style-------------------*/
2101
+
2102
  .clearfix::before,
2103
  .clearfix::after {
2104
  content: " ";
2193
  }
2194
 
2195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2196
  /* ---------background tour style---------- */
2197
  .rex-pano-tab-content .background-tour .content-wrapper {
2198
  display: flex;
2284
  }
2285
 
2286
 
2287
+ /* ---insert link modal style---- */
2288
+ .hotspot-setting .note-modal-footer {
2289
+ height: auto;
2290
+ padding: 10px 30px 30px;
2291
+ text-align: left;
2292
+ }
2293
+ .note-editor.note-airframe .note-editing-area .note-editable,
2294
+ .note-editor.note-frame .note-editing-area .note-editable {
2295
+ background: #fff;
2296
+ }
2297
+ .hotspot-setting .note-modal-footer input.btn {
2298
+ float: none;
2299
+ text-align: left;
2300
+ background: #3869f3;
2301
+ color: #fff;
2302
+ border: none;
2303
+ font-weight: 500;
2304
+ padding: 11px 22px;
2305
+ border-radius: 5px;
2306
+ }
2307
+
2308
+
2309
  /*--------preview-btn-area---------*/
2310
 
2311
  .preview-btn-wrapper {
2339
  display: block;
2340
  }
2341
 
2342
+ .wpvr_preview_button {
2343
+ text-transform: capitalize;
2344
+ color: #fff;
2345
+ font-size: 16px;
2346
+ border: 1px solid #c3d3fc;
2347
+ height: 45px;
2348
+ font-weight: 500;
2349
+ transition: all 0.25s ease-in-out;
2350
+ background: #4775f6;
2351
+ cursor: pointer;
2352
+ border-radius: 5px;
2353
+ box-shadow: 0px 7px 25px 0px rgba(56, 84, 163, 0.2);
2354
+ line-height: 45px;
2355
+ width: 120px;
2356
+ padding: 0 30px;
2357
+ }
2358
+
2359
  .video-setting button#videopreview:hover,
2360
  .preview-btn-area #panolenspreview:hover {
2361
  background: #3869f3;
2730
  }
2731
  .rex-pano-tabs .rex-pano-tab-nav.main-nav li span {
2732
  height: 80px;
2733
+ padding: 0 12px;
2734
  }
2735
  .rex-pano-tabs .rex-pano-tab-nav.main-nav li.logo {
2736
  height: 76px;
3465
  display: flex;
3466
  margin-bottom: 28px;
3467
  }
3468
+ .rex-onboarding .wpvr-settings .wpvr_role-container ul li.enqueue-video-script.wpvr_enqueue_video_script_list {
3469
+ flex-wrap: wrap;
3470
+ }
3471
  .rex-onboarding .wpvr-settings .wpvr_role-container ul li:last-child {
3472
  margin-bottom: 0;
3473
  }
admin/css/wpvr-admin2.css ADDED
@@ -0,0 +1,526 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: "Roboto";
3
+ src: url("../fonts/Roboto-Regular.woff2") format("woff2"), url("../fonts/Roboto-Regular.woff") format("woff");
4
+ font-weight: normal;
5
+ font-style: normal;
6
+ font-display: swap;
7
+ }
8
+ @font-face {
9
+ font-family: "Roboto";
10
+ src: url("../fonts/Roboto-Medium.woff2") format("woff2"), url("../fonts/Roboto-Medium.woff") format("woff");
11
+ font-weight: 500;
12
+ font-style: normal;
13
+ font-display: swap;
14
+ }
15
+ @font-face {
16
+ font-family: "Roboto";
17
+ src: url("../fonts/Roboto-Bold.woff2") format("woff2"), url("../fonts/Roboto-Bold.woff") format("woff");
18
+ font-weight: bold;
19
+ font-style: normal;
20
+ font-display: swap;
21
+ }
22
+ @media (min-width: 1200px) {
23
+ .wpvr-container-1350 {
24
+ max-width: 1020px;
25
+ }
26
+ }
27
+ @media (min-width: 1400px) {
28
+ .wpvr-container-1350 {
29
+ max-width: 1380px;
30
+ padding: 0 15px;
31
+ margin: 0 auto;
32
+ }
33
+ }
34
+ .primary-color {
35
+ color: #201CFE;
36
+ }
37
+
38
+ .wpvr-welcome {
39
+ margin-left: -20px;
40
+ }
41
+ .wpvr-welcome * {
42
+ box-sizing: border-box;
43
+ padding: 0;
44
+ margin: 0;
45
+ }
46
+ .wpvr-welcome div,
47
+ .wpvr-welcome span,
48
+ .wpvr-welcome section,
49
+ .wpvr-welcome p {
50
+ font-family: "Roboto", sans-serif;
51
+ }
52
+ .wpvr-welcome .wpvr-container-1350 {
53
+ padding: 0 15px;
54
+ margin: 0 auto;
55
+ }
56
+ .wpvr-welcome .vr-welcome-btn {
57
+ background: #201CFE;
58
+ border-radius: 8px;
59
+ font-weight: 700;
60
+ font-size: 18px;
61
+ line-height: 1.16;
62
+ letter-spacing: -0.3px;
63
+ color: #FFFFFF;
64
+ display: inline-block;
65
+ text-decoration: none;
66
+ padding: 20px 27px;
67
+ border: none;
68
+ cursor: pointer;
69
+ }
70
+ .wpvr-welcome .section-title {
71
+ max-width: 685px;
72
+ width: 100%;
73
+ margin: 0 auto 60px;
74
+ text-align: center;
75
+ }
76
+ .wpvr-welcome .section-title h2 {
77
+ font-weight: 700;
78
+ font-size: 44px;
79
+ line-height: 1.22;
80
+ letter-spacing: -0.88px;
81
+ color: #011F3F;
82
+ margin-bottom: 10px;
83
+ }
84
+ .wpvr-welcome .section-title p {
85
+ font-size: 20px;
86
+ line-height: 1.5;
87
+ color: #011F3F;
88
+ }
89
+ .wpvr-welcome .wpvr-welcome-hero {
90
+ background: #fff;
91
+ padding: 20px 0;
92
+ position: relative;
93
+ overflow: hidden;
94
+ }
95
+ .wpvr-welcome .wpvr-welcome-hero::before {
96
+ content: "";
97
+ background: #F2F4F7;
98
+ position: absolute;
99
+ left: -80px;
100
+ top: -90px;
101
+ width: 322px;
102
+ height: 322px;
103
+ border-radius: 0 0 270px 0;
104
+ border: 1px solid #dddddd96;
105
+ z-index: 0;
106
+ }
107
+ .wpvr-welcome .wpvr-welcome-hero .hero-content-wrapper {
108
+ display: flex;
109
+ flex-flow: row wrap;
110
+ align-items: center;
111
+ position: relative;
112
+ z-index: 1;
113
+ }
114
+ .wpvr-welcome .wpvr-welcome-hero .hero-content {
115
+ width: 40%;
116
+ }
117
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .backto-dashboard {
118
+ font-weight: 500;
119
+ font-size: 18px;
120
+ line-height: 1.2;
121
+ letter-spacing: -0.5px;
122
+ color: #011F3F;
123
+ text-decoration: none;
124
+ margin-bottom: 46px;
125
+ display: inline-block;
126
+ }
127
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .backto-dashboard:hover {
128
+ text-decoration: underline;
129
+ }
130
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .backto-dashboard img {
131
+ width: 16px;
132
+ margin-right: 4px;
133
+ }
134
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .hero-title {
135
+ font-weight: 900;
136
+ font-size: 56px;
137
+ line-height: 1.1;
138
+ letter-spacing: -1px;
139
+ color: #011F3F;
140
+ }
141
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .hero-title span {
142
+ color: #00B7FF;
143
+ }
144
+ .wpvr-welcome .wpvr-welcome-hero .hero-content p {
145
+ font-weight: 400;
146
+ font-size: 24px;
147
+ line-height: 1.4;
148
+ color: #011F3F;
149
+ width: 100%;
150
+ max-width: 350px;
151
+ margin-top: 13px;
152
+ margin-bottom: 54px;
153
+ }
154
+ .wpvr-welcome .wpvr-welcome-hero .hero-video {
155
+ width: 60%;
156
+ position: relative;
157
+ }
158
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .hero-video-shape {
159
+ max-width: 750px;
160
+ width: 100%;
161
+ }
162
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video {
163
+ width: 100%;
164
+ max-width: 665px;
165
+ cursor: pointer;
166
+ overflow: hidden;
167
+ position: absolute;
168
+ top: 70px;
169
+ right: 80px;
170
+ }
171
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video .bg-video {
172
+ background-image: url("../icon/vr-video-poster.png");
173
+ position: absolute;
174
+ top: 0;
175
+ left: 0;
176
+ width: 100%;
177
+ height: 100%;
178
+ background-repeat: no-repeat;
179
+ background-position: center;
180
+ background-size: 100% 100%;
181
+ z-index: 2;
182
+ background-color: #fff;
183
+ border-radius: 30px;
184
+ }
185
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video .bg-video .bt-play {
186
+ position: absolute;
187
+ top: 50%;
188
+ left: 50%;
189
+ transform: translate(-50%, -50%);
190
+ cursor: pointer;
191
+ z-index: 2;
192
+ -webkit-transition: all 0.3s ease-out;
193
+ transition: all 0.3s ease-out;
194
+ }
195
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video .bg-video .bt-play img {
196
+ width: 50px;
197
+ }
198
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video.open .bg-video {
199
+ visibility: hidden;
200
+ opacity: 0;
201
+ transition: all 0.6s ease;
202
+ }
203
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .video-container {
204
+ position: relative;
205
+ width: 100%;
206
+ height: 0;
207
+ margin: 0;
208
+ z-index: 1;
209
+ padding-bottom: 74.27198%;
210
+ }
211
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .video-container iframe {
212
+ position: absolute;
213
+ top: 0;
214
+ left: 0;
215
+ width: 100%;
216
+ height: 100%;
217
+ border-radius: 32px;
218
+ }
219
+ .wpvr-welcome .wpvr-features {
220
+ background: #F2F4F7;
221
+ padding: 110px 0 120px;
222
+ }
223
+ .wpvr-welcome .wpvr-features .features-wrapper {
224
+ display: flex;
225
+ flex-flow: row wrap;
226
+ margin-left: -30px;
227
+ }
228
+ .wpvr-welcome .wpvr-features .single-feature {
229
+ background: #FFFFFF;
230
+ box-shadow: 0px 20px 20px #e7eaeebc;
231
+ border-radius: 10px;
232
+ padding: 30px 40px;
233
+ width: calc(100% / 5 - 30px);
234
+ margin-left: 30px;
235
+ margin-bottom: 30px;
236
+ text-align: center;
237
+ }
238
+ .wpvr-welcome .wpvr-features .single-feature .title {
239
+ font-weight: 700;
240
+ font-size: 24px;
241
+ line-height: 1.16;
242
+ text-align: center;
243
+ letter-spacing: -0.6px;
244
+ color: #011F3F;
245
+ margin: 34px 0;
246
+ }
247
+ .wpvr-welcome .wpvr-features .single-feature .see-example {
248
+ font-weight: 500;
249
+ font-size: 16px;
250
+ line-height: 1.4;
251
+ text-align: center;
252
+ letter-spacing: -0.4px;
253
+ color: #201CFE;
254
+ text-decoration: underline;
255
+ display: inline-block;
256
+ }
257
+ .wpvr-welcome .wpvr-features .single-feature .see-example img {
258
+ margin-left: 5px;
259
+ transition: all 0.3s ease;
260
+ }
261
+ .wpvr-welcome .wpvr-features .single-feature .see-example:hover {
262
+ text-decoration: none;
263
+ }
264
+ .wpvr-welcome .wpvr-features .single-feature:hover .see-example img {
265
+ margin-left: 10px;
266
+ }
267
+ .wpvr-welcome .wpvr-features .single-feature:nth-child(even) {
268
+ transform: translateY(55px);
269
+ }
270
+ .wpvr-welcome .wpvr-features .features-cta {
271
+ background: #201CFE url(../icon/feature-cta-bg.jpg) no-repeat center right/cover;
272
+ border-radius: 20px;
273
+ margin-top: 105px;
274
+ padding: 60px 70px;
275
+ display: flex;
276
+ align-items: center;
277
+ justify-content: space-between;
278
+ }
279
+ .wpvr-welcome .wpvr-features .features-cta .cta-title {
280
+ font-weight: 700;
281
+ font-size: 38px;
282
+ line-height: 1.4;
283
+ color: #FFFFFF;
284
+ width: calc(100% - 290px);
285
+ }
286
+ .wpvr-welcome .wpvr-features .features-cta .cta-btn {
287
+ background: #FFFFFF;
288
+ color: #201CFE;
289
+ }
290
+ .wpvr-welcome .wpvr-feature-settings {
291
+ background: #071835;
292
+ padding-top: 110px;
293
+ }
294
+ .wpvr-welcome .wpvr-feature-settings .section-title {
295
+ max-width: 725px;
296
+ }
297
+ .wpvr-welcome .wpvr-feature-settings .section-title h2 {
298
+ color: #fff;
299
+ }
300
+ .wpvr-welcome .wpvr-feature-settings .section-title p {
301
+ color: rgba(255, 255, 255, 0.6);
302
+ }
303
+ .wpvr-welcome .wpvr-feature-settings .features-settings-wrapper {
304
+ display: flex;
305
+ flex-flow: row wrap;
306
+ margin-left: -50px;
307
+ }
308
+ .wpvr-welcome .wpvr-feature-settings .single-settings {
309
+ text-align: center;
310
+ width: calc(100% / 8 - 50px);
311
+ margin-left: 50px;
312
+ margin-bottom: 50px;
313
+ }
314
+ .wpvr-welcome .wpvr-feature-settings .single-settings .icon {
315
+ background: #0E244B;
316
+ border-radius: 20px;
317
+ width: 120px;
318
+ height: 110px;
319
+ display: flex;
320
+ align-items: center;
321
+ justify-content: center;
322
+ padding: 10px;
323
+ margin: 0 auto 13px;
324
+ }
325
+ .wpvr-welcome .wpvr-feature-settings .single-settings .title {
326
+ font-weight: 500;
327
+ font-size: 16px;
328
+ line-height: 1.3;
329
+ color: #FFFFFF;
330
+ }
331
+ .wpvr-welcome .wpvr-feature-settings .setting-cta-btn {
332
+ text-align: center;
333
+ }
334
+ .wpvr-welcome .wpvr-feature-settings .setting-cta-btn .vr-welcome-btn {
335
+ background: #FFFFFF;
336
+ color: #201CFE;
337
+ }
338
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta {
339
+ background: #FFFFFF url("../icon/feature-settings-cta-bg.jpg") no-repeat center right/cover;
340
+ border-radius: 20px;
341
+ padding: 60px 70px;
342
+ display: flex;
343
+ align-items: center;
344
+ justify-content: space-between;
345
+ margin-top: 70px;
346
+ }
347
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content {
348
+ width: calc(100% - 290px);
349
+ }
350
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content h2 {
351
+ font-size: 38px;
352
+ color: #011F3F;
353
+ font-weight: 700;
354
+ line-height: 1.4;
355
+ }
356
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content p {
357
+ font-weight: 400;
358
+ font-size: 24px;
359
+ line-height: 1.4;
360
+ color: #011F3F;
361
+ margin-top: 3px;
362
+ }
363
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content p span {
364
+ color: #00B7FF;
365
+ }
366
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer {
367
+ padding: 54px 0;
368
+ }
369
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu {
370
+ display: flex;
371
+ }
372
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu li {
373
+ margin-left: 30px;
374
+ }
375
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu li:first-child {
376
+ margin-left: 0;
377
+ }
378
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu li:last-child {
379
+ margin-left: auto;
380
+ }
381
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu li a {
382
+ font-weight: 500;
383
+ font-size: 20px;
384
+ line-height: 1;
385
+ color: #FFFFFF;
386
+ text-decoration: none;
387
+ outline: none;
388
+ box-shadow: none;
389
+ }
390
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu li a:hover {
391
+ color: #00B7FF;
392
+ }
393
+
394
+ @media (max-width: 1399px) {
395
+ .wpvr-welcome .vr-welcome-btn {
396
+ font-weight: 500;
397
+ font-size: 15px;
398
+ padding: 16px 27px;
399
+ }
400
+
401
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video {
402
+ max-width: 535px;
403
+ right: 30px;
404
+ top: 60px;
405
+ }
406
+
407
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .backto-dashboard {
408
+ font-size: 16px;
409
+ margin-bottom: 36px;
410
+ }
411
+
412
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .hero-title {
413
+ font-size: 44px;
414
+ }
415
+
416
+ .wpvr-welcome .wpvr-welcome-hero .hero-content p {
417
+ font-size: 18px;
418
+ margin-bottom: 34px;
419
+ }
420
+
421
+ .wpvr-welcome .section-title h2 {
422
+ font-size: 34px;
423
+ }
424
+
425
+ .wpvr-welcome .wpvr-features .single-feature .title {
426
+ font-size: 18px;
427
+ margin: 14px 0;
428
+ }
429
+
430
+ .wpvr-welcome .wpvr-features .single-feature {
431
+ padding: 30px 20px;
432
+ }
433
+
434
+ .wpvr-welcome .wpvr-features .single-feature .title {
435
+ font-size: 18px;
436
+ }
437
+
438
+ .wpvr-welcome .wpvr-features .single-feature .see-example {
439
+ font-size: 14px;
440
+ }
441
+
442
+ .wpvr-welcome .wpvr-features .features-cta .cta-title {
443
+ font-size: 32px;
444
+ line-height: 1.2;
445
+ }
446
+
447
+ .wpvr-welcome .wpvr-feature-settings .single-settings {
448
+ width: calc(100% / 4 - 50px);
449
+ }
450
+
451
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content h2 {
452
+ font-size: 32px;
453
+ line-height: 1.2;
454
+ }
455
+
456
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content p {
457
+ font-size: 20px;
458
+ }
459
+
460
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu li a {
461
+ font-size: 16px;
462
+ }
463
+ }
464
+ @media (max-width: 1199px) {
465
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video {
466
+ max-width: 435px;
467
+ }
468
+
469
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .hero-title {
470
+ font-size: 36px;
471
+ }
472
+
473
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video .bg-video {
474
+ border-radius: 20px;
475
+ }
476
+
477
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .video-container iframe {
478
+ border-radius: 24px;
479
+ }
480
+
481
+ .wpvr-welcome .wpvr-features {
482
+ padding: 80px 0 90px;
483
+ }
484
+
485
+ .wpvr-welcome .wpvr-features .single-feature {
486
+ width: calc(100% / 4 - 30px);
487
+ }
488
+
489
+ .wpvr-welcome .wpvr-features .features-cta {
490
+ margin-top: 35px;
491
+ padding: 50px;
492
+ }
493
+
494
+ .wpvr-welcome .wpvr-feature-settings {
495
+ padding-top: 80px;
496
+ }
497
+
498
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta {
499
+ padding: 50px 50px;
500
+ }
501
+
502
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content p {
503
+ font-size: 18px;
504
+ }
505
+ }
506
+ @media (max-width: 991px) {
507
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video {
508
+ max-width: 415px;
509
+ top: 40px;
510
+ }
511
+
512
+ .wpvr-welcome .wpvr-welcome-hero .hero-content {
513
+ padding-right: 20px;
514
+ }
515
+
516
+ .wpvr-welcome .wpvr-features .single-feature {
517
+ padding: 30px 16px;
518
+ }
519
+ }
520
+ @media (max-width: 782px) {
521
+ .wpvr-welcome {
522
+ margin-left: -10px;
523
+ }
524
+ }
525
+
526
+ /*# sourceMappingURL=wpvr-admin2.css.map */
admin/fonts/Roboto-Bold.woff ADDED
Binary file
admin/fonts/Roboto-Bold.woff2 ADDED
Binary file
admin/fonts/Roboto-Medium.woff ADDED
Binary file
admin/fonts/Roboto-Medium.woff2 ADDED
Binary file
admin/fonts/Roboto-Regular.woff ADDED
Binary file
admin/fonts/Roboto-Regular.woff2 ADDED
Binary file
admin/helpers/class-wpvr-format.php ADDED
@@ -0,0 +1,1350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Responsible for managing WPVR data formation
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 1.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/views
11
+ */
12
+
13
+ class WPVR_Format
14
+ {
15
+
16
+ /**
17
+ * Setup checkboxes values for meta fields
18
+ * @param string $arg
19
+ *
20
+ * @return bool
21
+ * @since 8.0.0
22
+ */
23
+ public function set_checkbox_value($arg)
24
+ {
25
+ $data = sanitize_text_field($arg);
26
+ if ($data == 'off') {
27
+ return $data = false;
28
+ } else {
29
+ return $data = true;
30
+ }
31
+ }
32
+
33
+
34
+ /**
35
+ * Setup checkboxes values for meta fields while default value is on
36
+ * @param string $arg
37
+ *
38
+ * @return bool
39
+ * @since 8.0.0
40
+ */
41
+ public function set_checkbox_on_value($arg)
42
+ {
43
+ $data = sanitize_text_field($arg);
44
+ if ($data == 'on') {
45
+ return $data = true;
46
+ } else {
47
+ return $data = false;
48
+ }
49
+ }
50
+
51
+
52
+ /**
53
+ * Setup checkboxes values for pro version meta fields
54
+ * @param string $arg
55
+ *
56
+ * @return bool
57
+ * @since 8.0.0
58
+ */
59
+ public function set_pro_checkbox_value($arg)
60
+ {
61
+ $data = sanitize_text_field($arg);
62
+ if ($data == 'on') {
63
+ return $data = 'on';
64
+ } else {
65
+ return $data = 'off';
66
+ }
67
+ }
68
+
69
+
70
+ /**
71
+ * Preapre default scene ID for Tour
72
+ * @param array $panodata
73
+ *
74
+ * @return string
75
+ * @since 8.0.0
76
+ */
77
+ public function prepare_default_scene($panodata)
78
+ {
79
+ $allsceneids = array();
80
+
81
+ foreach ($panodata["scene-list"] as $panoscenes) {
82
+ if (!empty($panoscenes['scene-id'])) {
83
+ array_push($allsceneids, $panoscenes['scene-id']);
84
+ }
85
+ if ($panoscenes['dscene'] == 'on') {
86
+ return $default_scene = $panoscenes['scene-id'];
87
+ }
88
+ }
89
+
90
+ if (empty($default_scene)) {
91
+ if ($allsceneids) {
92
+ return $default_scene = $allsceneids[0];
93
+ }
94
+ }
95
+ }
96
+
97
+
98
+ /**
99
+ * Prepare panaromic data for Tour
100
+ *
101
+ * @param string $panodata
102
+ *
103
+ * @return array
104
+ * @since 8.0.0
105
+ */
106
+ public function prepare_panodata($panodata)
107
+ {
108
+ $panolist = stripslashes($panodata);
109
+ $panodata = (array)json_decode($panolist);
110
+ $panolist = array();
111
+ if (is_array($panodata["scene-list"])) {
112
+ foreach ($panodata["scene-list"] as $scenes_data) {
113
+ $temp_array = array();
114
+ $temp_array = (array)$scenes_data;
115
+
116
+ if ($temp_array['hotspot-list']) {
117
+ $_hotspot_array = array();
118
+ foreach ($temp_array['hotspot-list'] as $temp_hotspot) {
119
+
120
+ $temp_hotspot = (array)$temp_hotspot;
121
+ $_hotspot_array[] = $temp_hotspot;
122
+ }
123
+ }
124
+
125
+ $temp_array['hotspot-list'] = $_hotspot_array;
126
+ $panolist['scene-list'][] = $temp_array;
127
+ }
128
+ }
129
+ $panodata = $panolist;
130
+ return $panodata;
131
+ }
132
+
133
+
134
+ /**
135
+ * Remove empty scene and hotspot from panaromic data list
136
+ *
137
+ * @param array $panodata
138
+ *
139
+ * @return array
140
+ * @since 8.0.0
141
+ */
142
+ public function remove_empty_scene_and_hotspot($panodata)
143
+ {
144
+ $panolength = count($panodata["scene-list"]);
145
+ for ($i = 0; $i < $panolength; $i++) {
146
+ if (empty($panodata["scene-list"][$i]['scene-id'])) {
147
+ unset($panodata["scene-list"][$i]);
148
+ } else {
149
+ $panohotspotlength = count($panodata["scene-list"][$i]['hotspot-list']);
150
+ for ($j = 0; $j < $panohotspotlength; $j++) {
151
+ if (empty($panodata["scene-list"][$i]['hotspot-list'][$j]['hotspot-title'])) {
152
+ unset($panodata["scene-list"][$i]['hotspot-list'][$j]);
153
+ }
154
+ }
155
+ }
156
+ }
157
+ return $panodata;
158
+ }
159
+
160
+
161
+ /**
162
+ * Prepare tour rotation wrapper data
163
+ *
164
+ * @param array $pano_array
165
+ * @param string $rotation
166
+ *
167
+ * @return array
168
+ * @since 8.0.0
169
+ */
170
+ public function prepare_rotation_wrapper_data($pano_array, $rotation)
171
+ {
172
+ if ($rotation == 'off') {
173
+ unset($pano_array['autoRotate']);
174
+ unset($pano_array['autoRotateInactivityDelay']);
175
+ unset($pano_array['autoRotateStopDelay']);
176
+ }
177
+ if (empty($pano_array['autoRotate'])) {
178
+ unset($pano_array['autoRotate']);
179
+ unset($pano_array['autoRotateInactivityDelay']);
180
+ unset($pano_array['autoRotateStopDelay']);
181
+ }
182
+ if (empty($pano_array['autoRotateInactivityDelay'])) {
183
+ unset($pano_array['autoRotateInactivityDelay']);
184
+ }
185
+ if (empty($pano_array['autoRotateStopDelay'])) {
186
+ unset($pano_array['autoRotateStopDelay']);
187
+ }
188
+ return $pano_array;
189
+ }
190
+
191
+
192
+ public function prepare_video_settings_data()
193
+ {
194
+ $autoplay = '';
195
+ if (isset($_POST['autoplay'])) {
196
+ $autoplay = sanitize_text_field($_POST['autoplay']);
197
+ }
198
+
199
+ $loop = '';
200
+ if (isset($_POST['loop'])) {
201
+ $loop = sanitize_text_field($_POST['loop']);
202
+ }
203
+
204
+ return array(
205
+ 'autoplay' => $autoplay,
206
+ 'loop' => $loop
207
+ );
208
+ }
209
+
210
+
211
+ /**
212
+ * Prepare meta data when video url has youtube
213
+ *
214
+ * @param string $videourl
215
+ *
216
+ * @return string
217
+ * @since 8.0.0
218
+ */
219
+ public function prepare_youtube_video_meta_data($videourl, $videodata)
220
+ {
221
+ $explodeid = '';
222
+ $explodeid = explode("=", $videourl);
223
+
224
+ if ($videodata['autoplay'] == 'on') {
225
+ $autoplay = '&autoplay=1';
226
+ } else {
227
+ $autoplay = '';
228
+ }
229
+
230
+ if ($videodata['loop'] == 'on') {
231
+ $loop = '&loop=1';
232
+ } else {
233
+ $loop = '';
234
+ }
235
+
236
+ $foundid = '';
237
+ $foundid = $explodeid[1] . '?' . $autoplay . $loop;
238
+ $html = '';
239
+ $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>';
240
+ return $html;
241
+ }
242
+
243
+ /**
244
+ * Prepare meta data when video url has youtu.be
245
+ *
246
+ * @param string $videourl
247
+ *
248
+ * @return string
249
+ * @since 8.0.0
250
+ */
251
+ public function prepare_youtu_be_video_meta_data($videourl, $videodata)
252
+ {
253
+ $explodeid = '';
254
+ $explodeid = explode("/", $videourl);
255
+
256
+ if ($videodata['autoplay'] == 'on') {
257
+ $autoplay = '&autoplay=1';
258
+ } else {
259
+ $autoplay = '';
260
+ }
261
+
262
+ if ($videodata['loop'] == 'on') {
263
+ $loop = '&loop=1';
264
+ } else {
265
+ $loop = '';
266
+ }
267
+
268
+ $foundid = '';
269
+ $foundid = $explodeid[3] . '?' . $autoplay . $loop;
270
+ $html = '';
271
+ $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>';
272
+ return $html;
273
+ }
274
+
275
+ /**
276
+ * Prepare meta data when video url has vimeo
277
+ *
278
+ * @param string $videourl
279
+ *
280
+ * @return string
281
+ * @since 8.0.0
282
+ */
283
+ public function prepare_vimeo_video_meta_data($videourl, $videodata)
284
+ {
285
+ $explodeid = '';
286
+ $explodeid = explode("/", $videourl);
287
+
288
+ if ($videodata['autoplay'] == 'on') {
289
+ $autoplay = '&autoplay=1&muted=1';
290
+ } else {
291
+ $autoplay = '';
292
+ }
293
+
294
+ if ($videodata['loop'] == 'on') {
295
+ $loop = '&loop=1';
296
+ } else {
297
+ $loop = '';
298
+ }
299
+
300
+ $foundid = '';
301
+ $foundid = $explodeid[3] . '?' . $autoplay . $loop;
302
+ $html = '';
303
+ $html .= '<iframe src="https://player.vimeo.com/video/' . $foundid . '" width="600" height="400" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
304
+ return $html;
305
+ }
306
+
307
+ /**
308
+ * Prepare meta data when video is selfhosted
309
+ *
310
+ * @param string $videourl
311
+ *
312
+ * @return string
313
+ * @since 8.0.0
314
+ */
315
+ public function prepare_selfhost_video_meta_data($videourl, $vidid, $videodata)
316
+ {
317
+ if ($videodata['autoplay'] == 'on') {
318
+ $autoplay = 'autoplay muted';
319
+ } else {
320
+ $autoplay = '';
321
+ }
322
+
323
+ if ($videodata['loop'] == 'on') {
324
+ $loop = 'loop';
325
+ } else {
326
+ $loop = '';
327
+ }
328
+
329
+ $html = '';
330
+ $html .= '<video id="' . $vidid . '" class="video-js vjs-default-skin vjs-big-play-centered" ' . $autoplay . ' ' . $loop . ' controls preload="auto" style="width:100%; height: 100%;" poster="" >';
331
+ $html .= '<source src="' . $videourl . '" type="video/mp4"/>';
332
+ $html .= '<p class="vjs-no-js">';
333
+ $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>';
334
+ $html .= '</p>';
335
+ $html .= '</video>';
336
+ return $html;
337
+ }
338
+
339
+
340
+ /**
341
+ * Prepare scene data for Tour preview
342
+ *
343
+ * @param array $panodata
344
+ *
345
+ * @return array
346
+ * @since 8.0.0
347
+ */
348
+ public function prepare_scene_data_for_preview($panodata)
349
+ {
350
+ $scene_data = array();
351
+ foreach ($panodata["scene-list"] as $panoscenes) {
352
+ if (!empty($panoscenes['scene-id'])) {
353
+ $scene_ititle = sanitize_text_field(@$panoscenes["scene-ititle"]);
354
+ $scene_author = sanitize_text_field(@$panoscenes["scene-author"]);
355
+
356
+ $scene_vaov = isset($panoscenes["scene-vaov"]) ? (float)$panoscenes["scene-vaov"] : 180;
357
+ $scene_haov = isset($panoscenes["scene-vaov"]) ? (float)$panoscenes["scene-haov"] : 360;
358
+ $scene_vertical_offset = isset($panoscenes["scene-vertical-offset"]) ? (float)$panoscenes["scene-vertical-offset"] : 0;
359
+
360
+ $default_scene_pitch = isset($panoscenes["scene-pitch"]) ? (float)$panoscenes["scene-pitch"] : null;
361
+ $default_scene_yaw = isset($panoscenes["scene-yaw"]) ? (float)$panoscenes["scene-yaw"] : null;
362
+ $scene_max_pitch = isset($panoscenes["scene-maxpitch"]) ? (float)$panoscenes["scene-maxpitch"] : '';
363
+ $scene_min_pitch = isset($panoscenes["scene-minpitch"]) ? (float)$panoscenes["scene-minpitch"] : '';
364
+ $scene_max_yaw = isset($panoscenes["scene-maxyaw"]) ? (float)$panoscenes["scene-maxyaw"] : '';
365
+ $scene_min_yaw = isset($panoscenes["scene-minyaw"]) ? (float)$panoscenes["scene-minyaw"] : '';
366
+
367
+ $default_zoom = isset($panoscenes["scene-zoom"]) ? $panoscenes["scene-zoom"] : 100;
368
+ if (!empty($default_zoom)) {
369
+ $default_zoom = isset($panoscenes["scene-zoom"]) ? (int)$panoscenes["scene-zoom"] : (int)$default_zoom;
370
+ } else {
371
+ $default_zoom = 100;
372
+ }
373
+
374
+ $max_zoom = isset($panoscenes["scene-maxzoom"]) ? $panoscenes["scene-maxzoom"] : 120;
375
+ if (!empty($max_zoom)) {
376
+ $max_zoom = isset($panoscenes["scene-maxzoom"]) ? (int)$panoscenes["scene-maxzoom"] : (int)$max_zoom;
377
+ } else {
378
+ $max_zoom = 120;
379
+ }
380
+
381
+ $min_zoom = isset($panoscenes["scene-minzoom"]) ? $panoscenes["scene-minzoom"] : 50;
382
+ if (!empty($min_zoom)) {
383
+ $min_zoom = isset($panoscenes["scene-minzoom"]) ? (int)$panoscenes["scene-minzoom"] : (int)$min_zoom;
384
+ } else {
385
+ $min_zoom = 50;
386
+ }
387
+
388
+ $hotspot_datas = $panoscenes["hotspot-list"];
389
+
390
+ $hotspots = $this->prepare_hotspot_data_for_preview($hotspot_datas);
391
+
392
+ $scene_info = array();
393
+ if ($panoscenes["scene-type"] == 'cubemap') {
394
+ $pano_type = 'cubemap';
395
+ $pano_attachment = array(
396
+ $panoscenes["scene-attachment-url-face0"],
397
+ $panoscenes["scene-attachment-url-face1"],
398
+ $panoscenes["scene-attachment-url-face2"],
399
+ $panoscenes["scene-attachment-url-face3"],
400
+ $panoscenes["scene-attachment-url-face4"],
401
+ $panoscenes["scene-attachment-url-face5"]
402
+ );
403
+
404
+ $scene_info = array("type" => $panoscenes["scene-type"], "cubeMap" => $pano_attachment, "pitch" => $default_scene_pitch, "maxPitch" => $scene_max_pitch, "minPitch" => $scene_min_pitch, "maxYaw" => $scene_max_yaw, "minYaw" => $scene_min_yaw, "yaw" => $default_scene_yaw, "hfov" => $default_zoom, "maxHfov" => $max_zoom, "minHfov" => $min_zoom, "title" => $scene_ititle, "author" => $scene_author, "vaov" => $scene_vaov, "haov" => $scene_haov, "vOffset" => $scene_vertical_offset, "hotSpots" => $hotspots);
405
+ } else {
406
+ $scene_info = array("type" => $panoscenes["scene-type"], "panorama" => $panoscenes["scene-attachment-url"], "pitch" => $default_scene_pitch, "maxPitch" => $scene_max_pitch, "minPitch" => $scene_min_pitch, "maxYaw" => $scene_max_yaw, "minYaw" => $scene_min_yaw, "yaw" => $default_scene_yaw, "hfov" => $default_zoom, "maxHfov" => $max_zoom, "minHfov" => $min_zoom, "title" => $scene_ititle, "author" => $scene_author, "vaov" => $scene_vaov, "haov" => $scene_haov, "vOffset" => $scene_vertical_offset, "hotSpots" => $hotspots);
407
+ }
408
+
409
+ if (empty($panoscenes["scene-ititle"])) {
410
+ unset($scene_info['title']);
411
+ }
412
+ if (empty($panoscenes["scene-author"])) {
413
+ unset($scene_info['author']);
414
+ }
415
+
416
+ if (empty($scene_vaov)) {
417
+ unset($scene_info['vaov']);
418
+ }
419
+
420
+ if (empty($scene_haov)) {
421
+ unset($scene_info['haov']);
422
+ }
423
+
424
+ if (empty($scene_vertical_offset)) {
425
+ unset($scene_info['vOffset']);
426
+ }
427
+
428
+ if (isset($panoscenes["cvgscene"])) {
429
+ if ($panoscenes["cvgscene"] == "off") {
430
+ unset($scene_info['maxPitch']);
431
+ unset($scene_info['minPitch']);
432
+ }
433
+ }
434
+
435
+ if (empty($panoscenes["scene-maxpitch"])) {
436
+ unset($scene_info['maxPitch']);
437
+ }
438
+
439
+ if (empty($panoscenes["scene-minpitch"])) {
440
+ unset($scene_info['minPitch']);
441
+ }
442
+
443
+ if (isset($panoscenes["chgscene"])) {
444
+ if ($panoscenes["chgscene"] == "off") {
445
+ unset($scene_info['maxYaw']);
446
+ unset($scene_info['minYaw']);
447
+ }
448
+ }
449
+ if (empty($panoscenes["scene-maxyaw"])) {
450
+ unset($scene_info['maxYaw']);
451
+ }
452
+
453
+ if (empty($panoscenes["scene-minyaw"])) {
454
+ unset($scene_info['minYaw']);
455
+ }
456
+
457
+ $scene_array = array();
458
+ $scene_array = array(
459
+ $panoscenes["scene-id"] => $scene_info
460
+ );
461
+ $scene_data[$panoscenes["scene-id"]] = $scene_info;
462
+ }
463
+ }
464
+ return $scene_data;
465
+ }
466
+
467
+
468
+ /**
469
+ * Preapre hotspot data for Tour preview
470
+ *
471
+ * @param array $hotspot_datas
472
+ *
473
+ * @return array
474
+ * @since 8.0.0
475
+ */
476
+ private function prepare_hotspot_data_for_preview($hotspot_datas)
477
+ {
478
+ $hotspots = array();
479
+ foreach ($hotspot_datas as $hotspot_data) {
480
+
481
+ if (!empty($hotspot_data["hotspot-title"])) {
482
+
483
+ $hotspot_type = $hotspot_data["hotspot-type"] !== 'scene' ? 'info' : $hotspot_data["hotspot-type"];
484
+ $hotspot_content = '';
485
+
486
+ ob_start();
487
+ do_action('wpvr_hotspot_content_admin', $hotspot_data);
488
+ $hotspot_content = ob_get_clean();
489
+
490
+
491
+ if (!$hotspot_content) $hotspot_content = $hotspot_data["hotspot-content"];
492
+
493
+
494
+ $hotspot_info = array(
495
+ "text" => $hotspot_data["hotspot-title"],
496
+ "pitch" => $hotspot_data["hotspot-pitch"],
497
+ "yaw" => $hotspot_data["hotspot-yaw"],
498
+ "type" => $hotspot_type,
499
+ "URL" => $hotspot_data["hotspot-url"],
500
+ "clickHandlerArgs" => $hotspot_content,
501
+ "createTooltipArgs" => $hotspot_data["hotspot-hover"],
502
+ "sceneId" => $hotspot_data["hotspot-scene"],
503
+ 'hotspot_type' => $hotspot_data['hotspot-type']
504
+ );
505
+
506
+ array_push($hotspots, $hotspot_info);
507
+ if (empty($hotspot_data["hotspot-scene"])) {
508
+ unset($hotspot_info['targetPitch']);
509
+ unset($hotspot_info['targetYaw']);
510
+ }
511
+ }
512
+ }
513
+ return $hotspots;
514
+ }
515
+
516
+
517
+ /**
518
+ * Prepare youtube video for preview
519
+ *
520
+ * @param string $videourl
521
+ *
522
+ * @return string
523
+ * @since 8.0.0
524
+ */
525
+ public function prepare_youtube_video_preview($videourl, $videodata)
526
+ {
527
+ $explodeid = '';
528
+ $explodeid = explode("=", $videourl);
529
+
530
+ if ($videodata['autoplay'] == 'on') {
531
+ $autoplay = '&autoplay=1';
532
+ $muted = '&mute=1';
533
+ } else {
534
+ $autoplay = '';
535
+ $muted = '';
536
+ }
537
+
538
+ if ($videodata['loop'] == 'on') {
539
+ $loop = '&loop=1';
540
+ } else {
541
+ $loop = '';
542
+ }
543
+
544
+ $html = '';
545
+ $html .= '
546
+ <iframe src="https://www.youtube.com/embed/' . $explodeid[1] . '?rel=0&modestbranding=1' . $loop . '&autohide=1' . $muted . '&showinfo=0&controls=1' . $autoplay . '" width="600" height="400" frameborder="0" allowfullscreen></iframe>
547
+ ';
548
+ return $html;
549
+ }
550
+
551
+
552
+ /**
553
+ * Prepare shortcode data for youtube video url
554
+ *
555
+ * @param array $postdata
556
+ * @param mixed $width
557
+ * @param mixed $height
558
+ *
559
+ * @return string
560
+ * @since 8.0.0
561
+ */
562
+ public function preapre_youtube_video_shortcode_data($postdata, $width, $height, $autoplay, $loop, $radius)
563
+ {
564
+ $explodeid = '';
565
+ $explodeid = explode("=", $postdata['vidurl']);
566
+
567
+ $foundid = '';
568
+ $muted = '&mute=1';
569
+
570
+ $loop = ($loop == 'on') ? '&loop=1' : '';
571
+
572
+ if (strpos($postdata['vidurl'], 'youtu') > 0) {
573
+ $explodeid = explode("/", $postdata['vidurl']);
574
+ $foundid = $explodeid[3] . '?' . $autoplay . $loop;
575
+ $expdata = $explodeid[3];
576
+ } else {
577
+ $foundid = $explodeid[1] . '?' . $autoplay . $loop;
578
+ $expdata = $explodeid[1];
579
+ }
580
+
581
+ $html = '';
582
+ $html .= '<div style="text-align:center; max-width:100%; width:' . $width . '; height:' . $height . '; border-radius: ' . $radius . '; margin: 0 auto;">';
583
+ $html .= '<iframe src="https://www.youtube.com/embed/' . $expdata . '?rel=0&modestbranding=1' . $loop . '&autohide=1' . $muted . '&showinfo=0&controls=1' . $autoplay . '" width="100%" height="100%" style="border-radius: ' . $radius . ';" frameborder="0" allowfullscreen></iframe>';
584
+ $html .= '</div>';
585
+ return $html;
586
+ }
587
+
588
+
589
+ /**
590
+ * Prepare shortcode data for Vimeo url
591
+ *
592
+ * @param array $postdata
593
+ * @param mixed $width
594
+ * @param mixed $height
595
+ *
596
+ * @return string
597
+ * @since 8.0.0
598
+ */
599
+ public function prepare_vimeo_video_shortcode_data($postdata, $width, $height, $autoplay, $loop, $radius)
600
+ {
601
+ $explodeid = '';
602
+ $explodeid = explode("/", $postdata['autoplay']);
603
+ $foundid = '';
604
+
605
+ $autoplay = ($autoplay == 'on') ? '&autoplay=1&muted=1' : '';
606
+ $loop = ($loop == 'on') ? '&loop=1' : '';
607
+
608
+ $foundid = $explodeid[3] . '?' . $autoplay . $loop;
609
+ $html = '';
610
+ $html .= '<div style="text-align: center; max-width:100%; width:' . $width . '; height:' . $height . '; margin: 0 auto;">';
611
+ $html .= '<iframe src="https://player.vimeo.com/video/' . $foundid . '" width="' . trim($width, 'px') . '" height="' . trim($height, 'px') . '" style="border-radius: ' . $radius . ';" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
612
+ $html .= '</div>';
613
+ return $html;
614
+ }
615
+
616
+
617
+ /**
618
+ * Prepare shortcode data from regular postdata
619
+ *
620
+ * @param integer $id
621
+ * @param array $postdata
622
+ * @param string $width
623
+ * @param string $height
624
+ *
625
+ * @return string
626
+ * @since 8.0.0
627
+ */
628
+ public function prepare_regular_video_shortcode_data($id, $postdata, $width, $height, $radius)
629
+ {
630
+ $html = '';
631
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style="max-width:100%; width: ' . $width . '; height: ' . $height . '; border-radius: ' . $radius . '; margin: 0 auto;">';
632
+ $html .= '<div style="width:100%; height:100%; ">' . $postdata['panoviddata'] . '</div>';
633
+
634
+ $html .= '
635
+ <style>
636
+ .video-js {
637
+ border-radius:' . $radius . ';
638
+ }
639
+ .video-js canvas{
640
+ border-radius:' . $radius . ';
641
+ }
642
+ #pano' . $id . ' .vjs-poster {
643
+ border-radius: ' . $radius . ';
644
+ }
645
+ </style>
646
+
647
+ ';
648
+
649
+ $html .= '</div>';
650
+
651
+ //video js vr setup //
652
+ $html .= '<script>';
653
+ $html .= '
654
+ (function (window, videojs) {
655
+ var player = window.player = videojs("' . $postdata['vidid'] . '");
656
+ player.mediainfo = player.mediainfo || {};
657
+ player.mediainfo.projection = "equirectangular";
658
+
659
+ // AUTO is the default and looks at mediainfo
660
+ var vr = window.vr = player.vr({ projection: "AUTO", debug: true, forceCardboard: false, antialias: false });
661
+ }(window, window.videojs));
662
+
663
+ ';
664
+ $html .= '</script>';
665
+ //video js vr end //
666
+ return $html;
667
+ }
668
+
669
+
670
+ /**
671
+ * Prepare scene data for shortcode
672
+ *
673
+ * @param array $panodata
674
+ *
675
+ * @return array
676
+ * @since 8.0.0
677
+ */
678
+ public function prepare_shortcode_scene_data($panodata)
679
+ {
680
+ $scene_data = array();
681
+
682
+ if (!empty($panodata["scene-list"])) {
683
+ $scene_data = $this->prepare_shortcode_scene_list($panodata);
684
+ }
685
+
686
+ return $scene_data;
687
+ }
688
+
689
+
690
+ /**
691
+ * Prepare scene lists data for shortcode
692
+ *
693
+ * @param array $panodata
694
+ *
695
+ * @return array
696
+ * @since 8.0.0
697
+ */
698
+ private function prepare_shortcode_scene_list($panodata)
699
+ {
700
+ $scene_data = array();
701
+ foreach ($panodata["scene-list"] as $panoscenes) {
702
+ $hotspot_datas = array();
703
+ if (isset($panoscenes["hotspot-list"])) {
704
+ $hotspot_datas = $panoscenes["hotspot-list"];
705
+ }
706
+ $hotspots = $this->prepare_shortcode_hotspots_list($hotspot_datas);
707
+ $device_scene = $this->get_shortcode_device_scene($panoscenes['scene-attachment-url']);
708
+ $scene_info = $this->get_shortcode_scene_info($panoscenes, $hotspots, $device_scene);
709
+ $scene_data[$panoscenes["scene-id"]] = $scene_info;
710
+ }
711
+ return $scene_data;
712
+ }
713
+
714
+
715
+ /**
716
+ * Prepare hotspots list for shortcode
717
+ *
718
+ * @param array $hotspot_datas
719
+ *
720
+ * @return array
721
+ * @since 8.0.0
722
+ */
723
+ private function prepare_shortcode_hotspots_list($hotspot_datas)
724
+ {
725
+ $hotspots = array();
726
+ foreach ($hotspot_datas as $hotspot_data) {
727
+ $hotspot_type = $hotspot_data["hotspot-type"] !== 'scene' ? 'info' : $hotspot_data["hotspot-type"];
728
+ $hotspot_content = $hotspot_data["hotspot-content"];
729
+ $hotspot_info = $this->get_shortcode_hotspot_info($hotspot_data, $hotspot_type, $hotspot_content);
730
+ array_push($hotspots, $hotspot_info);
731
+ }
732
+ return $hotspots;
733
+ }
734
+
735
+
736
+ /**
737
+ * Return hotspot info array to hotspot list
738
+ *
739
+ * @param array $hotspot_data
740
+ * @param string $hotspot_type
741
+ * @param string $hotspot_content
742
+ *
743
+ * @return array
744
+ * @since 8.0.0
745
+ */
746
+ private function get_shortcode_hotspot_info($hotspot_data, $hotspot_type, $hotspot_content)
747
+ {
748
+ $hotspot_info = array(
749
+ "text" => $hotspot_data["hotspot-title"],
750
+ "pitch" => $hotspot_data["hotspot-pitch"],
751
+ "yaw" => $hotspot_data["hotspot-yaw"],
752
+ "type" => $hotspot_type,
753
+ "cssClass" => $hotspot_data["hotspot-customclass"],
754
+ "URL" => $hotspot_data["hotspot-url"],
755
+ "wpvr_url_open" => isset($hotspot_data["wpvr_url_open"][0]) ? $hotspot_data["wpvr_url_open"][0] : 'off',
756
+ "clickHandlerArgs" => $hotspot_content,
757
+ "createTooltipArgs" => $hotspot_data["hotspot-hover"],
758
+ "sceneId" => $hotspot_data["hotspot-scene"],
759
+ 'hotspot_type' => $hotspot_data['hotspot-type']
760
+ );
761
+
762
+ $hotspot_info['URL'] = ($hotspot_data['hotspot-type'] === 'fluent_form' || $hotspot_data['hotspot-type'] === 'wc_product') ? '' : $hotspot_info['URL'];
763
+
764
+ if ($hotspot_data["hotspot-customclass"] == 'none' || $hotspot_data["hotspot-customclass"] == '') {
765
+ unset($hotspot_info["cssClass"]);
766
+ }
767
+ if (empty($hotspot_data["hotspot-scene"])) {
768
+ unset($hotspot_info['targetPitch']);
769
+ unset($hotspot_info['targetYaw']);
770
+ }
771
+ return $hotspot_info;
772
+ }
773
+
774
+
775
+ /**
776
+ * Return scene info array for scene list
777
+ *
778
+ * @param array $panoscenes
779
+ * @param array $hotspots
780
+ * @param string $device_scene
781
+ *
782
+ * @return array
783
+ * @since 8.0.0
784
+ */
785
+ private function get_shortcode_scene_info($panoscenes, $hotspots, $device_scene)
786
+ {
787
+ $scene_info = array();
788
+ if ($panoscenes["scene-type"] == 'cubemap') {
789
+ $pano_attachment = array(
790
+ $panoscenes["scene-attachment-url-face0"],
791
+ $panoscenes["scene-attachment-url-face1"],
792
+ $panoscenes["scene-attachment-url-face2"],
793
+ $panoscenes["scene-attachment-url-face3"],
794
+ $panoscenes["scene-attachment-url-face4"],
795
+ $panoscenes["scene-attachment-url-face5"]
796
+ );
797
+ $scene_info = array("type" => $panoscenes["scene-type"], "cubeMap" => $pano_attachment, "hotSpots" => $hotspots);
798
+ } else {
799
+ $scene_info = array("type" => $panoscenes["scene-type"], "panorama" => $device_scene, "hotSpots" => $hotspots);
800
+ }
801
+ return $scene_info;
802
+ }
803
+
804
+
805
+ /**
806
+ * Return device scene for shortcode
807
+ *
808
+ * @param string $device_scene
809
+ *
810
+ * @return string
811
+ * @since 8.0.0
812
+ */
813
+ private function get_shortcode_device_scene($device_scene)
814
+ {
815
+ $mobile_media_resize = get_option('mobile_media_resize');
816
+ $file_accessible = ini_get('allow_url_fopen');
817
+
818
+ if ($mobile_media_resize == "true") {
819
+ if ($file_accessible == "1") {
820
+ $image_info = getimagesize($device_scene);
821
+ if ($image_info[0] > 4096) {
822
+ $src_to_id_for_mobile = '';
823
+ $src_to_id_for_desktop = '';
824
+ if (wpvr_isMobileDevice()) {
825
+ $src_to_id_for_mobile = attachment_url_to_postid($device_scene);
826
+ if ($src_to_id_for_mobile) {
827
+ $mobile_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'wpvr_mobile');
828
+ if ($mobile_scene[3]) {
829
+ $device_scene = $mobile_scene[0];
830
+ }
831
+ }
832
+ } else {
833
+ $src_to_id_for_desktop = attachment_url_to_postid($device_scene);
834
+ if ($src_to_id_for_desktop) {
835
+ $desktop_scene = wp_get_attachment_image_src($src_to_id_for_mobile, 'full');
836
+ if ($desktop_scene[0]) {
837
+ $device_scene = $desktop_scene[0];
838
+ }
839
+ }
840
+ }
841
+ }
842
+ }
843
+ }
844
+ return $device_scene;
845
+ }
846
+
847
+
848
+ /**
849
+ * Prepare json response for shortcode
850
+ *
851
+ * @param string $autorotation
852
+ * @param array $pano_response
853
+ * @param string $panoid
854
+ * @param integer $autorotationinactivedelay
855
+ * @param integer $autorotationstopdelay
856
+ *
857
+ * @return array
858
+ * @since 8.0.0
859
+ */
860
+ public function prepare_shortcode_response($autorotation, $pano_response, $panoid, $autorotationinactivedelay, $autorotationstopdelay)
861
+ {
862
+ $pano_id_array = array("panoid" => $panoid);
863
+ if (empty($autorotation)) {
864
+ unset($pano_response['autoRotate']);
865
+ unset($pano_response['autoRotateInactivityDelay']);
866
+ unset($pano_response['autoRotateStopDelay']);
867
+ }
868
+ if (empty($autorotationinactivedelay)) {
869
+ unset($pano_response['autoRotateInactivityDelay']);
870
+ }
871
+ if (empty($autorotationstopdelay)) {
872
+ unset($pano_response['autoRotateStopDelay']);
873
+ }
874
+ $response = array();
875
+ $response = array($pano_id_array, $pano_response);
876
+ if (!empty($response)) {
877
+ $response = json_encode($response);
878
+ }
879
+ return $response;
880
+ }
881
+
882
+
883
+ /**
884
+ * Prepare HTML and script contents for scene shortcode
885
+ *
886
+ * @param mixed $width
887
+ * @param mixed $panoid
888
+ * @param mixed $hotspoticoncolor
889
+ * @param mixed $foreground_color
890
+ * @param mixed $hotspotblink
891
+ * @param mixed $pulse_color
892
+ * @param mixed $radius
893
+ * @param mixed $id
894
+ * @param mixed $height
895
+ * @param mixed $scene_data
896
+ * @param mixed $response
897
+ * @param mixed $autoload
898
+ * @param mixed $default_scene
899
+ * @param mixed $postdata
900
+ *
901
+ * @return string
902
+ * @since 8.0.0
903
+ */
904
+ public function prepare_scene_shortcode_html_content($width, $panoid, $hotspoticoncolor, $foreground_color, $hotspotblink, $pulse_color, $radius, $id, $height, $scene_data, $response, $autoload, $default_scene, $postdata, $mobile_height, $gyro)
905
+ {
906
+ $html = '';
907
+ $html .= '<style>';
908
+
909
+ if ($width == 'embed') {
910
+ $html .= 'body{overflow: hidden;}';
911
+ }
912
+ // Return ID and Classes for CSS styling //
913
+ $html = $this->get_shortcode_content_classes($html, $panoid, $hotspoticoncolor, $foreground_color);
914
+ // Return webkit keyframes CSS styling //
915
+ if ($hotspotblink == 'on') {
916
+ $html = $this->get_shortcode_webkit_keyframes($html, $panoid, $pulse_color);
917
+ }
918
+ $status = get_option('wpvr_edd_license_status');
919
+ if ($status !== false && $status == 'valid') {
920
+ if (!$gyro) {
921
+ $html .= '#' . $panoid . ' div.pnlm-orientation-button {
922
+ display: none;
923
+ }';
924
+ }
925
+ } else {
926
+ $html .= '#' . $panoid . ' div.pnlm-orientation-button {
927
+ display: none;
928
+ }';
929
+ }
930
+ $html .= '</style>';
931
+
932
+ // Render pano wrapper contents //
933
+ $html = $this->get_shortcode_pano_wrap_content($width, $radius, $html, $id, $height, $mobile_height);
934
+ // Render hotspots contents //
935
+ $html = $this->render_shortcode_hotspot_content($html, $id, $scene_data);
936
+ // Render custom iframe content //
937
+ $html = $this->render_shortcode_custom_iframe_wrapper($html, $id);
938
+
939
+ $html .= '</div>';
940
+
941
+ //script started
942
+ $html = $this->get_shortcode_script_content($html, $response, $id, $autoload, $default_scene, $postdata);
943
+ //script end
944
+ return $html;
945
+ }
946
+
947
+
948
+ /**
949
+ * Return ID and Classes for CSS styling
950
+ *
951
+ * @param mixed $html
952
+ * @param mixed $panoid
953
+ * @param mixed $hotspoticoncolor
954
+ * @param mixed $foreground_color
955
+ *
956
+ * @return string
957
+ * @since 8.0.0
958
+ */
959
+ private function get_shortcode_content_classes($html, $panoid, $hotspoticoncolor, $foreground_color)
960
+ {
961
+ $html .= '#' . $panoid . ' div.pnlm-hotspot-base.fas,
962
+ #' . $panoid . ' div.pnlm-hotspot-base.fab,
963
+ #' . $panoid . ' div.pnlm-hotspot-base.fa,
964
+ #' . $panoid . ' div.pnlm-hotspot-base.far {
965
+ display: block !important;
966
+ background-color: ' . $hotspoticoncolor . ';
967
+ color: ' . $foreground_color . ';
968
+ border-radius: 100%;
969
+ width: 30px;
970
+ height: 30px;
971
+ animation: icon-pulse' . $panoid . ' 1.5s infinite cubic-bezier(.25, 0, 0, 1);
972
+ }';
973
+ return $html;
974
+ }
975
+
976
+
977
+ /**
978
+ * Resturn webkit keyframes CSS styling
979
+ *
980
+ * @param mixed $html
981
+ * @param mixed $panoid
982
+ * @param mixed $pulse_color
983
+ *
984
+ * @return string
985
+ * @since 8.0.0
986
+ */
987
+ private function get_shortcode_webkit_keyframes($html, $panoid, $pulse_color)
988
+ {
989
+ $html .= '@-webkit-keyframes icon-pulse' . $panoid . ' {
990
+ 0% {
991
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
992
+ }
993
+ 100% {
994
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
995
+ }
996
+ }
997
+ @keyframes icon-pulse' . $panoid . ' {
998
+ 0% {
999
+ box-shadow: 0 0 0 0px rgba(' . $pulse_color[0] . ', 1);
1000
+ }
1001
+ 100% {
1002
+ box-shadow: 0 0 0 10px rgba(' . $pulse_color[0] . ', 0);
1003
+ }
1004
+ }';
1005
+ return $html;
1006
+ }
1007
+
1008
+
1009
+ /**
1010
+ * Render pano wrapper content depending on Tour Width, Height and radius
1011
+ *
1012
+ * @param mixed $width
1013
+ * @param mixed $radius
1014
+ * @param mixed $html
1015
+ * @param mixed $id
1016
+ * @param mixed $height
1017
+ *
1018
+ * @return string
1019
+ * @since 8.0.0
1020
+ */
1021
+ private function get_shortcode_pano_wrap_content($width, $radius, $html, $id, $height, $mobile_height)
1022
+ {
1023
+ if ($width == 'fullwidth') {
1024
+
1025
+ if (wpvr_isMobileDevice()) {
1026
+ if ($radius) {
1027
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style="text-align:center; border-radius:' . $radius . '; direction:ltr;">';
1028
+ } else {
1029
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style="text-align:center;">';
1030
+ }
1031
+ } else {
1032
+ if ($radius) {
1033
+ $html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . '; border-radius:' . $radius . '; direction:ltr;" >';
1034
+ } else {
1035
+ $html .= '<div id="pano' . $id . '" class="pano-wrap vrfullwidth" style=" text-align:center; height: ' . $height . '; direction:ltr;" >';
1036
+ }
1037
+ }
1038
+ } elseif ($width == 'embed') {
1039
+ $html .= '<div id="pano' . $id . '" class="pano-wrap vrembed" style=" text-align:center; direction:ltr;" >';
1040
+ } else {
1041
+ if (wpvr_isMobileDevice()) {
1042
+ if ($radius) {
1043
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $mobile_height . '!important; margin: 0 auto; border-radius:' . $radius . '; direction:ltr;">';
1044
+ } else {
1045
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $mobile_height . '!important; margin: 0 auto; direction:ltr;">';
1046
+ }
1047
+ } else {
1048
+ if ($radius) {
1049
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; border-radius:' . $radius . '; direction:ltr;">';
1050
+ } else {
1051
+ $html .= '<div id="pano' . $id . '" class="pano-wrap" style=" text-align:center; max-width:100%; width: ' . $width . '; height: ' . $height . '; margin: 0 auto; direction:ltr;">';
1052
+ }
1053
+ }
1054
+ }
1055
+ return $html;
1056
+ }
1057
+
1058
+
1059
+ /**
1060
+ * Render hotspot contents inside pano wrapper
1061
+ *
1062
+ * @param string $html
1063
+ * @param mixed $id
1064
+ * @param array $scene_data
1065
+ *
1066
+ * @return string
1067
+ * @since 8.0.0
1068
+ */
1069
+ private function render_shortcode_hotspot_content($html, $id, $scene_data)
1070
+ {
1071
+ $html .= '<div class="wpvr-hotspot-tweak-contents-wrapper" style="display: none">';
1072
+ $html .= '<i class="fa fa-times cross" data-id="' . $id . '"></i>';
1073
+ $html .= '<div class="wpvr-hotspot-tweak-contents-flex">';
1074
+ $html .= '<div class="wpvr-hotspot-tweak-contents">';
1075
+ ob_start();
1076
+ do_action('wpvr_hotspot_tweak_contents', $scene_data);
1077
+ $hotspot_content = ob_get_clean();
1078
+ $html .= $hotspot_content;
1079
+ $html .= '</div>';
1080
+ $html .= '</div>';
1081
+ $html .= '</div>';
1082
+ return $html;
1083
+ }
1084
+
1085
+
1086
+ /**
1087
+ * Render custom iframe wrapper inside pano wrapper
1088
+ *
1089
+ * @param string $html
1090
+ * @param mixed $id
1091
+ *
1092
+ * @return string
1093
+ * @since 8.0.0
1094
+ */
1095
+ private function render_shortcode_custom_iframe_wrapper($html, $id)
1096
+ {
1097
+ $html .= '<div class="custom-ifram-wrapper" style="display: none;">';
1098
+ $html .= '<i class="fa fa-times cross" data-id="' . $id . '"></i>';
1099
+
1100
+ $html .= '<div class="custom-ifram-flex">';
1101
+ $html .= '<div class="custom-ifram">';
1102
+ $html .= '</div>';
1103
+ $html .= '</div>';
1104
+ $html .= '</div>';
1105
+ return $html;
1106
+ }
1107
+
1108
+
1109
+ /**
1110
+ * Return scripts contents for shortcode
1111
+ *
1112
+ * @param string $html
1113
+ * @param mixed $response
1114
+ * @param mixed $id
1115
+ * @param mixed $autoload
1116
+ * @param mixed $default_scene
1117
+ * @param mixed $postdata
1118
+ *
1119
+ * @return string
1120
+ * @since 8.0.0
1121
+ */
1122
+ private function get_shortcode_script_content($html, $response, $id, $autoload, $default_scene, $postdata)
1123
+ {
1124
+ $html .= '<script>';
1125
+ $html .= 'jQuery(document).ready(function() {';
1126
+ $html .= 'var response = ' . $response . ';';
1127
+ $html .= 'var scenes = response[1];';
1128
+ // Hotspot scripts content //
1129
+ $html = $this->get_shortcode_hotspot_script_content($html);
1130
+
1131
+ $html .= 'var panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);';
1132
+
1133
+ // Panaromic show scripts content //
1134
+ $html = $this->render_shortcode_panoshow_script_content($html, $id);
1135
+ // Auto rotation scripts content //
1136
+ $html = $this->render_shortcode_autoRotate_content($html, $id);
1137
+
1138
+ $html .= 'var touchtime = 0;';
1139
+
1140
+ // Return autoload scripts content //
1141
+ if (!$autoload) {
1142
+ $html = $this->render_shortcode_autoload_content($html, $id);
1143
+ }
1144
+
1145
+ // JQuery scripts for on-click content for elementor tab //
1146
+ $previeword = "Click to Load Panorama";
1147
+ if (isset($postdata['previewtext']) && $postdata['previewtext'] != '') {
1148
+ $previeword = $postdata['previewtext'];
1149
+ }
1150
+ $html = $this->render_elementor_tab_title_click_content($html, $id, $default_scene, $previeword);
1151
+ // JQuery scripts for on-click content for vr tour tab //
1152
+ $html = $this->render_vr_tour_tab_click_content($html, $id, $default_scene);
1153
+
1154
+ if (isset($postdata['previewtext']) && $postdata['previewtext'] != '') {
1155
+ $html .= 'jQuery("#pano' . $id . '").children(".pnlm-ui").find(".pnlm-load-button p").text("' . $postdata['previewtext'] . '")';
1156
+ }
1157
+
1158
+ $html .= '});';
1159
+ $html .= '</script>';
1160
+ return $html;
1161
+ }
1162
+
1163
+
1164
+ /**
1165
+ * Return scripts content for hotspot data on shortcode
1166
+ *
1167
+ * @param mixed $html
1168
+ *
1169
+ * @return string
1170
+ * @since 8.0.0
1171
+ */
1172
+ private function get_shortcode_hotspot_script_content($html)
1173
+ {
1174
+ $html .= 'if(scenes) {';
1175
+ $html .= 'var scenedata = scenes.scenes;';
1176
+ $html .= 'for(var i in scenedata) {';
1177
+ $html .= 'var scenehotspot = scenedata[i].hotSpots;';
1178
+ $html .= 'for(var i = 0; i < scenehotspot.length; i++) {';
1179
+ $html .= 'if(scenehotspot[i]["clickHandlerArgs"] != "") {';
1180
+ $html .= 'scenehotspot[i]["clickHandlerFunc"] = wpvrhotspot;';
1181
+ $html .= '}';
1182
+ if (wpvr_isMobileDevice() && get_option('dis_on_hover') == "true") {
1183
+ } else {
1184
+ $html .= 'if(scenehotspot[i]["createTooltipArgs"] != "") {';
1185
+ $html .= 'scenehotspot[i]["createTooltipFunc"] = wpvrtooltip;';
1186
+ $html .= '}';
1187
+ }
1188
+ $html .= '}';
1189
+ $html .= '}';
1190
+ $html .= '}';
1191
+ return $html;
1192
+ }
1193
+
1194
+
1195
+ /**
1196
+ * Render scripts content for panaromic show on shortcode
1197
+ *
1198
+ * @param mixed $html
1199
+ * @param mixed $id
1200
+ *
1201
+ * @return string
1202
+ * @since 8.0.0
1203
+ */
1204
+ private function render_shortcode_panoshow_script_content($html, $id)
1205
+ {
1206
+ $html .= 'panoshow' . $id . '.on("load", function (){
1207
+ setTimeout(() => {
1208
+ window.dispatchEvent(new Event("resize"));
1209
+ }, 200);
1210
+ if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1211
+ jQuery("#controls' . $id . '").css("bottom", "55px");
1212
+ }
1213
+ else {
1214
+ jQuery("#controls' . $id . '").css("bottom", "5px");
1215
+ }
1216
+ });';
1217
+ $html .= 'panoshow' . $id . '.on("render", function (){
1218
+ window.dispatchEvent(new Event("resize"));
1219
+ });';
1220
+ return $html;
1221
+ }
1222
+
1223
+
1224
+ /**
1225
+ * Return auto rotation scripts content on shortcode
1226
+ *
1227
+ * @param mixed $html
1228
+ * @param mixed $id
1229
+ *
1230
+ * @return string
1231
+ * @since 8.0.0
1232
+ */
1233
+ private function render_shortcode_autoRotate_content($html, $id)
1234
+ {
1235
+ $html .= 'if (scenes.autoRotate) {
1236
+ panoshow' . $id . '.on("load", function (){
1237
+ setTimeout(function(){ panoshow' . $id . '.startAutoRotate(scenes.autoRotate, 0); }, 3000);
1238
+ });
1239
+ panoshow' . $id . '.on("scenechange", function (){
1240
+ setTimeout(function(){ panoshow' . $id . '.startAutoRotate(scenes.autoRotate, 0); }, 3000);
1241
+ });
1242
+ }';
1243
+ return $html;
1244
+ }
1245
+
1246
+
1247
+ /**
1248
+ * Return autoload scripts content on shortcode
1249
+ *
1250
+ * @param mixed $html
1251
+ * @param mixed $id
1252
+ *
1253
+ * @return string
1254
+ * @since 8.0.0
1255
+ */
1256
+ private function render_shortcode_autoload_content($html, $id)
1257
+ {
1258
+ $html .= 'jQuery(document).ready(function(){
1259
+ jQuery("#controls' . $id . '").hide();
1260
+ jQuery("#zoom-in-out-controls' . $id . '").hide();
1261
+ jQuery("#adcontrol' . $id . '").hide();
1262
+ jQuery("#pano' . $id . '").find(".pnlm-panorama-info").hide();
1263
+ });';
1264
+
1265
+ $html .= 'panoshow' . $id . '.on("load", function (){
1266
+ jQuery("#controls' . $id . '").show();
1267
+ jQuery("#zoom-in-out-controls' . $id . '").show();
1268
+ jQuery("#adcontrol' . $id . '").show();
1269
+ jQuery("#pano' . $id . '").find(".pnlm-panorama-info").show();
1270
+ });';
1271
+ return $html;
1272
+ }
1273
+
1274
+
1275
+ /**
1276
+ * JQuery scripts for on-click content for elementor tab
1277
+ *
1278
+ * @param mixed $html
1279
+ * @param mixed $id
1280
+ * @param mixed $default_scene
1281
+ *
1282
+ * @return string
1283
+ * @since 8.0.0
1284
+ */
1285
+ private function render_elementor_tab_title_click_content($html, $id, $default_scene, $previeword)
1286
+ {
1287
+ $html .= 'jQuery(".elementor-tab-title").click(function(){
1288
+ var element_id;
1289
+ var pano_id;
1290
+ var element_id = this.id;
1291
+ element_id = element_id.split("-");
1292
+ element_id = element_id[3];
1293
+ jQuery("#elementor-tab-content-"+element_id).children("div").addClass("awwww");
1294
+ var pano_id = jQuery(".awwww").attr("id");
1295
+ jQuery("#elementor-tab-content-"+element_id).children("div").removeClass("awwww");
1296
+ if (pano_id != undefined) {
1297
+ pano_id = pano_id.split("o");
1298
+ pano_id = pano_id[1];
1299
+ if (pano_id == "' . $id . '") {
1300
+ jQuery("#pano' . $id . '").children(".pnlm-render-container").remove();
1301
+ jQuery("#pano' . $id . '").children(".pnlm-ui").remove();
1302
+ panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);
1303
+ jQuery("#pano' . $id . '").children(".pnlm-ui").find(".pnlm-load-button p").text("' . $previeword . '")
1304
+ setTimeout(function() {
1305
+ // panoshow' . $id . '.loadScene("' . $default_scene . '");
1306
+ window.dispatchEvent(new Event("resize"));
1307
+ if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1308
+ jQuery("#controls' . $id . '").css("bottom", "55px");
1309
+ }
1310
+ else {
1311
+ jQuery("#controls' . $id . '").css("bottom", "5px");
1312
+ }
1313
+ }, 200);
1314
+ }
1315
+ }
1316
+ });';
1317
+ return $html;
1318
+ }
1319
+
1320
+
1321
+ /**
1322
+ * JQuery scripts for on-click content for vr tour tab
1323
+ *
1324
+ * @param mixed $html
1325
+ * @param mixed $id
1326
+ * @param mixed $default_scene
1327
+ *
1328
+ * @return string
1329
+ * @since 8.0.0
1330
+ */
1331
+ private function render_vr_tour_tab_click_content($html, $id, $default_scene)
1332
+ {
1333
+ $html .= 'jQuery(".geodir-tab-head dd, #vr-tour-tab").click(function(){
1334
+ jQuery("#pano' . $id . '").children(".pnlm-render-container").remove();
1335
+ jQuery("#pano' . $id . '").children(".pnlm-ui").remove();
1336
+ panoshow' . $id . ' = pannellum.viewer(response[0]["panoid"], scenes);
1337
+ setTimeout(function() {
1338
+ panoshow' . $id . '.loadScene("' . $default_scene . '");
1339
+ window.dispatchEvent(new Event("resize"));
1340
+ if (jQuery("#pano' . $id . '").children().children(".pnlm-panorama-info:visible").length > 0) {
1341
+ jQuery("#controls' . $id . '").css("bottom", "55px");
1342
+ }
1343
+ else {
1344
+ jQuery("#controls' . $id . '").css("bottom", "5px");
1345
+ }
1346
+ }, 200);
1347
+ });';
1348
+ return $html;
1349
+ }
1350
+ }
admin/helpers/class-wpvr-validator.php ADDED
@@ -0,0 +1,589 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Manage all validation requirements and messages
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+ class WPVR_Validator {
14
+
15
+ /**
16
+ * Get all error messages
17
+ *
18
+ * @var array
19
+ * @since 8.0.0
20
+ */
21
+ public $errors = array();
22
+
23
+
24
+ /**
25
+ * Auto-rotation data error control and validation
26
+ *
27
+ * @param number $autorotationinactivedelay
28
+ * @param number $autorotationstopdelay
29
+ *
30
+ * @return void
31
+ * @since 8.0.0
32
+ */
33
+ public function basic_setting_validation($autorotationinactivedelay, $autorotationstopdelay)
34
+ {
35
+ if (!empty($autorotationinactivedelay) && !empty($autorotationstopdelay)) {
36
+ $this->add_error('autorotation_dual_action', '<span class="pano-error-title">Dual Action Error for Auto-Rotation</span><p> You can not use both Resume Auto-rotation & Stop Auto-rotation on the same tour. You can use only one of them.</p>');
37
+ }
38
+ }
39
+
40
+
41
+ /**
42
+ * Preview Image Message error control and validation
43
+ *
44
+ * @param string $text
45
+ *
46
+ * @return string
47
+ * @since 8.0.0
48
+ */
49
+ public function preview_text_validation($text)
50
+ {
51
+ $prevtext = sanitize_text_field($text);
52
+ if (strlen($prevtext) > 50) {
53
+ $this->add_error('preview_text', '<p><span>Warning:</span> Don\'t add more than 50 characters in Preview Image Message</p>');
54
+ }
55
+ return $prevtext;
56
+ }
57
+
58
+
59
+ /**
60
+ * Scene content error control and validation
61
+ * @param array $panodata
62
+ *
63
+ * @return void
64
+ * @since 8.0.0
65
+ */
66
+ public function scene_validation($panodata)
67
+ {
68
+ if ($panodata["scene-list"] != "") {
69
+ foreach ($panodata["scene-list"] as $scenes_val) {
70
+ $scene_id_validate = $scenes_val["scene-id"];
71
+
72
+ if (!empty($scene_id_validate)) {
73
+
74
+ $scene_id_validated = preg_replace('/[^0-9a-zA-Z_]/', "", $scene_id_validate);
75
+ if ($scene_id_validated != $scene_id_validate) {
76
+ $this->add_error('invalid_scene_id', '<span class="pano-error-title">Invalid Scene ID</span> <p>Scene ID can\'t contain spaces and special characters. <br/>Please assign a unique Scene ID with letters and numbers where Scene ID is : ' . $scene_id_validate . '</p>');
77
+ }
78
+
79
+ $this->scene_attachment_validation($scenes_val, $scene_id_validate); // Attachment error control and validation //
80
+
81
+ $this->scene_pitch_yaw_validation($scenes_val, $scene_id_validate); // Pitch and yaw error controll and validation //
82
+
83
+ $this->scene_default_zoom_validation($scenes_val, $scene_id_validate); // Default zoom error controll and validation //
84
+
85
+ $this->scene_max_zoom_validation($scenes_val, $scene_id_validate); // Max zoom error controll and validation //
86
+
87
+ $this->scene_min_zoom_validation($scenes_val, $scene_id_validate); // Min zoom error controll and validation //
88
+
89
+ $this->scene_hotspot_validation($scenes_val, $scene_id_validate); // Hotspot error controll and validation //
90
+ }
91
+ }
92
+ }
93
+ }
94
+
95
+
96
+ /**
97
+ * Empty image, Scene ID, and duplicate scene
98
+ * Error control and validation
99
+ *
100
+ * @param array $panodata
101
+ *
102
+ * @return void
103
+ * @since 8.0.0
104
+ */
105
+ public function empty_scene_validation($panodata)
106
+ {
107
+ $allsceneids = array();
108
+
109
+ foreach ($panodata["scene-list"] as $panoscenes) {
110
+ if (empty($panoscenes['scene-id']) && !empty($panoscenes['scene-attachment-url'])) {
111
+ $this->add_error('missing_scene_id', '<span class="pano-error-title">Missing Scene ID</span> <p>Please assign a unique Scene ID to your uploaded scene.</p>');
112
+ }
113
+ if (!empty($panoscenes['scene-id'])) {
114
+ array_push($allsceneids, $panoscenes['scene-id']);
115
+ }
116
+ }
117
+
118
+ foreach ($panodata["scene-list"] as $panoscenes) {
119
+
120
+ if ($panoscenes['dscene'] == 'on') {
121
+ $default_scene = $panoscenes['scene-id'];
122
+ }
123
+ }
124
+ if (empty($default_scene)) {
125
+ if ($allsceneids) {
126
+ $default_scene = $allsceneids[0];
127
+ } else {
128
+ $this->add_error('missing_image_scene', '<span class="pano-error-title">Missing Image & Scene ID</span> <p>Please Upload An Image and Set A Scene ID To See The Preview</p>');
129
+ }
130
+ }
131
+
132
+ $allsceneids_count = array_count_values($allsceneids);
133
+ foreach ($allsceneids_count as $key => $value) {
134
+ if ($value > 1) {
135
+ $this->add_error('duplicate_scene', '<span class="pano-error-title">Duplicate Scene ID</span> <p>You\'ve assigned a duplicate Scene ID. <br/>Please assign unique Scene IDs to each scene. </p>');
136
+ }
137
+ }
138
+ }
139
+
140
+
141
+ /**
142
+ * Scene attachment error controll and validation
143
+ *
144
+ * @param array $scenes_val
145
+ * @param string $scene_id_validate
146
+ *
147
+ * @return void
148
+ * @since 8.0.0
149
+ */
150
+ private function scene_attachment_validation($scenes_val, $scene_id_validate)
151
+ {
152
+ if ($scenes_val['scene-type'] == 'cubemap') {
153
+ if (empty($scenes_val["scene-attachment-url-face0"])) {
154
+ $this->add_error('cubemap_0', '<span class="pano-error-title">Missing Cubemap Scene Face 0</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
155
+ }
156
+
157
+ if (empty($scenes_val["scene-attachment-url-face1"])) {
158
+ $this->add_error('cubemap_1', '<span class="pano-error-title">Missing Cubemap Scene Face 1</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
159
+ }
160
+
161
+ if (empty($scenes_val["scene-attachment-url-face2"])) {
162
+ $this->add_error('cubemap_2', '<span class="pano-error-title">Missing Cubemap Scene Face 2</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
163
+ }
164
+
165
+ if (empty($scenes_val["scene-attachment-url-face3"])) {
166
+ $this->add_error('cubemap_3', '<span class="pano-error-title">Missing Cubemap Scene Face 3</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
167
+ }
168
+
169
+ if (empty($scenes_val["scene-attachment-url-face4"])) {
170
+ $this->add_error('cubemap_4', '<span class="pano-error-title">Missing Cubemap Scene Face 4</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
171
+ }
172
+
173
+ if (empty($scenes_val["scene-attachment-url-face5"])) {
174
+ $this->add_error('cubemap_5', '<span class="pano-error-title">Missing Cubemap Scene Face 5</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
175
+ }
176
+ } else {
177
+ if (empty($scenes_val["scene-attachment-url"])) {
178
+ $this->add_error('missing_scene', '<span class="pano-error-title">Missing Scene Image</span><p> Please upload a 360 Degree image where Scene ID is: ' . $scene_id_validate . '</p>');
179
+ }
180
+ }
181
+ }
182
+
183
+
184
+
185
+ /**
186
+ * Scene default zoom error control and validation
187
+ *
188
+ * @param array $scenes_val
189
+ * @param string $scene_id_validate
190
+ *
191
+ * @return void
192
+ * @since 8.0.0
193
+ */
194
+ private function scene_default_zoom_validation($scenes_val, $scene_id_validate)
195
+ {
196
+ if (!empty($scenes_val["scene-zoom"])) {
197
+ $validate_default_zoom = $scenes_val["scene-zoom"];
198
+ $validated_default_zoom = preg_replace('/[^0-9-]/', '', $validate_default_zoom);
199
+ if ($validated_default_zoom != $validate_default_zoom) {
200
+ $this->add_error('invalid_default_zoom', '<span class="pano-error-title">Invalid Default Zoom Value</span><p> You can only set Default Zoom in Degree values from 50 to 120 where Scene ID: ' . $scene_id_validate . '</p>');
201
+ }
202
+ $default_zoom_value = (int)$scenes_val["scene-zoom"];
203
+ if ($default_zoom_value > 120 || $default_zoom_value < 50) {
204
+ $this->add_error('invalid_default_zoom', '<span class="pano-error-title">Invalid Default Zoom Value</span><p> You can only set Default Zoom in Degree values from 50 to 120 where Scene ID: ' . $scene_id_validate . '</p>');
205
+ }
206
+ }
207
+ }
208
+
209
+
210
+ /**
211
+ * Scene max zoom error control and validation
212
+ *
213
+ * @param array $scenes_val
214
+ * @param string $scene_id_validate
215
+ *
216
+ * @return void
217
+ * @since 8.0.0
218
+ */
219
+ private function scene_max_zoom_validation($scenes_val, $scene_id_validate)
220
+ {
221
+ if (!empty($scenes_val["scene-maxzoom"])) {
222
+ $validate_max_zoom = $scenes_val["scene-maxzoom"];
223
+ $validated_max_zoom = preg_replace('/[^0-9-]/', '', $validate_max_zoom);
224
+ if ($validated_max_zoom != $validate_max_zoom) {
225
+ $this->add_error('invalid_max_zoom', '<span class="pano-error-title">Invalid Max-zoom Value:</span><p> You can only set Max-zoom in degree values (50-120) where Scene ID: ' . $scene_id_validate . '</p>');
226
+ }
227
+ $max_zoom_value = (int)$scenes_val["scene-maxzoom"];
228
+ if ($max_zoom_value > 120) {
229
+ $this->add_error('limit_max_zoom', '<span class="pano-error-title">Max-zoom Value Limit Exceeded</span><p> You can set the Max-zoom Value up to 120 degrees.</p>');
230
+ }
231
+
232
+ if ($max_zoom_value < 50) {
233
+ $this->add_error('limit_max_zoom', '<span class="pano-error-title">Max-zoom Value Limit Exceeded</span><p> You can not set the Max-zoom Value lower than 50 degrees.</p>');
234
+ }
235
+ }
236
+ }
237
+
238
+
239
+ /**
240
+ * Scene min zoom error control and validation
241
+ *
242
+ * @param array $scenes_val
243
+ * @param string $scene_id_validate
244
+ *
245
+ * @return void
246
+ * @since 8.0.0
247
+ */
248
+ private function scene_min_zoom_validation($scenes_val, $scene_id_validate)
249
+ {
250
+ if (!empty($scenes_val["scene-minzoom"])) {
251
+ $validate_min_zoom = $scenes_val["scene-minzoom"];
252
+ $validated_min_zoom = preg_replace('/[^0-9-]/', '', $validate_min_zoom);
253
+ if ($validated_min_zoom != $validate_min_zoom) {
254
+ $this->add_error('invalid_min_zomm', '<span class="pano-error-title">Invalid Min-zoom Value</span><p> You can only set Min-zoom in degree values (50-120) where Scene ID: ' . $scene_id_validate . '</p>');
255
+ }
256
+ $min_zoom_value = (int)$scenes_val["scene-minzoom"];
257
+ if ($min_zoom_value < 50) {
258
+ $this->add_error('low_min_zoom', '<span class="pano-error-title">Low Min-Zoom Value</span><p> The Min-zoom value must be more than 50 in degree values where Scene ID: ' . $scene_id_validate . '</p>');
259
+ }
260
+
261
+ if ($min_zoom_value > 120) {
262
+ $this->add_error('low_min_zoom', '<span class="pano-error-title">Hight Min-Zoom Value</span><p> The Min-zoom value must be less than 120 in degree values where Scene ID: ' . $scene_id_validate . '</p>');
263
+ }
264
+ }
265
+ }
266
+
267
+
268
+ /**
269
+ * Scene hotspot error control and validation
270
+ *
271
+ * @param array $scenes_val
272
+ * @param string $scene_id_validate
273
+ *
274
+ * @return void
275
+ * @since 8.0.0
276
+ */
277
+ private function scene_hotspot_validation($scenes_val, $scene_id_validate)
278
+ {
279
+ if ($scenes_val["hotspot-list"] != "") {
280
+ foreach ($scenes_val["hotspot-list"] as $hotspot_val) {
281
+
282
+ $hotspot_title_validate = $hotspot_val["hotspot-title"];
283
+
284
+ if (!empty($hotspot_title_validate)) {
285
+ $this->hotspot_id_validation($scene_id_validate, $hotspot_title_validate); // ID error control and validation //
286
+
287
+ $this->hotspot_pitch_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate); // Pitch error control and validation //
288
+
289
+ $this->hotspot_yaw_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate); // Yaw error control and validation //
290
+
291
+ $this->hotspot_custom_icon_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate); // Custom icon error control and validation //
292
+
293
+ $this->hotspot_url_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate); // URL error control and validation //
294
+
295
+ $this->info_hotspot_type_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate); // Info type error control and validation //
296
+
297
+ $this->hotspot_shortcode_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate); // Shortcode error control and validation //
298
+
299
+ $this->scene_type_hotspot_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate); // Scene type error control and validation //
300
+ }
301
+ }
302
+ }
303
+ }
304
+
305
+
306
+ /**
307
+ * Scene pitch and yaw error control and validation
308
+ *
309
+ * @param array $scenes_val
310
+ * @param string $scene_id_validate
311
+ *
312
+ * @return void
313
+ * @since 8.0.0
314
+ */
315
+ private function scene_pitch_yaw_validation($scenes_val, $scene_id_validate)
316
+ {
317
+ if (!empty($scenes_val["scene-pitch"])) {
318
+ $validate_scene_pitch = $scenes_val["scene-pitch"];
319
+ $validated_scene_pitch = preg_replace('/[^0-9.-]/', '', $validate_scene_pitch);
320
+ if ($validated_scene_pitch != $validate_scene_pitch) {
321
+ $this->add_error('invalid_pitch', '<span class="pano-error-title">Invalid Pitch Value</span><p> The Pitch Value can only contain float numbers where Scene ID: ' . $scene_id_validate . '</p>');
322
+ }
323
+ }
324
+
325
+ if (!empty($scenes_val["scene-yaw"])) {
326
+ $validate_scene_yaw = $scenes_val["scene-yaw"];
327
+ $validated_scene_yaw = preg_replace('/[^0-9.-]/', '', $validate_scene_yaw);
328
+ if ($validated_scene_yaw != $validate_scene_yaw) {
329
+ $this->add_error('invalid_yaw', '<span class="pano-error-title">Invalid Yaw Value</span><p> The Yaw Value can only contain float numbers where Scene ID: ' . $scene_id_validate . '</p>');
330
+ }
331
+ }
332
+ }
333
+
334
+
335
+ /**
336
+ * Hotspot pitch error control and validation
337
+ *
338
+ * @param array $hotspot_val
339
+ * @param string $scene_id_validate
340
+ * @param string $hotspot_title_validate
341
+ *
342
+ * @return void
343
+ * @since 8.0.0
344
+ */
345
+ private function hotspot_pitch_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate)
346
+ {
347
+ $hotspot_pitch_validate = $hotspot_val["hotspot-pitch"];
348
+ if (empty($hotspot_pitch_validate)) {
349
+ $this->add_error('pitch_required', '<p><span>Warning:</span> Hotspot pitch is required for every hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
350
+ }
351
+ if (!empty($hotspot_pitch_validate)) {
352
+ $hotspot_pitch_validated = preg_replace('/[^0-9.-]/', '', $hotspot_pitch_validate);
353
+ if ($hotspot_pitch_validated != $hotspot_pitch_validate) {
354
+ $this->add_error('invalid_pitch', '<span class="pano-error-title">Invalid Pitch Value</span> <p>The Pitch Value can only contain float numbers where Scene ID: ' . $scene_id_validate . ' Hotspot ID is: ' . $hotspot_title_validate . '</p>');
355
+ }
356
+ }
357
+ }
358
+
359
+
360
+ /**
361
+ * Hotspot yaw error control and validation
362
+ *
363
+ * @param array $hotspot_val
364
+ * @param string $scene_id_validate
365
+ * @param string $hotspot_title_validate
366
+ *
367
+ * @return void
368
+ * @since 8.0.0
369
+ */
370
+ private function hotspot_yaw_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate)
371
+ {
372
+ $hotspot_yaw_validate = $hotspot_val["hotspot-yaw"];
373
+ if (empty($hotspot_yaw_validate)) {
374
+ $this->add_error('yaw_required', '<p><span>Warning:</span> Hotspot yaw is required for every hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
375
+ }
376
+ if (!empty($hotspot_yaw_validate)) {
377
+ $hotspot_yaw_validated = preg_replace('/[^0-9.-]/', '', $hotspot_yaw_validate);
378
+ if ($hotspot_yaw_validated != $hotspot_yaw_validate) {
379
+ $this->add_error('invalid_yaw', '<span class="pano-error-title">Invalid Yaw Value</span> <p>The Yaw Value can only contain float numbers where Scene ID: ' . $scene_id_validate . ' Hotspot ID is: ' . $hotspot_title_validate . '</p>');
380
+ }
381
+ }
382
+ }
383
+
384
+
385
+ /**
386
+ * Info type hotspot error control and validation
387
+ *
388
+ * @param array $hotspot_val
389
+ * @param string $scene_id_validate
390
+ * @param string $hotspot_title_validate
391
+ *
392
+ * @return void
393
+ * @since 8.0.0
394
+ */
395
+ private function info_hotspot_type_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate)
396
+ {
397
+ if ($hotspot_val["hotspot-type"] == "info") {
398
+ if (!empty($hotspot_val["hotspot-scene"])) {
399
+ $this->add_error('target_scene_info_type', '<p><span>Warning:</span> Don\'t add Target Scene ID on info type hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
400
+ }
401
+ if (!empty($hotspot_val["hotspot-url"]) && !empty($hotspot_val["hotspot-content"])) {
402
+ $this->add_error('both_click_content_url', '<span class="pano-error-title">Warning!</span> <p>You can not set both On Click Content and URL on a hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
403
+ }
404
+ }
405
+ }
406
+
407
+ /**
408
+ * Scene type hotspot error control and validation
409
+ *
410
+ * @param array $hotspot_val
411
+ * @param string $scene_id_validate
412
+ * @param string $hotspot_title_validate
413
+ *
414
+ * @return void
415
+ * @since 8.0.0
416
+ */
417
+ private function scene_type_hotspot_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate)
418
+ {
419
+ if ($hotspot_val["hotspot-type"] == "scene") {
420
+ if (empty($hotspot_val["hotspot-scene"])) {
421
+ $this->add_error('target_scene_missing', '<span class="pano-error-title">Target Scene Missing</span> <p>Assign a Target Scene to the Scene-type Hotspot where Scene ID: ' . $scene_id_validate . ' and Hotspot ID : ' . $hotspot_title_validate . '</p>');
422
+ }
423
+ if (!empty($hotspot_val["hotspot-url"]) || !empty($hotspot_val["hotspot-content"])) {
424
+ $this->add_error('both_url_click_content', '<p><span>Warning:</span> Don\'t add Url or On click content on scene type hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
425
+ }
426
+ }
427
+ }
428
+
429
+
430
+ /**
431
+ * Hotspot URL error control and validation
432
+ *
433
+ * @param array $hotspot_val
434
+ * @param string $scene_id_validate
435
+ * @param string $hotspot_title_validate
436
+ *
437
+ * @return void
438
+ * @since 8.0.0
439
+ */
440
+ private function hotspot_url_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate)
441
+ {
442
+ $hotspot_url_validate = $hotspot_val["hotspot-url"];
443
+ if (!empty($hotspot_url_validate)) {
444
+ $hotspot_url_validated = esc_url($hotspot_url_validate);
445
+ if ($hotspot_url_validated != $hotspot_url_validate) {
446
+ $this->add_error('invalid_hotspot_url', '<p><span>Warning:</span> Hotspot Url is invalid where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
447
+ }
448
+ }
449
+ }
450
+
451
+
452
+ /**
453
+ * Hotspot Shortcode error control and validation
454
+ *
455
+ * @param array $hotspot_val
456
+ * @param string $scene_id_validate
457
+ * @param string $hotspot_title_validate
458
+ *
459
+ * @return void
460
+ * @since 8.0.0
461
+ */
462
+ private function hotspot_shortcode_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate)
463
+ {
464
+ if ($hotspot_val["hotspot-type"] == "shortcode_editor") {
465
+ if (substr($hotspot_val['hotspot-shortcode'], 0, 1) === '[') {
466
+ $pattern = get_shortcode_regex();
467
+ preg_match('/' . $pattern . '/s', $hotspot_val['hotspot-shortcode'], $matches);
468
+ if (is_array($matches) && !isset($matches[2])) {
469
+ $this->add_error('invalid_shortcode', '<p><span>Warning:</span> This is not a valid shortcode where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
470
+ }
471
+ }
472
+ }
473
+ }
474
+
475
+ /**
476
+ * Hotspot custom icon error control and validation
477
+ *
478
+ * @param array $hotspot_val
479
+ * @param string $scene_id_validate
480
+ * @param string $hotspot_title_validate
481
+ *
482
+ * @return void
483
+ * @since 8.0.0
484
+ */
485
+ private function hotspot_custom_icon_validation($hotspot_val, $scene_id_validate, $hotspot_title_validate)
486
+ {
487
+ if (is_plugin_active('wpvr-pro/wpvr-pro.php')) {
488
+ $status = get_option('wpvr_edd_license_status');
489
+ if ($status !== false && $status == 'valid') {
490
+ if ($hotspot_val["hotspot-customclass-pro"] != 'none' && !empty($hotspot_val["hotspot-customclass"])) {
491
+ $this->add_error('both_custom_icon', '<span class="pano-error-title">Warning!</span> <p>You can not use both Custom Icon and Custom Icon Class for a hotspot where scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
492
+ }
493
+ }
494
+ }
495
+ }
496
+
497
+
498
+ /**
499
+ * Hotspot ID error control and validation
500
+ *
501
+ * @param string $scene_id_validate
502
+ * @param string $hotspot_title_validate
503
+ *
504
+ * @return void
505
+ */
506
+ private function hotspot_id_validation($scene_id_validate, $hotspot_title_validate)
507
+ {
508
+ $hotspot_title_validated = preg_replace('/[^0-9a-zA-Z_]/', "", $hotspot_title_validate);
509
+ if ($hotspot_title_validated != $hotspot_title_validate) {
510
+ $this->add_error('invalid_hotspot_id', '<span class="pano-error-title">Invalid Hotspot ID</span> <p>Hotspot ID can\'t contain spaces and special characters.<br/> Please assign a unique Hotspot ID with letters and numbers where Scene id: ' . $scene_id_validate . ' and hotspot id : ' . $hotspot_title_validate . '</p>');
511
+ }
512
+ }
513
+
514
+
515
+ /**
516
+ * Duplicate hotspot error control and validation
517
+ *
518
+ * @param array $panodata
519
+ *
520
+ * @return void
521
+ * @since 8.0.0
522
+ */
523
+ public function duplicate_hotspot_validation($panodata)
524
+ {
525
+ foreach ($panodata["scene-list"] as $panoscenes) {
526
+ if (!empty($panoscenes['scene-id'])) {
527
+ $allhotspot = array();
528
+ foreach ($panoscenes["hotspot-list"] as $hotspot_val) {
529
+ if (!empty($hotspot_val["hotspot-title"])) {
530
+ array_push($allhotspot, $hotspot_val["hotspot-title"]);
531
+ }
532
+ }
533
+ $allhotspotcount = array_count_values($allhotspot);
534
+ foreach ($allhotspotcount as $key => $value) {
535
+ if ($value > 1) {
536
+ $this->add_error('duplicate_hotspot', '<span class="pano-error-title">Duplicate Hotspot ID</span> <p>You\'ve assigned a duplicate Hotspot ID. <br/>Please assign unique Hotspot IDs to each Hotspot.</p>');
537
+ }
538
+ }
539
+ }
540
+ }
541
+ }
542
+
543
+
544
+ /**
545
+ * Empty or no video url error control and validation
546
+ *
547
+ * @param string $videourl
548
+ *
549
+ * @return void
550
+ * @since 8.0.0
551
+ */
552
+ public function empty_video_validation($videourl)
553
+ {
554
+ if($videourl == ''){
555
+ $this->add_error('no_video', '<span class="pano-error-title">No Video Found!</span> <p>You haven\'t uploaded or set the link to a 360 degree video. Please Upload or Set a video to see the Preview.</p>');
556
+ }
557
+ }
558
+
559
+
560
+ /**
561
+ * Add validation messages to errors array
562
+ *
563
+ * @param string $key
564
+ * @param string $value
565
+ *
566
+ * @return void
567
+ * @since 8.0.0
568
+ */
569
+ public function add_error($key, $value)
570
+ {
571
+ $this->errors[$key] = $value;
572
+ $this->display_errors();
573
+ }
574
+
575
+
576
+ /**
577
+ * Display validation message or sending back responses
578
+ *
579
+ * @return wp_send_json_error
580
+ * @since 8.0.0
581
+ */
582
+ private function display_errors()
583
+ {
584
+ foreach($this->errors as $error){
585
+ wp_send_json_error($error);
586
+ die();
587
+ }
588
+ }
589
+ }
admin/icon/360-camera.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.2308 38.4237C13.8145 37.7157 12.929 37.495 12.2528 37.9309C11.5766 38.3668 11.3658 39.294 11.7822 40.002L13.5629 43.0311C10.4841 42.3913 7.88045 41.4963 5.9515 40.4069C3.99633 39.303 2.87498 38.0517 2.87498 36.974C2.87498 35.9618 3.83309 34.8214 5.5726 33.7633C6.4753 33.2137 7.55397 32.7084 8.78128 32.2556C8.88949 31.0682 9.14596 29.9251 9.53123 28.8466C7.41694 29.4911 5.58757 30.272 4.12812 31.1599C0.715757 33.2357 -0.000488281 35.4675 -0.000488281 36.974C-0.000488281 38.5672 0.795506 40.9158 4.5864 43.0566C6.61532 44.2025 9.25753 45.148 12.3329 45.838L9.87868 47.1556C9.17217 47.5346 8.89286 48.4418 9.25529 49.1815C9.50988 49.7017 10.0135 50.0005 10.5358 50.0005C10.7563 50.0005 10.9806 49.9471 11.1906 49.8346L17.2178 46.5997C17.5743 46.408 17.8386 46.0693 17.9464 45.6651C18.0543 45.2609 17.9962 44.8281 17.7862 44.4706L14.2308 38.4237Z" fill="#FFA912"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M39.9995 14.4237C39.9995 22.3764 33.4949 28.8466 25.4995 28.8466C17.5041 28.8466 10.9995 22.3764 10.9995 14.4237C10.9995 6.47064 17.5041 0.000457764 25.4995 0.000457764C33.4949 0.000457764 39.9995 6.47064 39.9995 14.4237ZM31.2995 14.4237C31.2995 11.2423 28.6974 8.65442 25.4995 8.65442C22.3012 8.65442 19.6995 11.2423 19.6995 14.4237C19.6995 17.6047 22.3012 20.193 25.4995 20.193C28.6974 20.193 31.2995 17.6047 31.2995 14.4237Z" fill="#FFA912"/>
4
+ <path d="M24.9995 17.3081C26.6538 17.3081 27.9995 16.0138 27.9995 14.4235C27.9995 12.8329 26.6538 11.5389 24.9995 11.5389C23.3452 11.5389 21.9995 12.8329 21.9995 14.4235C21.9995 16.0138 23.3452 17.3081 24.9995 17.3081Z" fill="#FFA912"/>
5
+ <path d="M45.847 31.1786C44.3686 30.2831 42.5129 29.496 40.3663 28.8466C40.7556 29.9281 41.0148 31.0744 41.1242 32.2651C42.3721 32.7219 43.468 33.2322 44.3833 33.7869C46.1308 34.8452 47.0934 35.9852 47.0934 36.9967C47.0934 38.4441 45.1723 40.0924 41.9552 41.4055C38.1969 42.9394 33.0287 43.8954 27.4024 44.0975C26.6005 44.1262 25.9728 44.8252 26.0004 45.6586C26.0276 46.4739 26.6724 47.1158 27.4519 47.1158C27.469 47.1158 27.486 47.1154 27.503 47.1151C33.4503 46.9012 38.9601 45.8716 43.0177 44.2154C48.7883 41.8603 49.9995 38.9898 49.9995 36.9967C49.9991 35.4895 49.279 33.257 45.847 31.1786V31.1786Z" fill="#FFA912"/>
6
+ <path d="M13.8558 27.8851C12.6871 29.4089 11.9995 31.2688 11.9995 33.2746C11.9995 34.0151 12.6461 34.6158 13.444 34.6158H36.5551C37.3525 34.6158 37.9995 34.0151 37.9995 33.2746C37.9995 31.2688 37.3119 29.4089 36.1432 27.8851C33.1279 30.2409 29.2396 31.6624 24.9995 31.6624C20.7595 31.6624 16.8711 30.2409 13.8558 27.8851Z" fill="#FFA912"/>
7
+ </svg>
admin/icon/360-view.svg ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <svg width="55" height="51" viewBox="0 0 55 51" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M54 4.5C54 6.70947 52.209 8.5 50 8.5C47.792 8.49756 46.0024 6.7085 46 4.5C46 2.29102 47.791 0.5 50 0.5C52.209 0.5 54 2.29102 54 4.5ZM51.3335 4.5C51.3335 3.76367 50.7363 3.16699 50 3.16699C49.2637 3.16748 48.667 3.76416 48.6665 4.5C48.6665 5.23633 49.2637 5.8335 50 5.8335C50.7363 5.8335 51.3335 5.23633 51.3335 4.5Z" fill="#201CFE"/>
3
+ <path d="M18 20.9287H15.3335C14.5972 20.9287 14 21.5046 14 22.2146C14 22.9246 14.5972 23.5 15.3335 23.5H18C20.208 23.4976 21.9976 21.7725 22 19.6428V9.35718C21.9976 7.22801 20.208 5.50235 18 5.5H15.3335C14.5972 5.5 14 6.07585 14 6.78588C14 7.49592 14.5972 8.07129 15.3335 8.07129H18C18.7363 8.07177 19.333 8.64714 19.3335 9.35718V13.2144H15.3335C14.5972 13.2144 14 13.7902 14 14.5002C14 15.2103 14.5972 15.7856 15.3335 15.7856H19.3335V19.6428C19.333 20.3529 18.7363 20.9282 18 20.9287Z" fill="#201CFE"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M32 19.6428C31.9976 21.7725 30.2085 23.4976 28 23.5C25.792 23.4976 24.0024 21.7725 24 19.6428V9.35718C24.0024 7.22801 25.792 5.50235 28 5.5H30.667C31.4033 5.5 32 6.07585 32 6.78588C32 7.49592 31.4033 8.07129 30.667 8.07129H28C27.2642 8.07176 26.6675 8.64714 26.667 9.35718V10.8799C27.0938 10.7273 27.5449 10.6473 28 10.6431C30.2085 10.6454 31.9976 12.3706 32 14.5002V19.6428ZM28 13.2144C27.2637 13.2144 26.667 13.7902 26.667 14.5002V19.6428C26.667 20.3529 27.2637 20.9287 28 20.9287C28.7363 20.9287 29.3335 20.3529 29.3335 19.6428V14.5002C29.3335 13.7902 28.7363 13.2144 28 13.2144Z" fill="#201CFE"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M43 19.6428C42.9976 21.7725 41.208 23.4976 39 23.5C36.7915 23.4976 35.0024 21.7725 35 19.6428V9.35718C35 7.22707 36.7905 5.5 39 5.5C41.209 5.5 43 7.22707 43 9.35718V19.6428ZM39 8.07129C38.2637 8.07129 37.6665 8.64714 37.6665 9.35718V19.6428C37.6665 20.3529 38.2637 20.9287 39 20.9287C39.7363 20.9287 40.333 20.3529 40.333 19.6428V9.35718C40.333 8.64714 39.7363 8.07129 39 8.07129Z" fill="#201CFE"/>
6
+ <path d="M47.5613 15.7326C47.2086 15.9666 46.9995 16.3433 47 16.7447V23.5C50.6367 22.82 54.0988 21.2022 55 19.9547C54.6103 18.2174 52.5323 16.7415 48.7796 15.5648C48.3678 15.4375 47.915 15.5 47.5613 15.7326Z" fill="#201CFE"/>
7
+ <path d="M8 23.5V16.7455C8 16.3442 7.79037 15.967 7.4377 15.7335C7.08502 15.4996 6.63173 15.4371 6.22036 15.5657C2.46723 16.7427 0.389666 18.2185 0 19.9551C0.901165 21.2024 4.36328 22.82 8 23.5Z" fill="#201CFE"/>
8
+ <path d="M28.1876 28.8907V28.8848H26.8124V28.8907C11.238 28.7903 2.45576 25.3707 0 23.5V42.4001C0 47.7181 13.8347 50.5 27.4997 50.5C41.1653 50.5 55 47.7181 55 42.4001V23.5C52.5442 25.3707 43.762 28.7903 28.1876 28.8907Z" fill="#201CFE"/>
9
+ </svg>
admin/icon/3d-view.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="60" height="52" viewBox="0 0 60 52" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M50.6564 23V26.9761C54.38 28.9208 56.5436 31.328 56.5436 33.716C56.5436 39.1889 46.0085 43.4884 35.5856 44.3946C34.634 44.4765 33.9266 45.3495 34.0061 46.3429C34.0808 47.2984 34.869 48.0698 35.8702 47.995C44.9431 47.2143 60 43.1223 60 33.716C60 28.5786 55.1907 25.0444 50.6564 23Z" fill="#FE8A54"/>
3
+ <path d="M19.0683 38.3597C18.1106 37.3321 16.446 37.8343 16.1537 39.246L15.3917 42.9254C3.97602 39.6858 -1.5048 32.7178 9.34323 27.0022V23C-4.89135 29.4747 -2.65761 41.6359 14.6548 46.4829L13.9695 49.7911C13.6757 51.2095 15.0088 52.4092 16.2946 51.867L24.9161 48.2307C26.0566 47.7498 26.3692 46.1952 25.5058 45.2685L19.0683 38.3597Z" fill="#FE8A54"/>
4
+ <path d="M30.7598 0.238455C30.2257 -0.0821557 29.5715 -0.07922 29.0399 0.245795L15 8.83012C17.3778 10.2839 28.7053 17.2099 29.9975 18L45 8.78412L30.7598 0.238455Z" fill="#FE8A54"/>
5
+ <path d="M13.0001 28.9188C13.0001 29.5647 13.3302 30.1613 13.8661 30.4842L28 39V21.0376L13 12V28.9188H13.0001Z" fill="#FE8A54"/>
6
+ <path d="M47 28.9355V12L32 21.0649V39L46.134 30.4983C46.67 30.1759 47 29.5803 47 28.9355Z" fill="#FE8A54"/>
7
+ </svg>
admin/icon/arrow-return.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg width="20" height="18" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M19.4136 18C19.1298 18 18.8835 17.7889 18.8361 17.4961C18.4133 14.9552 16.0226 10.5205 9.95832 10.2613V13.5215C9.95832 13.7473 9.83566 13.9543 9.64051 14.0577C9.44531 14.161 9.21039 14.1434 9.0318 14.0122L0.245352 7.55296C0.0913672 7.43975 0 7.25695 0 7.06221C0 6.86743 0.0913672 6.68467 0.245352 6.5715L9.03184 0.11234C9.21039 -0.0189611 9.44535 -0.0365295 9.64051 0.0668309C9.83566 0.170191 9.95832 0.377153 9.95832 0.603051V3.91231C13.7069 4.29713 20 7.08187 20 17.3969C20 17.7107 19.7662 17.9721 19.4624 17.9979C19.446 17.9993 19.4297 18 19.4136 18Z" fill="#011F3F"/>
3
+ </svg>
admin/icon/arrow-right-blue.svg ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0.841469 5.01788C0.898753 5.00859 0.956726 5.0043 1.01473 5.00505H10.8915L10.6761 4.90494C10.4656 4.80535 10.2741 4.66982 10.1101 4.50447L7.34045 1.73629C6.97568 1.38827 6.91439 0.828402 7.19521 0.409764C7.52204 -0.0363424 8.14882 -0.133204 8.5952 0.193453C8.63126 0.219859 8.66554 0.248642 8.69775 0.279615L13.7062 5.28537C14.0976 5.67613 14.098 6.31002 13.707 6.70122C13.7067 6.70147 13.7065 6.70175 13.7062 6.702L8.69775 11.7078C8.30602 12.0982 7.6718 12.0973 7.28114 11.7058C7.2504 11.675 7.22169 11.6422 7.19521 11.6076C6.91439 11.189 6.97568 10.6291 7.34045 10.2811L10.1051 7.50793C10.2521 7.36089 10.4211 7.23759 10.606 7.14251L10.9065 7.00735H1.06985C0.558146 7.02634 0.109199 6.66909 0.0130682 6.16639C-0.0754877 5.6206 0.29539 5.10642 0.841469 5.01788Z" fill="#201CFE"/>
3
+ </svg>
admin/icon/background-audio.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg width="51" height="50" viewBox="0 0 51 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M48.2372 11.0576L27.201 17.0422C26.5583 17.2263 26.1159 17.8137 26.1159 18.4813C26.1159 25.9093 26.1159 31.316 26.1159 38.8631C25.2326 38.3478 24.2193 38.0309 23.1249 38.0309C19.8258 38.0309 17.1431 40.7149 17.1431 44.0154C17.1431 47.316 19.8258 50 23.1249 50C26.424 50 29.1068 47.316 29.1068 44.0154V28.5873L47.1521 23.4576V32.8786C46.2688 32.3632 45.2556 32.0463 44.1612 32.0463C40.8621 32.0463 38.1793 34.7303 38.1793 38.0309C38.1793 41.3315 40.8621 44.0154 44.1612 44.0154C47.4603 44.0154 50.1431 41.3315 50.1431 38.0309C50.1431 28.5216 50.1431 21.9841 50.1431 12.4968C50.1431 11.5072 49.1969 10.7864 48.2372 11.0576Z" fill="#00B7FF"/>
3
+ <path d="M16.711 9.2418C13.9066 7.44321 11.5953 5.92182 11.5953 1.49616C11.5953 0.669184 10.9551 0 10.1638 0C9.37256 0 8.73228 0.669184 8.73228 1.49616C8.73228 10.7872 8.73228 4.64758 8.73228 27.863C7.88672 27.3476 6.9168 27.0307 5.86921 27.0307C2.71115 27.0307 0.143066 29.7147 0.143066 33.0153C0.143066 36.316 2.71115 39 5.86921 39C9.02727 39 11.5953 36.316 11.5953 33.0153C11.5953 27.8584 11.5953 24.4467 11.5953 18.7372C12.532 19.5212 13.685 20.1663 14.695 20.7787C17.6924 22.5948 20.28 24.164 20.28 28.5269C20.28 29.3538 20.9203 30.023 21.7115 30.023C22.5028 30.023 23.1431 29.3538 23.1431 28.5269V19.5499C23.1431 13.365 19.7264 11.1748 16.711 9.2418Z" fill="white"/>
4
+ </svg>
admin/icon/cart-lift.png CHANGED
Binary file
admin/icon/contact-form.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="57" height="50" viewBox="0 0 57 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M20.0247 17.5002C20.0247 15.571 18.2925 14 16.1628 14C14.034 14 12.3005 15.571 12.3005 17.5002C12.3005 19.4303 14.034 21 16.1628 21C18.2925 21 20.0247 19.4303 20.0247 17.5002Z" fill="#FFA912"/>
3
+ <path d="M11.335 30.1921V32H21.9557V30.1942C21.9557 27.3296 19.5733 25 16.6449 25C13.716 25 11.335 27.3296 11.335 30.1921Z" fill="#FFA912"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M33.3327 9H45.3377C46.0553 9 46.73 9.28965 47.2379 9.81455C47.745 10.3403 48.0248 11.0388 48.0248 11.7816V17.1079C48.0248 18.6417 46.8197 19.8892 45.3377 19.8892H34.1896C33.8735 19.8892 33.5641 19.9854 33.3014 20.168L30.6455 22V11.7816C30.6455 11.0388 30.9253 10.3403 31.4324 9.81541C31.9395 9.28965 32.615 9 33.3327 9ZM32.5883 14.4446C32.5883 15.3597 33.306 16.1022 34.1896 16.1022C35.0736 16.1022 35.7909 15.3597 35.7909 14.4446C35.7909 13.5299 35.0736 12.787 34.1896 12.787C33.306 12.787 32.5883 13.5299 32.5883 14.4446ZM39.335 16.1022C38.4513 16.1022 37.7337 15.3597 37.7337 14.4446C37.7337 13.5299 38.4513 12.787 39.335 12.787C40.219 12.787 40.9362 13.5299 40.9362 14.4446C40.9362 15.3597 40.219 16.1022 39.335 16.1022ZM42.8795 14.4446C42.8795 15.3597 43.5967 16.1022 44.4807 16.1022C45.3644 16.1022 46.082 15.3597 46.082 14.4446C46.082 13.5299 45.3644 12.787 44.4807 12.787C43.5967 12.787 42.8795 13.5299 42.8795 14.4446Z" fill="white"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.86908 0H51.5596C54.3739 0 56.7144 2.29945 56.7144 5.21613V32H25.0832V30.1047C25.0832 27.0307 23.5114 24.3241 21.1389 22.7577C22.4834 21.4804 23.3255 19.6681 23.3255 17.66C23.3255 13.8036 20.2245 10.6665 16.4131 10.6665C12.6012 10.6665 9.50024 13.8036 9.50024 17.66C9.50024 19.6681 10.3428 21.4796 11.6869 22.7564C9.31567 24.3232 7.74384 27.0298 7.74384 30.1025V32H0.714355V5.21613C0.714355 2.30939 3.04498 0 5.86908 0ZM45.4081 22.8757C48.7355 22.8757 51.4426 20.1371 51.4426 16.7713V11.438C51.4426 8.06624 48.7462 5.33326 45.4081 5.33326H33.1082C29.7752 5.33326 27.0737 8.06105 27.0737 11.438V24.7714C27.0737 26.0936 28.5349 26.8867 29.6244 26.1524L34.4826 22.8757H45.4081Z" fill="#00B7FF"/>
6
+ <path d="M0.714355 37.8662C0.714355 40.7364 3.05524 43 5.86951 43H27.0737V46.7323H19.928C19.0219 46.7323 18.2874 47.4641 18.2874 48.3662C18.2874 49.2686 19.0219 50 19.928 50H37.5007C38.4069 50 39.1413 49.2686 39.1413 48.3662C39.1413 47.4641 38.4069 46.7323 37.5007 46.7323H30.355V43H51.5592C54.3833 43 56.7144 40.7271 56.7144 37.8662V36H0.714355V37.8662Z" fill="white"/>
7
+ </svg>
admin/icon/control-button.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="55" height="48" viewBox="0 0 55 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M42.0634 4H26.5079C25.2812 4 24.2856 3.104 24.2856 2C24.2856 0.896 25.2812 0 26.5079 0H42.0634C43.2901 0 44.2856 0.896 44.2856 2C44.2856 3.104 43.2901 4 42.0634 4Z" fill="white"/>
3
+ <path d="M51.978 15H26.5933C25.3195 15 24.2856 14.104 24.2856 13C24.2856 11.896 25.3195 11 26.5933 11H51.978C53.2518 11 54.2856 11.896 54.2856 13C54.2856 14.104 53.2518 15 51.978 15Z" fill="#FFF3F3"/>
4
+ <path d="M42.0634 26H26.5079C25.2812 26 24.2856 25.104 24.2856 24C24.2856 22.896 25.2812 22 26.5079 22H42.0634C43.2901 22 44.2856 22.896 44.2856 24C44.2856 25.104 43.2901 26 42.0634 26Z" fill="#FFF3F3"/>
5
+ <path d="M50.2472 33H28.3241C26.0972 33 24.2856 34.7008 24.2856 36.7917V42.2083C24.2856 44.2992 26.0972 46 28.3241 46H50.2472C52.4741 46 54.2856 44.2992 54.2856 42.2083V36.7917C54.2856 34.7008 52.4741 33 50.2472 33Z" fill="#00B7FF"/>
6
+ <path d="M19.7545 37.7619L11.9768 30.4489C11.4901 29.9922 10.7834 29.8752 10.1745 30.1384C9.56787 30.4084 9.17453 31.016 9.17453 31.6865V36.7493H2.50787C1.27898 36.7493 0.285645 37.7574 0.285645 38.9995C0.285645 40.2415 1.27898 41.2496 2.50787 41.2496H9.17453V46.3124C9.17453 46.9829 9.56787 47.5905 10.1745 47.8605C10.3901 47.9527 10.6145 48 10.8412 48C11.2545 48 11.6612 47.8447 11.9768 47.55L19.7545 40.237C20.0923 39.9175 20.2856 39.4675 20.2856 38.9995C20.2856 38.5314 20.0923 38.0814 19.7545 37.7619Z" fill="#FFA912"/>
7
+ </svg>
admin/icon/explainer-video.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg width="33" height="50" viewBox="0 0 33 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="16.5713" cy="25" r="3" fill="#FFA912"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0.571289 7.29163H32.5713V42.7083H0.571289V7.29163ZM29.6433 25.6268C29.7262 25.5444 29.7918 25.4462 29.8362 25.3382C29.9261 25.122 29.9264 24.8791 29.8371 24.6626C29.7927 24.5546 29.7271 24.4564 29.6442 24.374L26.9775 21.7177C26.6287 21.3822 26.0743 21.387 25.7315 21.7285C25.3886 22.07 25.3838 22.6223 25.7206 22.9697L26.87 24.1145H21.8246C21.4429 21.8899 19.6935 20.1473 17.4602 19.7671V14.7415L18.6113 15.8864C18.8345 16.1165 19.165 16.2088 19.4757 16.1278C19.7865 16.0468 20.0292 15.805 20.1106 15.4955C20.1919 15.1859 20.0993 14.8567 19.8682 14.6344L17.2015 11.9781C17.1187 11.8955 17.0202 11.8302 16.9117 11.786C16.6943 11.6965 16.4501 11.6965 16.2326 11.786C16.1241 11.8302 16.0256 11.8955 15.9428 11.9781L13.2762 14.6344C12.9393 14.9818 12.9441 15.534 13.287 15.8756C13.6299 16.2171 14.1843 16.2219 14.5331 15.8864L15.6824 14.7415V19.7671C13.4491 20.1473 11.6996 21.8899 11.318 24.1145H6.27262L7.42196 22.9679C7.75882 22.6205 7.754 22.0683 7.41113 21.7267C7.06825 21.3852 6.51385 21.3804 6.16507 21.7159L3.4984 24.3722C3.41545 24.4547 3.34987 24.5528 3.30551 24.6608C3.21563 24.8774 3.21563 25.1207 3.30551 25.3373C3.34987 25.4454 3.41545 25.5435 3.4984 25.6259L6.16507 28.2822C6.38824 28.5124 6.71874 28.6047 7.02952 28.5236C7.3403 28.4426 7.58301 28.2009 7.66435 27.8913C7.7457 27.5817 7.65303 27.2525 7.42196 27.0302L6.27262 25.8854H11.318C11.6996 28.11 13.4491 29.8526 15.6824 30.2328V35.2584L14.5313 34.1136C14.1825 33.778 13.6281 33.7828 13.2852 34.1243C12.9424 34.4659 12.9375 35.0181 13.2744 35.3655L15.9411 38.0218C16.1078 38.1883 16.3343 38.2819 16.5704 38.2819C16.8065 38.2819 17.033 38.1883 17.1997 38.0218L19.8664 35.3655C20.2033 35.0181 20.1984 34.4659 19.8556 34.1243C19.5127 33.7828 18.9583 33.778 18.6095 34.1136L17.4602 35.2584V30.2328C19.6935 29.8526 21.4429 28.11 21.8246 25.8854H26.87L25.7197 27.0311C25.3829 27.3785 25.3877 27.9308 25.7306 28.2723C26.0734 28.6138 26.6278 28.6186 26.9766 28.2831L29.6433 25.6268Z" fill="#00B7FF"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M32.5713 1.73611C32.5713 0.777283 31.7754 0 30.7935 0H2.34907C1.36723 0 0.571289 0.777283 0.571289 1.73611V5.20833H32.5713V1.73611ZM16.5713 3.47222H12.1268C11.6359 3.47222 11.238 3.08358 11.238 2.60417C11.238 2.12475 11.6359 1.73611 12.1268 1.73611H16.5713C17.0622 1.73611 17.4602 2.12475 17.4602 2.60417C17.4602 3.08358 17.0622 3.47222 16.5713 3.47222ZM20.1268 3.47222H21.0157C21.5067 3.47222 21.9046 3.08358 21.9046 2.60417C21.9046 2.12475 21.5067 1.73611 21.0157 1.73611H20.1268C19.6359 1.73611 19.238 2.12475 19.238 2.60417C19.238 3.08358 19.6359 3.47222 20.1268 3.47222Z" fill="white"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M2.34907 50C1.36723 50 0.571289 49.2227 0.571289 48.2638V44.7916H32.5713V48.2638C32.5713 49.2227 31.7754 50 30.7935 50H2.34907ZM18.3491 46.5277H14.7935C14.3026 46.5277 13.9046 46.9164 13.9046 47.3958C13.9046 47.8752 14.3026 48.2638 14.7935 48.2638H18.3491C18.84 48.2638 19.238 47.8752 19.238 47.3958C19.238 46.9164 18.84 46.5277 18.3491 46.5277Z" fill="#E8ECF2"/>
6
+ </svg>
admin/icon/feature-cta-bg.jpg ADDED
Binary file
admin/icon/feature-settings-cta-bg.jpg ADDED
Binary file
admin/icon/gyroscope.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg width="38" height="50" viewBox="0 0 38 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M1.72727 0H29.3636C34.131 0.00590378 37.9943 3.99991 38 8.92857V48.2143C38 49.2005 37.2267 50 36.2727 50H8.63636C3.869 49.9941 0.00571056 46.0001 0 41.0714V1.78571C0 0.799492 0.773326 0 1.72727 0ZM10.3636 37.5H27.6364C28.5903 37.5 29.3636 36.7005 29.3636 35.7143C29.3636 34.7281 28.5903 33.9286 27.6364 33.9286H10.3636C9.40969 33.9286 8.63636 34.7281 8.63636 35.7143C8.63636 36.7005 9.40969 37.5 10.3636 37.5ZM27.6364 26.7857H10.3636C9.40969 26.7857 8.63636 25.9862 8.63636 25C8.63636 24.0138 9.40969 23.2143 10.3636 23.2143H27.6364C28.5903 23.2143 29.3636 24.0138 29.3636 25C29.3636 25.9862 28.5903 26.7857 27.6364 26.7857ZM10.3636 16.0714H27.6364C28.5903 16.0714 29.3636 15.2719 29.3636 14.2857C29.3636 13.2995 28.5903 12.5 27.6364 12.5H10.3636C9.40969 12.5 8.63636 13.2995 8.63636 14.2857C8.63636 15.2719 9.40969 16.0714 10.3636 16.0714Z" fill="#00B7FF"/>
3
+ <rect x="8" y="12" width="22" height="5" rx="2.5" fill="#FFA912"/>
4
+ <rect x="8" y="23" width="22" height="5" rx="2.5" fill="white"/>
5
+ <rect x="8" y="34" width="22" height="5" rx="2.5" fill="#201CFE"/>
6
+ </svg>
admin/icon/hotspot.svg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <svg width="45" height="50" viewBox="0 0 45 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M33.8572 6.28571C33.8572 2.81977 31.3899 0 28.3572 0H6.35718C3.32448 0 0.857178 2.81977 0.857178 6.28571V8H33.8572V6.28571Z" fill="white"/>
3
+ <path d="M0.857178 43.7143C0.857178 47.1802 3.32448 50 6.35718 50H28.3572C31.3899 50 33.8572 47.1802 33.8572 43.7143V42H0.857178V43.7143Z" fill="#00B7FF"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.8572 22C19.8572 15.3831 25.4647 10 32.3572 10C39.2497 10 44.8572 15.3831 44.8572 22C44.8572 28.6168 39.2497 33.9999 32.3572 33.9999C30.3974 33.9999 28.4549 33.5515 26.707 32.6997L21.442 33.9634C21.3396 33.988 21.2358 34 21.1327 34C20.7985 34 20.4729 33.8737 20.2308 33.6413C19.9141 33.3371 19.7866 32.8957 19.8953 32.4784L21.2115 27.424C20.3242 25.7462 19.8572 23.8813 19.8572 22ZM39.8572 22.6C39.8572 18.4249 36.4992 15.04 32.3572 15.04C28.2152 15.04 24.8572 18.4244 24.8572 22.6C24.8572 26.7751 28.2147 30.16 32.3572 30.16C36.4997 30.16 39.8572 26.7751 39.8572 22.6Z" fill="#FFA912"/>
5
+ <circle cx="32.3572" cy="22.5" r="2.5" fill="white"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M27.5285 35.169L23.388 36.1975C23.0518 36.2811 22.7054 36.3235 22.3587 36.3237H22.3573C21.2221 36.3237 20.1548 35.8845 19.352 35.0869C18.3024 34.0438 17.8742 32.5073 18.2341 31.0768L19.2693 26.9628C18.5067 25.1304 18.1073 23.1501 18.1073 21.1715C18.1073 16.1904 20.5392 11.7635 24.2848 9H0.857178V40H33.8572V36.3147C33.6911 36.32 33.5246 36.3237 33.3572 36.3237C31.3657 36.3236 29.3726 35.9268 27.5285 35.169ZM13.3572 33.8396H6.35718C5.52878 33.8396 4.85718 33.1723 4.85718 32.3493C4.85718 31.5262 5.52878 30.8589 6.35718 30.8589H13.3572C14.1856 30.8589 14.8572 31.5262 14.8572 32.3493C14.8572 33.1723 14.1856 33.8396 13.3572 33.8396ZM6.35718 27.8781H13.3572C14.1856 27.8781 14.8572 27.2108 14.8572 26.3877C14.8572 25.5646 14.1856 24.8973 13.3572 24.8973H6.35718C5.52878 24.8973 4.85718 25.5646 4.85718 26.3877C4.85718 27.2108 5.52878 27.8781 6.35718 27.8781ZM13.3572 21.9166H6.35718C5.52878 21.9166 4.85718 21.2493 4.85718 20.4262C4.85718 19.6031 5.52878 18.9358 6.35718 18.9358H13.3572C14.1856 18.9358 14.8572 19.6031 14.8572 20.4262C14.8572 21.2493 14.1856 21.9166 13.3572 21.9166ZM6.35718 15.955H15.3572C16.1856 15.955 16.8572 15.2877 16.8572 14.4646C16.8572 13.6416 16.1856 12.9743 15.3572 12.9743H6.35718C5.52878 12.9743 4.85718 13.6416 4.85718 14.4646C4.85718 15.2877 5.52878 15.955 6.35718 15.955Z" fill="#00B7FF"/>
7
+ </svg>
admin/icon/scene-gallery.svg ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7 0H50V31H7V0Z" fill="#00B7FF"/>
3
+ <path d="M11 4H47V28H11V4Z" fill="white"/>
4
+ <circle cx="16.5" cy="9.5" r="2.5" fill="#FFA912"/>
5
+ <path d="M0 8H43V39H0V8Z" fill="#201CFE"/>
6
+ <path d="M3 12H39V36H3V12Z" fill="white"/>
7
+ <circle cx="9.5" cy="18.5" r="2.5" fill="#FFA912"/>
8
+ <path d="M39.3071 14.4945L45.4934 35.8463L10.6985 45.7523L4.51232 24.4004L39.3071 14.4945Z" fill="white"/>
9
+ <path opacity="0.2" d="M40.5959 25.2213L43.7204 36L46 35.3513L39.8109 14L5 23.906L5.55491 25.8205L29.3477 19.05C31.6653 18.3905 34.1524 18.6702 36.2618 19.8275C38.3713 20.9848 39.9303 22.9251 40.5959 25.2213Z" fill="#0088BE"/>
10
+ <path d="M31.355 30.6019L19.7598 24L10 41.7048L11.644 47L36 40.1675L31.6507 30.7727" fill="#201CFE"/>
11
+ <path opacity="0.2" d="M30.8621 30.7727L30.5807 30.6019L19.549 24L18.9902 25.0655C21.2452 27.667 22.2112 31.1965 21.6082 34.6311C21.0052 38.0656 18.9006 41.021 15.9045 42.6406L11 45.2919L11.8276 47L35 40.1675L30.8621 30.7727Z" fill="#000016"/>
12
+ <path d="M25 42L31.4036 31.2755L34.5501 26L45.2992 31.4408L47 36.4021L25 42Z" fill="#201CFE"/>
13
+ <path opacity="0.21" d="M45.2992 31.4408L34.5501 26L33.7301 27.3748C35.5989 28.5602 36.6788 30.6222 36.5655 32.789C36.4522 34.9557 35.1628 36.9006 33.1799 37.8956L25 42L47 36.4021L45.2992 31.4408Z" fill="#000016"/>
14
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0.240112 21.8221L41.6687 10.0134L49.7598 37.972L8.33115 49.7804L0.240112 21.8221ZM39.3064 14.2473L4.50632 24.1666L10.6935 45.5467L45.4936 35.6276L39.3064 14.2473Z" fill="#00B7FF"/>
15
+ <ellipse cx="29.1344" cy="22.4873" rx="2.58621" ry="2.56667" fill="#FFA912"/>
16
+ </svg>
admin/icon/smartphone.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M40.1296 20.1193L38.2812 12.5781V4.39453C38.2812 1.96279 36.3185 0 33.8867 0H16.1133C13.6815 0 11.7188 1.96279 11.7188 4.39453V12.5781L9.93633 20.1355L0 17.6758V38.1836C0 40.1348 2.23164 41.5124 7.02383 42.5181C7.44971 42.6093 7.90449 42.5004 8.24834 42.222C8.58877 41.9444 8.78906 41.5253 8.78906 41.0847V36.4843L10.0374 29.7062L11.7188 36.045V45.6055C11.7188 48.0372 13.6815 50 16.1133 50H33.8867C36.3185 50 38.2812 48.0372 38.2812 45.6055V36.045L39.9339 29.5502L41.2109 36.4843V41.0847C41.2109 41.5253 41.4112 41.9444 41.7517 42.222C42.0957 42.5005 42.5504 42.6093 42.9762 42.5181C47.7684 41.5124 50 40.1348 50 38.1836V17.6758L40.1296 20.1193Z" fill="#00B7FF"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M26.4648 8.9156H23.5352C22.7255 8.9156 22.0703 8.26358 22.0703 7.4578C22.0703 6.65203 22.7255 6 23.5352 6H26.4648C27.2745 6 27.9297 6.65203 27.9297 7.4578C27.9297 8.26358 27.2745 8.9156 26.4648 8.9156ZM0 17.7596C0 19.159 1.17197 21.0542 7.5 21.9581C8.23242 22.0746 8.78906 22.687 8.78906 23.4159V36.4777C9.72656 36.3027 10.7226 36.1569 11.7188 36.0404V12.6864C0 14.1442 0 16.7392 0 17.7596ZM38.2812 12.6864V36.0404C39.2774 36.1569 40.2734 36.3027 41.2109 36.4777V23.6492C41.2109 22.9495 41.7383 22.3663 42.412 22.2206C47.7147 21.2 50 19.8005 50 17.7596C50 16.7392 50 14.1442 38.2812 12.6864ZM27.9297 42.5422C27.9297 41.7364 27.2745 41.0844 26.4648 41.0844H23.5352C22.7255 41.0844 22.0703 41.7364 22.0703 42.5422C22.0703 43.348 22.7255 44 23.5352 44H26.4648C27.2745 44 27.9297 43.348 27.9297 42.5422ZM26.4648 23.5908H27.9297C28.7394 23.5908 29.3945 24.2428 29.3945 25.0486C29.3945 25.8544 28.7394 26.5064 27.9297 26.5064H26.4648V27.9642C26.4648 28.77 25.8097 29.422 25 29.422C24.1903 29.422 23.5352 28.77 23.5352 27.9642V26.5064H22.0703C21.2606 26.5064 20.6055 25.8544 20.6055 25.0486C20.6055 24.2428 21.2606 23.5908 22.0703 23.5908H23.5352V22.133C23.5352 21.3272 24.1903 20.6752 25 20.6752C25.8097 20.6752 26.4648 21.3272 26.4648 22.133V23.5908Z" fill="#E8EBEF"/>
4
+ </svg>
admin/icon/street-view.svg ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <svg width="50" height="52" viewBox="0 0 50 52" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <circle cx="25" cy="7.5" r="7" fill="#DC75F1"/>
3
+ <path d="M35.1333 37.5C34.3594 39.2841 33.35 40.9522 32.1333 42.4582C37.5833 42.9081 40.1417 43.7911 40.75 44.2835C39.8167 45.0731 34.5667 46.406 25 46.406C15.4333 46.406 10.1833 45.0731 9.25 44.2835C9.85833 43.7911 12.425 42.9081 17.8667 42.4582C16.65 40.9522 15.6406 39.2841 14.8667 37.5C5.00833 38.4084 0 40.6837 0 44.2835C0 50.252 13.5917 51.5 25 51.5C36.4083 51.5 50 50.252 50 44.2835C50 40.6837 44.9917 38.4084 35.1333 37.5V37.5Z" fill="#DC75F1"/>
4
+ <path d="M15 27.5246C15 34.2059 19.5093 44.5 25.5 44.5C31.4907 44.5 36 34.2059 36 27.5246C36 20.9306 31.7806 16.5 25.5 16.5C19.2194 16.5 15 20.9306 15 27.5246Z" fill="#DC75F1"/>
5
+ </svg>
admin/icon/vr-hero-video-shape.svg ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <svg width="831" height="694" viewBox="0 0 831 694" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M829.085 425.268C825.137 386.167 810.946 348.477 784.818 318.493C741.492 268.678 679.65 256.553 629.463 220.46C578.711 184.085 540.742 129.006 497.133 82.292C390.179 -32.378 242.624 40.4656 147.701 128.536C52.8707 216.512 -42.0532 362.106 20.2583 513.996C75.8968 649.533 223.922 619.831 325.706 642.859C446.946 670.305 562.922 725.102 683.128 668.895C724.763 649.439 764.048 620.395 792.243 578.381C820.72 535.521 834.63 479.031 829.085 425.268Z" fill="#F2F4F7"/>
3
+ <path d="M654.151 52.2192C672.963 36.6997 696.186 28.9399 709.419 44.4595C722.652 59.979 718.112 85.0393 699.3 100.686C680.488 116.333 633.652 115.442 620.419 99.9228C607.186 84.276 635.339 67.7388 654.151 52.2192Z" fill="#F2F4F7"/>
4
+ <path d="M554.769 54.2867C547.774 30.714 549.523 6.36409 568.51 0.406138C587.498 -5.68133 608.485 8.56594 615.48 32.1387C622.476 55.7115 604.112 98.3238 585.125 104.282C566.137 110.24 561.64 77.8595 554.769 54.2867Z" fill="#F2F4F7"/>
5
+ </svg>
admin/icon/vr-video-poster.png ADDED
Binary file
admin/icon/woocommerce.svg ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <svg width="64" height="39" viewBox="0 0 64 39" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M57.5504 0.5H6.3068C3.06016 0.5 0.428589 3.17898 0.428589 6.48363V26.1242C0.428589 29.4291 3.06057 32.1078 6.3068 32.1078H30.694L41.5023 38.5L39.3438 32.1078H57.5504C60.797 32.1078 63.4286 29.4289 63.4286 26.1242V6.48363C63.4288 3.17877 60.7968 0.5 57.5504 0.5Z" fill="#00B7FF"/>
3
+ <path d="M10.8121 29.9C10.8032 29.9 10.7948 29.9 10.7861 29.8998C10.0802 29.8915 9.42307 29.5458 9.02603 28.9738C8.39896 28.0703 7.47967 25.9872 5.92488 17.8311C5.09146 13.4596 4.46501 9.34271 4.45884 9.30175C4.28338 8.14561 5.09785 7.06938 6.27785 6.89747C7.45702 6.72536 8.55629 7.52336 8.73175 8.67969C8.73772 8.71985 9.35016 12.7425 10.165 17.0218C10.6358 19.4937 11.0384 21.3377 11.3728 22.7097C13.4095 19.0323 15.8956 14.0869 16.9899 11.8535C17.3906 11.036 18.2782 10.5594 19.1979 10.6689C20.1172 10.7785 20.8625 11.4498 21.0515 12.3378C21.4092 14.0141 22.3359 17.5047 23.6524 20.6729C24.138 16.1684 25.0777 10.4518 26.8691 6.85368C27.392 5.80327 28.6852 5.36705 29.7573 5.87954C30.8294 6.39204 31.2747 7.65894 30.7516 8.70935C27.9031 14.4307 27.4766 27.4638 27.4725 27.5949C27.447 28.4391 26.9115 29.1875 26.1105 29.4988C25.3092 29.8104 24.3959 29.6255 23.7863 29.0283C21.8511 27.1323 20.0871 23.8648 18.5428 19.3168C18.4761 19.12 18.4112 18.9253 18.348 18.733C16.4547 22.425 13.9657 27.1028 12.5685 29.016C12.1624 29.5709 11.5081 29.9 10.8121 29.9Z" fill="white"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M39.8797 8.46341C41.898 9.01364 43.4429 10.2513 44.3425 12.0412C45.2183 13.7827 45.4312 15.9331 44.9751 18.4314C44.3404 21.9184 41.0459 27.0036 37.1233 27.3684C36.9855 27.3809 36.837 27.3894 36.6778 27.3894C35.204 27.3894 32.923 26.7084 31.4727 22.9978C29.3552 17.5838 30.9799 13.091 33.207 10.694C35.0833 8.67002 37.5773 7.83732 39.8797 8.46341ZM38.948 21.3597C39.828 20.2191 40.523 18.777 40.7232 17.6871C41.0867 15.6863 41.0352 13.1711 38.7221 12.5406C38.608 12.5089 38.4876 12.4942 38.3628 12.4942C37.7431 12.4942 37.0221 12.8717 36.4025 13.5399C34.3238 15.779 34.6208 19.2197 35.5073 21.484C35.9484 22.6141 36.4476 23.179 36.7165 23.1538C37.1576 23.1139 38.0442 22.534 38.948 21.3597Z" fill="white"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M58.5766 9.78742C59.3254 10.3883 59.9366 11.1473 60.3884 12.0412C61.262 13.7827 61.4751 15.9331 61.0188 18.4314C60.3839 21.9184 57.0895 27.0036 53.169 27.3684C53.0314 27.3809 52.8807 27.3894 52.7215 27.3894C51.2476 27.3894 48.9667 26.7084 47.5163 22.9978C45.4012 17.5838 47.0258 13.091 49.2507 10.694C51.1292 8.67002 53.6231 7.83732 55.9233 8.46341C56.9326 8.73963 57.8235 9.18655 58.5766 9.78742ZM54.9938 21.3597C55.8717 20.2191 56.5689 18.777 56.7668 17.6871C57.1305 15.6863 57.0811 13.1711 54.7679 12.5406C54.6517 12.5089 54.5312 12.4942 54.4064 12.4942C53.7888 12.4942 53.0681 12.8717 52.4462 13.5399C50.3697 15.779 50.6665 19.2197 51.551 21.484C51.9921 22.6141 52.4933 23.179 52.7602 23.1538C53.2013 23.1139 54.0879 22.534 54.9938 21.3597Z" fill="white"/>
6
+ </svg>
admin/icon/youtube-play-icon.svg ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <svg width="85" height="61" viewBox="0 0 85 61" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M83.2487 9.86735C82.2688 6.19253 79.3979 3.29587 75.7573 2.30632C69.1057 0.469238 42.4992 0.469238 42.4992 0.469238C42.4992 0.469238 15.8933 0.469238 9.24171 2.23629C5.6711 3.22519 2.73017 6.19319 1.75029 9.86735C0 16.5795 0 30.5 0 30.5C0 30.5 0 44.4905 1.75029 51.1327C2.73082 54.8068 5.60106 57.7041 9.24236 58.6937C15.9634 60.5308 42.4998 60.5308 42.4998 60.5308C42.4998 60.5308 69.1057 60.5308 75.7573 58.7637C79.3986 57.7748 82.2688 54.8775 83.2494 51.2033C84.9996 44.4905 84.9996 30.5707 84.9996 30.5707C84.9996 30.5707 85.0697 16.5795 83.2487 9.86735Z" fill="white"/>
3
+ <path d="M33.6265 43.6384L56.044 30.9692L33.6265 18.3L33.6265 43.6384Z" fill="#C1C1D6"/>
4
+ </svg>
admin/js/wpvr-admin.js CHANGED
@@ -75,11 +75,17 @@
75
  $('.panolenspreview').on('click', function (e) {
76
  e.preventDefault();
77
  $('.wpvr-loading').show();
 
 
 
 
 
 
78
  var postid = $("#post_ID").val();
79
- var autoload = $("input[name='autoload']").val();
80
  var compass = $("input[name='compass']:checked").val();
81
- var control = $("input[name='controls']").val();
82
- var rotation = $("input[name='autorotation']").val();
83
  var defaultscene = $("input[name='default-scene-id']").val();
84
  var preview = $("input[name='preview-attachment-url']").val();
85
  var scenefadeduration = $("input[name='scene-fade-duration']").val();
@@ -92,7 +98,6 @@
92
  var panolist = JSON.stringify(panodata);
93
  var previewtext = $('.previewtext').val();
94
 
95
-
96
  jQuery.ajax({
97
  type: "POST",
98
  url: ajaxurl,
@@ -110,83 +115,99 @@
110
  autorotationstopdelay: autorotationstopdelay,
111
  preview: preview,
112
  scenefadeduration: scenefadeduration,
 
 
 
 
113
  },
114
 
115
  success: function (response) {
116
  $('.wpvr-loading').hide();
117
-
118
  if (response.success == true) {
119
- $('#error_occured').hide();
120
- $('#error_occuredpub').hide();
121
- $('#' + response.data[0]["panoid"]).empty();
122
- var scenes = response.data[1];
123
-
124
- if (scenes) {
125
- $.each(scenes.scenes, function (i) {
126
- $.each(scenes.scenes[i]['hotSpots'], function (key, val) {
127
- if (val["clickHandlerArgs"] != "") {
128
- val["clickHandlerFunc"] = wpvrhotspot;
129
- }
130
- if (val["createTooltipArgs"] != "") {
131
- val["createTooltipFunc"] = wpvrtooltip;
132
- }
 
 
133
  });
134
- });
135
- }
136
- if (scenes) {
137
- $('.scene-gallery').trigger('destroy.owl.carousel');
138
- $('.scene-gallery').empty();
139
- $.each(scenes.scenes, function (key, val) {
140
- $('.scene-gallery').append('<ul style="width:150px;"><li class="owlscene owl' + key + '">' + key + '</li><li title="Double click to view scene"><img class="scctrl" id="' + key + '_gallery" src="' + val.panorama + '"></li></ul>');
141
- });
142
- $(".vrowl-carousel").owlCarousel({
143
- margin: 10,
144
- autoWidth: true,
145
- });
146
- var active_owl_target = $('#wpvr_active_scenes').val();
147
- var get_owl_target = $('#scene-' + active_owl_target).find('input.sceneid').val();
148
- $('.owl' + get_owl_target).parents('.owl-item').addClass('marked');
149
- }
150
- var panoshow = pannellum.viewer(response.data[0]["panoid"], scenes);
151
- if (scenes.autoRotate) {
152
- panoshow.on('load', function () {
153
- setTimeout(function () {
154
- panoshow.startAutoRotate(scenes.autoRotate, 0);
155
- }, 3000);
156
- });
157
- panoshow.on('scenechange', function () {
158
- setTimeout(function () {
159
- panoshow.startAutoRotate(scenes.autoRotate, 0);
160
- }, 3000);
161
- });
162
- }
163
- var touchtime = 0;
164
- if (scenes) {
165
- $.each(scenes.scenes, function (key, val) {
166
- // document.getElementById('' + key + '_gallery').addEventListener('click', function (e) {
167
- // if (touchtime == 0) {
168
- // touchtime = new Date().getTime();
169
- // } else {
170
- // if (((new Date().getTime()) - touchtime) < 800) {
171
- // panoshow.loadScene(key);
172
- // touchtime = 0;
173
- // } else {
174
- // touchtime = new Date().getTime();
175
- // }
176
- // }
177
- // });
178
- jQuery(document).on("click",'#' + key + '_gallery',function() {
179
- panoshow.loadScene(key);
180
  });
181
- });
182
- }
183
- $('html, body').animate({
184
- scrollTop: $("#wpvr_item_builder__box").offset().top
185
- }, 500);
186
- //set preview text
187
- if ("" != previewtext) {
188
- $('.pnlm-load-button p').text(previewtext);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  }
 
190
  } else {
191
  $('#error_occured').show();
192
  $('#error_occured .pano-error-message').html(response.data);
@@ -203,68 +224,6 @@
203
  });
204
  });
205
 
206
- jQuery(document).ready(function ($) {
207
-
208
- var ajaxurl = wpvr_obj.ajaxurl;
209
- $('#videopreview').on('click', function (e) {
210
- e.preventDefault();
211
- var postid = $("#post_ID").val();
212
- var videourl = $("input[name='video-attachment-url']").val();
213
- if('' == videourl){
214
- $('#confirm_text').html("No Video Found!"+"<br>"+"<span class='wpvr-video-alert-text'>"+"You haven't uploaded or set the link to a 360 degree video. Please Upload or Set a video to see the Preview."+"</span>");
215
- $('.wpvr-delete-alert-wrapper .wpvr-delete-confirm-btn').css('display', 'none');
216
- $('.wpvr-delete-alert-wrapper').css('display', 'flex');
217
- $('.wpvr-video-alert-text').css('font-weight', '400');
218
-
219
- $(document).on("click", ".wpvr-delete-alert-wrapper .cross", function (e) {
220
- e.preventDefault();
221
- $('.wpvr-delete-alert-wrapper').css('display', 'none');
222
- $('.wpvr-delete-alert-wrapper .wpvr-delete-confirm-btn').css('display', 'flex');
223
- $(".video-setting").show();
224
- $(".video_off").prop('checked', false);
225
- $(".video_on").prop('checked', true);
226
- $("li.general").hide();
227
- $("li.scene").hide();
228
- $("li.hotspot").hide();
229
- $("li.streetview").hide();
230
- });
231
- return false;
232
- }
233
- var vidautoplay = $("input[name='playvideo']:checked").val();
234
- var vidcontrol = $("input[name='playcontrol']:checked").val();
235
- $('.wpvr-loading').show();
236
- jQuery.ajax({
237
- type: "POST",
238
- url: ajaxurl,
239
- data: {
240
- action: "wpvrvideo_preview",
241
- postid: postid,
242
- videourl: videourl,
243
- vidautoplay: vidautoplay,
244
- vidcontrol: vidcontrol,
245
- },
246
-
247
- success: function (response) {
248
- $('.wpvr-loading').hide();
249
- if (response.success == true) {
250
- $('#' + response.data["panoid"]).empty();
251
- $('#' + response.data["panoid"]).html(response.data["panodata"]);
252
- if (response.data['vidtype'] == 'selfhost') {
253
- videojs(response.data["vidid"], {
254
- plugins: {
255
- pannellum: {}
256
- }
257
- });
258
- }
259
- $('html, body').animate({
260
- scrollTop: $("#wpvr_item_builder__box").offset().top
261
- }, 500);
262
- } else { }
263
- }
264
- });
265
- });
266
- });
267
-
268
  //-- Set Cookie--//
269
 
270
  function setCookie(cName, cValue, expDays) {
@@ -294,6 +253,7 @@
294
  if (!results[2]) return '';
295
  return decodeURIComponent(results[2].replace(/\+/g, ' '));
296
  }
 
297
  jQuery(document).ready(function ($) {
298
  var getRedirectUrl = getCookie("redirectUrl");
299
  var getCookiePostID = getCookie("postID");
@@ -311,7 +271,6 @@
311
  }
312
  }
313
  }
314
-
315
  var flag_ok = false;
316
  $('#publish').on('click', function (e) {
317
  var x = $(this).val();
@@ -321,12 +280,12 @@
321
  var postid = $("#post_ID").val();
322
  var panovideo = $("input[name='panovideo']:checked").val();
323
  var videourl = $("input[name='video-attachment-url']").val();
324
- var autoload = $("input[name='autoload']").val();
325
- var control = $("input[name='controls']").val();
326
  var compass = $("input[name='compass']:checked").val();
327
  var defaultscene = $("input[name='default-scene-id']").val();
328
  var preview = $("input[name='preview-attachment-url']").val();
329
- var rotation = $("input[name='autorotation']").val();
330
  var autorotation = $("input[name='auto-rotation']").val();
331
  var autorotationinactivedelay = $("input[name='auto-rotation-inactive-delay']").val();
332
  var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
@@ -357,8 +316,8 @@
357
  panodata: panolist,
358
  defaultscene: defaultscene,
359
  preview: preview,
360
- rotation: rotation,
361
- autorotation: autorotation,
362
  autorotationinactivedelay: autorotationinactivedelay,
363
  autorotationstopdelay: autorotationstopdelay,
364
  scenefadeduration: scenefadeduration,
@@ -379,7 +338,6 @@
379
  }, 500);
380
  } else {
381
  flag_ok = true;
382
-
383
  var url_info = wpvr_global_obj.url_info
384
  var oldUrl = '';
385
  let params = (new URL(document.location)).searchParams;
@@ -577,7 +535,6 @@
577
  }
578
  }
579
  });
580
-
581
  $('textarea[name*=hotspot-hover]').summernote({
582
  toolbar: [
583
  ['style', ['style']],
@@ -715,6 +672,45 @@
715
  'hotspot-customclass-pro': 'none',
716
  },
717
  show: function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
718
  if ($(this).parents(".hotspot-setup").attr("data-limit").length > 0) {
719
 
720
  if ($(this).parents(".hotspot-setup").find("div[data-repeater-item]").length <= $(this).parents(".hotspot-setup").attr("data-limit")) {
@@ -763,46 +759,6 @@
763
  $(this).attr('id', hotspot);
764
  }
765
  $('#wpvr_active_hotspot').val(j);
766
- $('textarea[name*=hotspot-content]').summernote({
767
- toolbar: [
768
- ['style', ['style']],
769
- ['font', ['bold', 'underline', 'clear']],
770
- ['fontname', ['fontname']],
771
- ['color', ['color']],
772
- ['para', ['ul', 'ol', 'paragraph']],
773
- ['table', ['table']],
774
- ['insert', ['link', 'picture', 'video']],
775
- ['view', ['codeview', 'help']],
776
- ],
777
- callbacks: {
778
- onKeyup: function(e) {
779
- var getHotspotContent = $(this).val();
780
- var getParent = $(this).parent();
781
- var getMainParent = getParent.parent()
782
- var getClickContent = getMainParent.find('.hotspot-url')
783
- if(getHotspotContent.length > 0){
784
- getClickContent.find('input[name*=hotspot-url').val('')
785
- getClickContent.find('input[name*=hotspot-url').attr('placeholder','You can set either a URL or an On-click content')
786
- getClickContent.find('input[name*=hotspot-url]').attr("disabled",true)
787
- }else{
788
- getClickContent.find('input[name*=hotspot-url]').attr("disabled",false)
789
- }
790
- }
791
- }
792
- });
793
-
794
- $('textarea[name*=hotspot-hover]').summernote({
795
- toolbar: [
796
- ['style', ['style']],
797
- ['font', ['bold', 'underline', 'clear']],
798
- ['fontname', ['fontname']],
799
- ['color', ['color']],
800
- ['para', ['ul', 'ol', 'paragraph']],
801
- ['table', ['table']],
802
- ['insert', ['link', 'picture', 'video']],
803
- ['view', ['codeview', 'help']],
804
- ],
805
- });
806
  },
807
  hide: function (deleteElement) {
808
  var hotspot_hide_id = $(this).attr("id");
@@ -989,7 +945,6 @@
989
  $(document).on("change", "select[name*=hotspot-type]", function (event) {
990
 
991
  var getparent = $(this).parent();
992
-
993
  var getvalue = $(this).val();
994
  if (getvalue == 'info') {
995
  getparent.find('.hotspot-scene').hide();
@@ -998,6 +953,8 @@
998
  getparent.find('.hotspot-url').show();
999
  getparent.find('.s_tab').show();
1000
  getparent.find('.hotspot-content').show();
 
 
1001
  } else {
1002
  getparent.find('.hotspot-scene').show();
1003
  getparent.find('.hotspot-url').hide();
@@ -1007,13 +964,13 @@
1007
  getparent.find('.s_tab input').removeAttr('checked');
1008
  getparent.find('.hotspot-content').hide();
1009
  getparent.find('.hotspot-content textarea').val('');
 
1010
  }
1011
  });
1012
-
1013
  $(document).ready(function ($){
1014
  $(document).on("keyup","input[name*=hotspot-url]",function (){
 
1015
  var getHotspotUrl = $(this).val();
1016
- console.log(getHotspotUrl)
1017
  var getParent = $(this).parent();
1018
  var getMainParent = getParent.parent()
1019
  var getClickContent = getMainParent.find('.hotspot-content')
@@ -1021,11 +978,15 @@
1021
  getClickContent.find('textarea').val('')
1022
  getClickContent.find('textarea').attr('placeholder','You can set either a URL or an On-click content')
1023
  getClickContent.find('textarea').attr("disabled",true)
 
 
 
1024
  }else{
1025
  getClickContent.find('textarea').attr("disabled",false)
1026
- getparent.find('textarea[name*=hotspot-content]').next().find(".note-editable").html('');
1027
  }
1028
  })
 
1029
  $(document).on("keyup","textarea[name*=hotspot-content]",function (){
1030
  var getHotspotContent = $(this).val();
1031
  var getParent = $(this).parent();
@@ -1035,16 +996,13 @@
1035
  getClickContent.find('input[name*=hotspot-url').val('')
1036
  getClickContent.find('input[name*=hotspot-url').attr('placeholder','You can set either a URL or an On-click content')
1037
  getClickContent.find('input[name*=hotspot-url]').attr("disabled",true)
1038
- getClickContent.find('textarea[name*=hotspot-content]').next().find(".note-editable").attr("contenteditable", false);
1039
- getClickContent.find('textarea[name*=hotspot-content]').next().find(".note-editable").html('');
1040
-
1041
  }else{
1042
  getClickContent.find('input[name*=hotspot-url]').attr("disabled",false)
1043
- getClickContent.find('textarea[name*=hotspot-content]').next().find(".note-editable").attr("contenteditable", true);
1044
  }
1045
  })
1046
  })
1047
 
 
1048
  $(document).on("click", ".pano-error-close-btn", function (e) {
1049
  e.preventDefault();
1050
  $('.wpvr-delete-alert-wrapper').css('display', 'none');
@@ -1053,6 +1011,7 @@
1053
 
1054
  $(document).on("change", "input[type=radio][name=panovideo]", function (event) {
1055
  var getvalue = $(this).val();
 
1056
  if (getvalue == 'on') {
1057
  $('#confirm_text').html('Turning On The Video Option Will Erase Your Virtual Tour Data. Are You Sure?');
1058
  $('.wpvr-delete-alert-wrapper').css('display', 'flex');
@@ -1121,11 +1080,12 @@
1121
 
1122
  jQuery(document).ready(function ($) {
1123
  var viddata = $("input[name='panovideo']:checked").val();
 
1124
  if (viddata == 'on') {
1125
 
1126
- $("li.general").removeClass('active');
1127
- $(".rex-pano-tab.general").removeClass('active');
1128
- $("li.video").addClass('active');
1129
  $(".rex-pano-tab.video").addClass('active');
1130
  $(".video-setting").show();
1131
  $("li.general").hide();
@@ -1236,6 +1196,7 @@
1236
 
1237
  $(document).on("click", ".rex-pano-nav-menu.main-nav ul li span", function () {
1238
  var screen = $(this).parent().attr('data-screen');
 
1239
  var url_info = wpvr_global_obj.url_info
1240
  if ( 'add' == url_info.screen ){
1241
  var newUrl = url_info.admin_url+"post-new.php?"+"post_type="+url_info.param.post_type+"&active_tab="+screen;
@@ -1266,7 +1227,6 @@
1266
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
1267
  });
1268
 
1269
-
1270
  //-Get Started reloaded -//
1271
  $(document).on("click",".tabs.rex-tabs li a",function(){
1272
  var tab = $(this).attr('href');
@@ -1281,8 +1241,6 @@
1281
  window.history.pushState({ path: newUrl }, '', newUrl);
1282
  }
1283
  })
1284
-
1285
-
1286
  //----------alert dismiss--------//
1287
  $(document).on("click", "body", function () {
1288
  $('body').removeClass('error-overlay2');
@@ -1414,7 +1372,7 @@
1414
  });
1415
 
1416
  jQuery(document).ready(function ($) {
1417
- var autrotateset = $("input[name='autorotation']").val();
1418
  if (autrotateset == 'off') {
1419
  $('.autorotationdata-wrapper').hide();
1420
  } else {
@@ -1423,7 +1381,7 @@
1423
  });
1424
 
1425
  $(document).on("change", "input[name='autorotation']", function (event) {
1426
- var autrotateset = $(this).val();
1427
 
1428
  if (autrotateset == 'on') {
1429
  $('.autorotationdata-wrapper').show();
@@ -1738,6 +1696,10 @@
1738
 
1739
  $('.general-inner-tab .inner-nav li span').on('click', function () {
1740
  var this_id = $(this).attr('data-href');
 
 
 
 
1741
  $(this_id).show();
1742
  $(this_id).siblings().hide();
1743
  });
@@ -1831,6 +1793,10 @@
1831
 
1832
  });
1833
 
 
 
 
 
1834
  //------active tab scripts-------
1835
  jQuery(document).ready(function ($) {
1836
 
@@ -1881,6 +1847,7 @@
1881
  if(activeTab === 'hotspot'){
1882
  $(".rex-pano-nav-menu.main-nav ul li.hotspot span").trigger('click')
1883
  }
 
1884
  // scene contents
1885
  if (_sceneID) {
1886
  var scenesIds = [];
@@ -1960,6 +1927,7 @@
1960
  $(this).val('off');
1961
  }
1962
  });
 
1963
  $(document).ready(function() {
1964
  $('textarea[name*=hotspot-content]').summernote({
1965
  toolbar: [
@@ -1988,7 +1956,6 @@
1988
  }
1989
  }
1990
  });
1991
-
1992
  $('textarea[name*=hotspot-hover]').summernote({
1993
  toolbar: [
1994
  ['style', ['style']],
@@ -2001,6 +1968,7 @@
2001
  ['view', ['codeview', 'help']],
2002
  ],
2003
  });
 
2004
  });
2005
 
2006
 
75
  $('.panolenspreview').on('click', function (e) {
76
  e.preventDefault();
77
  $('.wpvr-loading').show();
78
+ var videourl = $("input[name='video-attachment-url']").val();
79
+ var vidautoplay = $("input[name='playvideo']:checked").val();
80
+ var vidcontrol = $("input[name='playcontrol']:checked").val();
81
+
82
+ var panovideo = $("input[name='panovideo']:checked").val();
83
+
84
  var postid = $("#post_ID").val();
85
+ var autoload = $("input[name='autoload']").is(':checked') ? 'on' : 'off';
86
  var compass = $("input[name='compass']:checked").val();
87
+ var control = $("input[name='controls']").is(':checked') ? 'on' : 'off';
88
+ var rotation = $("input[name='autorotation']").is(':checked') ? 'on' : 'off';
89
  var defaultscene = $("input[name='default-scene-id']").val();
90
  var preview = $("input[name='preview-attachment-url']").val();
91
  var scenefadeduration = $("input[name='scene-fade-duration']").val();
98
  var panolist = JSON.stringify(panodata);
99
  var previewtext = $('.previewtext').val();
100
 
 
101
  jQuery.ajax({
102
  type: "POST",
103
  url: ajaxurl,
115
  autorotationstopdelay: autorotationstopdelay,
116
  preview: preview,
117
  scenefadeduration: scenefadeduration,
118
+ panovideo: panovideo,
119
+ videourl: videourl,
120
+ vidautoplay: vidautoplay,
121
+ vidcontrol: vidcontrol,
122
  },
123
 
124
  success: function (response) {
125
  $('.wpvr-loading').hide();
 
126
  if (response.success == true) {
127
+ if(response.data[2] == 'off'){
128
+ $('#error_occured').hide();
129
+ $('#error_occuredpub').hide();
130
+ $('#' + response.data[0]["panoid"]).empty();
131
+ var scenes = response.data[1];
132
+
133
+ if (scenes) {
134
+ $.each(scenes.scenes, function (i) {
135
+ $.each(scenes.scenes[i]['hotSpots'], function (key, val) {
136
+ if (val["clickHandlerArgs"] != "") {
137
+ val["clickHandlerFunc"] = wpvrhotspot;
138
+ }
139
+ if (val["createTooltipArgs"] != "") {
140
+ val["createTooltipFunc"] = wpvrtooltip;
141
+ }
142
+ });
143
  });
144
+ }
145
+ if (scenes) {
146
+ $('.scene-gallery').trigger('destroy.owl.carousel');
147
+ $('.scene-gallery').empty();
148
+ $.each(scenes.scenes, function (key, val) {
149
+ $('.scene-gallery').append('<ul style="width:150px;"><li class="owlscene owl' + key + '">' + key + '</li><li title="Double click to view scene"><img class="scctrl" id="' + key + '_gallery" src="' + val.panorama + '"></li></ul>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  });
151
+ $(".vrowl-carousel").owlCarousel({
152
+ margin: 10,
153
+ autoWidth: true,
154
+ });
155
+ var active_owl_target = $('#wpvr_active_scenes').val();
156
+ var get_owl_target = $('#scene-' + active_owl_target).find('input.sceneid').val();
157
+ $('.owl' + get_owl_target).parents('.owl-item').addClass('marked');
158
+ }
159
+ var panoshow = pannellum.viewer(response.data[0]["panoid"], scenes);
160
+ if (scenes.autoRotate) {
161
+ panoshow.on('load', function () {
162
+ setTimeout(function () {
163
+ panoshow.startAutoRotate(scenes.autoRotate, 0);
164
+ }, 3000);
165
+ });
166
+ panoshow.on('scenechange', function () {
167
+ setTimeout(function () {
168
+ panoshow.startAutoRotate(scenes.autoRotate, 0);
169
+ }, 3000);
170
+ });
171
+ }
172
+ var touchtime = 0;
173
+ if (scenes) {
174
+ $.each(scenes.scenes, function (key, val) {
175
+ document.getElementById('' + key + '_gallery').addEventListener('click', function (e) {
176
+ if (touchtime == 0) {
177
+ touchtime = new Date().getTime();
178
+ } else {
179
+ if (((new Date().getTime()) - touchtime) < 800) {
180
+ panoshow.loadScene(key);
181
+ touchtime = 0;
182
+ } else {
183
+ touchtime = new Date().getTime();
184
+ }
185
+ }
186
+ });
187
+ });
188
+ }
189
+ $('html, body').animate({
190
+ scrollTop: $("#wpvr_item_builder__box").offset().top
191
+ }, 500);
192
+ //set preview text
193
+ if ("" != previewtext) {
194
+ $('.pnlm-load-button p').text(previewtext);
195
+ }
196
+ }else{
197
+ $('#' + response.data["panoid"]).empty();
198
+ $('#' + response.data["panoid"]).html(response.data["panodata"]);
199
+ if (response.data['vidtype'] == 'selfhost') {
200
+ videojs(response.data["vidid"], {
201
+ plugins: {
202
+ pannellum: {}
203
+ }
204
+ });
205
+ }
206
+ $('html, body').animate({
207
+ scrollTop: $("#wpvr_item_builder__box").offset().top
208
+ }, 500);
209
  }
210
+
211
  } else {
212
  $('#error_occured').show();
213
  $('#error_occured .pano-error-message').html(response.data);
224
  });
225
  });
226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  //-- Set Cookie--//
228
 
229
  function setCookie(cName, cValue, expDays) {
253
  if (!results[2]) return '';
254
  return decodeURIComponent(results[2].replace(/\+/g, ' '));
255
  }
256
+
257
  jQuery(document).ready(function ($) {
258
  var getRedirectUrl = getCookie("redirectUrl");
259
  var getCookiePostID = getCookie("postID");
271
  }
272
  }
273
  }
 
274
  var flag_ok = false;
275
  $('#publish').on('click', function (e) {
276
  var x = $(this).val();
280
  var postid = $("#post_ID").val();
281
  var panovideo = $("input[name='panovideo']:checked").val();
282
  var videourl = $("input[name='video-attachment-url']").val();
283
+ var autoload = $("input[name='autoload']").is(':checked') ? 'on' : 'off';
284
+ var control = $("input[name='controls']").is(':checked') ? 'on' : 'off';
285
  var compass = $("input[name='compass']:checked").val();
286
  var defaultscene = $("input[name='default-scene-id']").val();
287
  var preview = $("input[name='preview-attachment-url']").val();
288
+ var rotation = $("input[name='autorotation']").is(':checked') ? 'on' : 'off'; // Auto Rotation checkbox value
289
  var autorotation = $("input[name='auto-rotation']").val();
290
  var autorotationinactivedelay = $("input[name='auto-rotation-inactive-delay']").val();
291
  var autorotationstopdelay = $("input[name='auto-rotation-stop-delay']").val();
316
  panodata: panolist,
317
  defaultscene: defaultscene,
318
  preview: preview,
319
+ rotation: rotation, // Auto Rotation checkbox value
320
+ autorotation: autorotation, // Rotatin speed
321
  autorotationinactivedelay: autorotationinactivedelay,
322
  autorotationstopdelay: autorotationstopdelay,
323
  scenefadeduration: scenefadeduration,
338
  }, 500);
339
  } else {
340
  flag_ok = true;
 
341
  var url_info = wpvr_global_obj.url_info
342
  var oldUrl = '';
343
  let params = (new URL(document.location)).searchParams;
535
  }
536
  }
537
  });
 
538
  $('textarea[name*=hotspot-hover]').summernote({
539
  toolbar: [
540
  ['style', ['style']],
672
  'hotspot-customclass-pro': 'none',
673
  },
674
  show: function () {
675
+ $('textarea[name*=hotspot-content]').summernote({
676
+ toolbar: [
677
+ ['style', ['style']],
678
+ ['font', ['bold', 'underline', 'clear']],
679
+ ['fontname', ['fontname']],
680
+ ['color', ['color']],
681
+ ['para', ['ul', 'ol', 'paragraph']],
682
+ ['table', ['table']],
683
+ ['insert', ['link', 'picture', 'video']],
684
+ ['view', ['codeview', 'help']],
685
+ ],
686
+ callbacks: {
687
+ onKeyup: function(e) {
688
+ var getHotspotContent = $(this).val();
689
+ var getParent = $(this).parent();
690
+ var getMainParent = getParent.parent()
691
+ var getClickContent = getMainParent.find('.hotspot-url')
692
+ if(getHotspotContent.length > 0){
693
+ getClickContent.find('input[name*=hotspot-url').val('')
694
+ getClickContent.find('input[name*=hotspot-url').attr('placeholder','You can set either a URL or an On-click content')
695
+ getClickContent.find('input[name*=hotspot-url]').attr("disabled",true)
696
+ }else{
697
+ getClickContent.find('input[name*=hotspot-url]').attr("disabled",false)
698
+ }
699
+ }
700
+ }
701
+ });
702
+ $('textarea[name*=hotspot-hover]').summernote({
703
+ toolbar: [
704
+ ['style', ['style']],
705
+ ['font', ['bold', 'underline', 'clear']],
706
+ ['fontname', ['fontname']],
707
+ ['color', ['color']],
708
+ ['para', ['ul', 'ol', 'paragraph']],
709
+ ['table', ['table']],
710
+ ['insert', ['link', 'picture', 'video']],
711
+ ['view', ['codeview', 'help']],
712
+ ],
713
+ });
714
  if ($(this).parents(".hotspot-setup").attr("data-limit").length > 0) {
715
 
716
  if ($(this).parents(".hotspot-setup").find("div[data-repeater-item]").length <= $(this).parents(".hotspot-setup").attr("data-limit")) {
759
  $(this).attr('id', hotspot);
760
  }
761
  $('#wpvr_active_hotspot').val(j);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
762
  },
763
  hide: function (deleteElement) {
764
  var hotspot_hide_id = $(this).attr("id");
945
  $(document).on("change", "select[name*=hotspot-type]", function (event) {
946
 
947
  var getparent = $(this).parent();
 
948
  var getvalue = $(this).val();
949
  if (getvalue == 'info') {
950
  getparent.find('.hotspot-scene').hide();
953
  getparent.find('.hotspot-url').show();
954
  getparent.find('.s_tab').show();
955
  getparent.find('.hotspot-content').show();
956
+ getparent.find('input[name*=hotspot-url]').attr("disabled",false)
957
+ getparent.find('textarea[name*=hotspot-content]').next().find(".note-editable").attr("contenteditable", true);
958
  } else {
959
  getparent.find('.hotspot-scene').show();
960
  getparent.find('.hotspot-url').hide();
964
  getparent.find('.s_tab input').removeAttr('checked');
965
  getparent.find('.hotspot-content').hide();
966
  getparent.find('.hotspot-content textarea').val('');
967
+ getparent.find('textarea[name*=hotspot-content]').next().find(".note-editable").html('');
968
  }
969
  });
 
970
  $(document).ready(function ($){
971
  $(document).on("keyup","input[name*=hotspot-url]",function (){
972
+ console.log('afds')
973
  var getHotspotUrl = $(this).val();
 
974
  var getParent = $(this).parent();
975
  var getMainParent = getParent.parent()
976
  var getClickContent = getMainParent.find('.hotspot-content')
978
  getClickContent.find('textarea').val('')
979
  getClickContent.find('textarea').attr('placeholder','You can set either a URL or an On-click content')
980
  getClickContent.find('textarea').attr("disabled",true)
981
+ getClickContent.find('textarea[name*=hotspot-content]').next().find(".note-editable").attr("contenteditable", false);
982
+ getClickContent.find('textarea[name*=hotspot-content]').next().find(".note-editable").html('');
983
+
984
  }else{
985
  getClickContent.find('textarea').attr("disabled",false)
986
+ getClickContent.find('textarea[name*=hotspot-content]').next().find(".note-editable").attr("contenteditable", true);
987
  }
988
  })
989
+
990
  $(document).on("keyup","textarea[name*=hotspot-content]",function (){
991
  var getHotspotContent = $(this).val();
992
  var getParent = $(this).parent();
996
  getClickContent.find('input[name*=hotspot-url').val('')
997
  getClickContent.find('input[name*=hotspot-url').attr('placeholder','You can set either a URL or an On-click content')
998
  getClickContent.find('input[name*=hotspot-url]').attr("disabled",true)
 
 
 
999
  }else{
1000
  getClickContent.find('input[name*=hotspot-url]').attr("disabled",false)
 
1001
  }
1002
  })
1003
  })
1004
 
1005
+
1006
  $(document).on("click", ".pano-error-close-btn", function (e) {
1007
  e.preventDefault();
1008
  $('.wpvr-delete-alert-wrapper').css('display', 'none');
1011
 
1012
  $(document).on("change", "input[type=radio][name=panovideo]", function (event) {
1013
  var getvalue = $(this).val();
1014
+
1015
  if (getvalue == 'on') {
1016
  $('#confirm_text').html('Turning On The Video Option Will Erase Your Virtual Tour Data. Are You Sure?');
1017
  $('.wpvr-delete-alert-wrapper').css('display', 'flex');
1080
 
1081
  jQuery(document).ready(function ($) {
1082
  var viddata = $("input[name='panovideo']:checked").val();
1083
+
1084
  if (viddata == 'on') {
1085
 
1086
+ $("li.scene").removeClass('active');
1087
+ $(".rex-pano-tab.wpvr_scene").removeClass('active');
1088
+ $("li.videos").addClass('active');
1089
  $(".rex-pano-tab.video").addClass('active');
1090
  $(".video-setting").show();
1091
  $("li.general").hide();
1196
 
1197
  $(document).on("click", ".rex-pano-nav-menu.main-nav ul li span", function () {
1198
  var screen = $(this).parent().attr('data-screen');
1199
+
1200
  var url_info = wpvr_global_obj.url_info
1201
  if ( 'add' == url_info.screen ){
1202
  var newUrl = url_info.admin_url+"post-new.php?"+"post_type="+url_info.param.post_type+"&active_tab="+screen;
1227
  $([$(this).parent()[0], $($(this).data('href'))[0]]).addClass('active').siblings('.active').removeClass('active');
1228
  });
1229
 
 
1230
  //-Get Started reloaded -//
1231
  $(document).on("click",".tabs.rex-tabs li a",function(){
1232
  var tab = $(this).attr('href');
1241
  window.history.pushState({ path: newUrl }, '', newUrl);
1242
  }
1243
  })
 
 
1244
  //----------alert dismiss--------//
1245
  $(document).on("click", "body", function () {
1246
  $('body').removeClass('error-overlay2');
1372
  });
1373
 
1374
  jQuery(document).ready(function ($) {
1375
+ var autrotateset = $("input[name='autorotation']").is(':checked') ? 'on' : 'off';
1376
  if (autrotateset == 'off') {
1377
  $('.autorotationdata-wrapper').hide();
1378
  } else {
1381
  });
1382
 
1383
  $(document).on("change", "input[name='autorotation']", function (event) {
1384
+ var autrotateset = $(this).is(':checked') ? 'on' : 'off';
1385
 
1386
  if (autrotateset == 'on') {
1387
  $('.autorotationdata-wrapper').show();
1696
 
1697
  $('.general-inner-tab .inner-nav li span').on('click', function () {
1698
  var this_id = $(this).attr('data-href');
1699
+
1700
+ $(this).parent('li').addClass('active');
1701
+ $(this).parent('li').siblings().removeClass('active');
1702
+
1703
  $(this_id).show();
1704
  $(this_id).siblings().hide();
1705
  });
1793
 
1794
  });
1795
 
1796
+
1797
+
1798
+
1799
+
1800
  //------active tab scripts-------
1801
  jQuery(document).ready(function ($) {
1802
 
1847
  if(activeTab === 'hotspot'){
1848
  $(".rex-pano-nav-menu.main-nav ul li.hotspot span").trigger('click')
1849
  }
1850
+
1851
  // scene contents
1852
  if (_sceneID) {
1853
  var scenesIds = [];
1927
  $(this).val('off');
1928
  }
1929
  });
1930
+
1931
  $(document).ready(function() {
1932
  $('textarea[name*=hotspot-content]').summernote({
1933
  toolbar: [
1956
  }
1957
  }
1958
  });
 
1959
  $('textarea[name*=hotspot-hover]').summernote({
1960
  toolbar: [
1961
  ['style', ['style']],
1968
  ['view', ['codeview', 'help']],
1969
  ],
1970
  });
1971
+
1972
  });
1973
 
1974
 
admin/js/wpvr-global.js CHANGED
@@ -101,5 +101,13 @@
101
  }
102
  $(document).on('click', '.wpvr-black-friday-offer .notice-dismiss', wpvr_bf_notice_dismiss);
103
 
 
 
 
 
 
 
 
 
104
 
105
  })( jQuery );
101
  }
102
  $(document).on('click', '.wpvr-black-friday-offer .notice-dismiss', wpvr_bf_notice_dismiss);
103
 
104
+
105
+ // video setup wizard__video
106
+ $( document ).on( 'click', '.box-video', function() {
107
+ $('iframe',this)[0].src += "?autoplay=1";
108
+ $(this).addClass('open');
109
+ });
110
+
111
+
112
 
113
  })( jQuery );
admin/js/wpvr-shortcode.js ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function () {
2
+ document.getElementById("wpvr-copy-shortcode").addEventListener("click", function() {
3
+ copyToClipboard(document.getElementById("copy-shortcode"));
4
+ });
5
+
6
+ function copyToClipboard(elem) {
7
+ // create hidden text element, if it doesn\'t already exist
8
+ var targetId = "_hiddenCopyText_";
9
+ var isInput = elem.tagName === "INPUT" || elem.tagName === "TEXTAREA";
10
+ var origSelectionStart, origSelectionEnd;
11
+ if (isInput) {
12
+ // can just use the original source element for the selection and copy
13
+ target = elem;
14
+ origSelectionStart = elem.selectionStart;
15
+ origSelectionEnd = elem.selectionEnd;
16
+ } else {
17
+ // must use a temporary form element for the selection and copy
18
+ target = document.getElementById(targetId);
19
+ if (!target) {
20
+ var target = document.createElement("textarea");
21
+ target.style.position = "absolute";
22
+ target.style.left = "-9999px";
23
+ target.style.top = "0";
24
+ target.id = targetId;
25
+ document.body.appendChild(target);
26
+ }
27
+ target.textContent = elem.textContent;
28
+ }
29
+ // select the content
30
+ var currentFocus = document.activeElement;
31
+ target.focus();
32
+ target.setSelectionRange(0, target.value.length);
33
+
34
+ // copy the selection
35
+ var succeed;
36
+ try {
37
+ succeed = document.execCommand("copy");
38
+ document.getElementById("wpvr-copied-notice").innerHTML = "Copied!";
39
+ } catch(e) {
40
+ succeed = false;
41
+ }
42
+ // restore original focus
43
+ if (currentFocus && typeof currentFocus.focus === "function") {
44
+ currentFocus.focus();
45
+ }
46
+
47
+ setTimeout(function(){
48
+ document.getElementById("wpvr-copied-notice").innerHTML = "";
49
+ }, 2000 );
50
+
51
+ if (isInput) {
52
+ // restore prior selection
53
+ elem.setSelectionRange(origSelectionStart, origSelectionEnd);
54
+ } else {
55
+ // clear temporary content
56
+ target.textContent = "";
57
+ }
58
+ document.getElementById("wpvr-copy-shortcode").scrollIntoView()
59
+ return succeed;
60
+ };
61
+ });
62
+
63
+
64
+
admin/js/wpvr-tour-guide.js ADDED
@@ -0,0 +1,554 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function( $ ) {
2
+ 'use strict';
3
+
4
+ $(document).ready(function(){
5
+ var main_tour = new Shepherd.Tour();
6
+
7
+ main_tour.options.defaults = {
8
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour shadow-md bg-purple-dark',
9
+ showCancelLink: true,
10
+ useModalOverlay: true,
11
+ scrollTo: true,
12
+ tetherOptions: {
13
+ constraints: [
14
+ {
15
+ to: 'scrollParent',
16
+ attachment: 'together',
17
+ pin: false
18
+ }
19
+ ]
20
+ }
21
+ };
22
+
23
+ var next_button_text = 'Next';
24
+ var back_button_text = 'Previous';
25
+
26
+ //Start Sences guide tour
27
+
28
+ main_tour.addStep('tour_title', {
29
+ title: 'Set A Title To Tour Virtual Tour',
30
+ text: "Give a name to your virtual tour.",
31
+ attachTo: '#post-body-content bottom',
32
+ buttons: [
33
+ {
34
+ classes: 'udp-tour-end',
35
+ text: "End Tour",
36
+ action: main_tour.cancel
37
+ },
38
+ {
39
+ classes: 'button button-primary',
40
+ text: next_button_text,
41
+ action: main_tour.next,
42
+ }
43
+ ],
44
+ when: {
45
+ show: function() {
46
+ scroll_to_popup();
47
+ }
48
+ }
49
+ })
50
+ main_tour.addStep('scene_section', {
51
+ title: 'Add Scene ID ',
52
+ text: "Set the Scene ID for your first panorama image. The Scene ID has to be unique for each scene and without any spaces or special characters. You can set it as Scene1, S1, or simply 01.",
53
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
54
+ attachTo: '.single-scene.rex-pano-tab.active .sceneid right',
55
+ buttons: [
56
+ {
57
+ classes: 'udp-tour-back',
58
+ text: back_button_text,
59
+ action: function() {
60
+ main_tour.back();
61
+ }
62
+ },
63
+ {
64
+ classes: 'button button-primary',
65
+ text: next_button_text,
66
+ action: main_tour.next
67
+ }
68
+ ],
69
+ when: {
70
+ show: function() {
71
+ scroll_to_popup();
72
+ }
73
+ }
74
+ });
75
+
76
+ main_tour.addStep('upload_image', {
77
+ title: 'Upload Panorama Image',
78
+ text: "Click on the Upload button to upload your panorama image.",
79
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
80
+ attachTo: '.single-scene.rex-pano-tab.active .scene-upload right',
81
+ buttons: [
82
+ {
83
+ classes: 'udp-tour-back',
84
+ text: back_button_text,
85
+ action: function() {
86
+ main_tour.back();
87
+ }
88
+ },
89
+ {
90
+ classes: 'button button-primary',
91
+ text: next_button_text,
92
+ action: main_tour.next
93
+ }
94
+ ],
95
+ when: {
96
+ show: function() {
97
+ scroll_to_popup();
98
+ }
99
+ }
100
+ });
101
+
102
+ $('.single-scene.rex-pano-tab.active .scene-upload').on('click',function(event){
103
+ main_tour.hide()
104
+ if($(this).parent().find('.wpvr_continue_guide').length == 0 && !main_tour.canceled ){
105
+ $(this).parent().append('<span class="wpvr_continue_guide" >Continue to guide</span>');
106
+ }
107
+ })
108
+ $(document).on('click', "span.wpvr_continue_guide", function() {
109
+ $(this).remove();
110
+ main_tour.show("preview_tour_button")
111
+ $('body').addClass('shepherd-active')
112
+ });
113
+
114
+
115
+
116
+
117
+ main_tour.addStep('preview_tour_button', {
118
+ title: 'Preview The Image in Tour Mode',
119
+ text: "Click on the Preview button to view your uploaded panorama in virtual tour mode.",
120
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
121
+ attachTo: '#panolenspreview left',
122
+ buttons: [
123
+ {
124
+ classes: 'udp-tour-back',
125
+ text: back_button_text,
126
+ action: function() {
127
+ main_tour.back();
128
+ }
129
+ },
130
+ {
131
+ classes: 'button button-primary',
132
+ text: next_button_text,
133
+ action: main_tour.next
134
+ }
135
+ ],
136
+ when: {
137
+ show: function() {
138
+ scroll_to_popup();
139
+ }
140
+ }
141
+ });
142
+ main_tour.addStep('preview_tour_section', {
143
+ title: 'Your Image In Tour Mode',
144
+ text: "Here is a preview of your panorama image in tour mode. You can control it and mode around to see it in 360 degree view.",
145
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
146
+ attachTo: '#wpvr_item_builder__box left',
147
+
148
+ buttons: [
149
+ {
150
+ classes: 'udp-tour-back',
151
+ text: back_button_text,
152
+ action: function() {
153
+ main_tour.back();
154
+ }
155
+ },
156
+ {
157
+ classes: 'button button-primary',
158
+ text: next_button_text,
159
+ action: main_tour.next
160
+ }
161
+ ],
162
+ when: {
163
+ show: function() {
164
+ scroll_to_popup();
165
+ }
166
+ }
167
+ });
168
+ main_tour.addStep('publish_tour', {
169
+ title: 'Save Your Tour',
170
+ text: "Click on this Publish button to save this as a tour. You can always find it in your tour list.",
171
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
172
+ attachTo: '#publishing-action left',
173
+ buttons: [
174
+ {
175
+ classes: 'udp-tour-back',
176
+ text: back_button_text,
177
+ action: function() {
178
+ main_tour.back();
179
+ }
180
+ },
181
+ {
182
+ classes: 'button button-primary',
183
+ text: next_button_text,
184
+ action: main_tour.next
185
+ }
186
+ ],
187
+ when: {
188
+ show: function() {
189
+ scroll_to_popup();
190
+ }
191
+ }
192
+ });
193
+ main_tour.addStep('sence_end', {
194
+ title: 'Publish Your Tour',
195
+ text: "Now your tour is ready to be published on your website.\n" +
196
+ "\n" +
197
+ "To learn how to publish it on your website,<a href='https://rextheme.com/docs/wp-vr-wpvr-shortcode-embed-virtual-tour/' target='_blank'> follow this detailed documentation.\n</a>" +
198
+ "\n" +
199
+ " To continue customizing this tour, click on Next.",
200
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
201
+ attachTo: '.rex-pano-tabs',
202
+ buttons: [
203
+ {
204
+ classes: 'udp-tour-back',
205
+ text: back_button_text,
206
+ action: function() {
207
+ main_tour.back();
208
+ }
209
+ },
210
+ {
211
+ classes: 'button button-primary',
212
+ text: "Start Customizing",
213
+ // action: main_tour.next
214
+ action: function() {
215
+ main_tour.next()
216
+ $(".rex-pano-nav-menu.main-nav ul li.hotspot span").trigger('click')
217
+ }
218
+ }
219
+ ],
220
+ when: {
221
+ show: function() {
222
+ scroll_to_popup();
223
+ }
224
+ }
225
+ });
226
+
227
+ // End scenes Tour Guide
228
+
229
+ // Start Hotspot
230
+ main_tour.addStep('hotspot_start', {
231
+ title: 'Let\'s add a Hotspot',
232
+ text: "Add a Hotspot inside your tour to show additional information like Paragraph, Heading, Image, Video, or multiple content.",
233
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
234
+ attachTo: '#wpvr-main-nav .hotspot right',
235
+ buttons: [
236
+ {
237
+ classes: 'udp-tour-back',
238
+ text: back_button_text,
239
+ action: function() {
240
+ main_tour.back();
241
+ $(".rex-pano-nav-menu.main-nav ul li.scene span").trigger('click')
242
+ }
243
+ },
244
+ {
245
+ classes: 'button button-primary',
246
+ text: next_button_text,
247
+ action: main_tour.next
248
+ }
249
+ ],
250
+ when: {
251
+ show: function() {
252
+ scroll_to_popup();
253
+ }
254
+ }
255
+ });
256
+ main_tour.addStep('hotspot_id', {
257
+ title: 'Set Hotspot ID',
258
+ text: "Set an unique Hotspot ID to each of your Hotspots. Avoid Spaces & special characters. Set it like H1 or 01",
259
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
260
+ attachTo: '#scene-1-hotspot-1 .hotspot-setting right',
261
+ buttons: [
262
+ {
263
+ classes: 'udp-tour-back',
264
+ text: back_button_text,
265
+ action: function() {
266
+ main_tour.back();
267
+ }
268
+ },
269
+ {
270
+ classes: 'button button-primary',
271
+ text: next_button_text,
272
+ // action: main_tour.next
273
+ action: function() {
274
+ var post_ID = $("#post_ID").val();
275
+ $(".pnlm-ui.pnlm-grab").trigger('click');
276
+ // console.log($(".pnlm-ui.pnlm-grab").trigger('click'));
277
+ main_tour.next()
278
+
279
+ }
280
+ }
281
+ ],
282
+ when: {
283
+ show: function() {
284
+ scroll_to_popup();
285
+ }
286
+ }
287
+ });
288
+ main_tour.addStep('choose_previwer', {
289
+ title: 'Choose The Spot',
290
+ text: "In this Preview, drag to your desired location and click on it, exactly where you want to set the hotspot",
291
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
292
+ attachTo: '#wpvr_item_builder__box left',
293
+ buttons: [
294
+ {
295
+ classes: 'udp-tour-back',
296
+ text: back_button_text,
297
+ action: function() {
298
+ main_tour.back();
299
+ }
300
+ },
301
+ {
302
+ classes: 'button button-primary',
303
+ text: next_button_text,
304
+ action: main_tour.next
305
+ }
306
+ ],
307
+ when: {
308
+ show: function() {
309
+ scroll_to_popup();
310
+ }
311
+ }
312
+ });
313
+ main_tour.addStep('assigin_pitch_yaw', {
314
+ title: 'Assign Pitch & Yaw',
315
+ text: "Once you see the Pitch & Yaw value for the spot, click on this Arrow. It'll be set as the coordinate for your hotspot",
316
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
317
+ attachTo: '#panodata right',
318
+ buttons: [
319
+ {
320
+ classes: 'udp-tour-back',
321
+ text: back_button_text,
322
+ action: function() {
323
+ main_tour.back();
324
+ }
325
+ },
326
+ {
327
+ classes: 'button button-primary',
328
+ text: next_button_text,
329
+ action: main_tour.next
330
+ }
331
+ ],
332
+ when: {
333
+ show: function() {
334
+ scroll_to_popup();
335
+ }
336
+ }
337
+ });
338
+ main_tour.addStep('pitch_yaw_set', {
339
+ title: 'Pitch & Yaw is Set',
340
+ text: "Here you can see the Pitch & Yaw has been set for the hotspot.",
341
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
342
+ attachTo: '#scene-1-hotspot-1 .hotspot-pitch right',
343
+ buttons: [
344
+ {
345
+ classes: 'udp-tour-back',
346
+ text: back_button_text,
347
+ action: function() {
348
+ main_tour.back();
349
+ }
350
+ },
351
+ {
352
+ classes: 'button button-primary',
353
+ text: next_button_text,
354
+ action: main_tour.next
355
+ }
356
+ ],
357
+ when: {
358
+ show: function() {
359
+ scroll_to_popup();
360
+ }
361
+ }
362
+ });
363
+ main_tour.addStep('pitch_yaw_set_2', {
364
+ title: 'Pitch & Yaw is Set',
365
+ text: "Here you can see the Pitch & Yaw has been set for the hotspot.",
366
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
367
+ attachTo: '#scene-1-hotspot-1 .hotspot-yaw right',
368
+ buttons: [
369
+ {
370
+ classes: 'udp-tour-back',
371
+ text: back_button_text,
372
+ action: function() {
373
+ main_tour.back();
374
+ }
375
+ },
376
+ {
377
+ classes: 'button button-primary',
378
+ text: next_button_text,
379
+ action: main_tour.next
380
+ }
381
+ ],
382
+ when: {
383
+ show: function() {
384
+ scroll_to_popup();
385
+ }
386
+ }
387
+ });
388
+ main_tour.addStep('on_click_content_info', {
389
+ title: 'Set The Content for Click Action',
390
+ text: "Here, you can set what content your viewer will see after clicking on the Hotspot. You can either set an URL or any other content using this editor. To learn more, follow this guide to set content using editor",
391
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
392
+ attachTo: '#scene-1-hotspot-1 .hotspot-type.hotspot-setting:not(.hotspot-hover) top',
393
+ buttons: [
394
+ {
395
+ classes: 'udp-tour-back',
396
+ text: back_button_text,
397
+ action: function() {
398
+ main_tour.back();
399
+ }
400
+ },
401
+ {
402
+ classes: 'button button-primary',
403
+ text: next_button_text,
404
+ action: main_tour.next
405
+ }
406
+ ],
407
+ when: {
408
+ show: function() {
409
+ scroll_to_popup();
410
+ }
411
+ }
412
+ });
413
+ main_tour.addStep('on_hover_info', {
414
+ title: 'Set The Content for Click Action',
415
+ text: "Here, you can set what content your viewer will see after clicking on the Hotspot. You can either set an URL or any other content using this editor. To learn more, follow this guide to set content using editor",
416
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
417
+ attachTo: '#scene-1-hotspot-1 .hotspot-hover top',
418
+ buttons: [
419
+ {
420
+ classes: 'udp-tour-back',
421
+ text: back_button_text,
422
+ action: function() {
423
+ main_tour.back();
424
+ }
425
+ },
426
+ {
427
+ classes: 'button button-primary',
428
+ text: next_button_text,
429
+ action: main_tour.next
430
+ }
431
+ ],
432
+ when: {
433
+ show: function() {
434
+ scroll_to_popup();
435
+ }
436
+ }
437
+ });
438
+ main_tour.addStep('preview_on_hotspot', {
439
+ title: 'Preview Your Hotspot Content',
440
+ text: "Click on Preview to see how the content is appearing for the hotspot.",
441
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
442
+ attachTo: '#panolenspreview right',
443
+ buttons: [
444
+ {
445
+ classes: 'udp-tour-back',
446
+ text: back_button_text,
447
+ action: function() {
448
+ main_tour.back();
449
+ }
450
+ },
451
+ {
452
+ classes: 'button button-primary',
453
+ text: next_button_text,
454
+ action: main_tour.next
455
+ }
456
+ ],
457
+ when: {
458
+ show: function() {
459
+ scroll_to_popup();
460
+ }
461
+ }
462
+ });
463
+ main_tour.addStep('save_process_hotspot', {
464
+ title: 'Save Your Progress',
465
+ text: "Click on the Update button to save your work. And just like that, you can create an unlimited number of virtual tours and add your customization to them.\n",
466
+ classes: 'shepherd-theme-arrows-plain-buttons shepherd-main-tour super-index',
467
+ attachTo: '#publish left',
468
+ buttons: [
469
+ {
470
+ classes: 'udp-tour-back',
471
+ text: back_button_text,
472
+ action: function() {
473
+ main_tour.back();
474
+ }
475
+ },
476
+ {
477
+ classes: 'button button-primary',
478
+ text: 'Done',
479
+ action: main_tour.complete
480
+ }
481
+ ],
482
+ when: {
483
+ show: function() {
484
+ scroll_to_popup();
485
+ }
486
+ }
487
+ });
488
+ //End Hotspot
489
+ /**
490
+ * Scroll to Popup
491
+ *
492
+ * @param {Object} step
493
+ */
494
+ var scroll_to_popup = function(step) {
495
+ main_tour.going_somewhere = false;
496
+ if (!step) {
497
+ step = main_tour.getCurrentStep();
498
+ }
499
+ var popup = $(step.el);
500
+ var target = $(step.tether.target);
501
+ $('body, html').animate({
502
+ scrollTop: popup.offset().top - 50
503
+ }, 500, function() {
504
+ window.scrollTo(0, popup.offset().top - 50);
505
+ });
506
+
507
+ }
508
+ main_tour.start();
509
+ main_tour.on('cancel', cancel_tour);
510
+
511
+ /**
512
+ * Cancel tour
513
+ */
514
+ function cancel_tour() {
515
+ // The tour is either finished or [x] was clicked
516
+ main_tour.canceled = true;
517
+ var get_param = getParameterByName("wpvr-guide-tour");
518
+ if(get_param == "1"){
519
+ var newUrl = updateParam("wpvr-guide-tour",0);
520
+ if (window.history != 'undefined' && window.history.pushState != 'undefined') {
521
+ window.history.pushState({ path: newUrl }, '', newUrl);
522
+ }
523
+ }
524
+ };
525
+
526
+ /**
527
+ * Get URL parameter By name
528
+ */
529
+ function getParameterByName(name, url = window.location.href) {
530
+ name = name.replace(/[\[\]]/g, '\\$&');
531
+ var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
532
+ results = regex.exec(url);
533
+ if (!results) return null;
534
+ if (!results[2]) return '';
535
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
536
+ }
537
+ /**
538
+ * Delete parameter By name
539
+ */
540
+ function updateParam (name,value, url = window.location.href){
541
+ var url = new URL(url);
542
+ var search_params = url.searchParams;
543
+ search_params.delete(name);
544
+
545
+ url.search = search_params.toString();
546
+
547
+ var new_url = url.toString();
548
+
549
+ return new_url;
550
+ }
551
+
552
+ })
553
+
554
+ })( jQuery );
admin/lib/pannellum/src/js/pannellum.js CHANGED
@@ -1778,6 +1778,7 @@ function createHotSpot(hs) {
1778
  }
1779
  } else {
1780
  //wpvr edit by sakib for in tab url open// -- handling from here
 
1781
  if (hs.wpvr_url_open == 'on') {
1782
  a.target = '_self';
1783
  }
1778
  }
1779
  } else {
1780
  //wpvr edit by sakib for in tab url open// -- handling from here
1781
+ console.log(hs);
1782
  if (hs.wpvr_url_open == 'on') {
1783
  a.target = '_self';
1784
  }
admin/lib/shepherd/css/shepherd-theme-arrows-plain-buttons.css ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top.shepherd-target-attached-left .shepherd-content:before,
2
+ .shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top.shepherd-target-attached-right .shepherd-content:before,
3
+ .shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-target-attached-left .shepherd-content:before,
4
+ .shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-target-attached-right .shepherd-content:before {
5
+ display: none; }
6
+
7
+ .shepherd-element, .shepherd-element:after, .shepherd-element:before, .shepherd-element *, .shepherd-element *:after, .shepherd-element *:before {
8
+ box-sizing: border-box; }
9
+
10
+ .shepherd-element {
11
+ position: absolute;
12
+ display: none; }
13
+ .shepherd-element.shepherd-open {
14
+ display: block; }
15
+
16
+ .shepherd-element.shepherd-theme-arrows-plain-buttons {
17
+ max-width: 100%;
18
+ max-height: 100%; }
19
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content {
20
+ border-radius: 5px;
21
+ position: relative;
22
+ font-family: inherit;
23
+ background: #fff;
24
+ color: #444;
25
+ padding: 1em;
26
+ font-size: 1.1em;
27
+ line-height: 1.5em;
28
+ -webkit-transform: translateZ(0);
29
+ transform: translateZ(0);
30
+ -webkit-filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
31
+ filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2)); }
32
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content:before {
33
+ content: "";
34
+ display: block;
35
+ position: absolute;
36
+ width: 0;
37
+ height: 0;
38
+ border-color: transparent;
39
+ border-width: 16px;
40
+ border-style: solid;
41
+ pointer-events: none; }
42
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content {
43
+ margin-bottom: 16px; }
44
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-center .shepherd-content:before {
45
+ top: 100%;
46
+ left: 50%;
47
+ margin-left: -16px;
48
+ border-top-color: #fff; }
49
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content {
50
+ margin-top: 16px; }
51
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-center .shepherd-content:before {
52
+ bottom: 100%;
53
+ left: 50%;
54
+ margin-left: -16px;
55
+ border-bottom-color: #fff; }
56
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content {
57
+ margin-right: 16px; }
58
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-right.shepherd-element-attached-middle .shepherd-content:before {
59
+ left: 100%;
60
+ top: 50%;
61
+ margin-top: -16px;
62
+ border-left-color: #fff; }
63
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content {
64
+ margin-left: 16px; }
65
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-left.shepherd-element-attached-middle .shepherd-content:before {
66
+ right: 100%;
67
+ top: 50%;
68
+ margin-top: -16px;
69
+ border-right-color: #fff; }
70
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-left.shepherd-target-attached-center .shepherd-content {
71
+ left: -32px; }
72
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-right.shepherd-target-attached-center .shepherd-content {
73
+ left: 32px; }
74
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-middle .shepherd-content {
75
+ margin-top: 16px; }
76
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-middle .shepherd-content:before {
77
+ bottom: 100%;
78
+ left: 16px;
79
+ border-bottom-color: #fff; }
80
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-middle .shepherd-content {
81
+ margin-top: 16px; }
82
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-middle .shepherd-content:before {
83
+ bottom: 100%;
84
+ right: 16px;
85
+ border-bottom-color: #fff; }
86
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-middle .shepherd-content {
87
+ margin-bottom: 16px; }
88
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-middle .shepherd-content:before {
89
+ top: 100%;
90
+ left: 16px;
91
+ border-top-color: #fff; }
92
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-middle .shepherd-content {
93
+ margin-bottom: 16px; }
94
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-middle .shepherd-content:before {
95
+ top: 100%;
96
+ right: 16px;
97
+ border-top-color: #fff; }
98
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content {
99
+ margin-top: 16px; }
100
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom .shepherd-content:before {
101
+ bottom: 100%;
102
+ left: 16px;
103
+ border-bottom-color: #fff; }
104
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content {
105
+ margin-top: 16px; }
106
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom .shepherd-content:before {
107
+ bottom: 100%;
108
+ right: 16px;
109
+ border-bottom-color: #fff; }
110
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content {
111
+ margin-bottom: 16px; }
112
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top .shepherd-content:before {
113
+ top: 100%;
114
+ left: 16px;
115
+ border-top-color: #fff; }
116
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content {
117
+ margin-bottom: 16px; }
118
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top .shepherd-content:before {
119
+ top: 100%;
120
+ right: 16px;
121
+ border-top-color: #fff; }
122
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
123
+ margin-right: 16px; }
124
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
125
+ top: 16px;
126
+ left: 100%;
127
+ border-left-color: #fff; }
128
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
129
+ margin-left: 16px; }
130
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
131
+ top: 16px;
132
+ right: 100%;
133
+ border-right-color: #fff; }
134
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content {
135
+ margin-right: 16px; }
136
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-left .shepherd-content:before {
137
+ bottom: 16px;
138
+ left: 100%;
139
+ border-left-color: #fff; }
140
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content {
141
+ margin-left: 16px; }
142
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
143
+ bottom: 16px;
144
+ right: 100%;
145
+ border-right-color: #fff; }
146
+
147
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before, .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
148
+ border-bottom-color: #eee; }
149
+
150
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header {
151
+ background: #eee;
152
+ padding: 1em; }
153
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
154
+ padding: 0;
155
+ margin-bottom: 0; }
156
+
157
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-cancel-link .shepherd-content header h3 {
158
+ float: left; }
159
+
160
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content {
161
+ padding: 0; }
162
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header {
163
+ *zoom: 1;
164
+ border-radius: 5px 5px 0 0; }
165
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header:after {
166
+ content: "";
167
+ display: table;
168
+ clear: both; }
169
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header h3 {
170
+ margin: 0;
171
+ line-height: 1;
172
+ font-weight: normal; }
173
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header a.shepherd-cancel-link {
174
+ float: right;
175
+ text-decoration: none;
176
+ font-size: 1.25em;
177
+ line-height: .8em;
178
+ font-weight: normal;
179
+ color: rgba(0, 0, 0, 0.5);
180
+ opacity: 0.25;
181
+ position: relative;
182
+ top: .1em;
183
+ padding: .8em;
184
+ margin-bottom: -.8em; }
185
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header a.shepherd-cancel-link:hover {
186
+ opacity: 1; }
187
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content .shepherd-text {
188
+ padding: 1em; }
189
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content .shepherd-text p {
190
+ margin: 0 0 .5em 0;
191
+ line-height: 1.3em; }
192
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content .shepherd-text p:last-child {
193
+ margin-bottom: 0; }
194
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer {
195
+ padding: 0 1em 1em; }
196
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons {
197
+ text-align: right;
198
+ list-style: none;
199
+ padding: 0;
200
+ margin: 0; }
201
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li {
202
+ display: inline;
203
+ padding: 0;
204
+ margin: 0; }
205
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li .shepherd-button {
206
+ display: inline-block;
207
+ vertical-align: middle;
208
+ *vertical-align: auto;
209
+ *zoom: 1;
210
+ *display: inline;
211
+ cursor: pointer;
212
+ margin: 0 .5em 0 0;
213
+ text-decoration: none; }
214
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li:last-child .shepherd-button {
215
+ margin-right: 0; }
admin/lib/shepherd/css/wpvr-tour-guide.min.css ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .shepherd-theme-arrows-plain-buttons {
2
+ z-index: 9999;
3
+ max-width: 390px !important
4
+ }
5
+
6
+ .shepherd-theme-arrows-plain-buttons.super-index {
7
+ z-index: 999999
8
+ }
9
+ a.shepherd-button.button.button-primary {
10
+ background: #004efa;
11
+ }
12
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content {
13
+ border-radius: 3px;
14
+ -webkit-filter: none;
15
+ filter: none;
16
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 10px 40px rgba(0, 0, 0, 0.15);
17
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 10px 40px rgba(0, 0, 0, 0.15)
18
+ }
19
+
20
+ .shepherd-element-attached-bottom.shepherd-element-attached-right.shepherd-target-attached-top.shepherd-target-attached-left .shepherd-content:before,
21
+ .shepherd-element-attached-bottom.shepherd-element-attached-left.shepherd-target-attached-top.shepherd-target-attached-right .shepherd-content:before,
22
+ .shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-target-attached-left .shepherd-content:before,
23
+ .shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-target-attached-right .shepherd-content:before {
24
+ display: none
25
+ }
26
+
27
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-center.shepherd-has-title .shepherd-content:before,
28
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-right.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before,
29
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-bottom.shepherd-has-title .shepherd-content:before {
30
+ border-bottom-color: #004efa
31
+ }
32
+
33
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header {
34
+ background-color: #004efa;
35
+ border-radius: 3px 3px 0 0;
36
+ padding-right: 90px
37
+ }
38
+
39
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content header h3 {
40
+ color: #FFF;
41
+ font-size: 1.2em;
42
+ float: none
43
+ }
44
+
45
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link {
46
+ opacity: .7;
47
+ color: rgba(255, 255, 255, 0);
48
+ font-size: .8em;
49
+ border: 1px solid #FFF;
50
+ border-radius: 50%;
51
+ width: 22px;
52
+ height: 22px;
53
+ line-height: 20px;
54
+ padding: 0;
55
+ text-align: center;
56
+ float: none;
57
+ position: absolute;
58
+ right: 11px;
59
+ top: 12px
60
+ }
61
+
62
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link::before {
63
+ color: #FFF;
64
+ content: attr(data-btntext);
65
+ position: absolute;
66
+ right: 20px;
67
+ padding-right: 10px
68
+ }
69
+
70
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link::after {
71
+ content: "\f335";
72
+ -webkit-font-smoothing: antialiased;
73
+ -moz-osx-font-smoothing: grayscale;
74
+ font-family: dashicons;
75
+ color: #FFF;
76
+ position: absolute;
77
+ left: 2px;
78
+ line-height: 21px;
79
+ font-size: 16px
80
+ }
81
+
82
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link:hover,
83
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link:focus {
84
+ border: 1px solid #fff;
85
+ opacity: 1
86
+ }
87
+
88
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link:hover {
89
+ color: #fff;
90
+ }
91
+
92
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link:hover::before,
93
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link:focus::before {
94
+ color: #a04e00
95
+ }
96
+
97
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link:hover::after,
98
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-has-title .shepherd-content header a.shepherd-cancel-link:focus::after {
99
+ color: #fff;
100
+ }
101
+
102
+ .shepherd-element.shepherd-theme-arrows-plain-buttons.shepherd-element-attached-top.shepherd-element-attached-left.shepherd-target-attached-right .shepherd-content:before {
103
+ top: 44px
104
+ }
105
+
106
+ .shepherd-content .ud-notice {
107
+ background: #f0f0f0;
108
+ padding: 14px;
109
+ border-radius: 4px;
110
+ font-size: 90% !important;
111
+ line-height: 1.5
112
+ }
113
+
114
+ .shepherd-content .ud-notice h3 {
115
+ margin-top: 0;
116
+ padding-top: 0;
117
+ margin-bottom: .5em
118
+ }
119
+
120
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content .shepherd-text p {
121
+ margin-top: .5em;
122
+ margin-bottom: 1.3em
123
+ }
124
+
125
+ .ud-notice span.ud-special-offer {
126
+ font-weight: bold;
127
+ display: inline-block;
128
+ padding: 1px 6px;
129
+ border-radius: 3px;
130
+ background: rgba(217, 105, 0, 0.09)
131
+ }
132
+
133
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li .shepherd-button.udp-tour-back,
134
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li .shepherd-button.udp-tour-end {
135
+ float: left;
136
+ position: relative;
137
+ padding-left: 10px
138
+ }
139
+
140
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li .shepherd-button.udp-tour-end {
141
+ padding-left: 0;
142
+ color: #b7b7b7
143
+ }
144
+
145
+ .shepherd-element.shepherd-theme-arrows-plain-buttons .shepherd-content footer .shepherd-buttons li .shepherd-button.udp-tour-back::before {
146
+ content: ' ';
147
+ width: 6px;
148
+ height: 6px;
149
+ display: block;
150
+ border-left: 1px solid;
151
+ border-bottom: 1px solid;
152
+ position: absolute;
153
+ left: 0;
154
+ top: 8px;
155
+ -webkit-transform: rotate(45deg);
156
+ transform: rotate(45deg)
157
+ }
158
+
159
+ a.shepherd-button.udp-tour-end::before {
160
+ display: inline-block;
161
+ position: relative;
162
+ content: "\f335";
163
+ -webkit-font-smoothing: antialiased;
164
+ -moz-osx-font-smoothing: grayscale;
165
+ font-family: dashicons;
166
+ font-size: 20px;
167
+ line-height: 20px;
168
+ vertical-align: middle;
169
+ margin-top: -2px
170
+ }
171
+
172
+
173
+ @media(max-width:790px) {
174
+ .shepherd-element.shepherd-theme-arrows-plain-buttons {
175
+ display: none
176
+ }
177
+ }
178
+
179
+
180
+ body::after {
181
+ opacity: 0;
182
+ }
183
+
184
+ body.shepherd-active::after {
185
+ content: "";
186
+ display: block;
187
+ background-color: #000;
188
+ opacity: 0.4;
189
+ position: fixed;
190
+ width: 100%;
191
+ height: 100%;
192
+ top: 0;
193
+ left: 0;
194
+ z-index: 1000000; }
195
+
196
+ .shepherd-element.shepherd-open, .shepherd-target.shepherd-enabled {
197
+ z-index: 10000000;
198
+ position: relative;
199
+ }
200
+ .shepherd-text p {
201
+ font-size: 15px;
202
+ }
admin/lib/shepherd/tether-shepherd/LICENSE ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2015 HubSpot, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+
admin/lib/shepherd/tether-shepherd/shepherd.js ADDED
@@ -0,0 +1,745 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! tether-shepherd 1.8.1 */
2
+
3
+ (function(root, factory) {
4
+ if (typeof define === 'function' && define.amd) {
5
+ define(["tether"], factory);
6
+ } else if (typeof exports === 'object') {
7
+ module.exports = factory(require('tether'));
8
+ } else {
9
+ root.Shepherd = factory(root.Tether);
10
+ }
11
+ }(this, function(Tether) {
12
+
13
+ /* global Tether */
14
+
15
+ 'use strict';
16
+
17
+ var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
18
+
19
+ var _get = function get(_x5, _x6, _x7) { var _again = true; _function: while (_again) { var object = _x5, property = _x6, receiver = _x7; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x5 = parent; _x6 = property; _x7 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
20
+
21
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
22
+
23
+ function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
24
+
25
+ var _Tether$Utils = Tether.Utils;
26
+ var Evented = _Tether$Utils.Evented;
27
+ var addClass = _Tether$Utils.addClass;
28
+ var extend = _Tether$Utils.extend;
29
+ var hasClass = _Tether$Utils.hasClass;
30
+ var removeClass = _Tether$Utils.removeClass;
31
+ var uniqueId = _Tether$Utils.uniqueId;
32
+
33
+ var Shepherd = new Evented();
34
+
35
+ function isUndefined(obj) {
36
+ return typeof obj === 'undefined';
37
+ };
38
+
39
+ function isArray(obj) {
40
+ return obj && obj.constructor === Array;
41
+ };
42
+
43
+ function isObject(obj) {
44
+ return obj && obj.constructor === Object;
45
+ };
46
+
47
+ function isObjectLoose(obj) {
48
+ return typeof obj === 'object';
49
+ };
50
+
51
+ var ATTACHMENT = {
52
+ 'top right': 'bottom left',
53
+ 'top left': 'bottom right',
54
+ 'top center': 'bottom center',
55
+ 'middle right': 'middle left',
56
+ 'middle left': 'middle right',
57
+ 'middle center': 'middle center',
58
+ 'bottom left': 'top right',
59
+ 'bottom right': 'top left',
60
+ 'bottom center': 'top center',
61
+ 'top': 'bottom center',
62
+ 'left': 'middle right',
63
+ 'right': 'middle left',
64
+ 'bottom': 'top center',
65
+ 'center': 'middle center',
66
+ 'middle': 'middle center'
67
+ };
68
+
69
+ function createFromHTML(html) {
70
+ var el = document.createElement('div');
71
+ el.innerHTML = html;
72
+ return el.children[0];
73
+ }
74
+
75
+ function matchesSelector(el, sel) {
76
+ var matches = undefined;
77
+ if (!isUndefined(el.matches)) {
78
+ matches = el.matches;
79
+ } else if (!isUndefined(el.matchesSelector)) {
80
+ matches = el.matchesSelector;
81
+ } else if (!isUndefined(el.msMatchesSelector)) {
82
+ matches = el.msMatchesSelector;
83
+ } else if (!isUndefined(el.webkitMatchesSelector)) {
84
+ matches = el.webkitMatchesSelector;
85
+ } else if (!isUndefined(el.mozMatchesSelector)) {
86
+ matches = el.mozMatchesSelector;
87
+ } else if (!isUndefined(el.oMatchesSelector)) {
88
+ matches = el.oMatchesSelector;
89
+ }
90
+ return matches.call(el, sel);
91
+ }
92
+
93
+ var positionRe = /^(.+) (top|left|right|bottom|center|\[[a-z ]+\])$/;
94
+
95
+ function parsePosition(str) {
96
+ if (isObjectLoose(str)) {
97
+ if (str.hasOwnProperty("element") && str.hasOwnProperty("on")) {
98
+ return str;
99
+ }
100
+ return null;
101
+ }
102
+
103
+ var matches = positionRe.exec(str);
104
+ if (!matches) {
105
+ return null;
106
+ }
107
+
108
+ var on = matches[2];
109
+ if (on[0] === '[') {
110
+ on = on.substring(1, on.length - 1);
111
+ }
112
+
113
+ return {
114
+ 'element': matches[1],
115
+ 'on': on
116
+ };
117
+ }
118
+
119
+ function parseShorthand(obj, props) {
120
+ if (obj === null || isUndefined(obj)) {
121
+ return obj;
122
+ } else if (isObjectLoose(obj)) {
123
+ return obj;
124
+ }
125
+
126
+ var vals = obj.split(' ');
127
+ var out = {};
128
+ var j = props.length - 1;
129
+ for (var i = vals.length - 1; i >= 0; i--) {
130
+ if (j === 0) {
131
+ out[props[j]] = vals.slice(0, i + 1).join(' ');
132
+ break;
133
+ } else {
134
+ out[props[j]] = vals[i];
135
+ }
136
+
137
+ j--;
138
+ }
139
+
140
+ return out;
141
+ }
142
+
143
+ var Step = (function (_Evented) {
144
+ _inherits(Step, _Evented);
145
+
146
+ function Step(tour, options) {
147
+ _classCallCheck(this, Step);
148
+
149
+ _get(Object.getPrototypeOf(Step.prototype), 'constructor', this).call(this, tour, options);
150
+ this.tour = tour;
151
+ this.bindMethods();
152
+ this.setOptions(options);
153
+ return this;
154
+ }
155
+
156
+ _createClass(Step, [{
157
+ key: 'bindMethods',
158
+ value: function bindMethods() {
159
+ var _this = this;
160
+
161
+ var methods = ['_show', 'show', 'hide', 'isOpen', 'cancel', 'complete', 'scrollTo', 'destroy', 'render'];
162
+ methods.map(function (method) {
163
+ _this[method] = _this[method].bind(_this);
164
+ });
165
+ }
166
+ }, {
167
+ key: 'setOptions',
168
+ value: function setOptions() {
169
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
170
+
171
+ this.options = options;
172
+ this.destroy();
173
+
174
+ this.id = this.options.id || this.id || 'step-' + uniqueId();
175
+
176
+ var when = this.options.when;
177
+ if (when) {
178
+ for (var _event in when) {
179
+ if (({}).hasOwnProperty.call(when, _event)) {
180
+ var handler = when[_event];
181
+ this.on(_event, handler, this);
182
+ }
183
+ }
184
+ }
185
+
186
+ // Button configuration
187
+
188
+ var buttonsJson = JSON.stringify(this.options.buttons);
189
+ var buttonsAreDefault = isUndefined(buttonsJson) || buttonsJson === "true";
190
+
191
+ var buttonsAreEmpty = buttonsJson === "{}" || buttonsJson === "[]" || buttonsJson === "null" || buttonsJson === "false";
192
+
193
+ var buttonsAreArray = !buttonsAreDefault && isArray(this.options.buttons);
194
+
195
+ var buttonsAreObject = !buttonsAreDefault && isObject(this.options.buttons);
196
+
197
+ // Show default button if undefined or 'true'
198
+ if (buttonsAreDefault) {
199
+ this.options.buttons = [{
200
+ text: 'Next',
201
+ action: this.tour.next,
202
+ classes: 'btn'
203
+ }];
204
+
205
+ // Can pass in an object which will assume asingle button
206
+ } else if (!buttonsAreEmpty && buttonsAreObject) {
207
+ this.options.buttons = [this.options.buttons];
208
+
209
+ // Falsey/empty values or non-object values prevent buttons from rendering
210
+ } else if (buttonsAreEmpty || !buttonsAreArray) {
211
+ this.options.buttons = false;
212
+ }
213
+ }
214
+ }, {
215
+ key: 'getTour',
216
+ value: function getTour() {
217
+ return this.tour;
218
+ }
219
+ }, {
220
+ key: 'bindAdvance',
221
+ value: function bindAdvance() {
222
+ var _this2 = this;
223
+
224
+ // An empty selector matches the step element
225
+
226
+ var _parseShorthand = parseShorthand(this.options.advanceOn, ['selector', 'event']);
227
+
228
+ var event = _parseShorthand.event;
229
+ var selector = _parseShorthand.selector;
230
+
231
+ var handler = function handler(e) {
232
+ if (!_this2.isOpen()) {
233
+ return;
234
+ }
235
+
236
+ if (!isUndefined(selector)) {
237
+ if (matchesSelector(e.target, selector)) {
238
+ _this2.tour.next();
239
+ }
240
+ } else {
241
+ if (_this2.el && e.target === _this2.el) {
242
+ _this2.tour.next();
243
+ }
244
+ }
245
+ };
246
+
247
+ // TODO: this should also bind/unbind on show/hide
248
+ document.body.addEventListener(event, handler);
249
+ this.on('destroy', function () {
250
+ return document.body.removeEventListener(event, handler);
251
+ });
252
+ }
253
+ }, {
254
+ key: 'getAttachTo',
255
+ value: function getAttachTo() {
256
+ var opts = parsePosition(this.options.attachTo) || {};
257
+ var returnOpts = extend({}, opts);
258
+
259
+ if (typeof opts.element === 'string') {
260
+ // Can't override the element in user opts reference because we can't
261
+ // guarantee that the element will exist in the future.
262
+ returnOpts.element = document.querySelector(opts.element);
263
+ if (!returnOpts.element) {
264
+ console.error('The element for this Shepherd step was not found ' + opts.element);
265
+ }
266
+ }
267
+
268
+ return returnOpts;
269
+ }
270
+ }, {
271
+ key: 'setupTether',
272
+ value: function setupTether() {
273
+ if (isUndefined(Tether)) {
274
+ throw new Error("Using the attachment feature of Shepherd requires the Tether library");
275
+ }
276
+
277
+ var opts = this.getAttachTo();
278
+ var attachment = ATTACHMENT[opts.on] || ATTACHMENT.right;
279
+ if (isUndefined(opts.element)) {
280
+ opts.element = 'viewport';
281
+ attachment = 'middle center';
282
+ }
283
+
284
+ var tetherOpts = {
285
+ classPrefix: 'shepherd',
286
+ element: this.el,
287
+ constraints: [{
288
+ to: 'window',
289
+ pin: true,
290
+ attachment: 'together'
291
+ }],
292
+ target: opts.element,
293
+ offset: opts.offset || '0 0',
294
+ attachment: attachment
295
+ };
296
+
297
+ if (this.tether) {
298
+ this.tether.destroy();
299
+ }
300
+
301
+ this.tether = new Tether(extend(tetherOpts, this.options.tetherOptions));
302
+ }
303
+ }, {
304
+ key: 'show',
305
+ value: function show() {
306
+ var _this3 = this;
307
+
308
+ if (!isUndefined(this.options.beforeShowPromise)) {
309
+ var beforeShowPromise = this.options.beforeShowPromise();
310
+ if (!isUndefined(beforeShowPromise)) {
311
+ return beforeShowPromise.then(function () {
312
+ return _this3._show();
313
+ });
314
+ }
315
+ }
316
+ this._show();
317
+ }
318
+ }, {
319
+ key: '_show',
320
+ value: function _show() {
321
+ var _this4 = this;
322
+
323
+ this.trigger('before-show');
324
+
325
+ if (!this.el) {
326
+ this.render();
327
+ }
328
+
329
+ addClass(this.el, 'shepherd-open');
330
+
331
+ document.body.setAttribute('data-shepherd-step', this.id);
332
+
333
+ this.setupTether();
334
+
335
+ if (this.options.scrollTo) {
336
+ setTimeout(function () {
337
+ _this4.scrollTo();
338
+ });
339
+ }
340
+
341
+ this.trigger('show');
342
+ }
343
+ }, {
344
+ key: 'hide',
345
+ value: function hide() {
346
+ this.trigger('before-hide');
347
+
348
+ removeClass(this.el, 'shepherd-open');
349
+
350
+ document.body.removeAttribute('data-shepherd-step');
351
+
352
+ if (this.tether) {
353
+ this.tether.destroy();
354
+ }
355
+ this.tether = null;
356
+
357
+ this.trigger('hide');
358
+ }
359
+ }, {
360
+ key: 'isOpen',
361
+ value: function isOpen() {
362
+ return this.el && hasClass(this.el, 'shepherd-open');
363
+ }
364
+ }, {
365
+ key: 'cancel',
366
+ value: function cancel() {
367
+ this.tour.cancel();
368
+ this.trigger('cancel');
369
+ }
370
+ }, {
371
+ key: 'complete',
372
+ value: function complete() {
373
+ this.tour.complete();
374
+ this.trigger('complete');
375
+ }
376
+ }, {
377
+ key: 'scrollTo',
378
+ value: function scrollTo() {
379
+ var _getAttachTo = this.getAttachTo();
380
+
381
+ var element = _getAttachTo.element;
382
+
383
+ if (!isUndefined(this.options.scrollToHandler)) {
384
+ this.options.scrollToHandler(element);
385
+ } else if (!isUndefined(element)) {
386
+ element.scrollIntoView();
387
+ }
388
+ }
389
+ }, {
390
+ key: 'destroy',
391
+ value: function destroy() {
392
+ if (!isUndefined(this.el) && this.el.parentNode) {
393
+ this.el.parentNode.removeChild(this.el);
394
+ delete this.el;
395
+ }
396
+
397
+ if (this.tether) {
398
+ this.tether.destroy();
399
+ }
400
+ this.tether = null;
401
+
402
+ this.trigger('destroy');
403
+ }
404
+ }, {
405
+ key: 'render',
406
+ value: function render() {
407
+ var _this5 = this;
408
+
409
+ if (!isUndefined(this.el)) {
410
+ this.destroy();
411
+ }
412
+
413
+ this.el = createFromHTML('<div class=\'shepherd-step ' + (this.options.classes || '') + '\' data-id=\'' + this.id + '\' ' + (this.options.idAttribute ? 'id="' + this.options.idAttribute + '"' : '') + '></div>');
414
+
415
+ var content = document.createElement('div');
416
+ content.className = 'shepherd-content';
417
+ this.el.appendChild(content);
418
+
419
+ var header = document.createElement('header');
420
+ content.appendChild(header);
421
+
422
+ if (this.options.title) {
423
+ header.innerHTML += '<h3 class=\'shepherd-title\'>' + this.options.title + '</h3>';
424
+ this.el.className += ' shepherd-has-title';
425
+ }
426
+
427
+ if (this.options.showCancelLink) {
428
+ var link = createFromHTML("<a href class='shepherd-cancel-link'>✕</a>");
429
+ header.appendChild(link);
430
+
431
+ this.el.className += ' shepherd-has-cancel-link';
432
+
433
+ this.bindCancelLink(link);
434
+ }
435
+
436
+ if (!isUndefined(this.options.text)) {
437
+ (function () {
438
+ var text = createFromHTML("<div class='shepherd-text'></div>");
439
+ var paragraphs = _this5.options.text;
440
+
441
+ if (typeof paragraphs === 'function') {
442
+ paragraphs = paragraphs.call(_this5, text);
443
+ }
444
+
445
+ if (paragraphs instanceof HTMLElement) {
446
+ text.appendChild(paragraphs);
447
+ } else {
448
+ if (typeof paragraphs === 'string') {
449
+ paragraphs = [paragraphs];
450
+ }
451
+
452
+ paragraphs.map(function (paragraph) {
453
+ text.innerHTML += '<p>' + paragraph + '</p>';
454
+ });
455
+ }
456
+
457
+ content.appendChild(text);
458
+ })();
459
+ }
460
+
461
+ if (this.options.buttons) {
462
+ (function () {
463
+ var footer = document.createElement('footer');
464
+ var buttons = createFromHTML("<ul class='shepherd-buttons'></ul>");
465
+
466
+ _this5.options.buttons.map(function (cfg) {
467
+ var button = createFromHTML('<li><a class=\'shepherd-button ' + (cfg.classes || '') + '\'>' + cfg.text + '</a>');
468
+ buttons.appendChild(button);
469
+ _this5.bindButtonEvents(cfg, button.querySelector('a'));
470
+ });
471
+
472
+ footer.appendChild(buttons);
473
+ content.appendChild(footer);
474
+ })();
475
+ }
476
+
477
+ document.body.appendChild(this.el);
478
+
479
+ this.setupTether();
480
+
481
+ if (this.options.advanceOn) {
482
+ this.bindAdvance();
483
+ }
484
+ }
485
+ }, {
486
+ key: 'bindCancelLink',
487
+ value: function bindCancelLink(link) {
488
+ var _this6 = this;
489
+
490
+ link.addEventListener('click', function (e) {
491
+ e.preventDefault();
492
+ _this6.cancel();
493
+ });
494
+ }
495
+ }, {
496
+ key: 'bindButtonEvents',
497
+ value: function bindButtonEvents(cfg, el) {
498
+ var _this7 = this;
499
+
500
+ cfg.events = cfg.events || {};
501
+ if (!isUndefined(cfg.action)) {
502
+ // Including both a click event and an action is not supported
503
+ cfg.events.click = cfg.action;
504
+ }
505
+
506
+ for (var _event2 in cfg.events) {
507
+ if (({}).hasOwnProperty.call(cfg.events, _event2)) {
508
+ var handler = cfg.events[_event2];
509
+ if (typeof handler === 'string') {
510
+ (function () {
511
+ var page = handler;
512
+ handler = function () {
513
+ return _this7.tour.show(page);
514
+ };
515
+ })();
516
+ }
517
+ el.addEventListener(_event2, handler);
518
+ }
519
+ }
520
+
521
+ this.on('destroy', function () {
522
+ for (var _event3 in cfg.events) {
523
+ if (({}).hasOwnProperty.call(cfg.events, _event3)) {
524
+ var handler = cfg.events[_event3];
525
+ el.removeEventListener(_event3, handler);
526
+ }
527
+ }
528
+ });
529
+ }
530
+ }]);
531
+
532
+ return Step;
533
+ })(Evented);
534
+
535
+ var Tour = (function (_Evented2) {
536
+ _inherits(Tour, _Evented2);
537
+
538
+ function Tour() {
539
+ var _this8 = this;
540
+
541
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
542
+
543
+ _classCallCheck(this, Tour);
544
+
545
+ _get(Object.getPrototypeOf(Tour.prototype), 'constructor', this).call(this, options);
546
+ this.bindMethods();
547
+ this.options = options;
548
+ this.steps = this.options.steps || [];
549
+
550
+ // Pass these events onto the global Shepherd object
551
+ var events = ['complete', 'cancel', 'hide', 'start', 'show', 'active', 'inactive'];
552
+ events.map(function (event) {
553
+ (function (e) {
554
+ _this8.on(e, function (opts) {
555
+ opts = opts || {};
556
+ opts.tour = _this8;
557
+ Shepherd.trigger(e, opts);
558
+ });
559
+ })(event);
560
+ });
561
+
562
+ return this;
563
+ }
564
+
565
+ _createClass(Tour, [{
566
+ key: 'bindMethods',
567
+ value: function bindMethods() {
568
+ var _this9 = this;
569
+
570
+ var methods = ['next', 'back', 'cancel', 'complete', 'hide'];
571
+ methods.map(function (method) {
572
+ _this9[method] = _this9[method].bind(_this9);
573
+ });
574
+ }
575
+ }, {
576
+ key: 'addStep',
577
+ value: function addStep(name, step) {
578
+ if (isUndefined(step)) {
579
+ step = name;
580
+ }
581
+
582
+ if (!(step instanceof Step)) {
583
+ if (typeof name === 'string' || typeof name === 'number') {
584
+ step.id = name.toString();
585
+ }
586
+ step = extend({}, this.options.defaults, step);
587
+ step = new Step(this, step);
588
+ } else {
589
+ step.tour = this;
590
+ }
591
+
592
+ this.steps.push(step);
593
+ return this;
594
+ }
595
+ }, {
596
+ key: 'removeStep',
597
+ value: function removeStep(name) {
598
+ var current = this.getCurrentStep();
599
+
600
+ for (var i = 0; i < this.steps.length; ++i) {
601
+ var step = this.steps[i];
602
+ if (step.id === name) {
603
+ if (step.isOpen()) {
604
+ step.hide();
605
+ }
606
+ step.destroy();
607
+ this.steps.splice(i, 1);
608
+ break;
609
+ }
610
+ }
611
+
612
+ if (current && current.id === name) {
613
+ this.currentStep = undefined;
614
+
615
+ if (this.steps.length) this.show(0);else this.hide();
616
+ }
617
+ }
618
+ }, {
619
+ key: 'getById',
620
+ value: function getById(id) {
621
+ for (var i = 0; i < this.steps.length; ++i) {
622
+ var step = this.steps[i];
623
+ if (step.id === id) {
624
+ return step;
625
+ }
626
+ }
627
+ }
628
+ }, {
629
+ key: 'getCurrentStep',
630
+ value: function getCurrentStep() {
631
+ return this.currentStep;
632
+ }
633
+ }, {
634
+ key: 'next',
635
+ value: function next() {
636
+ var index = this.steps.indexOf(this.currentStep);
637
+
638
+ if (index === this.steps.length - 1) {
639
+ this.hide(index);
640
+ this.trigger('complete');
641
+ this.done();
642
+ } else {
643
+ this.show(index + 1, true);
644
+ }
645
+ }
646
+ }, {
647
+ key: 'back',
648
+ value: function back() {
649
+ var index = this.steps.indexOf(this.currentStep);
650
+ this.show(index - 1, false);
651
+ }
652
+ }, {
653
+ key: 'cancel',
654
+ value: function cancel() {
655
+ if (this.currentStep) {
656
+ this.currentStep.hide();
657
+ }
658
+ this.trigger('cancel');
659
+ this.done();
660
+ }
661
+ }, {
662
+ key: 'complete',
663
+ value: function complete() {
664
+ if (this.currentStep) {
665
+ this.currentStep.hide();
666
+ }
667
+ this.trigger('complete');
668
+ this.done();
669
+ }
670
+ }, {
671
+ key: 'hide',
672
+ value: function hide() {
673
+ if (this.currentStep) {
674
+ this.currentStep.hide();
675
+ }
676
+ this.trigger('hide');
677
+ this.done();
678
+ }
679
+ }, {
680
+ key: 'done',
681
+ value: function done() {
682
+ Shepherd.activeTour = null;
683
+ removeClass(document.body, 'shepherd-active');
684
+ this.trigger('inactive', { tour: this });
685
+ }
686
+ }, {
687
+ key: 'show',
688
+ value: function show() {
689
+ var key = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0];
690
+ var forward = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
691
+
692
+ if (this.currentStep) {
693
+ this.currentStep.hide();
694
+ } else {
695
+ addClass(document.body, 'shepherd-active');
696
+ this.trigger('active', { tour: this });
697
+ }
698
+
699
+ Shepherd.activeTour = this;
700
+
701
+ var next = undefined;
702
+
703
+ if (typeof key === 'string') {
704
+ next = this.getById(key);
705
+ } else {
706
+ next = this.steps[key];
707
+ }
708
+
709
+ if (next) {
710
+ if (!isUndefined(next.options.showOn) && !next.options.showOn()) {
711
+ var index = this.steps.indexOf(next);
712
+ var nextIndex = forward ? index + 1 : index - 1;
713
+ this.show(nextIndex, forward);
714
+ } else {
715
+ this.trigger('show', {
716
+ step: next,
717
+ previous: this.currentStep
718
+ });
719
+
720
+ if (this.currentStep) {
721
+ this.currentStep.hide();
722
+ }
723
+
724
+ this.currentStep = next;
725
+ next.show();
726
+ }
727
+ }
728
+ }
729
+ }, {
730
+ key: 'start',
731
+ value: function start() {
732
+ this.trigger('start');
733
+
734
+ this.currentStep = null;
735
+ this.next();
736
+ }
737
+ }]);
738
+
739
+ return Tour;
740
+ })(Evented);
741
+
742
+ extend(Shepherd, { Tour: Tour, Step: Step, Evented: Evented });
743
+ return Shepherd;
744
+
745
+ }));
admin/lib/shepherd/tether-shepherd/shepherd.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t,e){"function"==typeof define&&define.amd?define(["tether"],e):"object"==typeof exports?module.exports=e(require("tether")):t.Shepherd=e(t.Tether)}(this,function(t){"use strict";function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return"undefined"==typeof t}function r(t){return t&&t.constructor===Array}function o(t){return t&&t.constructor===Object}function s(t){return"object"==typeof t}function h(t){var e=document.createElement("div");return e.innerHTML=t,e.children[0]}function c(t,e){var n=void 0;return i(t.matches)?i(t.matchesSelector)?i(t.msMatchesSelector)?i(t.webkitMatchesSelector)?i(t.mozMatchesSelector)?i(t.oMatchesSelector)||(n=t.oMatchesSelector):n=t.mozMatchesSelector:n=t.webkitMatchesSelector:n=t.msMatchesSelector:n=t.matchesSelector:n=t.matches,n.call(t,e)}function l(t){if(s(t))return t.hasOwnProperty("element")&&t.hasOwnProperty("on")?t:null;var e=S.exec(t);if(!e)return null;var n=e[2];return"["===n[0]&&(n=n.substring(1,n.length-1)),{element:e[1],on:n}}function a(t,e){if(null===t||i(t))return t;if(s(t))return t;for(var n=t.split(" "),r={},o=e.length-1,h=n.length-1;h>=0;h--){if(0===o){r[e[o]]=n.slice(0,h+1).join(" ");break}r[e[o]]=n[h],o--}return r}var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),d=function(t,e,n){for(var i=!0;i;){var r=t,o=e,s=n;i=!1,null===r&&(r=Function.prototype);var h=Object.getOwnPropertyDescriptor(r,o);if(void 0!==h){if("value"in h)return h.value;var c=h.get;if(void 0===c)return;return c.call(s)}var l=Object.getPrototypeOf(r);if(null===l)return;t=l,e=o,n=s,i=!0,h=l=void 0}},p=t.Utils,f=p.Evented,v=p.addClass,m=p.extend,y=p.hasClass,g=p.removeClass,b=p.uniqueId,w=new f,k={"top right":"bottom left","top left":"bottom right","top center":"bottom center","middle right":"middle left","middle left":"middle right","middle center":"middle center","bottom left":"top right","bottom right":"top left","bottom center":"top center",top:"bottom center",left:"middle right",right:"middle left",bottom:"top center",center:"middle center",middle:"middle center"},S=/^(.+) (top|left|right|bottom|center|\[[a-z ]+\])$/,O=function(s){function p(t,n){return e(this,p),d(Object.getPrototypeOf(p.prototype),"constructor",this).call(this,t,n),this.tour=t,this.bindMethods(),this.setOptions(n),this}return n(p,s),u(p,[{key:"bindMethods",value:function(){var t=this,e=["_show","show","hide","isOpen","cancel","complete","scrollTo","destroy","render"];e.map(function(e){t[e]=t[e].bind(t)})}},{key:"setOptions",value:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=t,this.destroy(),this.id=this.options.id||this.id||"step-"+b();var e=this.options.when;if(e)for(var n in e)if({}.hasOwnProperty.call(e,n)){var s=e[n];this.on(n,s,this)}var h=JSON.stringify(this.options.buttons),c=i(h)||"true"===h,l="{}"===h||"[]"===h||"null"===h||"false"===h,a=!c&&r(this.options.buttons),u=!c&&o(this.options.buttons);c?this.options.buttons=[{text:"Next",action:this.tour.next,classes:"btn"}]:!l&&u?this.options.buttons=[this.options.buttons]:!l&&a||(this.options.buttons=!1)}},{key:"getTour",value:function(){return this.tour}},{key:"bindAdvance",value:function(){var t=this,e=a(this.options.advanceOn,["selector","event"]),n=e.event,r=e.selector,o=function(e){t.isOpen()&&(i(r)?t.el&&e.target===t.el&&t.tour.next():c(e.target,r)&&t.tour.next())};document.body.addEventListener(n,o),this.on("destroy",function(){return document.body.removeEventListener(n,o)})}},{key:"getAttachTo",value:function(){var t=l(this.options.attachTo)||{},e=m({},t);return"string"==typeof t.element&&(e.element=document.querySelector(t.element),e.element||console.error("The element for this Shepherd step was not found "+t.element)),e}},{key:"setupTether",value:function(){if(i(t))throw new Error("Using the attachment feature of Shepherd requires the Tether library");var e=this.getAttachTo(),n=k[e.on]||k.right;i(e.element)&&(e.element="viewport",n="middle center");var r={classPrefix:"shepherd",element:this.el,constraints:[{to:"window",pin:!0,attachment:"together"}],target:e.element,offset:e.offset||"0 0",attachment:n};this.tether&&this.tether.destroy(),this.tether=new t(m(r,this.options.tetherOptions))}},{key:"show",value:function(){var t=this;if(!i(this.options.beforeShowPromise)){var e=this.options.beforeShowPromise();if(!i(e))return e.then(function(){return t._show()})}this._show()}},{key:"_show",value:function(){var t=this;this.trigger("before-show"),this.el||this.render(),v(this.el,"shepherd-open"),document.body.setAttribute("data-shepherd-step",this.id),this.setupTether(),this.options.scrollTo&&setTimeout(function(){t.scrollTo()}),this.trigger("show")}},{key:"hide",value:function(){this.trigger("before-hide"),g(this.el,"shepherd-open"),document.body.removeAttribute("data-shepherd-step"),this.tether&&this.tether.destroy(),this.tether=null,this.trigger("hide")}},{key:"isOpen",value:function(){return this.el&&y(this.el,"shepherd-open")}},{key:"cancel",value:function(){this.tour.cancel(),this.trigger("cancel")}},{key:"complete",value:function(){this.tour.complete(),this.trigger("complete")}},{key:"scrollTo",value:function(){var t=this.getAttachTo(),e=t.element;i(this.options.scrollToHandler)?i(e)||e.scrollIntoView():this.options.scrollToHandler(e)}},{key:"destroy",value:function(){!i(this.el)&&this.el.parentNode&&(this.el.parentNode.removeChild(this.el),delete this.el),this.tether&&this.tether.destroy(),this.tether=null,this.trigger("destroy")}},{key:"render",value:function(){var t=this;i(this.el)||this.destroy(),this.el=h("<div class='shepherd-step "+(this.options.classes||"")+"' data-id='"+this.id+"' "+(this.options.idAttribute?'id="'+this.options.idAttribute+'"':"")+"></div>");var e=document.createElement("div");e.className="shepherd-content",this.el.appendChild(e);var n=document.createElement("header");if(e.appendChild(n),this.options.title&&(n.innerHTML+="<h3 class='shepherd-title'>"+this.options.title+"</h3>",this.el.className+=" shepherd-has-title"),this.options.showCancelLink){var r=h("<a href class='shepherd-cancel-link'>✕</a>");n.appendChild(r),this.el.className+=" shepherd-has-cancel-link",this.bindCancelLink(r)}i(this.options.text)||!function(){var n=h("<div class='shepherd-text'></div>"),i=t.options.text;"function"==typeof i&&(i=i.call(t,n)),i instanceof HTMLElement?n.appendChild(i):("string"==typeof i&&(i=[i]),i.map(function(t){n.innerHTML+="<p>"+t+"</p>"})),e.appendChild(n)}(),this.options.buttons&&!function(){var n=document.createElement("footer"),i=h("<ul class='shepherd-buttons'></ul>");t.options.buttons.map(function(e){var n=h("<li><a class='shepherd-button "+(e.classes||"")+"'>"+e.text+"</a>");i.appendChild(n),t.bindButtonEvents(e,n.querySelector("a"))}),n.appendChild(i),e.appendChild(n)}(),document.body.appendChild(this.el),this.setupTether(),this.options.advanceOn&&this.bindAdvance()}},{key:"bindCancelLink",value:function(t){var e=this;t.addEventListener("click",function(t){t.preventDefault(),e.cancel()})}},{key:"bindButtonEvents",value:function(t,e){var n=this;t.events=t.events||{},i(t.action)||(t.events.click=t.action);for(var r in t.events)if({}.hasOwnProperty.call(t.events,r)){var o=t.events[r];"string"==typeof o&&!function(){var t=o;o=function(){return n.tour.show(t)}}(),e.addEventListener(r,o)}this.on("destroy",function(){for(var n in t.events)if({}.hasOwnProperty.call(t.events,n)){var i=t.events[n];e.removeEventListener(n,i)}})}}]),p}(f),T=function(t){function r(){var t=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];e(this,r),d(Object.getPrototypeOf(r.prototype),"constructor",this).call(this,n),this.bindMethods(),this.options=n,this.steps=this.options.steps||[];var i=["complete","cancel","hide","start","show","active","inactive"];return i.map(function(e){!function(e){t.on(e,function(n){n=n||{},n.tour=t,w.trigger(e,n)})}(e)}),this}return n(r,t),u(r,[{key:"bindMethods",value:function(){var t=this,e=["next","back","cancel","complete","hide"];e.map(function(e){t[e]=t[e].bind(t)})}},{key:"addStep",value:function(t,e){return i(e)&&(e=t),e instanceof O?e.tour=this:("string"!=typeof t&&"number"!=typeof t||(e.id=t.toString()),e=m({},this.options.defaults,e),e=new O(this,e)),this.steps.push(e),this}},{key:"removeStep",value:function(t){for(var e=this.getCurrentStep(),n=0;n<this.steps.length;++n){var i=this.steps[n];if(i.id===t){i.isOpen()&&i.hide(),i.destroy(),this.steps.splice(n,1);break}}e&&e.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.hide())}},{key:"getById",value:function(t){for(var e=0;e<this.steps.length;++e){var n=this.steps[e];if(n.id===t)return n}}},{key:"getCurrentStep",value:function(){return this.currentStep}},{key:"next",value:function(){var t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?(this.hide(t),this.trigger("complete"),this.done()):this.show(t+1,!0)}},{key:"back",value:function(){var t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}},{key:"cancel",value:function(){this.currentStep&&this.currentStep.hide(),this.trigger("cancel"),this.done()}},{key:"complete",value:function(){this.currentStep&&this.currentStep.hide(),this.trigger("complete"),this.done()}},{key:"hide",value:function(){this.currentStep&&this.currentStep.hide(),this.trigger("hide"),this.done()}},{key:"done",value:function(){w.activeTour=null,g(document.body,"shepherd-active"),this.trigger("inactive",{tour:this})}},{key:"show",value:function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],e=arguments.length<=1||void 0===arguments[1]||arguments[1];this.currentStep?this.currentStep.hide():(v(document.body,"shepherd-active"),this.trigger("active",{tour:this})),w.activeTour=this;var n=void 0;if(n="string"==typeof t?this.getById(t):this.steps[t])if(i(n.options.showOn)||n.options.showOn())this.trigger("show",{step:n,previous:this.currentStep}),this.currentStep&&this.currentStep.hide(),this.currentStep=n,n.show();else{var r=this.steps.indexOf(n),o=e?r+1:r-1;this.show(o,e)}}},{key:"start",value:function(){this.trigger("start"),this.currentStep=null,this.next()}}]),r}(f);return m(w,{Tour:T,Step:O,Evented:f}),w});
admin/lib/shepherd/tether-shepherd/tether.js ADDED
@@ -0,0 +1,1443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! tether 0.6.5 */
2
+
3
+
4
+ (function(root, factory) {
5
+ if (typeof define === 'function' && define.amd) {
6
+ define(factory);
7
+ } else if (typeof exports === 'object') {
8
+ module.exports = factory(require,exports,module);
9
+ } else {
10
+ root.Tether = factory();
11
+ }
12
+ }(this, function(require,exports,module) {
13
+
14
+ (function() {
15
+ var Evented, addClass, defer, deferred, extend, flush, getBounds, getOffsetParent, getOrigin, getScrollBarSize, getScrollParent, hasClass, node, removeClass, uniqueId, updateClasses, zeroPosCache,
16
+ __hasProp = {}.hasOwnProperty,
17
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
18
+ __slice = [].slice;
19
+
20
+ if (this.Tether == null) {
21
+ this.Tether = {
22
+ modules: []
23
+ };
24
+ }
25
+
26
+ getScrollParent = function(el) {
27
+ var parent, position, scrollParent, style, _ref;
28
+ position = getComputedStyle(el).position;
29
+ if (position === 'fixed') {
30
+ return el;
31
+ }
32
+ scrollParent = void 0;
33
+ parent = el;
34
+ while (parent = parent.parentNode) {
35
+ try {
36
+ style = getComputedStyle(parent);
37
+ } catch (_error) {}
38
+ if (style == null) {
39
+ return parent;
40
+ }
41
+ if (/(auto|scroll)/.test(style['overflow'] + style['overflow-y'] + style['overflow-x'])) {
42
+ if (position !== 'absolute' || ((_ref = style['position']) === 'relative' || _ref === 'absolute' || _ref === 'fixed')) {
43
+ return parent;
44
+ }
45
+ }
46
+ }
47
+ return document.body;
48
+ };
49
+
50
+ uniqueId = (function() {
51
+ var id;
52
+ id = 0;
53
+ return function() {
54
+ return id++;
55
+ };
56
+ })();
57
+
58
+ zeroPosCache = {};
59
+
60
+ getOrigin = function(doc) {
61
+ var id, k, node, v, _ref;
62
+ node = doc._tetherZeroElement;
63
+ if (node == null) {
64
+ node = doc.createElement('div');
65
+ node.setAttribute('data-tether-id', uniqueId());
66
+ extend(node.style, {
67
+ top: 0,
68
+ left: 0,
69
+ position: 'absolute'
70
+ });
71
+ doc.body.appendChild(node);
72
+ doc._tetherZeroElement = node;
73
+ }
74
+ id = node.getAttribute('data-tether-id');
75
+ if (zeroPosCache[id] == null) {
76
+ zeroPosCache[id] = {};
77
+ _ref = node.getBoundingClientRect();
78
+ for (k in _ref) {
79
+ v = _ref[k];
80
+ zeroPosCache[id][k] = v;
81
+ }
82
+ defer(function() {
83
+ return zeroPosCache[id] = void 0;
84
+ });
85
+ }
86
+ return zeroPosCache[id];
87
+ };
88
+
89
+ node = null;
90
+
91
+ getBounds = function(el) {
92
+ var box, doc, docEl, k, origin, v, _ref;
93
+ if (el === document) {
94
+ doc = document;
95
+ el = document.documentElement;
96
+ } else {
97
+ doc = el.ownerDocument;
98
+ }
99
+ docEl = doc.documentElement;
100
+ box = {};
101
+ _ref = el.getBoundingClientRect();
102
+ for (k in _ref) {
103
+ v = _ref[k];
104
+ box[k] = v;
105
+ }
106
+ origin = getOrigin(doc);
107
+ box.top -= origin.top;
108
+ box.left -= origin.left;
109
+ if (box.width == null) {
110
+ box.width = document.body.scrollWidth - box.left - box.right;
111
+ }
112
+ if (box.height == null) {
113
+ box.height = document.body.scrollHeight - box.top - box.bottom;
114
+ }
115
+ box.top = box.top - docEl.clientTop;
116
+ box.left = box.left - docEl.clientLeft;
117
+ box.right = doc.body.clientWidth - box.width - box.left;
118
+ box.bottom = doc.body.clientHeight - box.height - box.top;
119
+ return box;
120
+ };
121
+
122
+ getOffsetParent = function(el) {
123
+ return el.offsetParent || document.documentElement;
124
+ };
125
+
126
+ getScrollBarSize = function() {
127
+ var inner, outer, width, widthContained, widthScroll;
128
+ inner = document.createElement('div');
129
+ inner.style.width = '100%';
130
+ inner.style.height = '200px';
131
+ outer = document.createElement('div');
132
+ extend(outer.style, {
133
+ position: 'absolute',
134
+ top: 0,
135
+ left: 0,
136
+ pointerEvents: 'none',
137
+ visibility: 'hidden',
138
+ width: '200px',
139
+ height: '150px',
140
+ overflow: 'hidden'
141
+ });
142
+ outer.appendChild(inner);
143
+ document.body.appendChild(outer);
144
+ widthContained = inner.offsetWidth;
145
+ outer.style.overflow = 'scroll';
146
+ widthScroll = inner.offsetWidth;
147
+ if (widthContained === widthScroll) {
148
+ widthScroll = outer.clientWidth;
149
+ }
150
+ document.body.removeChild(outer);
151
+ width = widthContained - widthScroll;
152
+ return {
153
+ width: width,
154
+ height: width
155
+ };
156
+ };
157
+
158
+ extend = function(out) {
159
+ var args, key, obj, val, _i, _len, _ref;
160
+ if (out == null) {
161
+ out = {};
162
+ }
163
+ args = [];
164
+ Array.prototype.push.apply(args, arguments);
165
+ _ref = args.slice(1);
166
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
167
+ obj = _ref[_i];
168
+ if (obj) {
169
+ for (key in obj) {
170
+ if (!__hasProp.call(obj, key)) continue;
171
+ val = obj[key];
172
+ out[key] = val;
173
+ }
174
+ }
175
+ }
176
+ return out;
177
+ };
178
+
179
+ removeClass = function(el, name) {
180
+ var cls, _i, _len, _ref, _results;
181
+ if (el.classList != null) {
182
+ _ref = name.split(' ');
183
+ _results = [];
184
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
185
+ cls = _ref[_i];
186
+ if (cls.trim()) {
187
+ _results.push(el.classList.remove(cls));
188
+ }
189
+ }
190
+ return _results;
191
+ } else {
192
+ return el.className = el.className.replace(new RegExp("(^| )" + (name.split(' ').join('|')) + "( |$)", 'gi'), ' ');
193
+ }
194
+ };
195
+
196
+ addClass = function(el, name) {
197
+ var cls, _i, _len, _ref, _results;
198
+ if (el.classList != null) {
199
+ _ref = name.split(' ');
200
+ _results = [];
201
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
202
+ cls = _ref[_i];
203
+ if (cls.trim()) {
204
+ _results.push(el.classList.add(cls));
205
+ }
206
+ }
207
+ return _results;
208
+ } else {
209
+ removeClass(el, name);
210
+ return el.className += " " + name;
211
+ }
212
+ };
213
+
214
+ hasClass = function(el, name) {
215
+ if (el.classList != null) {
216
+ return el.classList.contains(name);
217
+ } else {
218
+ return new RegExp("(^| )" + name + "( |$)", 'gi').test(el.className);
219
+ }
220
+ };
221
+
222
+ updateClasses = function(el, add, all) {
223
+ var cls, _i, _j, _len, _len1, _results;
224
+ for (_i = 0, _len = all.length; _i < _len; _i++) {
225
+ cls = all[_i];
226
+ if (__indexOf.call(add, cls) < 0) {
227
+ if (hasClass(el, cls)) {
228
+ removeClass(el, cls);
229
+ }
230
+ }
231
+ }
232
+ _results = [];
233
+ for (_j = 0, _len1 = add.length; _j < _len1; _j++) {
234
+ cls = add[_j];
235
+ if (!hasClass(el, cls)) {
236
+ _results.push(addClass(el, cls));
237
+ } else {
238
+ _results.push(void 0);
239
+ }
240
+ }
241
+ return _results;
242
+ };
243
+
244
+ deferred = [];
245
+
246
+ defer = function(fn) {
247
+ return deferred.push(fn);
248
+ };
249
+
250
+ flush = function() {
251
+ var fn, _results;
252
+ _results = [];
253
+ while (fn = deferred.pop()) {
254
+ _results.push(fn());
255
+ }
256
+ return _results;
257
+ };
258
+
259
+ Evented = (function() {
260
+ function Evented() {}
261
+
262
+ Evented.prototype.on = function(event, handler, ctx, once) {
263
+ var _base;
264
+ if (once == null) {
265
+ once = false;
266
+ }
267
+ if (this.bindings == null) {
268
+ this.bindings = {};
269
+ }
270
+ if ((_base = this.bindings)[event] == null) {
271
+ _base[event] = [];
272
+ }
273
+ return this.bindings[event].push({
274
+ handler: handler,
275
+ ctx: ctx,
276
+ once: once
277
+ });
278
+ };
279
+
280
+ Evented.prototype.once = function(event, handler, ctx) {
281
+ return this.on(event, handler, ctx, true);
282
+ };
283
+
284
+ Evented.prototype.off = function(event, handler) {
285
+ var i, _ref, _results;
286
+ if (((_ref = this.bindings) != null ? _ref[event] : void 0) == null) {
287
+ return;
288
+ }
289
+ if (handler == null) {
290
+ return delete this.bindings[event];
291
+ } else {
292
+ i = 0;
293
+ _results = [];
294
+ while (i < this.bindings[event].length) {
295
+ if (this.bindings[event][i].handler === handler) {
296
+ _results.push(this.bindings[event].splice(i, 1));
297
+ } else {
298
+ _results.push(i++);
299
+ }
300
+ }
301
+ return _results;
302
+ }
303
+ };
304
+
305
+ Evented.prototype.trigger = function() {
306
+ var args, ctx, event, handler, i, once, _ref, _ref1, _results;
307
+ event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : [];
308
+ if ((_ref = this.bindings) != null ? _ref[event] : void 0) {
309
+ i = 0;
310
+ _results = [];
311
+ while (i < this.bindings[event].length) {
312
+ _ref1 = this.bindings[event][i], handler = _ref1.handler, ctx = _ref1.ctx, once = _ref1.once;
313
+ handler.apply(ctx != null ? ctx : this, args);
314
+ if (once) {
315
+ _results.push(this.bindings[event].splice(i, 1));
316
+ } else {
317
+ _results.push(i++);
318
+ }
319
+ }
320
+ return _results;
321
+ }
322
+ };
323
+
324
+ return Evented;
325
+
326
+ })();
327
+
328
+ this.Tether.Utils = {
329
+ getScrollParent: getScrollParent,
330
+ getBounds: getBounds,
331
+ getOffsetParent: getOffsetParent,
332
+ extend: extend,
333
+ addClass: addClass,
334
+ removeClass: removeClass,
335
+ hasClass: hasClass,
336
+ updateClasses: updateClasses,
337
+ defer: defer,
338
+ flush: flush,
339
+ uniqueId: uniqueId,
340
+ Evented: Evented,
341
+ getScrollBarSize: getScrollBarSize
342
+ };
343
+
344
+ }).call(this);
345
+
346
+ (function() {
347
+ var MIRROR_LR, MIRROR_TB, OFFSET_MAP, Tether, addClass, addOffset, attachmentToOffset, autoToFixedAttachment, defer, extend, flush, getBounds, getOffsetParent, getOuterSize, getScrollBarSize, getScrollParent, getSize, now, offsetToPx, parseAttachment, parseOffset, position, removeClass, tethers, transformKey, updateClasses, within, _Tether, _ref,
348
+ __slice = [].slice,
349
+ __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
350
+
351
+ if (this.Tether == null) {
352
+ throw new Error("You must include the utils.js file before tether.js");
353
+ }
354
+
355
+ Tether = this.Tether;
356
+
357
+ _ref = Tether.Utils, getScrollParent = _ref.getScrollParent, getSize = _ref.getSize, getOuterSize = _ref.getOuterSize, getBounds = _ref.getBounds, getOffsetParent = _ref.getOffsetParent, extend = _ref.extend, addClass = _ref.addClass, removeClass = _ref.removeClass, updateClasses = _ref.updateClasses, defer = _ref.defer, flush = _ref.flush, getScrollBarSize = _ref.getScrollBarSize;
358
+
359
+ within = function(a, b, diff) {
360
+ if (diff == null) {
361
+ diff = 1;
362
+ }
363
+ return (a + diff >= b && b >= a - diff);
364
+ };
365
+
366
+ transformKey = (function() {
367
+ var el, key, _i, _len, _ref1;
368
+ el = document.createElement('div');
369
+ _ref1 = ['transform', 'webkitTransform', 'OTransform', 'MozTransform', 'msTransform'];
370
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
371
+ key = _ref1[_i];
372
+ if (el.style[key] !== void 0) {
373
+ return key;
374
+ }
375
+ }
376
+ })();
377
+
378
+ tethers = [];
379
+
380
+ position = function() {
381
+ var tether, _i, _len;
382
+ for (_i = 0, _len = tethers.length; _i < _len; _i++) {
383
+ tether = tethers[_i];
384
+ tether.position(false);
385
+ }
386
+ return flush();
387
+ };
388
+
389
+ now = function() {
390
+ var _ref1;
391
+ return (_ref1 = typeof performance !== "undefined" && performance !== null ? typeof performance.now === "function" ? performance.now() : void 0 : void 0) != null ? _ref1 : +(new Date);
392
+ };
393
+
394
+ (function() {
395
+ var event, lastCall, lastDuration, pendingTimeout, tick, _i, _len, _ref1, _results;
396
+ lastCall = null;
397
+ lastDuration = null;
398
+ pendingTimeout = null;
399
+ tick = function() {
400
+ if ((lastDuration != null) && lastDuration > 16) {
401
+ lastDuration = Math.min(lastDuration - 16, 250);
402
+ pendingTimeout = setTimeout(tick, 250);
403
+ return;
404
+ }
405
+ if ((lastCall != null) && (now() - lastCall) < 10) {
406
+ return;
407
+ }
408
+ if (pendingTimeout != null) {
409
+ clearTimeout(pendingTimeout);
410
+ pendingTimeout = null;
411
+ }
412
+ lastCall = now();
413
+ position();
414
+ return lastDuration = now() - lastCall;
415
+ };
416
+ _ref1 = ['resize', 'scroll', 'touchmove'];
417
+ _results = [];
418
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
419
+ event = _ref1[_i];
420
+ _results.push(window.addEventListener(event, tick));
421
+ }
422
+ return _results;
423
+ })();
424
+
425
+ MIRROR_LR = {
426
+ center: 'center',
427
+ left: 'right',
428
+ right: 'left'
429
+ };
430
+
431
+ MIRROR_TB = {
432
+ middle: 'middle',
433
+ top: 'bottom',
434
+ bottom: 'top'
435
+ };
436
+
437
+ OFFSET_MAP = {
438
+ top: 0,
439
+ left: 0,
440
+ middle: '50%',
441
+ center: '50%',
442
+ bottom: '100%',
443
+ right: '100%'
444
+ };
445
+
446
+ autoToFixedAttachment = function(attachment, relativeToAttachment) {
447
+ var left, top;
448
+ left = attachment.left, top = attachment.top;
449
+ if (left === 'auto') {
450
+ left = MIRROR_LR[relativeToAttachment.left];
451
+ }
452
+ if (top === 'auto') {
453
+ top = MIRROR_TB[relativeToAttachment.top];
454
+ }
455
+ return {
456
+ left: left,
457
+ top: top
458
+ };
459
+ };
460
+
461
+ attachmentToOffset = function(attachment) {
462
+ var _ref1, _ref2;
463
+ return {
464
+ left: (_ref1 = OFFSET_MAP[attachment.left]) != null ? _ref1 : attachment.left,
465
+ top: (_ref2 = OFFSET_MAP[attachment.top]) != null ? _ref2 : attachment.top
466
+ };
467
+ };
468
+
469
+ addOffset = function() {
470
+ var left, offsets, out, top, _i, _len, _ref1;
471
+ offsets = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
472
+ out = {
473
+ top: 0,
474
+ left: 0
475
+ };
476
+ for (_i = 0, _len = offsets.length; _i < _len; _i++) {
477
+ _ref1 = offsets[_i], top = _ref1.top, left = _ref1.left;
478
+ if (typeof top === 'string') {
479
+ top = parseFloat(top, 10);
480
+ }
481
+ if (typeof left === 'string') {
482
+ left = parseFloat(left, 10);
483
+ }
484
+ out.top += top;
485
+ out.left += left;
486
+ }
487
+ return out;
488
+ };
489
+
490
+ offsetToPx = function(offset, size) {
491
+ if (typeof offset.left === 'string' && offset.left.indexOf('%') !== -1) {
492
+ offset.left = parseFloat(offset.left, 10) / 100 * size.width;
493
+ }
494
+ if (typeof offset.top === 'string' && offset.top.indexOf('%') !== -1) {
495
+ offset.top = parseFloat(offset.top, 10) / 100 * size.height;
496
+ }
497
+ return offset;
498
+ };
499
+
500
+ parseAttachment = parseOffset = function(value) {
501
+ var left, top, _ref1;
502
+ _ref1 = value.split(' '), top = _ref1[0], left = _ref1[1];
503
+ return {
504
+ top: top,
505
+ left: left
506
+ };
507
+ };
508
+
509
+ _Tether = (function() {
510
+ _Tether.modules = [];
511
+
512
+ function _Tether(options) {
513
+ this.position = __bind(this.position, this);
514
+ var module, _i, _len, _ref1, _ref2;
515
+ tethers.push(this);
516
+ this.history = [];
517
+ this.setOptions(options, false);
518
+ _ref1 = Tether.modules;
519
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
520
+ module = _ref1[_i];
521
+ if ((_ref2 = module.initialize) != null) {
522
+ _ref2.call(this);
523
+ }
524
+ }
525
+ this.position();
526
+ }
527
+
528
+ _Tether.prototype.getClass = function(key) {
529
+ var _ref1, _ref2;
530
+ if ((_ref1 = this.options.classes) != null ? _ref1[key] : void 0) {
531
+ return this.options.classes[key];
532
+ } else if (((_ref2 = this.options.classes) != null ? _ref2[key] : void 0) !== false) {
533
+ if (this.options.classPrefix) {
534
+ return "" + this.options.classPrefix + "-" + key;
535
+ } else {
536
+ return key;
537
+ }
538
+ } else {
539
+ return '';
540
+ }
541
+ };
542
+
543
+ _Tether.prototype.setOptions = function(options, position) {
544
+ var defaults, key, _i, _len, _ref1, _ref2;
545
+ this.options = options;
546
+ if (position == null) {
547
+ position = true;
548
+ }
549
+ defaults = {
550
+ offset: '0 0',
551
+ targetOffset: '0 0',
552
+ targetAttachment: 'auto auto',
553
+ classPrefix: 'tether'
554
+ };
555
+ this.options = extend(defaults, this.options);
556
+ _ref1 = this.options, this.element = _ref1.element, this.target = _ref1.target, this.targetModifier = _ref1.targetModifier;
557
+ if (this.target === 'viewport') {
558
+ this.target = document.body;
559
+ this.targetModifier = 'visible';
560
+ } else if (this.target === 'scroll-handle') {
561
+ this.target = document.body;
562
+ this.targetModifier = 'scroll-handle';
563
+ }
564
+ _ref2 = ['element', 'target'];
565
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
566
+ key = _ref2[_i];
567
+ if (this[key] == null) {
568
+ throw new Error("Tether Error: Both element and target must be defined");
569
+ }
570
+ if (this[key].jquery != null) {
571
+ this[key] = this[key][0];
572
+ } else if (typeof this[key] === 'string') {
573
+ this[key] = document.querySelector(this[key]);
574
+ }
575
+ }
576
+ addClass(this.element, this.getClass('element'));
577
+ addClass(this.target, this.getClass('target'));
578
+ if (!this.options.attachment) {
579
+ throw new Error("Tether Error: You must provide an attachment");
580
+ }
581
+ this.targetAttachment = parseAttachment(this.options.targetAttachment);
582
+ this.attachment = parseAttachment(this.options.attachment);
583
+ this.offset = parseOffset(this.options.offset);
584
+ this.targetOffset = parseOffset(this.options.targetOffset);
585
+ if (this.scrollParent != null) {
586
+ this.disable();
587
+ }
588
+ if (this.targetModifier === 'scroll-handle') {
589
+ this.scrollParent = this.target;
590
+ } else {
591
+ this.scrollParent = getScrollParent(this.target);
592
+ }
593
+ if (this.options.enabled !== false) {
594
+ return this.enable(position);
595
+ }
596
+ };
597
+
598
+ _Tether.prototype.getTargetBounds = function() {
599
+ var bounds, fitAdj, hasBottomScroll, height, out, scrollBottom, scrollPercentage, style, target;
600
+ if (this.targetModifier != null) {
601
+ switch (this.targetModifier) {
602
+ case 'visible':
603
+ if (this.target === document.body) {
604
+ return {
605
+ top: pageYOffset,
606
+ left: pageXOffset,
607
+ height: innerHeight,
608
+ width: innerWidth
609
+ };
610
+ } else {
611
+ bounds = getBounds(this.target);
612
+ out = {
613
+ height: bounds.height,
614
+ width: bounds.width,
615
+ top: bounds.top,
616
+ left: bounds.left
617
+ };
618
+ out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));
619
+ out.height = Math.min(out.height, bounds.height - ((bounds.top + bounds.height) - (pageYOffset + innerHeight)));
620
+ out.height = Math.min(innerHeight, out.height);
621
+ out.height -= 2;
622
+ out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));
623
+ out.width = Math.min(out.width, bounds.width - ((bounds.left + bounds.width) - (pageXOffset + innerWidth)));
624
+ out.width = Math.min(innerWidth, out.width);
625
+ out.width -= 2;
626
+ if (out.top < pageYOffset) {
627
+ out.top = pageYOffset;
628
+ }
629
+ if (out.left < pageXOffset) {
630
+ out.left = pageXOffset;
631
+ }
632
+ return out;
633
+ }
634
+ break;
635
+ case 'scroll-handle':
636
+ target = this.target;
637
+ if (target === document.body) {
638
+ target = document.documentElement;
639
+ bounds = {
640
+ left: pageXOffset,
641
+ top: pageYOffset,
642
+ height: innerHeight,
643
+ width: innerWidth
644
+ };
645
+ } else {
646
+ bounds = getBounds(target);
647
+ }
648
+ style = getComputedStyle(target);
649
+ hasBottomScroll = target.scrollWidth > target.clientWidth || 'scroll' === [style.overflow, style.overflowX] || this.target !== document.body;
650
+ scrollBottom = 0;
651
+ if (hasBottomScroll) {
652
+ scrollBottom = 15;
653
+ }
654
+ height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;
655
+ out = {
656
+ width: 15,
657
+ height: height * 0.975 * (height / target.scrollHeight),
658
+ left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15
659
+ };
660
+ fitAdj = 0;
661
+ if (height < 408 && this.target === document.body) {
662
+ fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;
663
+ }
664
+ if (this.target !== document.body) {
665
+ out.height = Math.max(out.height, 24);
666
+ }
667
+ scrollPercentage = this.target.scrollTop / (target.scrollHeight - height);
668
+ out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);
669
+ if (this.target === document.body) {
670
+ out.height = Math.max(out.height, 24);
671
+ }
672
+ return out;
673
+ }
674
+ } else {
675
+ return getBounds(this.target);
676
+ }
677
+ };
678
+
679
+ _Tether.prototype.clearCache = function() {
680
+ return this._cache = {};
681
+ };
682
+
683
+ _Tether.prototype.cache = function(k, getter) {
684
+ if (this._cache == null) {
685
+ this._cache = {};
686
+ }
687
+ if (this._cache[k] == null) {
688
+ this._cache[k] = getter.call(this);
689
+ }
690
+ return this._cache[k];
691
+ };
692
+
693
+ _Tether.prototype.enable = function(position) {
694
+ if (position == null) {
695
+ position = true;
696
+ }
697
+ addClass(this.target, this.getClass('enabled'));
698
+ addClass(this.element, this.getClass('enabled'));
699
+ this.enabled = true;
700
+ if (this.scrollParent !== document) {
701
+ this.scrollParent.addEventListener('scroll', this.position);
702
+ }
703
+ if (position) {
704
+ return this.position();
705
+ }
706
+ };
707
+
708
+ _Tether.prototype.disable = function() {
709
+ removeClass(this.target, this.getClass('enabled'));
710
+ removeClass(this.element, this.getClass('enabled'));
711
+ this.enabled = false;
712
+ if (this.scrollParent != null) {
713
+ return this.scrollParent.removeEventListener('scroll', this.position);
714
+ }
715
+ };
716
+
717
+ _Tether.prototype.destroy = function() {
718
+ var i, tether, _i, _len, _results;
719
+ this.disable();
720
+ _results = [];
721
+ for (i = _i = 0, _len = tethers.length; _i < _len; i = ++_i) {
722
+ tether = tethers[i];
723
+ if (tether === this) {
724
+ tethers.splice(i, 1);
725
+ break;
726
+ } else {
727
+ _results.push(void 0);
728
+ }
729
+ }
730
+ return _results;
731
+ };
732
+
733
+ _Tether.prototype.updateAttachClasses = function(elementAttach, targetAttach) {
734
+ var add, all, side, sides, _i, _j, _len, _len1, _ref1,
735
+ _this = this;
736
+ if (elementAttach == null) {
737
+ elementAttach = this.attachment;
738
+ }
739
+ if (targetAttach == null) {
740
+ targetAttach = this.targetAttachment;
741
+ }
742
+ sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];
743
+ if ((_ref1 = this._addAttachClasses) != null ? _ref1.length : void 0) {
744
+ this._addAttachClasses.splice(0, this._addAttachClasses.length);
745
+ }
746
+ add = this._addAttachClasses != null ? this._addAttachClasses : this._addAttachClasses = [];
747
+ if (elementAttach.top) {
748
+ add.push("" + (this.getClass('element-attached')) + "-" + elementAttach.top);
749
+ }
750
+ if (elementAttach.left) {
751
+ add.push("" + (this.getClass('element-attached')) + "-" + elementAttach.left);
752
+ }
753
+ if (targetAttach.top) {
754
+ add.push("" + (this.getClass('target-attached')) + "-" + targetAttach.top);
755
+ }
756
+ if (targetAttach.left) {
757
+ add.push("" + (this.getClass('target-attached')) + "-" + targetAttach.left);
758
+ }
759
+ all = [];
760
+ for (_i = 0, _len = sides.length; _i < _len; _i++) {
761
+ side = sides[_i];
762
+ all.push("" + (this.getClass('element-attached')) + "-" + side);
763
+ }
764
+ for (_j = 0, _len1 = sides.length; _j < _len1; _j++) {
765
+ side = sides[_j];
766
+ all.push("" + (this.getClass('target-attached')) + "-" + side);
767
+ }
768
+ return defer(function() {
769
+ if (_this._addAttachClasses == null) {
770
+ return;
771
+ }
772
+ updateClasses(_this.element, _this._addAttachClasses, all);
773
+ updateClasses(_this.target, _this._addAttachClasses, all);
774
+ return _this._addAttachClasses = void 0;
775
+ });
776
+ };
777
+
778
+ _Tether.prototype.position = function(flushChanges) {
779
+ var elementPos, elementStyle, height, left, manualOffset, manualTargetOffset, module, next, offset, offsetBorder, offsetParent, offsetParentSize, offsetParentStyle, offsetPosition, ret, scrollLeft, scrollTop, scrollbarSize, side, targetAttachment, targetOffset, targetPos, targetSize, top, width, _i, _j, _len, _len1, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6,
780
+ _this = this;
781
+ if (flushChanges == null) {
782
+ flushChanges = true;
783
+ }
784
+ if (!this.enabled) {
785
+ return;
786
+ }
787
+ this.clearCache();
788
+ targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);
789
+ this.updateAttachClasses(this.attachment, targetAttachment);
790
+ elementPos = this.cache('element-bounds', function() {
791
+ return getBounds(_this.element);
792
+ });
793
+ width = elementPos.width, height = elementPos.height;
794
+ if (width === 0 && height === 0 && (this.lastSize != null)) {
795
+ _ref1 = this.lastSize, width = _ref1.width, height = _ref1.height;
796
+ } else {
797
+ this.lastSize = {
798
+ width: width,
799
+ height: height
800
+ };
801
+ }
802
+ targetSize = targetPos = this.cache('target-bounds', function() {
803
+ return _this.getTargetBounds();
804
+ });
805
+ offset = offsetToPx(attachmentToOffset(this.attachment), {
806
+ width: width,
807
+ height: height
808
+ });
809
+ targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);
810
+ manualOffset = offsetToPx(this.offset, {
811
+ width: width,
812
+ height: height
813
+ });
814
+ manualTargetOffset = offsetToPx(this.targetOffset, targetSize);
815
+ offset = addOffset(offset, manualOffset);
816
+ targetOffset = addOffset(targetOffset, manualTargetOffset);
817
+ left = targetPos.left + targetOffset.left - offset.left;
818
+ top = targetPos.top + targetOffset.top - offset.top;
819
+ _ref2 = Tether.modules;
820
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
821
+ module = _ref2[_i];
822
+ ret = module.position.call(this, {
823
+ left: left,
824
+ top: top,
825
+ targetAttachment: targetAttachment,
826
+ targetPos: targetPos,
827
+ attachment: this.attachment,
828
+ elementPos: elementPos,
829
+ offset: offset,
830
+ targetOffset: targetOffset,
831
+ manualOffset: manualOffset,
832
+ manualTargetOffset: manualTargetOffset,
833
+ scrollbarSize: scrollbarSize
834
+ });
835
+ if ((ret == null) || typeof ret !== 'object') {
836
+ continue;
837
+ } else if (ret === false) {
838
+ return false;
839
+ } else {
840
+ top = ret.top, left = ret.left;
841
+ }
842
+ }
843
+ next = {
844
+ page: {
845
+ top: top,
846
+ left: left
847
+ },
848
+ viewport: {
849
+ top: top - pageYOffset,
850
+ bottom: pageYOffset - top - height + innerHeight,
851
+ left: left - pageXOffset,
852
+ right: pageXOffset - left - width + innerWidth
853
+ }
854
+ };
855
+ if (document.body.scrollWidth > window.innerWidth) {
856
+ scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
857
+ next.viewport.bottom -= scrollbarSize.height;
858
+ }
859
+ if (document.body.scrollHeight > window.innerHeight) {
860
+ scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
861
+ next.viewport.right -= scrollbarSize.width;
862
+ }
863
+ if (((_ref3 = document.body.style.position) !== '' && _ref3 !== 'static') || ((_ref4 = document.body.parentElement.style.position) !== '' && _ref4 !== 'static')) {
864
+ next.page.bottom = document.body.scrollHeight - top - height;
865
+ next.page.right = document.body.scrollWidth - left - width;
866
+ }
867
+ if (((_ref5 = this.options.optimizations) != null ? _ref5.moveElement : void 0) !== false && (this.targetModifier == null)) {
868
+ offsetParent = this.cache('target-offsetparent', function() {
869
+ return getOffsetParent(_this.target);
870
+ });
871
+ offsetPosition = this.cache('target-offsetparent-bounds', function() {
872
+ return getBounds(offsetParent);
873
+ });
874
+ offsetParentStyle = getComputedStyle(offsetParent);
875
+ elementStyle = getComputedStyle(this.element);
876
+ offsetParentSize = offsetPosition;
877
+ offsetBorder = {};
878
+ _ref6 = ['Top', 'Left', 'Bottom', 'Right'];
879
+ for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) {
880
+ side = _ref6[_j];
881
+ offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle["border" + side + "Width"]);
882
+ }
883
+ offsetPosition.right = document.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;
884
+ offsetPosition.bottom = document.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;
885
+ if (next.page.top >= (offsetPosition.top + offsetBorder.top) && next.page.bottom >= offsetPosition.bottom) {
886
+ if (next.page.left >= (offsetPosition.left + offsetBorder.left) && next.page.right >= offsetPosition.right) {
887
+ scrollTop = offsetParent.scrollTop;
888
+ scrollLeft = offsetParent.scrollLeft;
889
+ next.offset = {
890
+ top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,
891
+ left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left
892
+ };
893
+ }
894
+ }
895
+ }
896
+ this.move(next);
897
+ this.history.unshift(next);
898
+ if (this.history.length > 3) {
899
+ this.history.pop();
900
+ }
901
+ if (flushChanges) {
902
+ flush();
903
+ }
904
+ return true;
905
+ };
906
+
907
+ _Tether.prototype.move = function(position) {
908
+ var css, elVal, found, key, moved, offsetParent, point, same, transcribe, type, val, write, writeCSS, _i, _len, _ref1, _ref2,
909
+ _this = this;
910
+ if (this.element.parentNode == null) {
911
+ return;
912
+ }
913
+ same = {};
914
+ for (type in position) {
915
+ same[type] = {};
916
+ for (key in position[type]) {
917
+ found = false;
918
+ _ref1 = this.history;
919
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
920
+ point = _ref1[_i];
921
+ if (!within((_ref2 = point[type]) != null ? _ref2[key] : void 0, position[type][key])) {
922
+ found = true;
923
+ break;
924
+ }
925
+ }
926
+ if (!found) {
927
+ same[type][key] = true;
928
+ }
929
+ }
930
+ }
931
+ css = {
932
+ top: '',
933
+ left: '',
934
+ right: '',
935
+ bottom: ''
936
+ };
937
+ transcribe = function(same, pos) {
938
+ var xPos, yPos, _ref3;
939
+ if (((_ref3 = _this.options.optimizations) != null ? _ref3.gpu : void 0) !== false) {
940
+ if (same.top) {
941
+ css.top = 0;
942
+ yPos = pos.top;
943
+ } else {
944
+ css.bottom = 0;
945
+ yPos = -pos.bottom;
946
+ }
947
+ if (same.left) {
948
+ css.left = 0;
949
+ xPos = pos.left;
950
+ } else {
951
+ css.right = 0;
952
+ xPos = -pos.right;
953
+ }
954
+ css[transformKey] = "translateX(" + (Math.round(xPos)) + "px) translateY(" + (Math.round(yPos)) + "px)";
955
+ if (transformKey !== 'msTransform') {
956
+ return css[transformKey] += " translateZ(0)";
957
+ }
958
+ } else {
959
+ if (same.top) {
960
+ css.top = "" + pos.top + "px";
961
+ } else {
962
+ css.bottom = "" + pos.bottom + "px";
963
+ }
964
+ if (same.left) {
965
+ return css.left = "" + pos.left + "px";
966
+ } else {
967
+ return css.right = "" + pos.right + "px";
968
+ }
969
+ }
970
+ };
971
+ moved = false;
972
+ if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {
973
+ css.position = 'absolute';
974
+ transcribe(same.page, position.page);
975
+ } else if ((same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {
976
+ css.position = 'fixed';
977
+ transcribe(same.viewport, position.viewport);
978
+ } else if ((same.offset != null) && same.offset.top && same.offset.left) {
979
+ css.position = 'absolute';
980
+ offsetParent = this.cache('target-offsetparent', function() {
981
+ return getOffsetParent(_this.target);
982
+ });
983
+ if (getOffsetParent(this.element) !== offsetParent) {
984
+ defer(function() {
985
+ _this.element.parentNode.removeChild(_this.element);
986
+ return offsetParent.appendChild(_this.element);
987
+ });
988
+ }
989
+ transcribe(same.offset, position.offset);
990
+ moved = true;
991
+ } else {
992
+ css.position = 'absolute';
993
+ transcribe({
994
+ top: true,
995
+ left: true
996
+ }, position.page);
997
+ }
998
+ if (!moved && this.element.parentNode.tagName !== 'BODY') {
999
+ this.element.parentNode.removeChild(this.element);
1000
+ document.body.appendChild(this.element);
1001
+ }
1002
+ writeCSS = {};
1003
+ write = false;
1004
+ for (key in css) {
1005
+ val = css[key];
1006
+ elVal = this.element.style[key];
1007
+ if (elVal !== '' && val !== '' && (key === 'top' || key === 'left' || key === 'bottom' || key === 'right')) {
1008
+ elVal = parseFloat(elVal);
1009
+ val = parseFloat(val);
1010
+ }
1011
+ if (elVal !== val) {
1012
+ write = true;
1013
+ writeCSS[key] = css[key];
1014
+ }
1015
+ }
1016
+ if (write) {
1017
+ return defer(function() {
1018
+ return extend(_this.element.style, writeCSS);
1019
+ });
1020
+ }
1021
+ };
1022
+
1023
+ return _Tether;
1024
+
1025
+ })();
1026
+
1027
+ Tether.position = position;
1028
+
1029
+ this.Tether = extend(_Tether, Tether);
1030
+
1031
+ }).call(this);
1032
+
1033
+ (function() {
1034
+ var BOUNDS_FORMAT, MIRROR_ATTACH, defer, extend, getBoundingRect, getBounds, getOuterSize, getSize, updateClasses, _ref,
1035
+ __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
1036
+
1037
+ _ref = this.Tether.Utils, getOuterSize = _ref.getOuterSize, getBounds = _ref.getBounds, getSize = _ref.getSize, extend = _ref.extend, updateClasses = _ref.updateClasses, defer = _ref.defer;
1038
+
1039
+ MIRROR_ATTACH = {
1040
+ left: 'right',
1041
+ right: 'left',
1042
+ top: 'bottom',
1043
+ bottom: 'top',
1044
+ middle: 'middle'
1045
+ };
1046
+
1047
+ BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];
1048
+
1049
+ getBoundingRect = function(tether, to) {
1050
+ var i, pos, side, size, style, _i, _len;
1051
+ if (to === 'scrollParent') {
1052
+ to = tether.scrollParent;
1053
+ } else if (to === 'window') {
1054
+ to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];
1055
+ }
1056
+ if (to === document) {
1057
+ to = to.documentElement;
1058
+ }
1059
+ if (to.nodeType != null) {
1060
+ pos = size = getBounds(to);
1061
+ style = getComputedStyle(to);
1062
+ to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];
1063
+ for (i = _i = 0, _len = BOUNDS_FORMAT.length; _i < _len; i = ++_i) {
1064
+ side = BOUNDS_FORMAT[i];
1065
+ side = side[0].toUpperCase() + side.substr(1);
1066
+ if (side === 'Top' || side === 'Left') {
1067
+ to[i] += parseFloat(style["border" + side + "Width"]);
1068
+ } else {
1069
+ to[i] -= parseFloat(style["border" + side + "Width"]);
1070
+ }
1071
+ }
1072
+ }
1073
+ return to;
1074
+ };
1075
+
1076
+ this.Tether.modules.push({
1077
+ position: function(_arg) {
1078
+ var addClasses, allClasses, attachment, bounds, changeAttachX, changeAttachY, cls, constraint, eAttachment, height, left, oob, oobClass, p, pin, pinned, pinnedClass, removeClass, side, tAttachment, targetAttachment, targetHeight, targetSize, targetWidth, to, top, width, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8,
1079
+ _this = this;
1080
+ top = _arg.top, left = _arg.left, targetAttachment = _arg.targetAttachment;
1081
+ if (!this.options.constraints) {
1082
+ return true;
1083
+ }
1084
+ removeClass = function(prefix) {
1085
+ var side, _i, _len, _results;
1086
+ _this.removeClass(prefix);
1087
+ _results = [];
1088
+ for (_i = 0, _len = BOUNDS_FORMAT.length; _i < _len; _i++) {
1089
+ side = BOUNDS_FORMAT[_i];
1090
+ _results.push(_this.removeClass("" + prefix + "-" + side));
1091
+ }
1092
+ return _results;
1093
+ };
1094
+ _ref1 = this.cache('element-bounds', function() {
1095
+ return getBounds(_this.element);
1096
+ }), height = _ref1.height, width = _ref1.width;
1097
+ if (width === 0 && height === 0 && (this.lastSize != null)) {
1098
+ _ref2 = this.lastSize, width = _ref2.width, height = _ref2.height;
1099
+ }
1100
+ targetSize = this.cache('target-bounds', function() {
1101
+ return _this.getTargetBounds();
1102
+ });
1103
+ targetHeight = targetSize.height;
1104
+ targetWidth = targetSize.width;
1105
+ tAttachment = {};
1106
+ eAttachment = {};
1107
+ allClasses = [this.getClass('pinned'), this.getClass('out-of-bounds')];
1108
+ _ref3 = this.options.constraints;
1109
+ for (_i = 0, _len = _ref3.length; _i < _len; _i++) {
1110
+ constraint = _ref3[_i];
1111
+ if (constraint.outOfBoundsClass) {
1112
+ allClasses.push(constraint.outOfBoundsClass);
1113
+ }
1114
+ if (constraint.pinnedClass) {
1115
+ allClasses.push(constraint.pinnedClass);
1116
+ }
1117
+ }
1118
+ for (_j = 0, _len1 = allClasses.length; _j < _len1; _j++) {
1119
+ cls = allClasses[_j];
1120
+ _ref4 = ['left', 'top', 'right', 'bottom'];
1121
+ for (_k = 0, _len2 = _ref4.length; _k < _len2; _k++) {
1122
+ side = _ref4[_k];
1123
+ allClasses.push("" + cls + "-" + side);
1124
+ }
1125
+ }
1126
+ addClasses = [];
1127
+ tAttachment = extend({}, targetAttachment);
1128
+ eAttachment = extend({}, this.attachment);
1129
+ _ref5 = this.options.constraints;
1130
+ for (_l = 0, _len3 = _ref5.length; _l < _len3; _l++) {
1131
+ constraint = _ref5[_l];
1132
+ to = constraint.to, attachment = constraint.attachment, pin = constraint.pin;
1133
+ if (attachment == null) {
1134
+ attachment = '';
1135
+ }
1136
+ if (__indexOf.call(attachment, ' ') >= 0) {
1137
+ _ref6 = attachment.split(' '), changeAttachY = _ref6[0], changeAttachX = _ref6[1];
1138
+ } else {
1139
+ changeAttachX = changeAttachY = attachment;
1140
+ }
1141
+ bounds = getBoundingRect(this, to);
1142
+ if (changeAttachY === 'target' || changeAttachY === 'both') {
1143
+ if (top < bounds[1] && tAttachment.top === 'top') {
1144
+ top += targetHeight;
1145
+ tAttachment.top = 'bottom';
1146
+ }
1147
+ if (top + height > bounds[3] && tAttachment.top === 'bottom') {
1148
+ top -= targetHeight;
1149
+ tAttachment.top = 'top';
1150
+ }
1151
+ }
1152
+ if (changeAttachY === 'together') {
1153
+ if (top < bounds[1] && tAttachment.top === 'top') {
1154
+ if (eAttachment.top === 'bottom') {
1155
+ top += targetHeight;
1156
+ tAttachment.top = 'bottom';
1157
+ top += height;
1158
+ eAttachment.top = 'top';
1159
+ } else if (eAttachment.top === 'top') {
1160
+ top += targetHeight;
1161
+ tAttachment.top = 'bottom';
1162
+ top -= height;
1163
+ eAttachment.top = 'bottom';
1164
+ }
1165
+ }
1166
+ if (top + height > bounds[3] && tAttachment.top === 'bottom') {
1167
+ if (eAttachment.top === 'top') {
1168
+ top -= targetHeight;
1169
+ tAttachment.top = 'top';
1170
+ top -= height;
1171
+ eAttachment.top = 'bottom';
1172
+ } else if (eAttachment.top === 'bottom') {
1173
+ top -= targetHeight;
1174
+ tAttachment.top = 'top';
1175
+ top += height;
1176
+ eAttachment.top = 'top';
1177
+ }
1178
+ }
1179
+ if (tAttachment.top === 'middle') {
1180
+ if (top + height > bounds[3] && eAttachment.top === 'top') {
1181
+ top -= height;
1182
+ eAttachment.top = 'bottom';
1183
+ } else if (top < bounds[1] && eAttachment.top === 'bottom') {
1184
+ top += height;
1185
+ eAttachment.top = 'top';
1186
+ }
1187
+ }
1188
+ }
1189
+ if (changeAttachX === 'target' || changeAttachX === 'both') {
1190
+ if (left < bounds[0] && tAttachment.left === 'left') {
1191
+ left += targetWidth;
1192
+ tAttachment.left = 'right';
1193
+ }
1194
+ if (left + width > bounds[2] && tAttachment.left === 'right') {
1195
+ left -= targetWidth;
1196
+ tAttachment.left = 'left';
1197
+ }
1198
+ }
1199
+ if (changeAttachX === 'together') {
1200
+ if (left < bounds[0] && tAttachment.left === 'left') {
1201
+ if (eAttachment.left === 'right') {
1202
+ left += targetWidth;
1203
+ tAttachment.left = 'right';
1204
+ left += width;
1205
+ eAttachment.left = 'left';
1206
+ } else if (eAttachment.left === 'left') {
1207
+ left += targetWidth;
1208
+ tAttachment.left = 'right';
1209
+ left -= width;
1210
+ eAttachment.left = 'right';
1211
+ }
1212
+ } else if (left + width > bounds[2] && tAttachment.left === 'right') {
1213
+ if (eAttachment.left === 'left') {
1214
+ left -= targetWidth;
1215
+ tAttachment.left = 'left';
1216
+ left -= width;
1217
+ eAttachment.left = 'right';
1218
+ } else if (eAttachment.left === 'right') {
1219
+ left -= targetWidth;
1220
+ tAttachment.left = 'left';
1221
+ left += width;
1222
+ eAttachment.left = 'left';
1223
+ }
1224
+ } else if (tAttachment.left === 'center') {
1225
+ if (left + width > bounds[2] && eAttachment.left === 'left') {
1226
+ left -= width;
1227
+ eAttachment.left = 'right';
1228
+ } else if (left < bounds[0] && eAttachment.left === 'right') {
1229
+ left += width;
1230
+ eAttachment.left = 'left';
1231
+ }
1232
+ }
1233
+ }
1234
+ if (changeAttachY === 'element' || changeAttachY === 'both') {
1235
+ if (top < bounds[1] && eAttachment.top === 'bottom') {
1236
+ top += height;
1237
+ eAttachment.top = 'top';
1238
+ }
1239
+ if (top + height > bounds[3] && eAttachment.top === 'top') {
1240
+ top -= height;
1241
+ eAttachment.top = 'bottom';
1242
+ }
1243
+ }
1244
+ if (changeAttachX === 'element' || changeAttachX === 'both') {
1245
+ if (left < bounds[0] && eAttachment.left === 'right') {
1246
+ left += width;
1247
+ eAttachment.left = 'left';
1248
+ }
1249
+ if (left + width > bounds[2] && eAttachment.left === 'left') {
1250
+ left -= width;
1251
+ eAttachment.left = 'right';
1252
+ }
1253
+ }
1254
+ if (typeof pin === 'string') {
1255
+ pin = (function() {
1256
+ var _len4, _m, _ref7, _results;
1257
+ _ref7 = pin.split(',');
1258
+ _results = [];
1259
+ for (_m = 0, _len4 = _ref7.length; _m < _len4; _m++) {
1260
+ p = _ref7[_m];
1261
+ _results.push(p.trim());
1262
+ }
1263
+ return _results;
1264
+ })();
1265
+ } else if (pin === true) {
1266
+ pin = ['top', 'left', 'right', 'bottom'];
1267
+ }
1268
+ pin || (pin = []);
1269
+ pinned = [];
1270
+ oob = [];
1271
+ if (top < bounds[1]) {
1272
+ if (__indexOf.call(pin, 'top') >= 0) {
1273
+ top = bounds[1];
1274
+ pinned.push('top');
1275
+ } else {
1276
+ oob.push('top');
1277
+ }
1278
+ }
1279
+ if (top + height > bounds[3]) {
1280
+ if (__indexOf.call(pin, 'bottom') >= 0) {
1281
+ top = bounds[3] - height;
1282
+ pinned.push('bottom');
1283
+ } else {
1284
+ oob.push('bottom');
1285
+ }
1286
+ }
1287
+ if (left < bounds[0]) {
1288
+ if (__indexOf.call(pin, 'left') >= 0) {
1289
+ left = bounds[0];
1290
+ pinned.push('left');
1291
+ } else {
1292
+ oob.push('left');
1293
+ }
1294
+ }
1295
+ if (left + width > bounds[2]) {
1296
+ if (__indexOf.call(pin, 'right') >= 0) {
1297
+ left = bounds[2] - width;
1298
+ pinned.push('right');
1299
+ } else {
1300
+ oob.push('right');
1301
+ }
1302
+ }
1303
+ if (pinned.length) {
1304
+ pinnedClass = (_ref7 = this.options.pinnedClass) != null ? _ref7 : this.getClass('pinned');
1305
+ addClasses.push(pinnedClass);
1306
+ for (_m = 0, _len4 = pinned.length; _m < _len4; _m++) {
1307
+ side = pinned[_m];
1308
+ addClasses.push("" + pinnedClass + "-" + side);
1309
+ }
1310
+ }
1311
+ if (oob.length) {
1312
+ oobClass = (_ref8 = this.options.outOfBoundsClass) != null ? _ref8 : this.getClass('out-of-bounds');
1313
+ addClasses.push(oobClass);
1314
+ for (_n = 0, _len5 = oob.length; _n < _len5; _n++) {
1315
+ side = oob[_n];
1316
+ addClasses.push("" + oobClass + "-" + side);
1317
+ }
1318
+ }
1319
+ if (__indexOf.call(pinned, 'left') >= 0 || __indexOf.call(pinned, 'right') >= 0) {
1320
+ eAttachment.left = tAttachment.left = false;
1321
+ }
1322
+ if (__indexOf.call(pinned, 'top') >= 0 || __indexOf.call(pinned, 'bottom') >= 0) {
1323
+ eAttachment.top = tAttachment.top = false;
1324
+ }
1325
+ if (tAttachment.top !== targetAttachment.top || tAttachment.left !== targetAttachment.left || eAttachment.top !== this.attachment.top || eAttachment.left !== this.attachment.left) {
1326
+ this.updateAttachClasses(eAttachment, tAttachment);
1327
+ }
1328
+ }
1329
+ defer(function() {
1330
+ updateClasses(_this.target, addClasses, allClasses);
1331
+ return updateClasses(_this.element, addClasses, allClasses);
1332
+ });
1333
+ return {
1334
+ top: top,
1335
+ left: left
1336
+ };
1337
+ }
1338
+ });
1339
+
1340
+ }).call(this);
1341
+
1342
+ (function() {
1343
+ var defer, getBounds, updateClasses, _ref;
1344
+
1345
+ _ref = this.Tether.Utils, getBounds = _ref.getBounds, updateClasses = _ref.updateClasses, defer = _ref.defer;
1346
+
1347
+ this.Tether.modules.push({
1348
+ position: function(_arg) {
1349
+ var abutted, addClasses, allClasses, bottom, height, left, right, side, sides, targetPos, top, width, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref1, _ref2, _ref3, _ref4, _ref5,
1350
+ _this = this;
1351
+ top = _arg.top, left = _arg.left;
1352
+ _ref1 = this.cache('element-bounds', function() {
1353
+ return getBounds(_this.element);
1354
+ }), height = _ref1.height, width = _ref1.width;
1355
+ targetPos = this.getTargetBounds();
1356
+ bottom = top + height;
1357
+ right = left + width;
1358
+ abutted = [];
1359
+ if (top <= targetPos.bottom && bottom >= targetPos.top) {
1360
+ _ref2 = ['left', 'right'];
1361
+ for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
1362
+ side = _ref2[_i];
1363
+ if ((_ref3 = targetPos[side]) === left || _ref3 === right) {
1364
+ abutted.push(side);
1365
+ }
1366
+ }
1367
+ }
1368
+ if (left <= targetPos.right && right >= targetPos.left) {
1369
+ _ref4 = ['top', 'bottom'];
1370
+ for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) {
1371
+ side = _ref4[_j];
1372
+ if ((_ref5 = targetPos[side]) === top || _ref5 === bottom) {
1373
+ abutted.push(side);
1374
+ }
1375
+ }
1376
+ }
1377
+ allClasses = [];
1378
+ addClasses = [];
1379
+ sides = ['left', 'top', 'right', 'bottom'];
1380
+ allClasses.push(this.getClass('abutted'));
1381
+ for (_k = 0, _len2 = sides.length; _k < _len2; _k++) {
1382
+ side = sides[_k];
1383
+ allClasses.push("" + (this.getClass('abutted')) + "-" + side);
1384
+ }
1385
+ if (abutted.length) {
1386
+ addClasses.push(this.getClass('abutted'));
1387
+ }
1388
+ for (_l = 0, _len3 = abutted.length; _l < _len3; _l++) {
1389
+ side = abutted[_l];
1390
+ addClasses.push("" + (this.getClass('abutted')) + "-" + side);
1391
+ }
1392
+ defer(function() {
1393
+ updateClasses(_this.target, addClasses, allClasses);
1394
+ return updateClasses(_this.element, addClasses, allClasses);
1395
+ });
1396
+ return true;
1397
+ }
1398
+ });
1399
+
1400
+ }).call(this);
1401
+
1402
+ (function() {
1403
+ this.Tether.modules.push({
1404
+ position: function(_arg) {
1405
+ var left, result, shift, shiftLeft, shiftTop, top, _ref;
1406
+ top = _arg.top, left = _arg.left;
1407
+ if (!this.options.shift) {
1408
+ return;
1409
+ }
1410
+ result = function(val) {
1411
+ if (typeof val === 'function') {
1412
+ return val.call(this, {
1413
+ top: top,
1414
+ left: left
1415
+ });
1416
+ } else {
1417
+ return val;
1418
+ }
1419
+ };
1420
+ shift = result(this.options.shift);
1421
+ if (typeof shift === 'string') {
1422
+ shift = shift.split(' ');
1423
+ shift[1] || (shift[1] = shift[0]);
1424
+ shiftTop = shift[0], shiftLeft = shift[1];
1425
+ shiftTop = parseFloat(shiftTop, 10);
1426
+ shiftLeft = parseFloat(shiftLeft, 10);
1427
+ } else {
1428
+ _ref = [shift.top, shift.left], shiftTop = _ref[0], shiftLeft = _ref[1];
1429
+ }
1430
+ top += shiftTop;
1431
+ left += shiftLeft;
1432
+ return {
1433
+ top: top,
1434
+ left: left
1435
+ };
1436
+ }
1437
+ });
1438
+
1439
+ }).call(this);
1440
+
1441
+ return this.Tether;
1442
+
1443
+ }));
admin/lib/shepherd/tether/LICENSE ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2014-2017 HubSpot, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+
admin/lib/shepherd/tether/tether.js ADDED
@@ -0,0 +1,1820 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*! tether 1.4.7 */
2
+
3
+ (function(root, factory) {
4
+ if (typeof define === 'function' && define.amd) {
5
+ define([], factory);
6
+ } else if (typeof exports === 'object') {
7
+ module.exports = factory();
8
+ } else {
9
+ root.Tether = factory();
10
+ }
11
+ }(this, function() {
12
+
13
+ 'use strict';
14
+
15
+ var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
16
+
17
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
18
+
19
+ var TetherBase = undefined;
20
+ if (typeof TetherBase === 'undefined') {
21
+ TetherBase = { modules: [] };
22
+ }
23
+
24
+ var zeroElement = null;
25
+
26
+ // Same as native getBoundingClientRect, except it takes into account parent <frame> offsets
27
+ // if the element lies within a nested document (<frame> or <iframe>-like).
28
+ function getActualBoundingClientRect(node) {
29
+ var boundingRect = node.getBoundingClientRect();
30
+
31
+ // The original object returned by getBoundingClientRect is immutable, so we clone it
32
+ // We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9
33
+ var rect = {};
34
+ for (var k in boundingRect) {
35
+ rect[k] = boundingRect[k];
36
+ }
37
+
38
+ try {
39
+ if (node.ownerDocument !== document) {
40
+ var _frameElement = node.ownerDocument.defaultView.frameElement;
41
+ if (_frameElement) {
42
+ var frameRect = getActualBoundingClientRect(_frameElement);
43
+ rect.top += frameRect.top;
44
+ rect.bottom += frameRect.top;
45
+ rect.left += frameRect.left;
46
+ rect.right += frameRect.left;
47
+ }
48
+ }
49
+ } catch (err) {
50
+ // Ignore "Access is denied" in IE11/Edge
51
+ }
52
+
53
+ return rect;
54
+ }
55
+
56
+ function getScrollParents(el) {
57
+ // In firefox if the el is inside an iframe with display: none; window.getComputedStyle() will return null;
58
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=548397
59
+ var computedStyle = getComputedStyle(el) || {};
60
+ var position = computedStyle.position;
61
+ var parents = [];
62
+
63
+ if (position === 'fixed') {
64
+ return [el];
65
+ }
66
+
67
+ var parent = el;
68
+ while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {
69
+ var style = undefined;
70
+ try {
71
+ style = getComputedStyle(parent);
72
+ } catch (err) {}
73
+
74
+ if (typeof style === 'undefined' || style === null) {
75
+ parents.push(parent);
76
+ return parents;
77
+ }
78
+
79
+ var _style = style;
80
+ var overflow = _style.overflow;
81
+ var overflowX = _style.overflowX;
82
+ var overflowY = _style.overflowY;
83
+
84
+ if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {
85
+ if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {
86
+ parents.push(parent);
87
+ }
88
+ }
89
+ }
90
+
91
+ parents.push(el.ownerDocument.body);
92
+
93
+ // If the node is within a frame, account for the parent window scroll
94
+ if (el.ownerDocument !== document) {
95
+ parents.push(el.ownerDocument.defaultView);
96
+ }
97
+
98
+ return parents;
99
+ }
100
+
101
+ var uniqueId = (function () {
102
+ var id = 0;
103
+ return function () {
104
+ return ++id;
105
+ };
106
+ })();
107
+
108
+ var zeroPosCache = {};
109
+ var getOrigin = function getOrigin() {
110
+ // getBoundingClientRect is unfortunately too accurate. It introduces a pixel or two of
111
+ // jitter as the user scrolls that messes with our ability to detect if two positions
112
+ // are equivilant or not. We place an element at the top left of the page that will
113
+ // get the same jitter, so we can cancel the two out.
114
+ var node = zeroElement;
115
+ if (!node || !document.body.contains(node)) {
116
+ node = document.createElement('div');
117
+ node.setAttribute('data-tether-id', uniqueId());
118
+ extend(node.style, {
119
+ top: 0,
120
+ left: 0,
121
+ position: 'absolute'
122
+ });
123
+
124
+ document.body.appendChild(node);
125
+
126
+ zeroElement = node;
127
+ }
128
+
129
+ var id = node.getAttribute('data-tether-id');
130
+ if (typeof zeroPosCache[id] === 'undefined') {
131
+ zeroPosCache[id] = getActualBoundingClientRect(node);
132
+
133
+ // Clear the cache when this position call is done
134
+ defer(function () {
135
+ delete zeroPosCache[id];
136
+ });
137
+ }
138
+
139
+ return zeroPosCache[id];
140
+ };
141
+
142
+ function removeUtilElements() {
143
+ if (zeroElement) {
144
+ document.body.removeChild(zeroElement);
145
+ }
146
+ zeroElement = null;
147
+ };
148
+
149
+ function getBounds(el) {
150
+ var doc = undefined;
151
+ if (el === document) {
152
+ doc = document;
153
+ el = document.documentElement;
154
+ } else {
155
+ doc = el.ownerDocument;
156
+ }
157
+
158
+ var docEl = doc.documentElement;
159
+
160
+ var box = getActualBoundingClientRect(el);
161
+
162
+ var origin = getOrigin();
163
+
164
+ box.top -= origin.top;
165
+ box.left -= origin.left;
166
+
167
+ if (typeof box.width === 'undefined') {
168
+ box.width = document.body.scrollWidth - box.left - box.right;
169
+ }
170
+ if (typeof box.height === 'undefined') {
171
+ box.height = document.body.scrollHeight - box.top - box.bottom;
172
+ }
173
+
174
+ box.top = box.top - docEl.clientTop;
175
+ box.left = box.left - docEl.clientLeft;
176
+ box.right = doc.body.clientWidth - box.width - box.left;
177
+ box.bottom = doc.body.clientHeight - box.height - box.top;
178
+
179
+ return box;
180
+ }
181
+
182
+ function getOffsetParent(el) {
183
+ return el.offsetParent || document.documentElement;
184
+ }
185
+
186
+ var _scrollBarSize = null;
187
+ function getScrollBarSize() {
188
+ if (_scrollBarSize) {
189
+ return _scrollBarSize;
190
+ }
191
+ var inner = document.createElement('div');
192
+ inner.style.width = '100%';
193
+ inner.style.height = '200px';
194
+
195
+ var outer = document.createElement('div');
196
+ extend(outer.style, {
197
+ position: 'absolute',
198
+ top: 0,
199
+ left: 0,
200
+ pointerEvents: 'none',
201
+ visibility: 'hidden',
202
+ width: '200px',
203
+ height: '150px',
204
+ overflow: 'hidden'
205
+ });
206
+
207
+ outer.appendChild(inner);
208
+
209
+ document.body.appendChild(outer);
210
+
211
+ var widthContained = inner.offsetWidth;
212
+ outer.style.overflow = 'scroll';
213
+ var widthScroll = inner.offsetWidth;
214
+
215
+ if (widthContained === widthScroll) {
216
+ widthScroll = outer.clientWidth;
217
+ }
218
+
219
+ document.body.removeChild(outer);
220
+
221
+ var width = widthContained - widthScroll;
222
+
223
+ _scrollBarSize = { width: width, height: width };
224
+ return _scrollBarSize;
225
+ }
226
+
227
+ function extend() {
228
+ var out = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
229
+
230
+ var args = [];
231
+
232
+ Array.prototype.push.apply(args, arguments);
233
+
234
+ args.slice(1).forEach(function (obj) {
235
+ if (obj) {
236
+ for (var key in obj) {
237
+ if (({}).hasOwnProperty.call(obj, key)) {
238
+ out[key] = obj[key];
239
+ }
240
+ }
241
+ }
242
+ });
243
+
244
+ return out;
245
+ }
246
+
247
+ function removeClass(el, name) {
248
+ if (typeof el.classList !== 'undefined') {
249
+ name.split(' ').forEach(function (cls) {
250
+ if (cls.trim()) {
251
+ el.classList.remove(cls);
252
+ }
253
+ });
254
+ } else {
255
+ var regex = new RegExp('(^| )' + name.split(' ').join('|') + '( |$)', 'gi');
256
+ var className = getClassName(el).replace(regex, ' ');
257
+ setClassName(el, className);
258
+ }
259
+ }
260
+
261
+ function addClass(el, name) {
262
+ if (typeof el.classList !== 'undefined') {
263
+ name.split(' ').forEach(function (cls) {
264
+ if (cls.trim()) {
265
+ el.classList.add(cls);
266
+ }
267
+ });
268
+ } else {
269
+ removeClass(el, name);
270
+ var cls = getClassName(el) + (' ' + name);
271
+ setClassName(el, cls);
272
+ }
273
+ }
274
+
275
+ function hasClass(el, name) {
276
+ if (typeof el.classList !== 'undefined') {
277
+ return el.classList.contains(name);
278
+ }
279
+ var className = getClassName(el);
280
+ return new RegExp('(^| )' + name + '( |$)', 'gi').test(className);
281
+ }
282
+
283
+ function getClassName(el) {
284
+ // Can't use just SVGAnimatedString here since nodes within a Frame in IE have
285
+ // completely separately SVGAnimatedString base classes
286
+ if (el.className instanceof el.ownerDocument.defaultView.SVGAnimatedString) {
287
+ return el.className.baseVal;
288
+ }
289
+ return el.className;
290
+ }
291
+
292
+ function setClassName(el, className) {
293
+ el.setAttribute('class', className);
294
+ }
295
+
296
+ function updateClasses(el, add, all) {
297
+ // Of the set of 'all' classes, we need the 'add' classes, and only the
298
+ // 'add' classes to be set.
299
+ all.forEach(function (cls) {
300
+ if (add.indexOf(cls) === -1 && hasClass(el, cls)) {
301
+ removeClass(el, cls);
302
+ }
303
+ });
304
+
305
+ add.forEach(function (cls) {
306
+ if (!hasClass(el, cls)) {
307
+ addClass(el, cls);
308
+ }
309
+ });
310
+ }
311
+
312
+ var deferred = [];
313
+
314
+ var defer = function defer(fn) {
315
+ deferred.push(fn);
316
+ };
317
+
318
+ var flush = function flush() {
319
+ var fn = undefined;
320
+ while (fn = deferred.pop()) {
321
+ fn();
322
+ }
323
+ };
324
+
325
+ var Evented = (function () {
326
+ function Evented() {
327
+ _classCallCheck(this, Evented);
328
+ }
329
+
330
+ _createClass(Evented, [{
331
+ key: 'on',
332
+ value: function on(event, handler, ctx) {
333
+ var once = arguments.length <= 3 || arguments[3] === undefined ? false : arguments[3];
334
+
335
+ if (typeof this.bindings === 'undefined') {
336
+ this.bindings = {};
337
+ }
338
+ if (typeof this.bindings[event] === 'undefined') {
339
+ this.bindings[event] = [];
340
+ }
341
+ this.bindings[event].push({ handler: handler, ctx: ctx, once: once });
342
+ }
343
+ }, {
344
+ key: 'once',
345
+ value: function once(event, handler, ctx) {
346
+ this.on(event, handler, ctx, true);
347
+ }
348
+ }, {
349
+ key: 'off',
350
+ value: function off(event, handler) {
351
+ if (typeof this.bindings === 'undefined' || typeof this.bindings[event] === 'undefined') {
352
+ return;
353
+ }
354
+
355
+ if (typeof handler === 'undefined') {
356
+ delete this.bindings[event];
357
+ } else {
358
+ var i = 0;
359
+ while (i < this.bindings[event].length) {
360
+ if (this.bindings[event][i].handler === handler) {
361
+ this.bindings[event].splice(i, 1);
362
+ } else {
363
+ ++i;
364
+ }
365
+ }
366
+ }
367
+ }
368
+ }, {
369
+ key: 'trigger',
370
+ value: function trigger(event) {
371
+ if (typeof this.bindings !== 'undefined' && this.bindings[event]) {
372
+ var i = 0;
373
+
374
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
375
+ args[_key - 1] = arguments[_key];
376
+ }
377
+
378
+ while (i < this.bindings[event].length) {
379
+ var _bindings$event$i = this.bindings[event][i];
380
+ var handler = _bindings$event$i.handler;
381
+ var ctx = _bindings$event$i.ctx;
382
+ var once = _bindings$event$i.once;
383
+
384
+ var context = ctx;
385
+ if (typeof context === 'undefined') {
386
+ context = this;
387
+ }
388
+
389
+ handler.apply(context, args);
390
+
391
+ if (once) {
392
+ this.bindings[event].splice(i, 1);
393
+ } else {
394
+ ++i;
395
+ }
396
+ }
397
+ }
398
+ }
399
+ }]);
400
+
401
+ return Evented;
402
+ })();
403
+
404
+ TetherBase.Utils = {
405
+ getActualBoundingClientRect: getActualBoundingClientRect,
406
+ getScrollParents: getScrollParents,
407
+ getBounds: getBounds,
408
+ getOffsetParent: getOffsetParent,
409
+ extend: extend,
410
+ addClass: addClass,
411
+ removeClass: removeClass,
412
+ hasClass: hasClass,
413
+ updateClasses: updateClasses,
414
+ defer: defer,
415
+ flush: flush,
416
+ uniqueId: uniqueId,
417
+ Evented: Evented,
418
+ getScrollBarSize: getScrollBarSize,
419
+ removeUtilElements: removeUtilElements
420
+ };
421
+ /* globals TetherBase, performance */
422
+
423
+ 'use strict';
424
+
425
+ var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
426
+
427
+ var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
428
+
429
+ var _get = function get(_x6, _x7, _x8) { var _again = true; _function: while (_again) { var object = _x6, property = _x7, receiver = _x8; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x6 = parent; _x7 = property; _x8 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
430
+
431
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
432
+
433
+ function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
434
+
435
+ if (typeof TetherBase === 'undefined') {
436
+ throw new Error('You must include the utils.js file before tether.js');
437
+ }
438
+
439
+ var _TetherBase$Utils = TetherBase.Utils;
440
+ var getScrollParents = _TetherBase$Utils.getScrollParents;
441
+ var getBounds = _TetherBase$Utils.getBounds;
442
+ var getOffsetParent = _TetherBase$Utils.getOffsetParent;
443
+ var extend = _TetherBase$Utils.extend;
444
+ var addClass = _TetherBase$Utils.addClass;
445
+ var removeClass = _TetherBase$Utils.removeClass;
446
+ var updateClasses = _TetherBase$Utils.updateClasses;
447
+ var defer = _TetherBase$Utils.defer;
448
+ var flush = _TetherBase$Utils.flush;
449
+ var getScrollBarSize = _TetherBase$Utils.getScrollBarSize;
450
+ var removeUtilElements = _TetherBase$Utils.removeUtilElements;
451
+
452
+ function within(a, b) {
453
+ var diff = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2];
454
+
455
+ return a + diff >= b && b >= a - diff;
456
+ }
457
+
458
+ var transformKey = (function () {
459
+ if (typeof document === 'undefined') {
460
+ return '';
461
+ }
462
+ var el = document.createElement('div');
463
+
464
+ var transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];
465
+ for (var i = 0; i < transforms.length; ++i) {
466
+ var key = transforms[i];
467
+ if (el.style[key] !== undefined) {
468
+ return key;
469
+ }
470
+ }
471
+ })();
472
+
473
+ var tethers = [];
474
+
475
+ var position = function position() {
476
+ tethers.forEach(function (tether) {
477
+ tether.position(false);
478
+ });
479
+ flush();
480
+ };
481
+
482
+ function now() {
483
+ if (typeof performance === 'object' && typeof performance.now === 'function') {
484
+ return performance.now();
485
+ }
486
+ return +new Date();
487
+ }
488
+
489
+ (function () {
490
+ var lastCall = null;
491
+ var lastDuration = null;
492
+ var pendingTimeout = null;
493
+
494
+ var tick = function tick() {
495
+ if (typeof lastDuration !== 'undefined' && lastDuration > 16) {
496
+ // We voluntarily throttle ourselves if we can't manage 60fps
497
+ lastDuration = Math.min(lastDuration - 16, 250);
498
+
499
+ // Just in case this is the last event, remember to position just once more
500
+ pendingTimeout = setTimeout(tick, 250);
501
+ return;
502
+ }
503
+
504
+ if (typeof lastCall !== 'undefined' && now() - lastCall < 10) {
505
+ // Some browsers call events a little too frequently, refuse to run more than is reasonable
506
+ return;
507
+ }
508
+
509
+ if (pendingTimeout != null) {
510
+ clearTimeout(pendingTimeout);
511
+ pendingTimeout = null;
512
+ }
513
+
514
+ lastCall = now();
515
+ position();
516
+ lastDuration = now() - lastCall;
517
+ };
518
+
519
+ if (typeof window !== 'undefined' && typeof window.addEventListener !== 'undefined') {
520
+ ['resize', 'scroll', 'touchmove'].forEach(function (event) {
521
+ window.addEventListener(event, tick);
522
+ });
523
+ }
524
+ })();
525
+
526
+ var MIRROR_LR = {
527
+ center: 'center',
528
+ left: 'right',
529
+ right: 'left'
530
+ };
531
+
532
+ var MIRROR_TB = {
533
+ middle: 'middle',
534
+ top: 'bottom',
535
+ bottom: 'top'
536
+ };
537
+
538
+ var OFFSET_MAP = {
539
+ top: 0,
540
+ left: 0,
541
+ middle: '50%',
542
+ center: '50%',
543
+ bottom: '100%',
544
+ right: '100%'
545
+ };
546
+
547
+ var autoToFixedAttachment = function autoToFixedAttachment(attachment, relativeToAttachment) {
548
+ var left = attachment.left;
549
+ var top = attachment.top;
550
+
551
+ if (left === 'auto') {
552
+ left = MIRROR_LR[relativeToAttachment.left];
553
+ }
554
+
555
+ if (top === 'auto') {
556
+ top = MIRROR_TB[relativeToAttachment.top];
557
+ }
558
+
559
+ return { left: left, top: top };
560
+ };
561
+
562
+ var attachmentToOffset = function attachmentToOffset(attachment) {
563
+ var left = attachment.left;
564
+ var top = attachment.top;
565
+
566
+ if (typeof OFFSET_MAP[attachment.left] !== 'undefined') {
567
+ left = OFFSET_MAP[attachment.left];
568
+ }
569
+
570
+ if (typeof OFFSET_MAP[attachment.top] !== 'undefined') {
571
+ top = OFFSET_MAP[attachment.top];
572
+ }
573
+
574
+ return { left: left, top: top };
575
+ };
576
+
577
+ function addOffset() {
578
+ var out = { top: 0, left: 0 };
579
+
580
+ for (var _len = arguments.length, offsets = Array(_len), _key = 0; _key < _len; _key++) {
581
+ offsets[_key] = arguments[_key];
582
+ }
583
+
584
+ offsets.forEach(function (_ref) {
585
+ var top = _ref.top;
586
+ var left = _ref.left;
587
+
588
+ if (typeof top === 'string') {
589
+ top = parseFloat(top, 10);
590
+ }
591
+ if (typeof left === 'string') {
592
+ left = parseFloat(left, 10);
593
+ }
594
+
595
+ out.top += top;
596
+ out.left += left;
597
+ });
598
+
599
+ return out;
600
+ }
601
+
602
+ function offsetToPx(offset, size) {
603
+ if (typeof offset.left === 'string' && offset.left.indexOf('%') !== -1) {
604
+ offset.left = parseFloat(offset.left, 10) / 100 * size.width;
605
+ }
606
+ if (typeof offset.top === 'string' && offset.top.indexOf('%') !== -1) {
607
+ offset.top = parseFloat(offset.top, 10) / 100 * size.height;
608
+ }
609
+
610
+ return offset;
611
+ }
612
+
613
+ var parseOffset = function parseOffset(value) {
614
+ var _value$split = value.split(' ');
615
+
616
+ var _value$split2 = _slicedToArray(_value$split, 2);
617
+
618
+ var top = _value$split2[0];
619
+ var left = _value$split2[1];
620
+
621
+ return { top: top, left: left };
622
+ };
623
+ var parseAttachment = parseOffset;
624
+
625
+ var TetherClass = (function (_Evented) {
626
+ _inherits(TetherClass, _Evented);
627
+
628
+ function TetherClass(options) {
629
+ var _this = this;
630
+
631
+ _classCallCheck(this, TetherClass);
632
+
633
+ _get(Object.getPrototypeOf(TetherClass.prototype), 'constructor', this).call(this);
634
+ this.position = this.position.bind(this);
635
+
636
+ tethers.push(this);
637
+
638
+ this.history = [];
639
+
640
+ this.setOptions(options, false);
641
+
642
+ TetherBase.modules.forEach(function (module) {
643
+ if (typeof module.initialize !== 'undefined') {
644
+ module.initialize.call(_this);
645
+ }
646
+ });
647
+
648
+ this.position();
649
+ }
650
+
651
+ _createClass(TetherClass, [{
652
+ key: 'getClass',
653
+ value: function getClass() {
654
+ var key = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
655
+ var classes = this.options.classes;
656
+
657
+ if (typeof classes !== 'undefined' && classes[key]) {
658
+ return this.options.classes[key];
659
+ } else if (this.options.classPrefix) {
660
+ return this.options.classPrefix + '-' + key;
661
+ } else {
662
+ return key;
663
+ }
664
+ }
665
+ }, {
666
+ key: 'setOptions',
667
+ value: function setOptions(options) {
668
+ var _this2 = this;
669
+
670
+ var pos = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
671
+
672
+ var defaults = {
673
+ offset: '0 0',
674
+ targetOffset: '0 0',
675
+ targetAttachment: 'auto auto',
676
+ classPrefix: 'tether'
677
+ };
678
+
679
+ this.options = extend(defaults, options);
680
+
681
+ var _options = this.options;
682
+ var element = _options.element;
683
+ var target = _options.target;
684
+ var targetModifier = _options.targetModifier;
685
+
686
+ this.element = element;
687
+ this.target = target;
688
+ this.targetModifier = targetModifier;
689
+
690
+ if (this.target === 'viewport') {
691
+ this.target = document.body;
692
+ this.targetModifier = 'visible';
693
+ } else if (this.target === 'scroll-handle') {
694
+ this.target = document.body;
695
+ this.targetModifier = 'scroll-handle';
696
+ }
697
+
698
+ ['element', 'target'].forEach(function (key) {
699
+ if (typeof _this2[key] === 'undefined') {
700
+ throw new Error('Tether Error: Both element and target must be defined');
701
+ }
702
+
703
+ if (typeof _this2[key].jquery !== 'undefined') {
704
+ _this2[key] = _this2[key][0];
705
+ } else if (typeof _this2[key] === 'string') {
706
+ _this2[key] = document.querySelector(_this2[key]);
707
+ }
708
+ });
709
+
710
+ addClass(this.element, this.getClass('element'));
711
+ if (!(this.options.addTargetClasses === false)) {
712
+ addClass(this.target, this.getClass('target'));
713
+ }
714
+
715
+ if (!this.options.attachment) {
716
+ throw new Error('Tether Error: You must provide an attachment');
717
+ }
718
+
719
+ this.targetAttachment = parseAttachment(this.options.targetAttachment);
720
+ this.attachment = parseAttachment(this.options.attachment);
721
+ this.offset = parseOffset(this.options.offset);
722
+ this.targetOffset = parseOffset(this.options.targetOffset);
723
+
724
+ if (typeof this.scrollParents !== 'undefined') {
725
+ this.disable();
726
+ }
727
+
728
+ if (this.targetModifier === 'scroll-handle') {
729
+ this.scrollParents = [this.target];
730
+ } else {
731
+ this.scrollParents = getScrollParents(this.target);
732
+ }
733
+
734
+ if (!(this.options.enabled === false)) {
735
+ this.enable(pos);
736
+ }
737
+ }
738
+ }, {
739
+ key: 'getTargetBounds',
740
+ value: function getTargetBounds() {
741
+ if (typeof this.targetModifier !== 'undefined') {
742
+ if (this.targetModifier === 'visible') {
743
+ if (this.target === document.body) {
744
+ return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth };
745
+ } else {
746
+ var bounds = getBounds(this.target);
747
+
748
+ var out = {
749
+ height: bounds.height,
750
+ width: bounds.width,
751
+ top: bounds.top,
752
+ left: bounds.left
753
+ };
754
+
755
+ out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));
756
+ out.height = Math.min(out.height, bounds.height - (bounds.top + bounds.height - (pageYOffset + innerHeight)));
757
+ out.height = Math.min(innerHeight, out.height);
758
+ out.height -= 2;
759
+
760
+ out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));
761
+ out.width = Math.min(out.width, bounds.width - (bounds.left + bounds.width - (pageXOffset + innerWidth)));
762
+ out.width = Math.min(innerWidth, out.width);
763
+ out.width -= 2;
764
+
765
+ if (out.top < pageYOffset) {
766
+ out.top = pageYOffset;
767
+ }
768
+ if (out.left < pageXOffset) {
769
+ out.left = pageXOffset;
770
+ }
771
+
772
+ return out;
773
+ }
774
+ } else if (this.targetModifier === 'scroll-handle') {
775
+ var bounds = undefined;
776
+ var target = this.target;
777
+ if (target === document.body) {
778
+ target = document.documentElement;
779
+
780
+ bounds = {
781
+ left: pageXOffset,
782
+ top: pageYOffset,
783
+ height: innerHeight,
784
+ width: innerWidth
785
+ };
786
+ } else {
787
+ bounds = getBounds(target);
788
+ }
789
+
790
+ var style = getComputedStyle(target);
791
+
792
+ var hasBottomScroll = target.scrollWidth > target.clientWidth || [style.overflow, style.overflowX].indexOf('scroll') >= 0 || this.target !== document.body;
793
+
794
+ var scrollBottom = 0;
795
+ if (hasBottomScroll) {
796
+ scrollBottom = 15;
797
+ }
798
+
799
+ var height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;
800
+
801
+ var out = {
802
+ width: 15,
803
+ height: height * 0.975 * (height / target.scrollHeight),
804
+ left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15
805
+ };
806
+
807
+ var fitAdj = 0;
808
+ if (height < 408 && this.target === document.body) {
809
+ fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;
810
+ }
811
+
812
+ if (this.target !== document.body) {
813
+ out.height = Math.max(out.height, 24);
814
+ }
815
+
816
+ var scrollPercentage = this.target.scrollTop / (target.scrollHeight - height);
817
+ out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);
818
+
819
+ if (this.target === document.body) {
820
+ out.height = Math.max(out.height, 24);
821
+ }
822
+
823
+ return out;
824
+ }
825
+ } else {
826
+ return getBounds(this.target);
827
+ }
828
+ }
829
+ }, {
830
+ key: 'clearCache',
831
+ value: function clearCache() {
832
+ this._cache = {};
833
+ }
834
+ }, {
835
+ key: 'cache',
836
+ value: function cache(k, getter) {
837
+ // More than one module will often need the same DOM info, so
838
+ // we keep a cache which is cleared on each position call
839
+ if (typeof this._cache === 'undefined') {
840
+ this._cache = {};
841
+ }
842
+
843
+ if (typeof this._cache[k] === 'undefined') {
844
+ this._cache[k] = getter.call(this);
845
+ }
846
+
847
+ return this._cache[k];
848
+ }
849
+ }, {
850
+ key: 'enable',
851
+ value: function enable() {
852
+ var _this3 = this;
853
+
854
+ var pos = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
855
+
856
+ if (!(this.options.addTargetClasses === false)) {
857
+ addClass(this.target, this.getClass('enabled'));
858
+ }
859
+ addClass(this.element, this.getClass('enabled'));
860
+ this.enabled = true;
861
+
862
+ this.scrollParents.forEach(function (parent) {
863
+ if (parent !== _this3.target.ownerDocument) {
864
+ parent.addEventListener('scroll', _this3.position);
865
+ }
866
+ });
867
+
868
+ if (pos) {
869
+ this.position();
870
+ }
871
+ }
872
+ }, {
873
+ key: 'disable',
874
+ value: function disable() {
875
+ var _this4 = this;
876
+
877
+ removeClass(this.target, this.getClass('enabled'));
878
+ removeClass(this.element, this.getClass('enabled'));
879
+ this.enabled = false;
880
+
881
+ if (typeof this.scrollParents !== 'undefined') {
882
+ this.scrollParents.forEach(function (parent) {
883
+ parent.removeEventListener('scroll', _this4.position);
884
+ });
885
+ }
886
+ }
887
+ }, {
888
+ key: 'destroy',
889
+ value: function destroy() {
890
+ var _this5 = this;
891
+
892
+ this.disable();
893
+
894
+ tethers.forEach(function (tether, i) {
895
+ if (tether === _this5) {
896
+ tethers.splice(i, 1);
897
+ }
898
+ });
899
+
900
+ // Remove any elements we were using for convenience from the DOM
901
+ if (tethers.length === 0) {
902
+ removeUtilElements();
903
+ }
904
+ }
905
+ }, {
906
+ key: 'updateAttachClasses',
907
+ value: function updateAttachClasses(elementAttach, targetAttach) {
908
+ var _this6 = this;
909
+
910
+ elementAttach = elementAttach || this.attachment;
911
+ targetAttach = targetAttach || this.targetAttachment;
912
+ var sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];
913
+
914
+ if (typeof this._addAttachClasses !== 'undefined' && this._addAttachClasses.length) {
915
+ // updateAttachClasses can be called more than once in a position call, so
916
+ // we need to clean up after ourselves such that when the last defer gets
917
+ // ran it doesn't add any extra classes from previous calls.
918
+ this._addAttachClasses.splice(0, this._addAttachClasses.length);
919
+ }
920
+
921
+ if (typeof this._addAttachClasses === 'undefined') {
922
+ this._addAttachClasses = [];
923
+ }
924
+ var add = this._addAttachClasses;
925
+
926
+ if (elementAttach.top) {
927
+ add.push(this.getClass('element-attached') + '-' + elementAttach.top);
928
+ }
929
+ if (elementAttach.left) {
930
+ add.push(this.getClass('element-attached') + '-' + elementAttach.left);
931
+ }
932
+ if (targetAttach.top) {
933
+ add.push(this.getClass('target-attached') + '-' + targetAttach.top);
934
+ }
935
+ if (targetAttach.left) {
936
+ add.push(this.getClass('target-attached') + '-' + targetAttach.left);
937
+ }
938
+
939
+ var all = [];
940
+ sides.forEach(function (side) {
941
+ all.push(_this6.getClass('element-attached') + '-' + side);
942
+ all.push(_this6.getClass('target-attached') + '-' + side);
943
+ });
944
+
945
+ defer(function () {
946
+ if (!(typeof _this6._addAttachClasses !== 'undefined')) {
947
+ return;
948
+ }
949
+
950
+ updateClasses(_this6.element, _this6._addAttachClasses, all);
951
+ if (!(_this6.options.addTargetClasses === false)) {
952
+ updateClasses(_this6.target, _this6._addAttachClasses, all);
953
+ }
954
+
955
+ delete _this6._addAttachClasses;
956
+ });
957
+ }
958
+ }, {
959
+ key: 'position',
960
+ value: function position() {
961
+ var _this7 = this;
962
+
963
+ var flushChanges = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
964
+
965
+ // flushChanges commits the changes immediately, leave true unless you are positioning multiple
966
+ // tethers (in which case call Tether.Utils.flush yourself when you're done)
967
+
968
+ if (!this.enabled) {
969
+ return;
970
+ }
971
+
972
+ this.clearCache();
973
+
974
+ // Turn 'auto' attachments into the appropriate corner or edge
975
+ var targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);
976
+
977
+ this.updateAttachClasses(this.attachment, targetAttachment);
978
+
979
+ var elementPos = this.cache('element-bounds', function () {
980
+ return getBounds(_this7.element);
981
+ });
982
+
983
+ var width = elementPos.width;
984
+ var height = elementPos.height;
985
+
986
+ if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {
987
+ var _lastSize = this.lastSize;
988
+
989
+ // We cache the height and width to make it possible to position elements that are
990
+ // getting hidden.
991
+ width = _lastSize.width;
992
+ height = _lastSize.height;
993
+ } else {
994
+ this.lastSize = { width: width, height: height };
995
+ }
996
+
997
+ var targetPos = this.cache('target-bounds', function () {
998
+ return _this7.getTargetBounds();
999
+ });
1000
+ var targetSize = targetPos;
1001
+
1002
+ // Get an actual px offset from the attachment
1003
+ var offset = offsetToPx(attachmentToOffset(this.attachment), { width: width, height: height });
1004
+ var targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);
1005
+
1006
+ var manualOffset = offsetToPx(this.offset, { width: width, height: height });
1007
+ var manualTargetOffset = offsetToPx(this.targetOffset, targetSize);
1008
+
1009
+ // Add the manually provided offset
1010
+ offset = addOffset(offset, manualOffset);
1011
+ targetOffset = addOffset(targetOffset, manualTargetOffset);
1012
+
1013
+ // It's now our goal to make (element position + offset) == (target position + target offset)
1014
+ var left = targetPos.left + targetOffset.left - offset.left;
1015
+ var top = targetPos.top + targetOffset.top - offset.top;
1016
+
1017
+ for (var i = 0; i < TetherBase.modules.length; ++i) {
1018
+ var _module2 = TetherBase.modules[i];
1019
+ var ret = _module2.position.call(this, {
1020
+ left: left,
1021
+ top: top,
1022
+ targetAttachment: targetAttachment,
1023
+ targetPos: targetPos,
1024
+ elementPos: elementPos,
1025
+ offset: offset,
1026
+ targetOffset: targetOffset,
1027
+ manualOffset: manualOffset,
1028
+ manualTargetOffset: manualTargetOffset,
1029
+ scrollbarSize: scrollbarSize,
1030
+ attachment: this.attachment
1031
+ });
1032
+
1033
+ if (ret === false) {
1034
+ return false;
1035
+ } else if (typeof ret === 'undefined' || typeof ret !== 'object') {
1036
+ continue;
1037
+ } else {
1038
+ top = ret.top;
1039
+ left = ret.left;
1040
+ }
1041
+ }
1042
+
1043
+ // We describe the position three different ways to give the optimizer
1044
+ // a chance to decide the best possible way to position the element
1045
+ // with the fewest repaints.
1046
+ var next = {
1047
+ // It's position relative to the page (absolute positioning when
1048
+ // the element is a child of the body)
1049
+ page: {
1050
+ top: top,
1051
+ left: left
1052
+ },
1053
+
1054
+ // It's position relative to the viewport (fixed positioning)
1055
+ viewport: {
1056
+ top: top - pageYOffset,
1057
+ bottom: pageYOffset - top - height + innerHeight,
1058
+ left: left - pageXOffset,
1059
+ right: pageXOffset - left - width + innerWidth
1060
+ }
1061
+ };
1062
+
1063
+ var doc = this.target.ownerDocument;
1064
+ var win = doc.defaultView;
1065
+
1066
+ var scrollbarSize = undefined;
1067
+ if (win.innerHeight > doc.documentElement.clientHeight) {
1068
+ scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
1069
+ next.viewport.bottom -= scrollbarSize.height;
1070
+ }
1071
+
1072
+ if (win.innerWidth > doc.documentElement.clientWidth) {
1073
+ scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);
1074
+ next.viewport.right -= scrollbarSize.width;
1075
+ }
1076
+
1077
+ if (['', 'static'].indexOf(doc.body.style.position) === -1 || ['', 'static'].indexOf(doc.body.parentElement.style.position) === -1) {
1078
+ // Absolute positioning in the body will be relative to the page, not the 'initial containing block'
1079
+ next.page.bottom = doc.body.scrollHeight - top - height;
1080
+ next.page.right = doc.body.scrollWidth - left - width;
1081
+ }
1082
+
1083
+ if (typeof this.options.optimizations !== 'undefined' && this.options.optimizations.moveElement !== false && !(typeof this.targetModifier !== 'undefined')) {
1084
+ (function () {
1085
+ var offsetParent = _this7.cache('target-offsetparent', function () {
1086
+ return getOffsetParent(_this7.target);
1087
+ });
1088
+ var offsetPosition = _this7.cache('target-offsetparent-bounds', function () {
1089
+ return getBounds(offsetParent);
1090
+ });
1091
+ var offsetParentStyle = getComputedStyle(offsetParent);
1092
+ var offsetParentSize = offsetPosition;
1093
+
1094
+ var offsetBorder = {};
1095
+ ['Top', 'Left', 'Bottom', 'Right'].forEach(function (side) {
1096
+ offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle['border' + side + 'Width']);
1097
+ });
1098
+
1099
+ offsetPosition.right = doc.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;
1100
+ offsetPosition.bottom = doc.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;
1101
+
1102
+ if (next.page.top >= offsetPosition.top + offsetBorder.top && next.page.bottom >= offsetPosition.bottom) {
1103
+ if (next.page.left >= offsetPosition.left + offsetBorder.left && next.page.right >= offsetPosition.right) {
1104
+ // We're within the visible part of the target's scroll parent
1105
+ var scrollTop = offsetParent.scrollTop;
1106
+ var scrollLeft = offsetParent.scrollLeft;
1107
+
1108
+ // It's position relative to the target's offset parent (absolute positioning when
1109
+ // the element is moved to be a child of the target's offset parent).
1110
+ next.offset = {
1111
+ top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,
1112
+ left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left
1113
+ };
1114
+ }
1115
+ }
1116
+ })();
1117
+ }
1118
+
1119
+ // We could also travel up the DOM and try each containing context, rather than only
1120
+ // looking at the body, but we're gonna get diminishing returns.
1121
+
1122
+ this.move(next);
1123
+
1124
+ this.history.unshift(next);
1125
+
1126
+ if (this.history.length > 3) {
1127
+ this.history.pop();
1128
+ }
1129
+
1130
+ if (flushChanges) {
1131
+ flush();
1132
+ }
1133
+
1134
+ return true;
1135
+ }
1136
+
1137
+ // THE ISSUE
1138
+ }, {
1139
+ key: 'move',
1140
+ value: function move(pos) {
1141
+ var _this8 = this;
1142
+
1143
+ if (!(typeof this.element.parentNode !== 'undefined')) {
1144
+ return;
1145
+ }
1146
+
1147
+ var same = {};
1148
+
1149
+ for (var type in pos) {
1150
+ same[type] = {};
1151
+
1152
+ for (var key in pos[type]) {
1153
+ var found = false;
1154
+
1155
+ for (var i = 0; i < this.history.length; ++i) {
1156
+ var point = this.history[i];
1157
+ if (typeof point[type] !== 'undefined' && !within(point[type][key], pos[type][key])) {
1158
+ found = true;
1159
+ break;
1160
+ }
1161
+ }
1162
+
1163
+ if (!found) {
1164
+ same[type][key] = true;
1165
+ }
1166
+ }
1167
+ }
1168
+
1169
+ var css = { top: '', left: '', right: '', bottom: '' };
1170
+
1171
+ var transcribe = function transcribe(_same, _pos) {
1172
+ var hasOptimizations = typeof _this8.options.optimizations !== 'undefined';
1173
+ var gpu = hasOptimizations ? _this8.options.optimizations.gpu : null;
1174
+ if (gpu !== false) {
1175
+ var yPos = undefined,
1176
+ xPos = undefined;
1177
+ if (_same.top) {
1178
+ css.top = 0;
1179
+ yPos = _pos.top;
1180
+ } else {
1181
+ css.bottom = 0;
1182
+ yPos = -_pos.bottom;
1183
+ }
1184
+
1185
+ if (_same.left) {
1186
+ css.left = 0;
1187
+ xPos = _pos.left;
1188
+ } else {
1189
+ css.right = 0;
1190
+ xPos = -_pos.right;
1191
+ }
1192
+
1193
+ if (typeof window.devicePixelRatio === 'number' && devicePixelRatio % 1 === 0) {
1194
+ xPos = Math.round(xPos * devicePixelRatio) / devicePixelRatio;
1195
+ yPos = Math.round(yPos * devicePixelRatio) / devicePixelRatio;
1196
+ }
1197
+
1198
+ css[transformKey] = 'translateX(' + xPos + 'px) translateY(' + yPos + 'px)';
1199
+
1200
+ if (transformKey !== 'msTransform') {
1201
+ // The Z transform will keep this in the GPU (faster, and prevents artifacts),
1202
+ // but IE9 doesn't support 3d transforms and will choke.
1203
+ css[transformKey] += " translateZ(0)";
1204
+ }
1205
+ } else {
1206
+ if (_same.top) {
1207
+ css.top = _pos.top + 'px';
1208
+ } else {
1209
+ css.bottom = _pos.bottom + 'px';
1210
+ }
1211
+
1212
+ if (_same.left) {
1213
+ css.left = _pos.left + 'px';
1214
+ } else {
1215
+ css.right = _pos.right + 'px';
1216
+ }
1217
+ }
1218
+ };
1219
+
1220
+ var moved = false;
1221
+ if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {
1222
+ css.position = 'absolute';
1223
+ transcribe(same.page, pos.page);
1224
+ } else if ((same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {
1225
+ css.position = 'fixed';
1226
+ transcribe(same.viewport, pos.viewport);
1227
+ } else if (typeof same.offset !== 'undefined' && same.offset.top && same.offset.left) {
1228
+ (function () {
1229
+ css.position = 'absolute';
1230
+ var offsetParent = _this8.cache('target-offsetparent', function () {
1231
+ return getOffsetParent(_this8.target);
1232
+ });
1233
+
1234
+ if (getOffsetParent(_this8.element) !== offsetParent) {
1235
+ defer(function () {
1236
+ _this8.element.parentNode.removeChild(_this8.element);
1237
+ offsetParent.appendChild(_this8.element);
1238
+ });
1239
+ }
1240
+
1241
+ transcribe(same.offset, pos.offset);
1242
+ moved = true;
1243
+ })();
1244
+ } else {
1245
+ css.position = 'absolute';
1246
+ transcribe({ top: true, left: true }, pos.page);
1247
+ }
1248
+
1249
+ if (!moved) {
1250
+ if (this.options.bodyElement) {
1251
+ if (this.element.parentNode !== this.options.bodyElement) {
1252
+ this.options.bodyElement.appendChild(this.element);
1253
+ }
1254
+ } else {
1255
+ var isFullscreenElement = function isFullscreenElement(e) {
1256
+ var d = e.ownerDocument;
1257
+ var fe = d.fullscreenElement || d.webkitFullscreenElement || d.mozFullScreenElement || d.msFullscreenElement;
1258
+ return fe === e;
1259
+ };
1260
+
1261
+ var offsetParentIsBody = true;
1262
+
1263
+ var currentNode = this.element.parentNode;
1264
+ while (currentNode && currentNode.nodeType === 1 && currentNode.tagName !== 'BODY' && !isFullscreenElement(currentNode)) {
1265
+ if (getComputedStyle(currentNode).position !== 'static') {
1266
+ offsetParentIsBody = false;
1267
+ break;
1268
+ }
1269
+
1270
+ currentNode = currentNode.parentNode;
1271
+ }
1272
+
1273
+ if (!offsetParentIsBody) {
1274
+ this.element.parentNode.removeChild(this.element);
1275
+ this.element.ownerDocument.body.appendChild(this.element);
1276
+ }
1277
+ }
1278
+ }
1279
+
1280
+ // Any css change will trigger a repaint, so let's avoid one if nothing changed
1281
+ var writeCSS = {};
1282
+ var write = false;
1283
+ for (var key in css) {
1284
+ var val = css[key];
1285
+ var elVal = this.element.style[key];
1286
+
1287
+ if (elVal !== val) {
1288
+ write = true;
1289
+ writeCSS[key] = val;
1290
+ }
1291
+ }
1292
+
1293
+ if (write) {
1294
+ defer(function () {
1295
+ extend(_this8.element.style, writeCSS);
1296
+ _this8.trigger('repositioned');
1297
+ });
1298
+ }
1299
+ }
1300
+ }]);
1301
+
1302
+ return TetherClass;
1303
+ })(Evented);
1304
+
1305
+ TetherClass.modules = [];
1306
+
1307
+ TetherBase.position = position;
1308
+
1309
+ var Tether = extend(TetherClass, TetherBase);
1310
+ /* globals TetherBase */
1311
+
1312
+ 'use strict';
1313
+
1314
+ var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
1315
+
1316
+ var _TetherBase$Utils = TetherBase.Utils;
1317
+ var getBounds = _TetherBase$Utils.getBounds;
1318
+ var extend = _TetherBase$Utils.extend;
1319
+ var updateClasses = _TetherBase$Utils.updateClasses;
1320
+ var defer = _TetherBase$Utils.defer;
1321
+
1322
+ var BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];
1323
+
1324
+ function getBoundingRect(tether, to) {
1325
+ if (to === 'scrollParent') {
1326
+ to = tether.scrollParents[0];
1327
+ } else if (to === 'window') {
1328
+ to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];
1329
+ }
1330
+
1331
+ if (to === document) {
1332
+ to = to.documentElement;
1333
+ }
1334
+
1335
+ if (typeof to.nodeType !== 'undefined') {
1336
+ (function () {
1337
+ var node = to;
1338
+ var size = getBounds(to);
1339
+ var pos = size;
1340
+ var style = getComputedStyle(to);
1341
+
1342
+ to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];
1343
+
1344
+ // Account any parent Frames scroll offset
1345
+ if (node.ownerDocument !== document) {
1346
+ var win = node.ownerDocument.defaultView;
1347
+ to[0] += win.pageXOffset;
1348
+ to[1] += win.pageYOffset;
1349
+ to[2] += win.pageXOffset;
1350
+ to[3] += win.pageYOffset;
1351
+ }
1352
+
1353
+ BOUNDS_FORMAT.forEach(function (side, i) {
1354
+ side = side[0].toUpperCase() + side.substr(1);
1355
+ if (side === 'Top' || side === 'Left') {
1356
+ to[i] += parseFloat(style['border' + side + 'Width']);
1357
+ } else {
1358
+ to[i] -= parseFloat(style['border' + side + 'Width']);
1359
+ }
1360
+ });
1361
+ })();
1362
+ }
1363
+
1364
+ return to;
1365
+ }
1366
+
1367
+ TetherBase.modules.push({
1368
+ position: function position(_ref) {
1369
+ var _this = this;
1370
+
1371
+ var top = _ref.top;
1372
+ var left = _ref.left;
1373
+ var targetAttachment = _ref.targetAttachment;
1374
+
1375
+ if (!this.options.constraints) {
1376
+ return true;
1377
+ }
1378
+
1379
+ var _cache = this.cache('element-bounds', function () {
1380
+ return getBounds(_this.element);
1381
+ });
1382
+
1383
+ var height = _cache.height;
1384
+ var width = _cache.width;
1385
+
1386
+ if (width === 0 && height === 0 && typeof this.lastSize !== 'undefined') {
1387
+ var _lastSize = this.lastSize;
1388
+
1389
+ // Handle the item getting hidden as a result of our positioning without glitching
1390
+ // the classes in and out
1391
+ width = _lastSize.width;
1392
+ height = _lastSize.height;
1393
+ }
1394
+
1395
+ var targetSize = this.cache('target-bounds', function () {
1396
+ return _this.getTargetBounds();
1397
+ });
1398
+
1399
+ var targetHeight = targetSize.height;
1400
+ var targetWidth = targetSize.width;
1401
+
1402
+ var allClasses = [this.getClass('pinned'), this.getClass('out-of-bounds')];
1403
+
1404
+ this.options.constraints.forEach(function (constraint) {
1405
+ var outOfBoundsClass = constraint.outOfBoundsClass;
1406
+ var pinnedClass = constraint.pinnedClass;
1407
+
1408
+ if (outOfBoundsClass) {
1409
+ allClasses.push(outOfBoundsClass);
1410
+ }
1411
+ if (pinnedClass) {
1412
+ allClasses.push(pinnedClass);
1413
+ }
1414
+ });
1415
+
1416
+ allClasses.forEach(function (cls) {
1417
+ ['left', 'top', 'right', 'bottom'].forEach(function (side) {
1418
+ allClasses.push(cls + '-' + side);
1419
+ });
1420
+ });
1421
+
1422
+ var addClasses = [];
1423
+
1424
+ var tAttachment = extend({}, targetAttachment);
1425
+ var eAttachment = extend({}, this.attachment);
1426
+
1427
+ this.options.constraints.forEach(function (constraint) {
1428
+ var to = constraint.to;
1429
+ var attachment = constraint.attachment;
1430
+ var pin = constraint.pin;
1431
+
1432
+ if (typeof attachment === 'undefined') {
1433
+ attachment = '';
1434
+ }
1435
+
1436
+ var changeAttachX = undefined,
1437
+ changeAttachY = undefined;
1438
+ if (attachment.indexOf(' ') >= 0) {
1439
+ var _attachment$split = attachment.split(' ');
1440
+
1441
+ var _attachment$split2 = _slicedToArray(_attachment$split, 2);
1442
+
1443
+ changeAttachY = _attachment$split2[0];
1444
+ changeAttachX = _attachment$split2[1];
1445
+ } else {
1446
+ changeAttachX = changeAttachY = attachment;
1447
+ }
1448
+
1449
+ var bounds = getBoundingRect(_this, to);
1450
+
1451
+ if (changeAttachY === 'target' || changeAttachY === 'both') {
1452
+ if (top < bounds[1] && tAttachment.top === 'top') {
1453
+ top += targetHeight;
1454
+ tAttachment.top = 'bottom';
1455
+ }
1456
+
1457
+ if (top + height > bounds[3] && tAttachment.top === 'bottom') {
1458
+ top -= targetHeight;
1459
+ tAttachment.top = 'top';
1460
+ }
1461
+ }
1462
+
1463
+ if (changeAttachY === 'together') {
1464
+ if (tAttachment.top === 'top') {
1465
+ if (eAttachment.top === 'bottom' && top < bounds[1]) {
1466
+ top += targetHeight;
1467
+ tAttachment.top = 'bottom';
1468
+
1469
+ top += height;
1470
+ eAttachment.top = 'top';
1471
+ } else if (eAttachment.top === 'top' && top + height > bounds[3] && top - (height - targetHeight) >= bounds[1]) {
1472
+ top -= height - targetHeight;
1473
+ tAttachment.top = 'bottom';
1474
+
1475
+ eAttachment.top = 'bottom';
1476
+ }
1477
+ }
1478
+
1479
+ if (tAttachment.top === 'bottom') {
1480
+ if (eAttachment.top === 'top' && top + height > bounds[3]) {
1481
+ top -= targetHeight;
1482
+ tAttachment.top = 'top';
1483
+
1484
+ top -= height;
1485
+ eAttachment.top = 'bottom';
1486
+ } else if (eAttachment.top === 'bottom' && top < bounds[1] && top + (height * 2 - targetHeight) <= bounds[3]) {
1487
+ top += height - targetHeight;
1488
+ tAttachment.top = 'top';
1489
+
1490
+ eAttachment.top = 'top';
1491
+ }
1492
+ }
1493
+
1494
+ if (tAttachment.top === 'middle') {
1495
+ if (top + height > bounds[3] && eAttachment.top === 'top') {
1496
+ top -= height;
1497
+ eAttachment.top = 'bottom';
1498
+ } else if (top < bounds[1] && eAttachment.top === 'bottom') {
1499
+ top += height;
1500
+ eAttachment.top = 'top';
1501
+ }
1502
+ }
1503
+ }
1504
+
1505
+ if (changeAttachX === 'target' || changeAttachX === 'both') {
1506
+ if (left < bounds[0] && tAttachment.left === 'left') {
1507
+ left += targetWidth;
1508
+ tAttachment.left = 'right';
1509
+ }
1510
+
1511
+ if (left + width > bounds[2] && tAttachment.left === 'right') {
1512
+ left -= targetWidth;
1513
+ tAttachment.left = 'left';
1514
+ }
1515
+ }
1516
+
1517
+ if (changeAttachX === 'together') {
1518
+ if (left < bounds[0] && tAttachment.left === 'left') {
1519
+ if (eAttachment.left === 'right') {
1520
+ left += targetWidth;
1521
+ tAttachment.left = 'right';
1522
+
1523
+ left += width;
1524
+ eAttachment.left = 'left';
1525
+ } else if (eAttachment.left === 'left') {
1526
+ left += targetWidth;
1527
+ tAttachment.left = 'right';
1528
+
1529
+ left -= width;
1530
+ eAttachment.left = 'right';
1531
+ }
1532
+ } else if (left + width > bounds[2] && tAttachment.left === 'right') {
1533
+ if (eAttachment.left === 'left') {
1534
+ left -= targetWidth;
1535
+ tAttachment.left = 'left';
1536
+
1537
+ left -= width;
1538
+ eAttachment.left = 'right';
1539
+ } else if (eAttachment.left === 'right') {
1540
+ left -= targetWidth;
1541
+ tAttachment.left = 'left';
1542
+
1543
+ left += width;
1544
+ eAttachment.left = 'left';
1545
+ }
1546
+ } else if (tAttachment.left === 'center') {
1547
+ if (left + width > bounds[2] && eAttachment.left === 'left') {
1548
+ left -= width;
1549
+ eAttachment.left = 'right';
1550
+ } else if (left < bounds[0] && eAttachment.left === 'right') {
1551
+ left += width;
1552
+ eAttachment.left = 'left';
1553
+ }
1554
+ }
1555
+ }
1556
+
1557
+ if (changeAttachY === 'element' || changeAttachY === 'both') {
1558
+ if (top < bounds[1] && eAttachment.top === 'bottom') {
1559
+ top += height;
1560
+ eAttachment.top = 'top';
1561
+ }
1562
+
1563
+ if (top + height > bounds[3] && eAttachment.top === 'top') {
1564
+ top -= height;
1565
+ eAttachment.top = 'bottom';
1566
+ }
1567
+ }
1568
+
1569
+ if (changeAttachX === 'element' || changeAttachX === 'both') {
1570
+ if (left < bounds[0]) {
1571
+ if (eAttachment.left === 'right') {
1572
+ left += width;
1573
+ eAttachment.left = 'left';
1574
+ } else if (eAttachment.left === 'center') {
1575
+ left += width / 2;
1576
+ eAttachment.left = 'left';
1577
+ }
1578
+ }
1579
+
1580
+ if (left + width > bounds[2]) {
1581
+ if (eAttachment.left === 'left') {
1582
+ left -= width;
1583
+ eAttachment.left = 'right';
1584
+ } else if (eAttachment.left === 'center') {
1585
+ left -= width / 2;
1586
+ eAttachment.left = 'right';
1587
+ }
1588
+ }
1589
+ }
1590
+
1591
+ if (typeof pin === 'string') {
1592
+ pin = pin.split(',').map(function (p) {
1593
+ return p.trim();
1594
+ });
1595
+ } else if (pin === true) {
1596
+ pin = ['top', 'left', 'right', 'bottom'];
1597
+ }
1598
+
1599
+ pin = pin || [];
1600
+
1601
+ var pinned = [];
1602
+ var oob = [];
1603
+
1604
+ if (top < bounds[1]) {
1605
+ if (pin.indexOf('top') >= 0) {
1606
+ top = bounds[1];
1607
+ pinned.push('top');
1608
+ } else {
1609
+ oob.push('top');
1610
+ }
1611
+ }
1612
+
1613
+ if (top + height > bounds[3]) {
1614
+ if (pin.indexOf('bottom') >= 0) {
1615
+ top = bounds[3] - height;
1616
+ pinned.push('bottom');
1617
+ } else {
1618
+ oob.push('bottom');
1619
+ }
1620
+ }
1621
+
1622
+ if (left < bounds[0]) {
1623
+ if (pin.indexOf('left') >= 0) {
1624
+ left = bounds[0];
1625
+ pinned.push('left');
1626
+ } else {
1627
+ oob.push('left');
1628
+ }
1629
+ }
1630
+
1631
+ if (left + width > bounds[2]) {
1632
+ if (pin.indexOf('right') >= 0) {
1633
+ left = bounds[2] - width;
1634
+ pinned.push('right');
1635
+ } else {
1636
+ oob.push('right');
1637
+ }
1638
+ }
1639
+
1640
+ if (pinned.length) {
1641
+ (function () {
1642
+ var pinnedClass = undefined;
1643
+ if (typeof _this.options.pinnedClass !== 'undefined') {
1644
+ pinnedClass = _this.options.pinnedClass;
1645
+ } else {
1646
+ pinnedClass = _this.getClass('pinned');
1647
+ }
1648
+
1649
+ addClasses.push(pinnedClass);
1650
+ pinned.forEach(function (side) {
1651
+ addClasses.push(pinnedClass + '-' + side);
1652
+ });
1653
+ })();
1654
+ }
1655
+
1656
+ if (oob.length) {
1657
+ (function () {
1658
+ var oobClass = undefined;
1659
+ if (typeof _this.options.outOfBoundsClass !== 'undefined') {
1660
+ oobClass = _this.options.outOfBoundsClass;
1661
+ } else {
1662
+ oobClass = _this.getClass('out-of-bounds');
1663
+ }
1664
+
1665
+ addClasses.push(oobClass);
1666
+ oob.forEach(function (side) {
1667
+ addClasses.push(oobClass + '-' + side);
1668
+ });
1669
+ })();
1670
+ }
1671
+
1672
+ if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {
1673
+ eAttachment.left = tAttachment.left = false;
1674
+ }
1675
+ if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {
1676
+ eAttachment.top = tAttachment.top = false;
1677
+ }
1678
+
1679
+ if (tAttachment.top !== targetAttachment.top || tAttachment.left !== targetAttachment.left || eAttachment.top !== _this.attachment.top || eAttachment.left !== _this.attachment.left) {
1680
+ _this.updateAttachClasses(eAttachment, tAttachment);
1681
+ _this.trigger('update', {
1682
+ attachment: eAttachment,
1683
+ targetAttachment: tAttachment
1684
+ });
1685
+ }
1686
+ });
1687
+
1688
+ defer(function () {
1689
+ if (!(_this.options.addTargetClasses === false)) {
1690
+ updateClasses(_this.target, addClasses, allClasses);
1691
+ }
1692
+ updateClasses(_this.element, addClasses, allClasses);
1693
+ });
1694
+
1695
+ return { top: top, left: left };
1696
+ }
1697
+ });
1698
+ /* globals TetherBase */
1699
+
1700
+ 'use strict';
1701
+
1702
+ var _TetherBase$Utils = TetherBase.Utils;
1703
+ var getBounds = _TetherBase$Utils.getBounds;
1704
+ var updateClasses = _TetherBase$Utils.updateClasses;
1705
+ var defer = _TetherBase$Utils.defer;
1706
+
1707
+ TetherBase.modules.push({
1708
+ position: function position(_ref) {
1709
+ var _this = this;
1710
+
1711
+ var top = _ref.top;
1712
+ var left = _ref.left;
1713
+
1714
+ var _cache = this.cache('element-bounds', function () {
1715
+ return getBounds(_this.element);
1716
+ });
1717
+
1718
+ var height = _cache.height;
1719
+ var width = _cache.width;
1720
+
1721
+ var targetPos = this.getTargetBounds();
1722
+
1723
+ var bottom = top + height;
1724
+ var right = left + width;
1725
+
1726
+ var abutted = [];
1727
+ if (top <= targetPos.bottom && bottom >= targetPos.top) {
1728
+ ['left', 'right'].forEach(function (side) {
1729
+ var targetPosSide = targetPos[side];
1730
+ if (targetPosSide === left || targetPosSide === right) {
1731
+ abutted.push(side);
1732
+ }
1733
+ });
1734
+ }
1735
+
1736
+ if (left <= targetPos.right && right >= targetPos.left) {
1737
+ ['top', 'bottom'].forEach(function (side) {
1738
+ var targetPosSide = targetPos[side];
1739
+ if (targetPosSide === top || targetPosSide === bottom) {
1740
+ abutted.push(side);
1741
+ }
1742
+ });
1743
+ }
1744
+
1745
+ var allClasses = [];
1746
+ var addClasses = [];
1747
+
1748
+ var sides = ['left', 'top', 'right', 'bottom'];
1749
+ allClasses.push(this.getClass('abutted'));
1750
+ sides.forEach(function (side) {
1751
+ allClasses.push(_this.getClass('abutted') + '-' + side);
1752
+ });
1753
+
1754
+ if (abutted.length) {
1755
+ addClasses.push(this.getClass('abutted'));
1756
+ }
1757
+
1758
+ abutted.forEach(function (side) {
1759
+ addClasses.push(_this.getClass('abutted') + '-' + side);
1760
+ });
1761
+
1762
+ defer(function () {
1763
+ if (!(_this.options.addTargetClasses === false)) {
1764
+ updateClasses(_this.target, addClasses, allClasses);
1765
+ }
1766
+ updateClasses(_this.element, addClasses, allClasses);
1767
+ });
1768
+
1769
+ return true;
1770
+ }
1771
+ });
1772
+ /* globals TetherBase */
1773
+
1774
+ 'use strict';
1775
+
1776
+ var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
1777
+
1778
+ TetherBase.modules.push({
1779
+ position: function position(_ref) {
1780
+ var top = _ref.top;
1781
+ var left = _ref.left;
1782
+
1783
+ if (!this.options.shift) {
1784
+ return;
1785
+ }
1786
+
1787
+ var shift = this.options.shift;
1788
+ if (typeof this.options.shift === 'function') {
1789
+ shift = this.options.shift.call(this, { top: top, left: left });
1790
+ }
1791
+
1792
+ var shiftTop = undefined,
1793
+ shiftLeft = undefined;
1794
+ if (typeof shift === 'string') {
1795
+ shift = shift.split(' ');
1796
+ shift[1] = shift[1] || shift[0];
1797
+
1798
+ var _shift = shift;
1799
+
1800
+ var _shift2 = _slicedToArray(_shift, 2);
1801
+
1802
+ shiftTop = _shift2[0];
1803
+ shiftLeft = _shift2[1];
1804
+
1805
+ shiftTop = parseFloat(shiftTop, 10);
1806
+ shiftLeft = parseFloat(shiftLeft, 10);
1807
+ } else {
1808
+ shiftTop = shift.top;
1809
+ shiftLeft = shift.left;
1810
+ }
1811
+
1812
+ top += shiftTop;
1813
+ left += shiftLeft;
1814
+
1815
+ return { top: top, left: left };
1816
+ }
1817
+ });
1818
+ return Tether;
1819
+
1820
+ }));
admin/lib/shepherd/tether/tether.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.Tether=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){var o=t.getBoundingClientRect(),i={};for(var n in o)i[n]=o[n];try{if(t.ownerDocument!==document){var r=t.ownerDocument.defaultView.frameElement;if(r){var s=e(r);i.top+=s.top,i.bottom+=s.top,i.left+=s.left,i.right+=s.left}}}catch(a){}return i}function o(t){var e=getComputedStyle(t)||{},o=e.position,i=[];if("fixed"===o)return[t];for(var n=t;(n=n.parentNode)&&n&&1===n.nodeType;){var r=void 0;try{r=getComputedStyle(n)}catch(s){}if("undefined"==typeof r||null===r)return i.push(n),i;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll|overlay)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&i.push(n)}return i.push(t.ownerDocument.body),t.ownerDocument!==document&&i.push(t.ownerDocument.defaultView),i}function i(){O&&document.body.removeChild(O),O=null}function n(t){var o=void 0;t===document?(o=document,t=document.documentElement):o=t.ownerDocument;var i=o.documentElement,n=e(t),r=A();return n.top-=r.top,n.left-=r.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.right),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-i.clientTop,n.left=n.left-i.clientLeft,n.right=o.body.clientWidth-n.width-n.left,n.bottom=o.body.clientHeight-n.height-n.top,n}function r(t){return t.offsetParent||document.documentElement}function s(){if(T)return T;var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");a(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var i=t.offsetWidth;o===i&&(i=e.clientWidth),document.body.removeChild(e);var n=o-i;return T={width:n,height:n}}function a(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function f(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),i=d(t).replace(o," ");u(t,i)}}function l(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{f(t,e);var o=d(t)+(" "+e);u(t,o)}}function h(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=d(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function d(t){return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString?t.className.baseVal:t.className}function u(t,e){t.setAttribute("class",e)}function p(t,e,o){o.forEach(function(o){e.indexOf(o)===-1&&h(t,o)&&f(t,o)}),e.forEach(function(e){h(t,e)||l(t,e)})}function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function g(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function m(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}function v(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),i=0;i<e;i++)o[i]=arguments[i];return o.forEach(function(e){var o=e.top,i=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof i&&(i=parseFloat(i,10)),t.top+=o,t.left+=i}),t}function y(t,e){return"string"==typeof t.left&&t.left.indexOf("%")!==-1&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&t.top.indexOf("%")!==-1&&(t.top=parseFloat(t.top,10)/100*e.height),t}function b(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=e,o=n(e),i=o,r=getComputedStyle(e);if(e=[i.left,i.top,o.width+i.left,o.height+i.top],t.ownerDocument!==document){var s=t.ownerDocument.defaultView;e[0]+=s.pageXOffset,e[1]+=s.pageYOffset,e[2]+=s.pageXOffset,e[3]+=s.pageYOffset}I.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(r["border"+t+"Width"]):e[o]-=parseFloat(r["border"+t+"Width"])})}(),e}var w=function(){function t(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,o,i){return o&&t(e.prototype,o),i&&t(e,i),e}}(),C=void 0;"undefined"==typeof C&&(C={modules:[]});var O=null,E=function(){var t=0;return function(){return++t}}(),x={},A=function(){var t=O;t&&document.body.contains(t)||(t=document.createElement("div"),t.setAttribute("data-tether-id",E()),a(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),O=t);var o=t.getAttribute("data-tether-id");return"undefined"==typeof x[o]&&(x[o]=e(t),S(function(){delete x[o]})),x[o]},T=null,P=[],S=function(t){P.push(t)},W=function(){for(var t=void 0;t=P.pop();)t()},M=function(){function e(){t(this,e)}return w(e,[{key:"on",value:function(t,e,o){var i=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[t])if("undefined"==typeof e)delete this.bindings[t];else for(var o=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,o=arguments.length,i=Array(o>1?o-1:0),n=1;n<o;n++)i[n-1]=arguments[n];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,f=r.once,l=a;"undefined"==typeof l&&(l=this),s.apply(l,i),f?this.bindings[t].splice(e,1):++e}}}}]),e}();C.Utils={getActualBoundingClientRect:e,getScrollParents:o,getBounds:n,getOffsetParent:r,extend:a,addClass:l,removeClass:f,hasClass:h,updateClasses:p,defer:S,flush:W,uniqueId:E,Evented:M,getScrollBarSize:s,removeUtilElements:i};var k=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),w=function(){function t(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,o,i){return o&&t(e.prototype,o),i&&t(e,i),e}}(),_=function(t,e,o){for(var i=!0;i;){var n=t,r=e,s=o;i=!1,null===n&&(n=Function.prototype);var a=Object.getOwnPropertyDescriptor(n,r);if(void 0!==a){if("value"in a)return a.value;var f=a.get;if(void 0===f)return;return f.call(s)}var l=Object.getPrototypeOf(n);if(null===l)return;t=l,e=r,o=s,i=!0,a=l=void 0}};if("undefined"==typeof C)throw new Error("You must include the utils.js file before tether.js");var z=C.Utils,o=z.getScrollParents,n=z.getBounds,r=z.getOffsetParent,a=z.extend,l=z.addClass,f=z.removeClass,p=z.updateClasses,S=z.defer,W=z.flush,s=z.getScrollBarSize,i=z.removeUtilElements,B=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){var i=e[o];if(void 0!==t.style[i])return i}}(),j=[],F=function(){j.forEach(function(t){t.position(!1)}),W()};!function(){var t=null,e=null,o=null,i=function n(){return"undefined"!=typeof e&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(n,250))):void("undefined"!=typeof t&&m()-t<10||(null!=o&&(clearTimeout(o),o=null),t=m(),F(),e=m()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,i)})}();var Y={center:"center",left:"right",right:"left"},D={middle:"middle",top:"bottom",bottom:"top"},L={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},X=function(t,e){var o=t.left,i=t.top;return"auto"===o&&(o=Y[e.left]),"auto"===i&&(i=D[e.top]),{left:o,top:i}},H=function(t){var e=t.left,o=t.top;return"undefined"!=typeof L[t.left]&&(e=L[t.left]),"undefined"!=typeof L[t.top]&&(o=L[t.top]),{left:e,top:o}},N=function(t){var e=t.split(" "),o=k(e,2),i=o[0],n=o[1];return{top:i,left:n}},R=N,U=function(e){function h(e){var o=this;t(this,h),_(Object.getPrototypeOf(h.prototype),"constructor",this).call(this),this.position=this.position.bind(this),j.push(this),this.history=[],this.setOptions(e,!1),C.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return c(h,e),w(h,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=a(n,t);var r=this.options,s=r.element,f=r.target,h=r.targetModifier;if(this.element=s,this.target=f,this.targetModifier=h,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),l(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&l(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=R(this.options.targetAttachment),this.attachment=R(this.options.attachment),this.offset=N(this.options.offset),this.targetOffset=N(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=o(this.target),this.options.enabled!==!1&&this.enable(i)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return n(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=n(this.target),e={height:t.height,width:t.width,top:t.top,left:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=n(o);var i=getComputedStyle(o),r=o.scrollWidth>o.clientWidth||[i.overflow,i.overflowX].indexOf("scroll")>=0||this.target!==document.body,s=0;r&&(s=15);var a=t.height-parseFloat(i.borderTopWidth)-parseFloat(i.borderBottomWidth)-s,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(i.borderLeftWidth)-15},f=0;a<408&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-a);return e.top=l*(a-e.height-f)+t.top+parseFloat(i.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];this.options.addTargetClasses!==!1&&l(this.target,this.getClass("enabled")),l(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==t.target.ownerDocument&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;f(this.target,this.getClass("enabled")),f(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),j.forEach(function(e,o){e===t&&j.splice(o,1)}),0===j.length&&i()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var i=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var n=this._addAttachClasses;t.top&&n.push(this.getClass("element-attached")+"-"+t.top),t.left&&n.push(this.getClass("element-attached")+"-"+t.left),e.top&&n.push(this.getClass("target-attached")+"-"+e.top),e.left&&n.push(this.getClass("target-attached")+"-"+e.left);var r=[];i.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),S(function(){"undefined"!=typeof o._addAttachClasses&&(p(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&p(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var o=X(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var i=this.cache("element-bounds",function(){return n(t.element)}),a=i.width,f=i.height;if(0===a&&0===f&&"undefined"!=typeof this.lastSize){var l=this.lastSize;a=l.width,f=l.height}else this.lastSize={width:a,height:f};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=h,u=y(H(this.attachment),{width:a,height:f}),p=y(H(o),d),c=y(this.offset,{width:a,height:f}),g=y(this.targetOffset,d);u=v(u,c),p=v(p,g);for(var m=h.left+p.left-u.left,b=h.top+p.top-u.top,w=0;w<C.modules.length;++w){var O=C.modules[w],E=O.position.call(this,{left:m,top:b,targetAttachment:o,targetPos:h,elementPos:i,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:P,attachment:this.attachment});if(E===!1)return!1;"undefined"!=typeof E&&"object"==typeof E&&(b=E.top,m=E.left)}var x={page:{top:b,left:m},viewport:{top:b-pageYOffset,bottom:pageYOffset-b-f+innerHeight,left:m-pageXOffset,right:pageXOffset-m-a+innerWidth}},A=this.target.ownerDocument,T=A.defaultView,P=void 0;return T.innerHeight>A.documentElement.clientHeight&&(P=this.cache("scrollbar-size",s),x.viewport.bottom-=P.height),T.innerWidth>A.documentElement.clientWidth&&(P=this.cache("scrollbar-size",s),x.viewport.right-=P.width),["","static"].indexOf(A.body.style.position)!==-1&&["","static"].indexOf(A.body.parentElement.style.position)!==-1||(x.page.bottom=A.body.scrollHeight-b-f,x.page.right=A.body.scrollWidth-m-a),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return r(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return n(e)}),i=getComputedStyle(e),s=o,a={};if(["Top","Left","Bottom","Right"].forEach(function(t){a[t.toLowerCase()]=parseFloat(i["border"+t+"Width"])}),o.right=A.body.scrollWidth-o.left-s.width+a.right,o.bottom=A.body.scrollHeight-o.top-s.height+a.bottom,x.page.top>=o.top+a.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+a.left&&x.page.right>=o.right){var f=e.scrollTop,l=e.scrollLeft;x.offset={top:x.page.top-o.top+f-a.top,left:x.page.left-o.left+l-a.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&W(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var i in t){o[i]={};for(var n in t[i]){for(var s=!1,f=0;f<this.history.length;++f){var l=this.history[f];if("undefined"!=typeof l[i]&&!g(l[i][n],t[i][n])){s=!0;break}}s||(o[i][n]=!0)}}var h={top:"",left:"",right:"",bottom:""},d=function(t,o){var i="undefined"!=typeof e.options.optimizations,n=i?e.options.optimizations.gpu:null;if(n!==!1){var r=void 0,s=void 0;t.top?(h.top=0,r=o.top):(h.bottom=0,r=-o.bottom),t.left?(h.left=0,s=o.left):(h.right=0,s=-o.right),"number"==typeof window.devicePixelRatio&&devicePixelRatio%1===0&&(s=Math.round(s*devicePixelRatio)/devicePixelRatio,r=Math.round(r*devicePixelRatio)/devicePixelRatio),h[B]="translateX("+s+"px) translateY("+r+"px)","msTransform"!==B&&(h[B]+=" translateZ(0)")}else t.top?h.top=o.top+"px":h.bottom=o.bottom+"px",t.left?h.left=o.left+"px":h.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(h.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(h.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeof o.offset&&o.offset.top&&o.offset.left?!function(){h.position="absolute";var i=e.cache("target-offsetparent",function(){return r(e.target)});r(e.element)!==i&&S(function(){e.element.parentNode.removeChild(e.element),i.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(h.position="absolute",d({top:!0,left:!0},t.page)),!u)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var p=function(t){var e=t.ownerDocument,o=e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement;return o===t},c=!0,m=this.element.parentNode;m&&1===m.nodeType&&"BODY"!==m.tagName&&!p(m);){if("static"!==getComputedStyle(m).position){c=!1;break}m=m.parentNode}c||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var v={},y=!1;for(var n in h){var b=h[n],w=this.element.style[n];w!==b&&(y=!0,v[n]=b)}y&&S(function(){a(e.element.style,v),e.trigger("repositioned")})}}}]),h}(M);U.modules=[],C.position=F;var V=a(U,C),k=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),z=C.Utils,n=z.getBounds,a=z.extend,p=z.updateClasses,S=z.defer,I=["left","top","right","bottom"];C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,r=t.targetAttachment;if(!this.options.constraints)return!0;var s=this.cache("element-bounds",function(){return n(e.element)}),f=s.height,l=s.width;if(0===l&&0===f&&"undefined"!=typeof this.lastSize){var h=this.lastSize;l=h.width,f=h.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,c=d.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&g.push(e),o&&g.push(o)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=a({},r),y=a({},this.attachment);return this.options.constraints.forEach(function(t){var n=t.to,s=t.attachment,a=t.pin;"undefined"==typeof s&&(s="");var h=void 0,d=void 0;if(s.indexOf(" ")>=0){var p=s.split(" "),g=k(p,2);d=g[0],h=g[1]}else h=d=s;var w=b(e,n);"target"!==d&&"both"!==d||(o<w[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+f>w[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&("top"===v.top&&("bottom"===y.top&&o<w[1]?(o+=u,v.top="bottom",o+=f,y.top="top"):"top"===y.top&&o+f>w[3]&&o-(f-u)>=w[1]&&(o-=f-u,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+f>w[3]?(o-=u,v.top="top",o-=f,y.top="bottom"):"bottom"===y.top&&o<w[1]&&o+(2*f-u)<=w[3]&&(o+=f-u,v.top="top",y.top="top")),"middle"===v.top&&(o+f>w[3]&&"top"===y.top?(o-=f,y.top="bottom"):o<w[1]&&"bottom"===y.top&&(o+=f,y.top="top"))),"target"!==h&&"both"!==h||(i<w[0]&&"left"===v.left&&(i+=c,v.left="right"),i+l>w[2]&&"right"===v.left&&(i-=c,v.left="left")),"together"===h&&(i<w[0]&&"left"===v.left?"right"===y.left?(i+=c,v.left="right",i+=l,y.left="left"):"left"===y.left&&(i+=c,v.left="right",i-=l,y.left="right"):i+l>w[2]&&"right"===v.left?"left"===y.left?(i-=c,v.left="left",i-=l,y.left="right"):"right"===y.left&&(i-=c,v.left="left",i+=l,y.left="left"):"center"===v.left&&(i+l>w[2]&&"left"===y.left?(i-=l,y.left="right"):i<w[0]&&"right"===y.left&&(i+=l,y.left="left"))),"element"!==d&&"both"!==d||(o<w[1]&&"bottom"===y.top&&(o+=f,y.top="top"),o+f>w[3]&&"top"===y.top&&(o-=f,y.top="bottom")),"element"!==h&&"both"!==h||(i<w[0]&&("right"===y.left?(i+=l,y.left="left"):"center"===y.left&&(i+=l/2,y.left="left")),i+l>w[2]&&("left"===y.left?(i-=l,y.left="right"):"center"===y.left&&(i-=l/2,y.left="right"))),"string"==typeof a?a=a.split(",").map(function(t){return t.trim()}):a===!0&&(a=["top","left","right","bottom"]),a=a||[];var C=[],O=[];o<w[1]&&(a.indexOf("top")>=0?(o=w[1],C.push("top")):O.push("top")),o+f>w[3]&&(a.indexOf("bottom")>=0?(o=w[3]-f,C.push("bottom")):O.push("bottom")),i<w[0]&&(a.indexOf("left")>=0?(i=w[0],C.push("left")):O.push("left")),i+l>w[2]&&(a.indexOf("right")>=0?(i=w[2]-l,C.push("right")):O.push("right")),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(C.indexOf("left")>=0||C.indexOf("right")>=0)&&(y.left=v.left=!1),(C.indexOf("top")>=0||C.indexOf("bottom")>=0)&&(y.top=v.top=!1),v.top===r.top&&v.left===r.left&&y.top===e.attachment.top&&y.left===e.attachment.left||(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),S(function(){e.options.addTargetClasses!==!1&&p(e.target,m,g),p(e.element,m,g)}),{top:o,left:i}}});var z=C.Utils,n=z.getBounds,p=z.updateClasses,S=z.defer;C.modules.push({position:function(t){var e=this,o=t.top,i=t.left,r=this.cache("element-bounds",function(){return n(e.element)}),s=r.height,a=r.width,f=this.getTargetBounds(),l=o+s,h=i+a,d=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];e!==i&&e!==h||d.push(t)}),i<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];e!==o&&e!==l||d.push(t)});var u=[],c=[],g=["left","top","right","bottom"];return u.push(this.getClass("abutted")),g.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&c.push(this.getClass("abutted")),d.forEach(function(t){c.push(e.getClass("abutted")+"-"+t)}),S(function(){e.options.addTargetClasses!==!1&&p(e.target,c,u),p(e.element,c,u)}),!0}});var k=function(){function t(t,e){var o=[],i=!0,n=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(i=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);i=!0);}catch(f){n=!0,r=f}finally{try{!i&&a["return"]&&a["return"]()}finally{if(n)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return C.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var i=this.options.shift;"function"==typeof this.options.shift&&(i=this.options.shift.call(this,{top:e,left:o}));var n=void 0,r=void 0;if("string"==typeof i){i=i.split(" "),i[1]=i[1]||i[0];var s=i,a=k(s,2);n=a[0],r=a[1],n=parseFloat(n,10),r=parseFloat(r,10)}else n=i.top,r=i.left;return e+=n,o+=r,{top:e,left:o}}}}),V});
admin/partials/wpvr-admin-display.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  /**
4
  * Provide a admin area view for the plugin
5
  *
1
  <?php
2
+
3
  /**
4
  * Provide a admin area view for the plugin
5
  *
admin/partials/wpvr-meta-box-builder-display.php DELETED
@@ -1,614 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
- /**
4
- * Provide a admin area view for the plugin
5
- *
6
- * This file is used to markup the admin-facing aspects of the plugin.
7
- *
8
- * @link http://rextheme.com/
9
- * @since 1.0.0
10
- *
11
- * @package Wpvr
12
- * @subpackage Wpvr/admin/partials
13
- */
14
- ?>
15
- <?php
16
-
17
- $post = '';
18
- $id = '';
19
- $postdata = array();
20
- $post = get_post();
21
- $id = $post->ID;
22
-
23
- $postdata = get_post_meta( $id, 'panodata', true );
24
- $panoid = 'pano'.$id;
25
-
26
- if (isset($postdata['vidid'])) {
27
- ?>
28
- <div class="iframe-wrapper">
29
- <i class="fa fa-times" id="cross"></i>
30
- <div id="custom-ifram" style="display: none;">
31
-
32
-
33
- </div>
34
- <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
35
- <?php
36
- echo $postdata['panoviddata'];
37
- ?>
38
- <?php
39
- if ($postdata['vidtype'] == 'selfhost') {
40
- ?>
41
- <script>
42
-
43
- videojs(<?php echo $postdata['vidid']; ?>, {
44
- plugins: {
45
- pannellum: {}
46
- }
47
- });
48
- </script>
49
- <?php
50
- }
51
- ?>
52
- </div>
53
- </div>
54
-
55
- <div class="rex-add-coordinates" style="text-align: center;">
56
- <ul>
57
- <li>
58
- <div id="panodata" style="text-align: center; font-weight: bold;">
59
- </div>
60
- </li>
61
- <li class="rex-hide-coordinates add-pitch">
62
- <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
63
- <i class="fa fa-arrow-down toppitch"></i>
64
- </li>
65
- </ul>
66
- </div>
67
- <?php
68
- }
69
- elseif (isset($postdata['streetviewdata'])) {
70
- ?>
71
- <div class="iframe-wrapper">
72
- <i class="fa fa-times" id="cross"></i>
73
- <div id="custom-ifram" style="display: none;">
74
-
75
- </div>
76
- <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
77
- <?php
78
- echo $postdata['streetviewdata'];
79
- ?>
80
- </div>
81
- </div>
82
-
83
- <div class="rex-add-coordinates" style="text-align: center;">
84
- <ul>
85
- <li>
86
- <div id="panodata" style="text-align: center; font-weight: bold;">
87
- </div>
88
- </li>
89
- <li class="rex-hide-coordinates add-pitch">
90
- <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
91
- <i class="fa fa-arrow-down toppitch"></i>
92
- </li>
93
- </ul>
94
- </div>
95
- <?php
96
- }
97
- elseif (isset($postdata['flat_image'])) {
98
- ?>
99
- <div class="iframe-wrapper">
100
- <i class="fa fa-times" id="cross"></i>
101
- <div id="custom-ifram" style="display: none;">
102
-
103
- </div>
104
- <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="height: 100%;">
105
- <img src="<?php echo $postdata['flat_image_url']; ?>" style="width: 600px">
106
- </div>
107
- </div>
108
-
109
- <div class="rex-add-coordinates" style="text-align: center;">
110
- <ul>
111
- <li>
112
- <div id="panodata" style="text-align: center; font-weight: bold;">
113
- </div>
114
- </li>
115
- <li class="rex-hide-coordinates add-pitch">
116
- <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
117
- <i class="fa fa-arrow-down toppitch"></i>
118
- </li>
119
- </ul>
120
- </div>
121
- <?php
122
- }
123
- else {
124
- $control = false;
125
- if (isset($postdata['showControls'])) {
126
- $control = $postdata['showControls'];
127
- }
128
- $compass = false;
129
- if (isset($postdata['compass'])) {
130
- $compass = $postdata['compass'];
131
- }
132
- $mouseZoom = true;
133
- if (isset($postdata['mouseZoom'])) {
134
- $mouseZoom = $postdata['mouseZoom'];
135
- }
136
- $draggable = true;
137
- if (isset($postdata['draggable'])) {
138
- $draggable = $postdata['draggable'];
139
- }
140
- $diskeyboard = false;
141
- if (isset($postdata['diskeyboard'])) {
142
- $diskeyboard = $postdata['diskeyboard'];
143
- }
144
- $keyboardzoom = true;
145
- if (isset($postdata['keyboardzoom'])) {
146
- $keyboardzoom = $postdata['keyboardzoom'];
147
- }
148
- $autoload = false;
149
- if (isset($postdata['autoLoad'])) {
150
- $autoload = $postdata['autoLoad'];
151
- }
152
-
153
- $default_scene = '';
154
- if (isset($postdata['defaultscene'])) {
155
- $default_scene = $postdata['defaultscene'];
156
- }
157
-
158
- $preview = '';
159
- if (isset($postdata['preview'])) {
160
- $preview = $postdata['preview'];
161
- }
162
-
163
- $autorotation = '';
164
- if (isset($postdata["autoRotate"])) {
165
- $autorotation = $postdata["autoRotate"];
166
- }
167
- $autorotationinactivedelay = '';
168
- if (isset($postdata["autoRotateInactivityDelay"])) {
169
- $autorotationinactivedelay = $postdata["autoRotateInactivityDelay"];
170
- }
171
- $autorotationstopdelay = '';
172
- if (isset($postdata["autoRotateStopDelay"])) {
173
- $autorotationstopdelay = $postdata["autoRotateStopDelay"];
174
- }
175
-
176
- $scene_fade_duration = '';
177
- if (isset($postdata['scenefadeduration'])) {
178
- $scene_fade_duration = $postdata['scenefadeduration'];
179
- }
180
-
181
- $default_global_zoom = '';
182
- if (isset($postdata['hfov'])) {
183
- $default_global_zoom = $postdata['hfov'];
184
- }
185
-
186
- $max_global_zoom = '';
187
- if (isset($postdata['maxHfov'])) {
188
- $max_global_zoom = $postdata['maxHfov'];
189
- }
190
-
191
- $min_global_zoom = '';
192
- if (isset($postdata['minHfov'])) {
193
- $min_global_zoom = $postdata['minHfov'];
194
- }
195
-
196
- $panodata = '';
197
- if (isset($postdata['panodata'])) {
198
- $panodata = $postdata['panodata'];
199
- }
200
-
201
-
202
- $default_data = array();
203
- if($default_global_zoom != '' && $max_global_zoom != '' && $min_global_zoom != ''){
204
- $default_data = array("firstScene"=>$default_scene,"sceneFadeDuration"=>$scene_fade_duration,"hfov"=>$default_global_zoom,"maxHfov"=>$max_global_zoom,"minHfov"=>$min_global_zoom);
205
- }else{
206
- $default_data = array("firstScene"=>$default_scene,"sceneFadeDuration"=>$scene_fade_duration);
207
- }
208
-
209
- $scene_data = array();
210
-
211
- if (!empty($panodata)) {
212
- foreach ($panodata["scene-list"] as $panoscenes) {
213
-
214
- $scene_ititle = '';
215
- if (isset($panoscenes["scene-ititle"])) {
216
- $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
217
- }
218
-
219
- $scene_author = '';
220
- if (isset($panoscenes["scene-author"])) {
221
- $scene_author = sanitize_text_field($panoscenes["scene-author"]);
222
- }
223
-
224
- $scene_vaov = 180;
225
- if (isset($panoscenes["scene-vaov"])) {
226
- $scene_vaov = (float)$panoscenes["scene-vaov"];
227
- }
228
-
229
- $scene_haov = 360;
230
- if (isset($panoscenes["scene-haov"])) {
231
- $scene_haov = (float)$panoscenes["scene-haov"];
232
- }
233
-
234
-
235
- $scene_vertical_offset = 0;
236
- if (isset($panoscenes["scene-vertical-offset"])) {
237
- $scene_vertical_offset = (float)$panoscenes["scene-vertical-offset"];
238
- }
239
-
240
- $default_scene_pitch = null;
241
- if (isset($panoscenes["scene-pitch"])) {
242
- $default_scene_pitch = (float)$panoscenes["scene-pitch"];
243
- }
244
-
245
- $default_scene_yaw = null;
246
- if (isset($panoscenes["scene-yaw"])) {
247
- $default_scene_yaw = (float)$panoscenes["scene-yaw"];
248
- }
249
-
250
- $scene_max_pitch = '';
251
- if (isset($panoscenes["scene-maxpitch"])) {
252
- $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
253
- }
254
-
255
-
256
- $scene_min_pitch = '';
257
- if (isset($panoscenes["scene-minpitch"])) {
258
- $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
259
- }
260
-
261
-
262
- $scene_max_yaw = '';
263
- if (isset($panoscenes["scene-maxyaw"])) {
264
- $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
265
- }
266
-
267
-
268
- $scene_min_yaw = '';
269
- if (isset($panoscenes["scene-minyaw"])) {
270
- $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
271
- }
272
-
273
-
274
- $default_zoom = 100;
275
- if (isset($panoscenes["scene-zoom"]) && $panoscenes["scene-zoom"] != '') {
276
- $default_zoom = (int)$panoscenes["scene-zoom"];
277
-
278
- }else{
279
- if($default_global_zoom != ''){
280
- $default_zoom = (int)$default_global_zoom;
281
-
282
- }
283
- }
284
-
285
-
286
-
287
- $max_zoom = 120;
288
- if (isset($panoscenes["scene-maxzoom"]) && $panoscenes["scene-maxzoom"] != '') {
289
- $max_zoom = (int)$panoscenes["scene-maxzoom"];
290
- }else{
291
- if($max_global_zoom != ''){
292
- $max_zoom = (int)$max_global_zoom;
293
- }
294
- }
295
-
296
-
297
-
298
-
299
- $min_zoom = 50;
300
- if (isset($panoscenes["scene-minzoom"]) && $panoscenes["scene-minzoom"] != '') {
301
- $min_zoom = (int)$panoscenes["scene-minzoom"];
302
- }else{
303
- if($min_global_zoom != ''){
304
- $min_zoom = (int)$min_global_zoom;
305
- }
306
- }
307
-
308
- $hotspot_datas = array();
309
- if (isset($panoscenes["hotspot-list"])) {
310
- $hotspot_datas = $panoscenes["hotspot-list"];
311
- }
312
-
313
- $hotspots = array();
314
- foreach ($hotspot_datas as $hotspot_data) {
315
-
316
- $hotspot_scene_pitch = '';
317
- if (isset($hotspot_data["hotspot-scene-pitch"])) {
318
- $hotspot_scene_pitch = $hotspot_data["hotspot-scene-pitch"];
319
- }
320
- $hotspot_scene_yaw = '';
321
- if (isset($hotspot_data["hotspot-scene-yaw"])) {
322
- $hotspot_scene_yaw = $hotspot_data["hotspot-scene-yaw"];
323
- }
324
-
325
- $hotspot_type = $hotspot_data["hotspot-type"] !== 'scene' ? 'info' : $hotspot_data["hotspot-type"];
326
- $hotspot_content = '';
327
-
328
- ob_start();
329
- do_action('wpvr_hotspot_content', $hotspot_data);
330
- $hotspot_content = ob_get_clean();
331
-
332
- if(!$hotspot_content) $hotspot_content = $hotspot_data["hotspot-content"];
333
-
334
-
335
- $hotspot_info = array(
336
- "text"=>$hotspot_data["hotspot-title"],
337
- "pitch"=>$hotspot_data["hotspot-pitch"],
338
- "yaw"=>$hotspot_data["hotspot-yaw"],
339
- "type"=>$hotspot_type,
340
- "URL"=>$hotspot_data["hotspot-url"],
341
- "clickHandlerArgs"=>$hotspot_content,
342
- "createTooltipArgs"=>$hotspot_data["hotspot-hover"],
343
- "sceneId"=>$hotspot_data["hotspot-scene"],
344
- "targetPitch"=>(float)$hotspot_scene_pitch,
345
- "targetYaw"=>(float)$hotspot_scene_yaw);
346
- array_push($hotspots, $hotspot_info);
347
- if (empty($hotspot_data["hotspot-scene"])) {
348
- unset($hotspot_info['targetPitch']);
349
- unset($hotspot_info['targetYaw']);
350
- }
351
- }
352
-
353
- $scene_info = array();
354
-
355
-
356
- if ($panoscenes["scene-type"] == 'cubemap') {
357
- $pano_type = 'cubemap';
358
- $pano_attachment = array(
359
- $panoscenes["scene-attachment-url-face0"],
360
- $panoscenes["scene-attachment-url-face1"],
361
- $panoscenes["scene-attachment-url-face2"],
362
- $panoscenes["scene-attachment-url-face3"],
363
- $panoscenes["scene-attachment-url-face4"],
364
- $panoscenes["scene-attachment-url-face5"]
365
- );
366
-
367
- $scene_info = array("type"=>$panoscenes["scene-type"],"cubeMap"=>$pano_attachment,"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
368
- }
369
- else {
370
- $scene_info = array("type"=>$panoscenes["scene-type"],"panorama"=>$panoscenes["scene-attachment-url"],"pitch"=>$default_scene_pitch,"maxPitch"=>$scene_max_pitch,"minPitch"=>$scene_min_pitch,"maxYaw"=>$scene_max_yaw,"minYaw"=>$scene_min_yaw,"yaw"=>$default_scene_yaw,"hfov"=>$default_zoom,"maxHfov"=>$max_zoom,"minHfov"=>$min_zoom,"title"=>$scene_ititle,"author"=>$scene_author, "vaov"=>$scene_vaov, "haov"=>$scene_haov, "vOffset"=>$scene_vertical_offset, "hotSpots"=>$hotspots);
371
- }
372
-
373
-
374
-
375
- if (isset($panoscenes["ptyscene"])) {
376
- if ($panoscenes["ptyscene"] == "off") {
377
- unset($scene_info['pitch']);
378
- unset($scene_info['yaw']);
379
- }
380
- }
381
-
382
- if (empty($panoscenes["scene-ititle"])) {
383
- unset($scene_info['title']);
384
- }
385
- if (empty($panoscenes["scene-author"])) {
386
- unset($scene_info['author']);
387
- }
388
-
389
- if (empty($scene_vaov)) {
390
- unset($scene_info['vaov']);
391
- }
392
-
393
- if (empty($scene_haov)) {
394
- unset($scene_info['haov']);
395
- }
396
-
397
- if (empty($scene_vertical_offset)) {
398
- unset($scene_info['vOffset']);
399
- }
400
-
401
- if (isset($panoscenes["cvgscene"])) {
402
- if ($panoscenes["cvgscene"] == "off") {
403
- unset($scene_info['maxPitch']);
404
- unset($scene_info['minPitch']);
405
- }
406
- }
407
-
408
- if (empty($panoscenes["scene-maxpitch"])) {
409
- unset($scene_info['maxPitch']);
410
- }
411
-
412
- if (empty($panoscenes["scene-minpitch"])) {
413
- unset($scene_info['minPitch']);
414
- }
415
-
416
- if (isset($panoscenes["chgscene"])) {
417
- if ($panoscenes["chgscene"] == "off") {
418
- unset($scene_info['maxYaw']);
419
- unset($scene_info['minYaw']);
420
- }
421
- }
422
- if (empty($panoscenes["scene-maxyaw"])) {
423
- unset($scene_info['maxYaw']);
424
- }
425
-
426
- if (empty($panoscenes["scene-minyaw"])) {
427
- unset($scene_info['minYaw']);
428
- }
429
-
430
- // if (isset($panoscenes["czscene"])) {
431
- // if ($panoscenes["czscene"] == "off") {
432
- // unset($scene_info['hfov']);
433
- // unset($scene_info['maxHfov']);
434
- // unset($scene_info['minHfov']);
435
- // }
436
- // }
437
-
438
- $scene_array = array();
439
- $scene_array = array(
440
- $panoscenes["scene-id"]=>$scene_info
441
- );
442
- $scene_data[$panoscenes["scene-id"]] = $scene_info;
443
- }
444
- }
445
-
446
-
447
- $pano_id_array = array();
448
- $pano_id_array = array("panoid"=>$panoid);
449
- $pano_response = array();
450
- $pano_response = array("autoLoad"=>$autoload,"showControls"=>$control,'compass'=>$compass,'mouseZoom'=>$mouseZoom,'draggable'=>$draggable,'disableKeyboardCtrl'=>$diskeyboard,'keyboardZoom'=>$keyboardzoom,"preview"=>$preview,"autoRotate"=>$autorotation,"autoRotateInactivityDelay"=>$autorotationinactivedelay,"autoRotateStopDelay"=>$autorotationstopdelay,"default"=>$default_data,"scenes"=>$scene_data);
451
-
452
- if (empty($autorotation)) {
453
- unset($pano_response['autoRotate']);
454
- unset($pano_response['autoRotateInactivityDelay']);
455
- unset($pano_response['autoRotateStopDelay']);
456
- }
457
- if (empty($autorotationinactivedelay)) {
458
- unset($pano_response['autoRotateInactivityDelay']);
459
- }
460
- if (empty($autorotationstopdelay)) {
461
- unset($pano_response['autoRotateStopDelay']);
462
- }
463
-
464
- $response = array();
465
- $response = array($pano_id_array,$pano_response);
466
- if (!empty($response)) {
467
- $response = json_encode($response);
468
- }
469
-
470
- ?>
471
-
472
- <div class="iframe-wrapper">
473
- <i class="fa fa-times" id="cross"></i>
474
- <div id="custom-ifram" style="display: none;">
475
-
476
- </div>
477
- <div id="<?php echo 'pano'.$id; ?>" class="pano-wrap" style="direction:ltr;">
478
-
479
- </div>
480
- </div>
481
-
482
- <div class="rex-add-coordinates" style="text-align: center;">
483
- <ul>
484
- <li>
485
- <div id="panodata" style="text-align: center; font-weight: bold;">
486
-
487
- </div>
488
- </li>
489
- <li class="rex-hide-coordinates add-pitch">
490
- <span class="rex-tooltiptext">Add This Position into active Hotspot</span>
491
- <i class="fa fa-arrow-down toppitch"></i>
492
- </li>
493
- </ul>
494
-
495
- <div class="scene-gallery vrowl-carousel" style="direction:ltr;">
496
-
497
- </div>
498
-
499
- </div>
500
-
501
- <?php
502
- /**
503
- * Nasim
504
- * include alert modal
505
- */
506
-
507
- ?>
508
- <?php include('wpvr_confirmation_alert.php');?>
509
-
510
-
511
-
512
-
513
-
514
- <script>
515
- var response = <?php echo $response; ?>;
516
- var scenes = response[1];
517
-
518
- if (scenes) {
519
- jQuery.each(scenes.scenes, function (i) {
520
- jQuery.each(scenes.scenes[i]['hotSpots'], function (key, val) {
521
- if (val["clickHandlerArgs"] != "") {
522
- val["clickHandlerFunc"] = wpvrhotspot;
523
- }
524
- if (val["createTooltipArgs"] != "") {
525
- val["createTooltipFunc"] = wpvrtooltip;
526
- }
527
- });
528
- });
529
- }
530
- if (scenes) {
531
- jQuery('.scene-gallery').empty();
532
-
533
- jQuery.each(scenes.scenes, function (key, val) {
534
- if (val.type == 'cubemap') {
535
- var img_data = val.cubeMap[0];
536
- }
537
- else {
538
- var img_data = val.panorama;
539
- }
540
- jQuery('.scene-gallery').append('<ul style="width:150px;"><li class="owlscene owl'+key+'">'+key+'</li><li title="Double click to view scene"><img class="scctrl" id="'+key+'_gallery" src="'+img_data+'"></li></ul>');
541
- });
542
- }
543
-
544
- if (response[1]['scenes'] != "") {
545
- var panoshow = pannellum.viewer(response[0]["panoid"], scenes);
546
-
547
- if (scenes.autoRotate) {
548
- panoshow.on('load', function (){
549
- setTimeout(function(){ panoshow.startAutoRotate(scenes.autoRotate, 0); }, 3000);
550
- });
551
- panoshow.on('scenechange', function (){
552
- setTimeout(function(){ panoshow.startAutoRotate(scenes.autoRotate, 0); }, 3000);
553
- });
554
- }
555
-
556
- var touchtime = 0;
557
- if (scenes) {
558
- jQuery.each(scenes.scenes, function (key, val) {
559
- // document.getElementById(''+key+'_gallery').addEventListener('click', function(e) {
560
- // if (touchtime == 0) {
561
- // touchtime = new Date().getTime();
562
- // }
563
- // else {
564
- // if (((new Date().getTime()) - touchtime) < 800) {
565
- // panoshow.loadScene(key);
566
- // touchtime = 0;
567
- // }
568
- // else {
569
- // touchtime = new Date().getTime();
570
- // }
571
- // }
572
- // });
573
- jQuery(document).on("click",'#' + key + '_gallery',function() {
574
- panoshow.loadScene(key);
575
- });
576
- });
577
- }
578
-
579
- }
580
-
581
- function wpvrhotspot(hotSpotDiv, args) {
582
- var argst = args.replace(/\\/g, '');
583
- jQuery("#custom-ifram").html(argst);
584
- jQuery("#custom-ifram").fadeToggle();
585
- jQuery(".iframe-wrapper").toggleClass("show-modal");
586
- jQuery('button.ff-btn.ff-btn-submit.ff-btn-md').prop('disabled', true);
587
-
588
- //------add to cart button------
589
- jQuery('.wpvr-product-container p.add_to_cart_inline a.button').wrap('<span class="wpvr-cart-wrap"></span>');
590
- }
591
-
592
- function wpvrtooltip(hotSpotDiv, args) {
593
- hotSpotDiv.classList.add('custom-tooltip');
594
- var span = document.createElement('span');
595
- if (args != null) {
596
- args = args.replace(/\\/g, "");
597
- }
598
- span.innerHTML = args;
599
- hotSpotDiv.appendChild(span);
600
- span.style.marginLeft = -(span.scrollWidth - hotSpotDiv.offsetWidth) / 2 + 'px';
601
- span.style.marginTop = -span.scrollHeight - 12 + 'px';
602
- }
603
-
604
- jQuery(document).ready(function($){
605
- jQuery("#cross").on("click", function(e){
606
- e.preventDefault();
607
- jQuery("#custom-ifram").fadeOut();
608
- jQuery(".iframe-wrapper").removeClass("show-modal");
609
- jQuery('iframe').attr('src', $('iframe').attr('src'));
610
- });
611
- });
612
- </script>
613
- <?php
614
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/partials/wpvr-meta-box-shortcode-display.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
- /**
4
- * Provide a admin area view for the plugin
5
- *
6
- * This file is used to markup the admin-facing aspects of the plugin.
7
- *
8
- * @link http://rextheme.com/
9
- * @since 1.0.0
10
- *
11
- * @package Wpvr
12
- * @subpackage Wpvr/admin/partials
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
- <p><?php echo __('For Classic Editor:', 'wpvr'); ?></p>
23
- <p><?php echo __('To use this WP VR tour in your posts or pages use the following shortcode:', 'wpvr'); ?></p>
24
- <p><code>[wpvr id="<?php echo $id; ?>"]</code><?php ($slug ? 'or' : '') ?></p>
25
- <p><?php echo __('For Gutenberg:', 'wpvr'); ?></p>
26
- <p>Use id:<code><?php echo $id; ?></code>on WP VR block setting</p>
27
- <p><?php echo __('Check how to use: ', 'wpvr'); ?><a href="https://rextheme.com/docs/wp-vr/gutenberg-block/" target="blank"> WP VR block</a></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/partials/wpvr_confirmation_alert.php CHANGED
@@ -1,24 +1,6 @@
1
- <div class="wpvr-delete-alert-wrapper">
2
- <!-- <div class="wpvr-delete-confirmation">
3
- <span class="icon">
4
- <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-alert-triangle" width="54" height="54" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffa500" fill="none" stroke-linecap="round" stroke-linejoin="round">
5
- <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
6
- <path d="M12 9v2m0 4v.01" />
7
- <path d="M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75" />
8
- </svg>
9
- </span>
10
- <h3 id="confirm_text"><?php //echo __('Turning On The Video Option Will Erase Your Virtual Tour Data. Are You Sure?', 'wpvr'); ?></h3>
11
- <ul class="wpvr-delete-confirm-btn">
12
- <li><button class="btn-default cancel"><?php echo __('Cancel', 'wpvr'); ?></button></li>
13
- <li>
14
- <button type="button" class="btn-default yes">
15
- <?php //echo __('Yes', 'wpvr'); ?>
16
- </button>
17
- </li>
18
- </ul>
19
- </div> -->
20
-
21
  <div class="pano-error-wrapper">
 
22
  <div class="pano-error-body">
23
  <span class="cross pano-error-close-btn">
24
  <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -35,9 +17,8 @@
35
  </span>
36
 
37
  <div class="pano-error-message">
38
- <h3 id="confirm_text"><?php echo __('Turning On The Video Option Will Erase Your Virtual Tour Data. Are You Sure?', 'wpvr'); ?></h3>
39
  </div>
40
-
41
  </div>
42
 
43
  <div class="pano-error-footer">
@@ -50,5 +31,79 @@
50
  </li>
51
  </ul>
52
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  </div>
54
  </div>
 
1
+ <div class="wpvr-delete-alert-wrapper" style="display: none;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <div class="pano-error-wrapper">
3
+
4
  <div class="pano-error-body">
5
  <span class="cross pano-error-close-btn">
6
  <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
17
  </span>
18
 
19
  <div class="pano-error-message">
20
+ <h3 id="confirm_text"></h3>
21
  </div>
 
22
  </div>
23
 
24
  <div class="pano-error-footer">
31
  </li>
32
  </ul>
33
  </div>
34
+
35
+ </div>
36
+ </div>
37
+
38
+
39
+ <!-- start pano alert -->
40
+ <div class="pano-alert scene-alert">
41
+ <div class="pano-error-wrapper">
42
+ <div class="pano-error-body">
43
+ <span class="cross pano-error-close-btn">
44
+ <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
45
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18.7778 18.7786C14.4819 23.074 7.51728 23.0738 3.22169 18.778C-1.0739 14.4823 -1.0739 7.51769 3.22169 3.22196C7.51728 -1.07378 14.4819 -1.07402 18.7778 3.22143C20.8409 5.28436 22 8.08242 22 11C22 13.9176 20.8409 16.7156 18.7778 18.7786ZM14.9278 8.21857L12.1071 11L14.9278 13.7814C15.0865 13.93 15.1765 14.1376 15.1765 14.355C15.1765 14.5724 15.0865 14.78 14.9278 14.9286C14.7795 15.0756 14.5788 15.1576 14.3699 15.1564C14.1638 15.1556 13.9663 15.0737 13.8199 14.9286L10.9992 12.1079L8.21778 14.9286C8.07143 15.0737 7.8739 15.1556 7.66778 15.1564C7.45893 15.1576 7.2582 15.0756 7.10992 14.9286C6.80528 14.6221 6.80528 14.1272 7.10992 13.8207L9.89135 11L7.10992 8.21857C6.84295 7.90683 6.8609 7.44213 7.15112 7.15191C7.44134 6.8617 7.90604 6.84375 8.21778 7.11071L10.9992 9.89214L13.7806 7.11071C13.9785 6.9058 14.2707 6.82202 14.5471 6.89095C14.8236 6.95988 15.0422 7.17104 15.1207 7.44488C15.1992 7.71872 15.1257 8.01365 14.9278 8.21857ZM4.34363 4.34471C8.02058 0.663508 13.9845 0.656605 17.6699 4.32929C19.4452 6.09842 20.4431 8.50157 20.4431 11.0079C20.4431 13.5141 19.4452 15.9173 17.6699 17.6864C13.9845 21.3591 8.02058 21.3522 4.34363 17.671C0.666691 13.9898 0.666691 8.02591 4.34363 4.34471Z" fill="#A8A7BE"/>
46
+ </svg>
47
+ </span>
48
+
49
+ <span class="icon pano-warning">
50
+ <svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
51
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M0 15C0 23.2843 6.71573 30 15 30C23.2843 30 30 23.2843 30 15C30 6.71573 23.2843 0 15 0C6.71573 0 0 6.71573 0 15ZM2 15C2 7.8203 7.8203 2 15 2C22.1797 2 28 7.8203 28 15C28 22.1797 22.1797 28 15 28C7.8203 28 2 22.1797 2 15Z" fill="#004EFA"/>
52
+ <circle cx="8.5" cy="11.5" r="1.5" fill="#004EFA"/>
53
+ <circle cx="21.5" cy="11.5" r="1.5" fill="#004EFA"/>
54
+ <path d="M20.9993 21.9932C20.7336 21.995 20.4781 21.8728 20.2894 21.6537C17.6429 18.5603 13.3571 18.5603 10.7106 21.6537C10.5228 21.8753 10.2673 22 10.0007 22C9.73407 22 9.4785 21.8753 9.29076 21.6537C8.90308 21.1971 8.90308 20.4596 9.29076 20.0029C12.7241 15.999 18.2759 15.999 21.7092 20.0029C22.0969 20.4596 22.0969 21.1971 21.7092 21.6537C21.5205 21.8728 21.2651 21.995 20.9993 21.9932V21.9932Z" fill="#004EFA"/>
55
+ </svg>
56
+ </span>
57
+
58
+ <div class="pano-error-message"></div>
59
+
60
+ </div>
61
+ <!-- end error body -->
62
+
63
+ <!-- error footer -->
64
+ <div class="pano-error-footer">
65
+ <ul>
66
+ <li class="pano-error-close">
67
+ <a href="https://rextheme.com/wpvr/" target="_blank" >Upgrade to Pro</a>
68
+ </li>
69
+ </ul>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <!-- end pano alert -->
74
+
75
+
76
+ <!-- start pano eror alert -->
77
+ <div id="error_occured">
78
+ <div class="pano-error-wrapper">
79
+ <div class="pano-error-body">
80
+ <span class="cross pano-error-close-btn">
81
+ <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
82
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18.7778 18.7786C14.4819 23.074 7.51728 23.0738 3.22169 18.778C-1.0739 14.4823 -1.0739 7.51769 3.22169 3.22196C7.51728 -1.07378 14.4819 -1.07402 18.7778 3.22143C20.8409 5.28436 22 8.08242 22 11C22 13.9176 20.8409 16.7156 18.7778 18.7786ZM14.9278 8.21857L12.1071 11L14.9278 13.7814C15.0865 13.93 15.1765 14.1376 15.1765 14.355C15.1765 14.5724 15.0865 14.78 14.9278 14.9286C14.7795 15.0756 14.5788 15.1576 14.3699 15.1564C14.1638 15.1556 13.9663 15.0737 13.8199 14.9286L10.9992 12.1079L8.21778 14.9286C8.07143 15.0737 7.8739 15.1556 7.66778 15.1564C7.45893 15.1576 7.2582 15.0756 7.10992 14.9286C6.80528 14.6221 6.80528 14.1272 7.10992 13.8207L9.89135 11L7.10992 8.21857C6.84295 7.90683 6.8609 7.44213 7.15112 7.15191C7.44134 6.8617 7.90604 6.84375 8.21778 7.11071L10.9992 9.89214L13.7806 7.11071C13.9785 6.9058 14.2707 6.82202 14.5471 6.89095C14.8236 6.95988 15.0422 7.17104 15.1207 7.44488C15.1992 7.71872 15.1257 8.01365 14.9278 8.21857ZM4.34363 4.34471C8.02058 0.663508 13.9845 0.656605 17.6699 4.32929C19.4452 6.09842 20.4431 8.50157 20.4431 11.0079C20.4431 13.5141 19.4452 15.9173 17.6699 17.6864C13.9845 21.3591 8.02058 21.3522 4.34363 17.671C0.666691 13.9898 0.666691 8.02591 4.34363 4.34471Z" fill="#A8A7BE"/>
83
+ </svg>
84
+ </span>
85
+
86
+ <span class="icon pano-warning">
87
+ <svg width="36" height="30" viewBox="0 0 36 30" fill="none" xmlns="http://www.w3.org/2000/svg">
88
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M21.4802 1.86951L35.4553 24.3914C36.1816 25.5621 36.1816 26.9598 35.4553 28.1305C34.7289 29.3011 33.4278 30 31.9751 30H4.025C2.5722 30 1.2712 29.3011 0.5448 28.1305C-0.1816 26.9598 -0.1816 25.5621 0.5448 24.3914L14.5198 1.86951C15.2462 0.698907 16.5473 0 18 0C19.4527 0 20.7538 0.698841 21.4802 1.86951ZM31.9751 28.0358C32.6647 28.0358 33.2822 27.7041 33.6271 27.1484C33.9719 26.5927 33.9719 25.9291 33.6271 25.3734L19.6521 2.8515C19.3072 2.2958 18.6896 1.96404 18 1.96404C17.3104 1.96404 16.6928 2.2958 16.3479 2.8515L2.37293 25.3734C2.02812 25.9291 2.02812 26.5927 2.37293 27.1484C2.71774 27.7041 3.33537 28.0358 4.025 28.0358H31.9751Z" fill="#FAAC14"/>
89
+ <path d="M18 22C17.4486 22 17 22.4486 17 23C17 23.5514 17.4486 24 18 24C18.5514 24 19 23.5514 19 23C19 22.4486 18.5514 22 18 22Z" fill="#FAAC14"/>
90
+ <rect x="17" y="11" width="2" height="9" fill="#FAAC14"/>
91
+ </svg>
92
+ </span>
93
+
94
+ <div class="pano-error-message"></div>
95
+
96
+ </div>
97
+ <!-- end error body -->
98
+
99
+ <!-- error footer -->
100
+ <div class="pano-error-footer">
101
+ <ul>
102
+ <li class="pano-error-close">
103
+ <button type="button" class="pano-error-close-btn">Ok</button>
104
+ </li>
105
+ </ul>
106
+ </div>
107
  </div>
108
  </div>
109
+ <!-- end pano eror alert -->
admin/partials/wpvr_documentation.php CHANGED
@@ -87,6 +87,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
87
 
88
  <div id="tab1" class="block-wrapper info-tab">
89
  <div class="info-wrapper">
 
90
  <div class="single-block banner">
91
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-banner.jpg' ?>" alt="wpvr-banner">
92
  </div>
@@ -95,12 +96,12 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
95
  <div class="upgrade-pro">
96
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
97
  <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
98
- <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
 
 
99
  <?php } ?>
100
  </div>
101
-
102
  <div class="social-share">
103
-
104
  <h4><?php _e('Share On', 'wpvr'); ?></h4>
105
  <ul>
106
  <li>
@@ -131,7 +132,6 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
131
  </span>
132
  <h4><?php _e('Documentation', 'wpvr'); ?></h4>
133
  <p><?php _e('Before You start, you can check our Documentation to get familiar with WP VR - 360 Panorama and virtual tour creator for WordPress.', 'wpvr'); ?></p>
134
-
135
  <a class="wpvr-btn" href="https://rextheme.com/docs/wp-vr/" target="_blank"><?php _e('Documentation', 'wpvr'); ?></a>
136
  </div>
137
 
@@ -141,7 +141,6 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
141
  </span>
142
  <h4><?php _e('Support', 'wpvr'); ?></h4>
143
  <p><?php _e('Can\'t find solution on with our documentation? Just Post a ticket on Support forum. We are to solve your issue.', 'wpvr'); ?></p>
144
-
145
  <a class="wpvr-btn" href="https://wordpress.org/support/plugin/wpvr" target="_blank"><?php _e('Post a Ticket', 'wpvr'); ?></a>
146
  </div>
147
 
@@ -151,14 +150,13 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
151
  </span>
152
  <h4><?php _e('Make WPVR Popular', 'wpvr'); ?></h4>
153
  <p><?php _e('Your rating and feedback matters to us. If you are happy with WP VR - 360 Panorama and virtual tour creator for WordPress give us a rating.', 'wpvr'); ?> </p>
154
-
155
  <a class="wpvr-btn" href="https://wordpress.org/plugins/wpvr/#reviews" target="_blank"><?php _e('Rate Us ', 'wpvr'); ?></a>
156
  </div>
157
 
158
  </div>
159
 
160
  <div class="promotion-area">
161
- <h4 class="title"><?php _e('Try out these plugins to scale up your business, for Free!', 'wpvr'); ?></h4>
162
  <div class="single-block m2c">
163
  <span class="icon">
164
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpfunnels.png' ?>" alt="icon">
@@ -170,7 +168,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
170
  </div>
171
 
172
  <div class="single-block sb">
173
- <span class="icon">
174
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cart-lift.png' ?>" alt="icon">
175
  </span>
176
  <h4><?php _e('Cart Lift', 'wpvr'); ?></h4>
@@ -179,11 +177,11 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
179
  <a class="wpvr-btn" href="https://wordpress.org/plugins/cart-lift/" target="_blank"><?php _e('Get It Now', 'wpvr'); ?></a>
180
  </div>
181
  </div>
182
-
183
  </div>
184
 
185
  <div id="tab2" class="block-wrapper">
186
  <div class="video-wrapper">
 
187
  <div class="video-left">
188
  <iframe src="https://www.youtube.com/embed/videoseries?list=PLelDqLncNWcUndi1NkXJh2BH62OYmIayt" width="100%" height="100%" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
189
  </div>
@@ -193,7 +191,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
193
  <div class="upgrade-pro">
194
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
195
  <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
196
- <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
197
  <?php } ?>
198
  </div>
199
  </div>
@@ -201,6 +199,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
201
 
202
  </div>
203
  </div>
 
204
  <?php
205
  if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) {
206
  ?>
@@ -208,7 +207,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
208
  <div class="wpvr-compare">
209
  <div class="compare-header">
210
  <h4><?php _e('WPVR Feature Comparison', 'wpvr'); ?></h4>
211
- <?php $pro_url = add_query_arg('wpvr-dashboard', '1', 'https://rextheme.com/wpvr/?wpvr-dashboard=1'); ?>
212
  <a class="wpvr-btn get-pro" href="<?php echo $pro_url; ?>" title="Upgrade to Pro" target="_blank"><?php _e('Upgrade to Pro', 'wpvr'); ?></a>
213
  </div>
214
 
@@ -512,7 +511,6 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
512
  <?php
513
  $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
514
  $is_integration_module = apply_filters('is_integration_module', false);
515
-
516
  $editor_active = get_option('wpvr_editor_active');
517
  $author_active = get_option('wpvr_author_active');
518
  $fontawesome_disable = get_option('wpvr_fontawesome_disable');
@@ -524,7 +522,6 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
524
  $high_res_image = get_option('high_res_image');
525
  $dis_on_hover = get_option('dis_on_hover');
526
  $enable_woocommerce = get_option('wpvr_enable_woocommerce', false);
527
-
528
  ?>
529
  <li>
530
  <h6><?php echo __("Allow the Editors of your site to Create, Edit, Update, and Delete virtual tours (They can access other users' tours):", "wpvr"); ?></h6>
@@ -721,12 +718,6 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
721
  <textarea id="wpvr_script_list" class="materialize-textarea" placeholder="https://example.com/tour1/,https://example.com/tour2/"><?php echo $wpvr_script_list; ?></textarea>
722
  </li>
723
 
724
-
725
-
726
-
727
-
728
-
729
-
730
  <li>
731
 
732
  <h6><?php echo __("Enable Video JS control (It will load the WP VR Video JS library in the listed pages only):", "wpvr"); ?></h6>
@@ -767,12 +758,6 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
767
  <textarea id="wpvr_video_script_list" class="materialize-textarea" placeholder="https://example.com/video-tour1/,https://example.com/video-tour2/"><?php echo $wpvr_video_script_list; ?></textarea>
768
  </li>
769
 
770
-
771
-
772
-
773
-
774
-
775
-
776
  <!-- WPVR front-end notice -->
777
  <li class="enqueue-script front-notice">
778
  <?php
@@ -815,8 +800,8 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
815
  <form class="wpvr-version">
816
  <h6><?php _e('Select a Version to Rollback', 'wpvr'); ?></h6>
817
  <select name="wpvr_version">
818
- <option value="7.3.10">7.3.8</option>
819
- <option value="7.3.9">7.3.8</option>
820
  <option value="7.3.8">7.3.8</option>
821
  <option value="7.3.7">7.3.7</option>
822
  <option value="7.3.6">7.3.6</option>
@@ -838,7 +823,7 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
838
  <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
839
  <div class="upgrade-pro">
840
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
841
- <a class="wpvr-btn" href="https://rextheme.com/wpvr/?wpvr-dashboard=1" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
842
  </div>
843
  <?php } ?>
844
 
@@ -847,4 +832,25 @@ if (!defined('ABSPATH')) exit; // Exit if accessed directly
847
  </div>
848
 
849
  </div>
850
- <?php include('wpvr_confirmation_alert.php'); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
 
88
  <div id="tab1" class="block-wrapper info-tab">
89
  <div class="info-wrapper">
90
+
91
  <div class="single-block banner">
92
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-banner.jpg' ?>" alt="wpvr-banner">
93
  </div>
96
  <div class="upgrade-pro">
97
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
98
  <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
99
+ <a class="wpvr-btn" href="https://rextheme.com/wpvr/#pricing" target="_blank">
100
+ <?php _e('Upgrade to Pro ', 'wpvr'); ?>
101
+ </a>
102
  <?php } ?>
103
  </div>
 
104
  <div class="social-share">
 
105
  <h4><?php _e('Share On', 'wpvr'); ?></h4>
106
  <ul>
107
  <li>
132
  </span>
133
  <h4><?php _e('Documentation', 'wpvr'); ?></h4>
134
  <p><?php _e('Before You start, you can check our Documentation to get familiar with WP VR - 360 Panorama and virtual tour creator for WordPress.', 'wpvr'); ?></p>
 
135
  <a class="wpvr-btn" href="https://rextheme.com/docs/wp-vr/" target="_blank"><?php _e('Documentation', 'wpvr'); ?></a>
136
  </div>
137
 
141
  </span>
142
  <h4><?php _e('Support', 'wpvr'); ?></h4>
143
  <p><?php _e('Can\'t find solution on with our documentation? Just Post a ticket on Support forum. We are to solve your issue.', 'wpvr'); ?></p>
 
144
  <a class="wpvr-btn" href="https://wordpress.org/support/plugin/wpvr" target="_blank"><?php _e('Post a Ticket', 'wpvr'); ?></a>
145
  </div>
146
 
150
  </span>
151
  <h4><?php _e('Make WPVR Popular', 'wpvr'); ?></h4>
152
  <p><?php _e('Your rating and feedback matters to us. If you are happy with WP VR - 360 Panorama and virtual tour creator for WordPress give us a rating.', 'wpvr'); ?> </p>
 
153
  <a class="wpvr-btn" href="https://wordpress.org/plugins/wpvr/#reviews" target="_blank"><?php _e('Rate Us ', 'wpvr'); ?></a>
154
  </div>
155
 
156
  </div>
157
 
158
  <div class="promotion-area">
159
+ <h4 class="title"><?php _e('Check out our other amazing free plugins!', 'wpvr'); ?></h4>
160
  <div class="single-block m2c">
161
  <span class="icon">
162
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpfunnels.png' ?>" alt="icon">
168
  </div>
169
 
170
  <div class="single-block sb">
171
+ <span class="icon">
172
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/cart-lift.png' ?>" alt="icon">
173
  </span>
174
  <h4><?php _e('Cart Lift', 'wpvr'); ?></h4>
177
  <a class="wpvr-btn" href="https://wordpress.org/plugins/cart-lift/" target="_blank"><?php _e('Get It Now', 'wpvr'); ?></a>
178
  </div>
179
  </div>
 
180
  </div>
181
 
182
  <div id="tab2" class="block-wrapper">
183
  <div class="video-wrapper">
184
+
185
  <div class="video-left">
186
  <iframe src="https://www.youtube.com/embed/videoseries?list=PLelDqLncNWcUndi1NkXJh2BH62OYmIayt" width="100%" height="100%" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
187
  </div>
191
  <div class="upgrade-pro">
192
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
193
  <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
194
+ <a class="wpvr-btn" href="https://rextheme.com/wpvr/#pricing" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
195
  <?php } ?>
196
  </div>
197
  </div>
199
 
200
  </div>
201
  </div>
202
+
203
  <?php
204
  if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) {
205
  ?>
207
  <div class="wpvr-compare">
208
  <div class="compare-header">
209
  <h4><?php _e('WPVR Feature Comparison', 'wpvr'); ?></h4>
210
+ <?php $pro_url = add_query_arg('wpvr-dashboard', '1', 'https://rextheme.com/wpvr/#pricing'); ?>
211
  <a class="wpvr-btn get-pro" href="<?php echo $pro_url; ?>" title="Upgrade to Pro" target="_blank"><?php _e('Upgrade to Pro', 'wpvr'); ?></a>
212
  </div>
213
 
511
  <?php
512
  $is_wpvr_premium = apply_filters('is_wpvr_premium', false);
513
  $is_integration_module = apply_filters('is_integration_module', false);
 
514
  $editor_active = get_option('wpvr_editor_active');
515
  $author_active = get_option('wpvr_author_active');
516
  $fontawesome_disable = get_option('wpvr_fontawesome_disable');
522
  $high_res_image = get_option('high_res_image');
523
  $dis_on_hover = get_option('dis_on_hover');
524
  $enable_woocommerce = get_option('wpvr_enable_woocommerce', false);
 
525
  ?>
526
  <li>
527
  <h6><?php echo __("Allow the Editors of your site to Create, Edit, Update, and Delete virtual tours (They can access other users' tours):", "wpvr"); ?></h6>
718
  <textarea id="wpvr_script_list" class="materialize-textarea" placeholder="https://example.com/tour1/,https://example.com/tour2/"><?php echo $wpvr_script_list; ?></textarea>
719
  </li>
720
 
 
 
 
 
 
 
721
  <li>
722
 
723
  <h6><?php echo __("Enable Video JS control (It will load the WP VR Video JS library in the listed pages only):", "wpvr"); ?></h6>
758
  <textarea id="wpvr_video_script_list" class="materialize-textarea" placeholder="https://example.com/video-tour1/,https://example.com/video-tour2/"><?php echo $wpvr_video_script_list; ?></textarea>
759
  </li>
760
 
 
 
 
 
 
 
761
  <!-- WPVR front-end notice -->
762
  <li class="enqueue-script front-notice">
763
  <?php
800
  <form class="wpvr-version">
801
  <h6><?php _e('Select a Version to Rollback', 'wpvr'); ?></h6>
802
  <select name="wpvr_version">
803
+ <option value="7.3.11">7.3.11</option>
804
+ <option value="7.3.10">7.3.10</option>
805
  <option value="7.3.8">7.3.8</option>
806
  <option value="7.3.7">7.3.7</option>
807
  <option value="7.3.6">7.3.6</option>
823
  <?php if (!is_plugin_active('wpvr-pro/wpvr-pro.php')) { ?>
824
  <div class="upgrade-pro">
825
  <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/wpvr-logo.png' ?>" alt="logo">
826
+ <a class="wpvr-btn" href="https://rextheme.com/wpvr/#pricing" target="_blank"><?php _e('Upgrade to Pro ', 'wpvr'); ?></a>
827
  </div>
828
  <?php } ?>
829
 
832
  </div>
833
 
834
  </div>
835
+
836
+ <?php
837
+
838
+ if(is_plugin_active('divi-builder/divi-builder.php')){
839
+ ?>
840
+ <script>
841
+ (function ($) {
842
+ $(".rex-onboarding .block-wrapper:not(#tab1)").hide()
843
+ $('.rex-onboarding li.tab a').first().addClass("active");
844
+ $('.rex-onboarding li.tab').on('click', function(){
845
+ var target_id = $(this).find("a").attr('href');
846
+ $(".rex-onboarding li.tab a").removeClass('active');
847
+ $(this).find("a").addClass('active');
848
+ $(target_id).show();
849
+ $(target_id).siblings('.block-wrapper').hide();
850
+ })
851
+ })(jQuery);
852
+ </script>
853
+ <?php
854
+ }
855
+
856
+ ?>
admin/partials/wpvr_setup_wizard.php ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wpvr-welcome">
2
+ <section class="wpvr-welcome-hero">
3
+ <div class="wpvr-container-1350">
4
+ <div class="hero-content-wrapper">
5
+ <div class="hero-content">
6
+ <a href="<?php echo esc_url( admin_url( 'edit.php?post_type=wpvr_item' ) ); ?>" class="backto-dashboard">
7
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/arrow-return.svg' ?>" alt="arrow-return" />
8
+ <?php echo __('Back to WPVR Dashboard','wpvr') ?>
9
+ </a>
10
+ <h1 class="hero-title">Thank you <br/> for Choosing <span>WPVR!</span></h1>
11
+ <p><?php echo __('Follow the Guided Wizard and Learn How it Works.','wpvr') ?></p>
12
+ <form action="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>" method="get">
13
+ <input type="text" name="post_type" value="wpvr_item" hidden>
14
+ <input type="text" name="wpvr-guide-tour" value="1" hidden>
15
+ <button type="submit" class="vr-welcome-btn hero-btn"><?php echo __('Start The Wizard','wpvr') ?></button>
16
+ </form>
17
+ </div>
18
+
19
+ <div class="hero-video">
20
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/vr-hero-video-shape.svg' ?>" alt="vr-hero-video-shape" class="hero-video-shape" />
21
+
22
+ <div class="box-video">
23
+ <div class="bg-video">
24
+ <div class="bt-play">
25
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/youtube-play-icon.svg' ?>" alt="youtube-play-icon" />
26
+ </div>
27
+ </div>
28
+
29
+ <div class="video-container">
30
+ <iframe width="560" height="315" src="https://www.youtube.com/embed/SWsv-bplne8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
31
+
32
+ </div>
33
+ </div>
34
+ </div>
35
+
36
+ </div>
37
+ </div>
38
+ </section>
39
+
40
+ <section class="wpvr-features">
41
+ <div class="wpvr-container-1350">
42
+ <div class="section-title">
43
+ <h2>The <span class="primary-color"> <?php echo __('Best WordPress Plugin','wpvr') ?></span> <?php echo __('for Virtual Tours, Viewing Panoramas, and 360 Degree Content','wpvr') ?></h2>
44
+ </div>
45
+
46
+ <div class="features-wrapper">
47
+ <div class="single-feature">
48
+ <span class="icon">
49
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/360-view.svg' ?>" alt="360-view" />
50
+ </span>
51
+ <h5 class="title"><?php echo __('360 Degree Panorama','wpvr') ?></h5>
52
+
53
+ <a href="https://rextheme.com/docs/wp-vr-create-simple-virtual-tour/" target="_blank" class="see-example">
54
+ <?php echo __('Learn more','wpvr') ?>
55
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/arrow-right-blue.svg' ?>" alt="arrow-right" />
56
+ </a>
57
+ </div>
58
+
59
+ <div class="single-feature">
60
+ <span class="icon">
61
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/smartphone.svg' ?>" alt="smartphone" />
62
+ </span>
63
+ <h5 class="title"><?php echo __('Mobile Panorama','wpvr') ?></h5>
64
+
65
+ <a href="https://rextheme.com/docs/create-virtual-tour-with-mobile-phone-panorama/" target="_blank" class="see-example">
66
+ <?php echo __('Learn more','wpvr') ?>
67
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/arrow-right-blue.svg' ?>" alt="arrow-right" />
68
+ </a>
69
+ </div>
70
+
71
+ <div class="single-feature">
72
+ <span class="icon">
73
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/3d-view.svg' ?>" alt="3d-view" />
74
+ </span>
75
+ <h5 class="title"><?php echo __('Cubemap Images','wpvr') ?></h5>
76
+
77
+ <a href="https://rextheme.com/docs/wp-vr/" class="see-example" target="_blank">
78
+ <?php echo __('Learn more','wpvr') ?>
79
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/arrow-right-blue.svg' ?>" alt="arrow-right" />
80
+ </a>
81
+ </div>
82
+
83
+ <div class="single-feature">
84
+ <span class="icon">
85
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/360-camera.svg' ?>" alt="360-camera" />
86
+ </span>
87
+ <h5 class="title"><?php echo __('360 Degree Video','wpvr') ?></h5>
88
+
89
+ <a href="https://rextheme.com/docs/wp-vr-360-degree-interactive-video/" target="_blank" class="see-example">
90
+ <?php echo __('Learn more','wpvr') ?>
91
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/arrow-right-blue.svg' ?>" alt="arrow-right" />
92
+ </a>
93
+ </div>
94
+
95
+ <div class="single-feature">
96
+ <span class="icon">
97
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/street-view.svg' ?>" alt="street-view" />
98
+ </span>
99
+ <h5 class="title"><?php echo __('Google Street View','wpvr') ?></h5>
100
+
101
+ <a href="https://rextheme.com/docs/wp-vr-embed-google-street-view-tour/" target="_blank" class="see-example">
102
+ <?php echo __('Learn more','wpvr') ?>
103
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/arrow-right-blue.svg' ?>" alt="arrow-right" />
104
+ </a>
105
+ </div>
106
+
107
+ </div>
108
+
109
+
110
+ <?php if(!is_plugin_active('wpvr-pro/wpvr-pro.php')){?>
111
+ <div class="features-cta">
112
+ <h2 class="cta-title"><?php echo __('Unlock all these options by upgrading to Premium version','wpvr')?></h2>
113
+ <a href="https://rextheme.com/wpvr/#pricing" class="vr-welcome-btn cta-btn" target="_blank"><?php echo __('Upgrade Now','wpvr')?></a>
114
+ </div>
115
+ <?php
116
+ }
117
+ ?>
118
+
119
+ </div>
120
+ </section>
121
+
122
+ <section class="wpvr-feature-settings">
123
+ <div class="wpvr-container-1350">
124
+ <div class="section-title">
125
+ <h2><?php echo __('Features That Can','wpvr')?> <span class="primary-color"><?php echo __('Hook','wpvr')?></span> <?php echo __('Your Viewers - And Make Them Take','wpvr')?> <span class="primary-color"><?php echo __('Decisions','wpvr')?></span></h2>
126
+ <p><?php echo __('Personalize your virtual tours, in the way you want.','wpvr')?></p>
127
+ </div>
128
+
129
+ <div class="features-settings-wrapper">
130
+ <div class="single-settings">
131
+ <span class="icon">
132
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/scene-gallery.svg' ?>" alt="Panorama Scene Gallery" />
133
+ </span>
134
+ <h5 class="title"><?php echo __('Panorama Scene Gallery','wpvr')?></h5>
135
+ </div>
136
+
137
+ <div class="single-settings">
138
+ <span class="icon">
139
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/woocommerce.svg' ?>" alt="Sell WooCommerce Products" />
140
+ </span>
141
+ <h5 class="title"><?php echo __('Sell WooCommerce Products','wpvr')?></h5>
142
+ </div>
143
+
144
+ <div class="single-settings">
145
+ <span class="icon">
146
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/hotspot.svg' ?>" alt="Multiple Content on Hotspots" />
147
+ </span>
148
+ <h5 class="title"><?php echo __('Multiple Content on Hotspots','wpvr')?></h5>
149
+ </div>
150
+
151
+ <div class="single-settings">
152
+ <span class="icon">
153
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/control-button.svg' ?>" alt="Custom Control Buttons" />
154
+ </span>
155
+ <h5 class="title"><?php echo __('Custom Control Buttons','wpvr')?></h5>
156
+ </div>
157
+
158
+ <div class="single-settings">
159
+ <span class="icon">
160
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/contact-form.svg' ?>" alt="Set Contact Form" />
161
+ </span>
162
+ <h5 class="title"><?php echo __('Set Contact Form','wpvr')?></h5>
163
+ </div>
164
+
165
+ <div class="single-settings">
166
+ <span class="icon">
167
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/background-audio.svg' ?>" alt="Background Audio" />
168
+ </span>
169
+ <h5 class="title"><?php echo __('Background Audio','wpvr')?></h5>
170
+ </div>
171
+
172
+ <div class="single-settings">
173
+ <span class="icon">
174
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/explainer-video.svg' ?>" alt="Explainer Video" />
175
+ </span>
176
+ <h5 class="title"><?php echo __('Explainer Video','wpvr')?></h5>
177
+ </div>
178
+
179
+ <div class="single-settings">
180
+ <span class="icon">
181
+ <img src="<?php echo WPVR_PLUGIN_DIR_URL . 'admin/icon/gyroscope.svg' ?>" alt="Gyroscope & Mobile Notices" />
182
+ </span>
183
+ <h5 class="title"><?php echo __('Gyroscope & Mobile Notices','wpvr')?></h5>
184
+ </div>
185
+
186
+ </div>
187
+ <?php if(!is_plugin_active('wpvr-pro/wpvr-pro.php')){?>
188
+ <div class="setting-cta-btn">
189
+ <a href="https://rextheme.com/wpvr/#pricing" class="vr-welcome-btn" target="_blank"><?php echo __('Checkout All Features','wpvr')?></a>
190
+ </div>
191
+ <div class="feature-settings-cta">
192
+ <div class="cta-content">
193
+ <h2>Get Access to <span class="primary-color">Premium Features</span> & <span class="primary-color">Add-ons</span></h2>
194
+ <p>Starts from only <span>$79</span>, for unlimited virtual tours.</p>
195
+ </div>
196
+
197
+ <a href="https://rextheme.com/wpvr/#pricing" class="vr-welcome-btn cta-btn" target="_blank"><?php echo __('Get Pro Now','wpvr')?></a>
198
+ </div>
199
+ <?php
200
+ }else{?>
201
+ <div class="setting-cta-btn">
202
+ <form action="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>" method="get">
203
+ <input type="text" name="post_type" value="wpvr_item" hidden>
204
+ <input type="text" name="wpvr-guide-tour" value="1" hidden>
205
+ <button type="submit" class="vr-welcome-btn hero-btn"><?php echo __('Start The Wizard','wpvr') ?></button>
206
+ </form>
207
+ </div>
208
+ <?php
209
+ }
210
+ ?>
211
+
212
+
213
+
214
+
215
+ <div class="welcome-page-footer">
216
+ <ul class="footer-menu">
217
+ <li><a href="https://rextheme.com/support/" target="_blank" ><?php echo __('Contact Our Support','wpvr') ?></a></li>
218
+ <li><a href="https://rextheme.com/docs/wp-vr-install-and-activate/" target="_blank"><?php echo __('Read Documentations','wpvr') ?></a></li>
219
+ <li><a href="https://rextheme.com/category/virtual-tour/" target="_blank" ><?php echo __('Read Our Complete Guides','wpvr') ?></a></li>
220
+ </ul>
221
+ </div>
222
+ </div>
223
+ </section>
224
+
225
+ </div>
226
+ <style>
227
+ .pano-alert.scene-alert {
228
+ display: none;
229
+ }
230
+ div#error_occured {
231
+ display: none;
232
+ }
233
+ </style>
admin/partials/wpvr_streetview_confirmation_alert.php DELETED
@@ -1,20 +0,0 @@
1
- <div class="wpvr-streetview-alert-wrapper">
2
- <div class="wpvr-streetview-confirmation">
3
- <span class="icon">
4
- <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-alert-triangle" width="54" height="54" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffa500" fill="none" stroke-linecap="round" stroke-linejoin="round">
5
- <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
6
- <path d="M12 9v2m0 4v.01" />
7
- <path d="M5 19h14a2 2 0 0 0 1.84 -2.75l-7.1 -12.25a2 2 0 0 0 -3.5 0l-7.1 12.25a2 2 0 0 0 1.75 2.75" />
8
- </svg>
9
- </span>
10
- <h3><?php echo __('Turning On The Video Option Will Erase Your Virtual Tour Data. Are You Sure?', 'wpvr-pro'); ?></h3>
11
- <ul class="wpvr-streetview-confirm-btn">
12
- <li><button class="btn-default cancel"><?php echo __('Cancel', 'wpvr-pro'); ?></button></li>
13
- <li>
14
- <button type="button" class="btn-default yes">
15
- <?php echo __('Yes', 'wpvr'); ?>
16
- </button>
17
- </li>
18
- </ul>
19
- </div>
20
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/scss/_welcome-page.scss ADDED
@@ -0,0 +1,594 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $primary-color: #201CFE;
2
+
3
+ @font-face {
4
+ font-family: 'Roboto';
5
+ src: url('../fonts/Roboto-Regular.woff2') format('woff2'),
6
+ url('../fonts/Roboto-Regular.woff') format('woff');
7
+ font-weight: normal;
8
+ font-style: normal;
9
+ font-display: swap;
10
+ }
11
+
12
+ @font-face {
13
+ font-family: 'Roboto';
14
+ src: url('../fonts/Roboto-Medium.woff2') format('woff2'),
15
+ url('../fonts/Roboto-Medium.woff') format('woff');
16
+ font-weight: 500;
17
+ font-style: normal;
18
+ font-display: swap;
19
+ }
20
+
21
+ @font-face {
22
+ font-family: 'Roboto';
23
+ src: url('../fonts/Roboto-Bold.woff2') format('woff2'),
24
+ url('../fonts/Roboto-Bold.woff') format('woff');
25
+ font-weight: bold;
26
+ font-style: normal;
27
+ font-display: swap;
28
+ }
29
+
30
+ @media (min-width: 1200px) {
31
+ .wpvr-container-1350 {
32
+ max-width: 1020px;
33
+ }
34
+ }
35
+
36
+ @media (min-width: 1400px) {
37
+ .wpvr-container-1350 {
38
+ max-width: 1380px;
39
+ padding: 0 15px;
40
+ margin: 0 auto;
41
+ }
42
+ }
43
+
44
+
45
+
46
+ .primary-color {
47
+ color: $primary-color;
48
+ }
49
+
50
+ .wpvr-welcome {
51
+ margin-left: -20px;
52
+
53
+ * {
54
+ box-sizing: border-box;
55
+ padding: 0;
56
+ margin: 0;
57
+ }
58
+
59
+ div,
60
+ span,
61
+ section,
62
+ p {
63
+ font-family: 'Roboto', sans-serif;
64
+ }
65
+
66
+ .wpvr-container-1350 {
67
+ padding: 0 15px;
68
+ margin: 0 auto;
69
+ }
70
+
71
+ .vr-welcome-btn {
72
+ background: $primary-color;
73
+ border-radius: 8px;
74
+ font-weight: 700;
75
+ font-size: 18px;
76
+ line-height: 1.16;
77
+ letter-spacing: -0.3px;
78
+ color: #FFFFFF;
79
+ display: inline-block;
80
+ text-decoration: none;
81
+ padding: 20px 27px;
82
+ border: none;
83
+ cursor: pointer;
84
+ }
85
+
86
+ .section-title {
87
+ max-width: 685px;
88
+ width: 100%;
89
+ margin: 0 auto 60px;
90
+ text-align: center;
91
+
92
+ h2 {
93
+ font-weight: 700;
94
+ font-size: 44px;
95
+ line-height: 1.22;
96
+ letter-spacing: -0.88px;
97
+ color: #011F3F;
98
+ margin-bottom: 10px;
99
+ }
100
+
101
+ p {
102
+ font-size: 18px;
103
+ line-height: 1.5;
104
+ color: #011F3F;
105
+ }
106
+ }
107
+
108
+ .wpvr-welcome-hero {
109
+ background: #fff;
110
+ padding: 20px 0;
111
+ position: relative;
112
+ overflow: hidden;
113
+
114
+ &::before {
115
+ content: "";
116
+ background: #F2F4F7;
117
+ position: absolute;
118
+ left: -80px;
119
+ top: -90px;
120
+ width: 322px;
121
+ height: 322px;
122
+ border-radius: 0 0 270px 0;
123
+ border: 1px solid #dddddd96;
124
+ z-index: 0;
125
+ }
126
+
127
+ .hero-content-wrapper {
128
+ display: flex;
129
+ flex-flow: row wrap;
130
+ align-items: center;
131
+ position: relative;
132
+ z-index: 1;
133
+ }
134
+
135
+ .hero-content {
136
+ width: 40%;
137
+
138
+ .backto-dashboard {
139
+ font-weight: 500;
140
+ font-size: 18px;
141
+ line-height: 1.2;
142
+ letter-spacing: -0.5px;
143
+ color: #011F3F;
144
+ text-decoration: none;
145
+ margin-bottom: 46px;
146
+ display: inline-block;
147
+
148
+ &:hover {
149
+ text-decoration: underline;
150
+ }
151
+
152
+ img {
153
+ width: 16px;
154
+ margin-right: 4px;
155
+ }
156
+ }
157
+
158
+ .hero-title {
159
+ font-weight: 900;
160
+ font-size: 56px;
161
+ line-height: 1.1;
162
+ letter-spacing: -1px;
163
+ color: #011F3F;
164
+
165
+ span {
166
+ color: #00B7FF;
167
+ }
168
+ }
169
+
170
+ p {
171
+ font-weight: 400;
172
+ font-size: 24px;
173
+ line-height: 1.4;
174
+ color: #011F3F;
175
+ width: 100%;
176
+ max-width: 350px;
177
+ margin-top: 13px;
178
+ margin-bottom: 54px;
179
+ }
180
+ }
181
+
182
+ .hero-video {
183
+ width: 60%;
184
+ position: relative;
185
+
186
+ .hero-video-shape {
187
+ max-width: 750px;
188
+ width: 100%;
189
+ }
190
+
191
+ .box-video {
192
+ width: 100%;
193
+ max-width: 665px;
194
+ cursor: pointer;
195
+ overflow: hidden;
196
+ position: absolute;
197
+ top: 70px;
198
+ right: 80px;
199
+ }
200
+
201
+ .box-video .bg-video {
202
+ background-image: url('../icon/vr-video-poster.png');
203
+ position: absolute;
204
+ top: 0;
205
+ left: 0;
206
+ width: 100%;
207
+ height: 100%;
208
+ background-repeat: no-repeat;
209
+ background-position: center;
210
+ background-size: 100% 100%;
211
+ z-index: 2;
212
+ background-color: #fff;
213
+ border-radius: 30px;
214
+
215
+ .bt-play {
216
+ position: absolute;
217
+ top: 50%;
218
+ left: 50%;
219
+ transform: translate(-50%, -50%);
220
+ cursor: pointer;
221
+ z-index: 2;
222
+ -webkit-transition: all 0.3s ease-out;
223
+ transition: all 0.3s ease-out;
224
+
225
+ img {
226
+ width: 50px;
227
+ }
228
+ }
229
+ }
230
+ .box-video.open .bg-video {
231
+ visibility: hidden;
232
+ opacity: 0;
233
+ transition: all 0.6s ease;
234
+ }
235
+
236
+ .video-container {
237
+ position: relative;
238
+ width: 100%;
239
+ height: 0;
240
+ margin: 0;
241
+ z-index: 1;
242
+ padding-bottom: 74.27198%;
243
+
244
+ iframe {
245
+ position: absolute;
246
+ top: 0;
247
+ left: 0;
248
+ width: 100%;
249
+ height: 100%;
250
+ border-radius: 32px;
251
+ }
252
+ }
253
+ }
254
+
255
+ }
256
+
257
+ .wpvr-features {
258
+ background: #F2F4F7;
259
+ padding: 110px 0 120px;
260
+
261
+ .features-wrapper {
262
+ display: flex;
263
+ flex-flow: row wrap;
264
+ margin-left: -30px;
265
+ }
266
+
267
+ .single-feature {
268
+ background: #FFFFFF;
269
+ box-shadow: 0px 20px 20px #e7eaeebc;
270
+ border-radius: 10px;
271
+ padding: 30px 40px;
272
+ width: calc(100% / 5 - 30px);
273
+ margin-left: 30px;
274
+ margin-bottom: 30px;
275
+ text-align: center;
276
+
277
+ .title {
278
+ font-weight: 700;
279
+ font-size: 24px;
280
+ line-height: 1.16;
281
+ text-align: center;
282
+ letter-spacing: -0.6px;
283
+ color: #011F3F;
284
+ margin: 34px 0;
285
+ }
286
+
287
+ .see-example {
288
+ font-weight: 500;
289
+ font-size: 16px;
290
+ line-height: 1.4;
291
+ text-align: center;
292
+ letter-spacing: -0.4px;
293
+ color: #201CFE;
294
+ text-decoration: underline;
295
+ display: inline-block;
296
+
297
+ img {
298
+ margin-left: 5px;
299
+ transition: all 0.3s ease;
300
+ }
301
+
302
+ &:hover {
303
+ text-decoration: none;
304
+ }
305
+
306
+ }
307
+
308
+ &:hover .see-example img {
309
+ margin-left: 10px;
310
+ }
311
+
312
+ &:nth-child(even) {
313
+ transform: translateY(55px);
314
+ }
315
+ }
316
+
317
+ .features-cta {
318
+ background: #201CFE url(../icon/feature-cta-bg.jpg) no-repeat center right / cover;
319
+ border-radius: 20px;
320
+ margin-top: 105px;
321
+ padding: 60px 70px;
322
+ display: flex;
323
+ align-items: center;
324
+ justify-content: space-between;
325
+
326
+ .cta-title {
327
+ font-weight: 700;
328
+ font-size: 38px;
329
+ line-height: 1.4;
330
+ color: #FFFFFF;
331
+ width: calc(100% - 290px);
332
+ }
333
+
334
+ .cta-btn {
335
+ background: #FFFFFF;
336
+ color: $primary-color;
337
+ }
338
+ }
339
+ }
340
+
341
+ .wpvr-feature-settings {
342
+ background: #071835;
343
+ padding-top: 110px;
344
+
345
+ .section-title {
346
+ max-width: 725px;
347
+
348
+ h2 {
349
+ color: #fff;
350
+ }
351
+ p {
352
+ color: rgba(255, 255, 255, 0.6);
353
+ }
354
+ }
355
+
356
+ .features-settings-wrapper {
357
+ display: flex;
358
+ flex-flow: row wrap;
359
+ margin-left: -50px;
360
+ }
361
+
362
+ .single-settings {
363
+ text-align: center;
364
+ width: calc(100% / 8 - 50px);
365
+ margin-left: 50px;
366
+ margin-bottom: 50px;
367
+
368
+ .icon {
369
+ background: #0E244B;
370
+ border-radius: 20px;
371
+ width: 120px;
372
+ height: 110px;
373
+ display: flex;
374
+ align-items: center;
375
+ justify-content: center;
376
+ padding: 10px;
377
+ margin: 0 auto 13px;
378
+ }
379
+
380
+ .title {
381
+ font-weight: 500;
382
+ font-size: 16px;
383
+ line-height: 1.3;
384
+ color: #FFFFFF;
385
+ }
386
+ }
387
+
388
+ .setting-cta-btn {
389
+ text-align: center;
390
+
391
+ .vr-welcome-btn {
392
+ background: #FFFFFF;
393
+ color: $primary-color;
394
+ }
395
+ }
396
+
397
+ .feature-settings-cta {
398
+ background: #FFFFFF url('../icon/feature-settings-cta-bg.jpg') no-repeat center right / cover;
399
+ border-radius: 20px;
400
+ padding: 60px 70px;
401
+ display: flex;
402
+ align-items: center;
403
+ justify-content: space-between;
404
+ margin-top: 70px;
405
+
406
+ .cta-content {
407
+ width: calc(100% - 290px);
408
+
409
+ h2 {
410
+ font-size: 38px;
411
+ color: #011F3F;
412
+ font-weight: 700;
413
+ line-height: 1.4;
414
+ }
415
+
416
+ p{
417
+ font-weight: 400;
418
+ font-size: 24px;
419
+ line-height: 1.4;
420
+ color: #011F3F;
421
+ margin-top: 3px;
422
+
423
+ span {
424
+ color: #00B7FF;
425
+ }
426
+ }
427
+ }
428
+
429
+ }
430
+
431
+ .welcome-page-footer {
432
+ padding: 54px 0;
433
+
434
+ .footer-menu {
435
+ display: flex;
436
+
437
+ li {
438
+ margin-left: 30px;
439
+
440
+ &:first-child {
441
+ margin-left: 0;
442
+ }
443
+ &:last-child {
444
+ margin-left: auto;
445
+ }
446
+
447
+ a {
448
+ font-weight: 500;
449
+ font-size: 20px;
450
+ line-height: 1;
451
+ color: #FFFFFF;
452
+ text-decoration: none;
453
+ outline: none;
454
+ box-shadow: none;
455
+
456
+ &:hover {
457
+ color: #00B7FF;
458
+ }
459
+ }
460
+ }
461
+ }
462
+ }
463
+
464
+ }
465
+
466
+ }
467
+
468
+
469
+ @media (max-width: 1399px) {
470
+ .wpvr-welcome .vr-welcome-btn {
471
+ font-weight: 500;
472
+ font-size: 15px;
473
+ padding: 16px 27px;
474
+ }
475
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video {
476
+ max-width: 535px;
477
+ right: 30px;
478
+ top: 60px;
479
+ }
480
+
481
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .backto-dashboard {
482
+ font-size: 16px;
483
+ margin-bottom: 36px;
484
+ }
485
+
486
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .hero-title {
487
+ font-size: 44px;
488
+ }
489
+ .wpvr-welcome .wpvr-welcome-hero .hero-content p {
490
+ font-size: 18px;
491
+ margin-bottom: 34px;
492
+ }
493
+
494
+ .wpvr-welcome .section-title h2 {
495
+ font-size: 34px;
496
+ }
497
+
498
+ .wpvr-welcome .wpvr-features .single-feature .title {
499
+ font-size: 18px;
500
+ margin: 14px 0;
501
+ }
502
+
503
+ .wpvr-welcome .wpvr-features .single-feature {
504
+ padding: 30px 20px;
505
+ }
506
+ .wpvr-welcome .wpvr-features .single-feature .title {
507
+ font-size: 18px;
508
+ }
509
+ .wpvr-welcome .wpvr-features .single-feature .see-example {
510
+ font-size: 14px;
511
+ }
512
+
513
+ .wpvr-welcome .wpvr-features .features-cta .cta-title {
514
+ font-size: 32px;
515
+ line-height: 1.2;
516
+ }
517
+
518
+ .wpvr-welcome .wpvr-feature-settings .single-settings {
519
+ width: calc(100% / 4 - 50px);
520
+ }
521
+
522
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content h2 {
523
+ font-size: 32px;
524
+ line-height: 1.2;
525
+ }
526
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content p {
527
+ font-size: 20px;
528
+ }
529
+
530
+ .wpvr-welcome .wpvr-feature-settings .welcome-page-footer .footer-menu li a {
531
+ font-size: 16px;
532
+ }
533
+
534
+ }
535
+
536
+ @media (max-width: 1199px) {
537
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video {
538
+ max-width: 435px;
539
+ }
540
+ .wpvr-welcome .wpvr-welcome-hero .hero-content .hero-title {
541
+ font-size: 36px;
542
+ }
543
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video .bg-video {
544
+ border-radius: 20px;
545
+ }
546
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .video-container iframe {
547
+ border-radius: 24px;
548
+ }
549
+
550
+ .wpvr-welcome .wpvr-features {
551
+ padding: 80px 0 90px;
552
+ }
553
+ .wpvr-welcome .wpvr-features .single-feature {
554
+ width: calc(100% / 4 - 30px);
555
+ }
556
+
557
+ .wpvr-welcome .wpvr-features .features-cta {
558
+ margin-top: 35px;
559
+ padding: 50px;
560
+ }
561
+
562
+ .wpvr-welcome .wpvr-feature-settings {
563
+ padding-top: 80px;
564
+ }
565
+
566
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta {
567
+ padding: 50px 50px;
568
+ }
569
+ .wpvr-welcome .wpvr-feature-settings .feature-settings-cta .cta-content p {
570
+ font-size: 18px;
571
+ }
572
+
573
+ }
574
+
575
+ @media (max-width: 991px) {
576
+ .wpvr-welcome .wpvr-welcome-hero .hero-video .box-video {
577
+ max-width: 415px;
578
+ top: 40px;
579
+ }
580
+ .wpvr-welcome .wpvr-welcome-hero .hero-content {
581
+ padding-right: 20px;
582
+ }
583
+ .wpvr-welcome .wpvr-features .single-feature {
584
+ padding: 30px 16px;
585
+ }
586
+
587
+ }
588
+
589
+ @media (max-width: 782px) {
590
+ .wpvr-welcome {
591
+ margin-left: -10px;
592
+ }
593
+
594
+ }
admin/scss/style.scss ADDED
@@ -0,0 +1 @@
 
1
+ @import 'welcome-page' // welcome page style
admin/views/class-wpvr-meta-box.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ /**
4
+ * The abstract class for maintaing custom meta box
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/views
11
+ */
12
+
13
+ abstract class WPVR_Meta_Box {
14
+
15
+ /**
16
+ * Defination of custom meta box register method
17
+ *
18
+ * @param string $data
19
+ *
20
+ * @return void
21
+ * @since 8.0.0
22
+ */
23
+ abstract public function register($data);
24
+
25
+
26
+ /**
27
+ * Defination of custom meta box render method
28
+ *
29
+ * @param object $data
30
+ *
31
+ * @return void
32
+ * @since 8.0.0
33
+ */
34
+ abstract public function render($data);
35
+
36
+ }
admin/views/class-wpvr-singleton.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+ /**
4
+ * The abstract class for maintaing singleton design pattern
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/views
11
+ */
12
+
13
+ /**
14
+ * Orginial Singleton class
15
+ */
16
+ abstract class Singleton {
17
+
18
+ /**
19
+ * Any Singleton class
20
+ *
21
+ * @var Singleton[] $instances
22
+ * @since 8.0.0
23
+ */
24
+ private static $instances = array();
25
+
26
+
27
+ /**
28
+ * Private construct to avoid 'new'
29
+ *
30
+ * @since 8.0.0
31
+ */
32
+ private function __construct()
33
+ {
34
+
35
+ }
36
+
37
+
38
+ /**
39
+ * Get Instacne
40
+ *
41
+ * @return Singleton
42
+ * @since 8.0.0
43
+ */
44
+ final public static function get_instance() {
45
+ $class = get_called_class();
46
+
47
+ if ( ! isset( $instances[ $class ] ) ) {
48
+ self::$instances[ $class ] = new $class();
49
+ }
50
+
51
+ return self::$instances[ $class ];
52
+ }
53
+
54
+
55
+ /**
56
+ * Declared to overwrite magic method __clone()
57
+ * In order to prevent object cloning
58
+ *
59
+ * @return void
60
+ * @since 8.0.0
61
+ */
62
+ private function __clone()
63
+ {
64
+ // Do nothing
65
+ }
66
+
67
+
68
+ /**
69
+ * Declared to overwrite magic method __sleep()
70
+ * In order to avoid serialize instance
71
+ *
72
+ * @return void
73
+ * @since 8.0.0
74
+ */
75
+ private function __sleep()
76
+ {
77
+ // Do nothing
78
+ }
79
+
80
+
81
+ /**
82
+ * Declared to overwrite magic method __wakeup()
83
+ * In order to avoid unserialize instance
84
+ *
85
+ * @return void
86
+ * @since 8.0.0
87
+ */
88
+ private function __wakeup()
89
+ {
90
+ // Do nothing
91
+ }
92
+
93
+
94
+ /**
95
+ * Responsible for rendering setting tabs
96
+ *
97
+ * @param array $postdata
98
+ *
99
+ * @return void
100
+ * @since 8.0.0
101
+ */
102
+ abstract static public function render($postdata);
103
+
104
+ /**
105
+ * Responsible for rendering setting meta fields
106
+ *
107
+ * @param array $postdata
108
+ *
109
+ * @return void
110
+ * @since 8.0.0
111
+ */
112
+ abstract static public function render_meta_fields($postdata);
113
+ }
admin/views/class-wpvr-tour-setting.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) exit; // Exit if accessed directly
3
+ /**
4
+ * Abstract class for WPVR Setting
5
+ *
6
+ * @link http://rextheme.com/
7
+ * @since 8.0.0
8
+ *
9
+ * @package Wpvr
10
+ * @subpackage Wpvr/admin/classes
11
+ */
12
+
13
+
14
+ abstract class WPVR_Tour_setting {
15
+
16
+ /**
17
+ * @param mixed $postdata
18
+ *
19
+ * @return void
20
+ * @since 8.0.0
21
+ */
22
+ abstract public function render_setting($postdata);
23
+
24
+ }
build/index.build.js CHANGED
@@ -93,7 +93,7 @@
93
  /*! no static exports found */
94
  /***/ (function(module, exports) {
95
 
96
- eval("function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar __ = wp.i18n.__; // Import __() from wp.i18n\n\nvar Component = wp.element.Component;\nvar el = wp.element.createElement,\n registerBlockType = wp.blocks.registerBlockType,\n TextControl = wp.components.TextControl,\n SelectControl = wp.components.SelectControl,\n InspectorControls = wp.editor.InspectorControls,\n blockStyle = {\n fontFamily: 'Roboto',\n backgroundColor: '#900',\n color: '#fff',\n padding: '20px'\n};\nvar iconEl = el('svg', {\n width: 20,\n height: 20\n}, el('path', {\n 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\"\n}));\n\nvar wpvredit = /*#__PURE__*/function (_Component) {\n _inherits(wpvredit, _Component);\n\n var _super = _createSuper(wpvredit);\n\n function wpvredit() {\n var _this;\n\n _classCallCheck(this, wpvredit);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n data: [{\n value: \"0\",\n label: \"None\"\n }]\n };\n return _this;\n }\n\n _createClass(wpvredit, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n wp.apiFetch({\n path: 'wpvr/v1/panodata'\n }).then(function (data) {\n _this2.setState({\n data: data\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return [el(InspectorControls, {}, el(SelectControl, {\n className: 'wpvr-base-control',\n label: 'Id',\n value: this.props.attributes.id,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n id: value\n });\n },\n options: this.state.data\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Width',\n value: this.props.attributes.width,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n width: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Height',\n value: this.props.attributes.height,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n height: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Mobile Height',\n value: this.props.attributes.mobile_height,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n mobile_height: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Radius',\n value: this.props.attributes.radius,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n radius: value\n });\n }\n })), /*#__PURE__*/React.createElement(\"p\", {\n className: \"wpvr-block-content\"\n }, \"WPVR id=\", this.props.attributes.id, \", Width=\", this.props.attributes.width, \"px, Height=\", this.props.attributes.height, \"px, Mobile Height=\", this.props.attributes.mobile_height, \"px, Radius=\", this.props.attributes.radius, \"px\")];\n }\n }]);\n\n return wpvredit;\n}(Component);\n\nregisterBlockType('wpvr/wpvr-block', {\n title: 'WPVR',\n icon: iconEl,\n category: 'common',\n edit: wpvredit,\n save: function save(props) {\n return null;\n }\n});\n\n//# sourceURL=webpack:///./src/index.js?");
97
 
98
  /***/ })
99
 
93
  /*! no static exports found */
94
  /***/ (function(module, exports) {
95
 
96
+ eval("function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar __ = wp.i18n.__; // Import __() from wp.i18n\n\nvar Component = wp.element.Component;\nvar el = wp.element.createElement,\n registerBlockType = wp.blocks.registerBlockType,\n TextControl = wp.components.TextControl,\n SelectControl = wp.components.SelectControl,\n InspectorControls = wp.editor.InspectorControls,\n blockStyle = {\n fontFamily: 'Roboto',\n backgroundColor: '#900',\n color: '#fff',\n padding: '20px'\n};\nvar iconEl = el('svg', {\n width: 20,\n height: 20\n}, el('path', {\n 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\"\n}));\n\nvar wpvredit = /*#__PURE__*/function (_Component) {\n _inherits(wpvredit, _Component);\n\n var _super = _createSuper(wpvredit);\n\n function wpvredit() {\n var _this;\n\n _classCallCheck(this, wpvredit);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n data: [{\n value: \"0\",\n label: \"None\"\n }]\n };\n return _this;\n }\n\n _createClass(wpvredit, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n wp.apiFetch({\n path: 'wpvr/v1/panodata'\n }).then(function (data) {\n _this2.setState({\n data: data\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n return [el(InspectorControls, {}, el(SelectControl, {\n className: 'wpvr-base-control',\n label: 'Id',\n value: this.props.attributes.id,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n id: value\n });\n },\n options: this.state.data\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Width',\n value: this.props.attributes.width,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n width: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Height',\n value: this.props.attributes.height,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n height: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Mobile Height',\n value: this.props.attributes.mobile_height,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n mobile_height: value\n });\n }\n })), el(InspectorControls, {}, el(TextControl, {\n className: 'wpvr-base-control',\n label: 'Radius',\n value: this.props.attributes.radius,\n onChange: function onChange(value) {\n _this3.props.setAttributes({\n radius: value\n });\n }\n })), /*#__PURE__*/React.createElement(\"p\", {\n className: \"wpvr-block-content\"\n }, \"WPVR id=\", this.props.attributes.id, \", Width=\", this.props.attributes.width, \"px, Height=\", this.props.attributes.height, \"px, Mobile Height=\", this.props.attributes.mobile_height, \"px, Radius=\", this.props.attributes.radius, \"px\")];\n }\n }]);\n\n return wpvredit;\n}(Component);\n\nregisterBlockType('wpvr/wpvr-block', {\n title: 'WPVR',\n icon: iconEl,\n category: 'common',\n edit: wpvredit,\n save: function save(props) {\n return null;\n }\n});\n\n//# sourceURL=webpack:///./src/index.js?");
97
 
98
  /***/ })
99
 
elementor/elementor.php CHANGED
@@ -84,11 +84,7 @@ class WpvrElementor {
84
  * @access private
85
  */
86
  private function register_widget() {
87
- if ( version_compare(ELEMENTOR_VERSION, '3.5.0', '>=') ) {
88
- \Elementor\Plugin::instance()->widgets_manager->register( new Wpvr_Widget() );
89
- } else {
90
- \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Wpvr_Widget() );
91
- }
92
  }
93
  }
94
 
84
  * @access private
85
  */
86
  private function register_widget() {
87
+ \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Wpvr_Widget() );
 
 
 
 
88
  }
89
  }
90
 
elementor/elements/Wpvr-widget.php CHANGED
@@ -3,7 +3,6 @@
3
  namespace WpvrElement\Elements\Wpvr;
4
 
5
  use Elementor\Controls_Stack;
6
- use Elementor\Plugin;
7
  use Elementor\Widget_Base;
8
  use Elementor\Controls_Manager;
9
 
@@ -91,6 +90,7 @@ class Wpvr_Widget extends Widget_Base {
91
  return [ 'Wpvr-widget' ];
92
  }
93
 
 
94
  /**
95
  * Register the widget controls.
96
  *
@@ -116,7 +116,7 @@ class Wpvr_Widget extends Widget_Base {
116
  * get all tour info and store in $wpvr_post
117
  */
118
  $the_posts = get_posts(array('post_type' => 'wpvr_item',
119
- 'posts_per_page' => -1));
120
 
121
  $wpvr_post = array();
122
 
@@ -140,13 +140,13 @@ class Wpvr_Widget extends Widget_Base {
140
  * add a select type field instead of text field
141
  */
142
  $this->add_control(
143
- 'vr_id',
144
- [
145
- 'label' => __( 'ID:', 'wpvr' ),
146
- 'type' => \Elementor\Controls_Manager::SELECT,
147
- 'options' => $wpvr_post
148
- ]
149
- );
150
  $this->add_control(
151
  'vr_width',
152
  [
@@ -188,7 +188,7 @@ class Wpvr_Widget extends Widget_Base {
188
  * get all tour info and store in $wpvr_post
189
  */
190
  $the_posts = get_posts(array('post_type' => 'wpvr_item',
191
- 'posts_per_page' => -1));
192
 
193
  $wpvr_post = array();
194
 
@@ -212,13 +212,13 @@ class Wpvr_Widget extends Widget_Base {
212
  * add a select type field instead of text field
213
  */
214
  $this->add_control(
215
- 'vr_id',
216
- [
217
- 'label' => __( 'ID:', 'wpvr' ),
218
- 'type' => \Elementor\Controls_Manager::SELECT,
219
- 'options' => $wpvr_post
220
- ]
221
- );
222
  $this->add_control(
223
  'vr_width',
224
  [
@@ -289,18 +289,6 @@ class Wpvr_Widget extends Widget_Base {
289
  }
290
  }
291
 
292
- /**
293
- * Render the widget output in the editor.
294
- *
295
- * Written as a Backbone JavaScript template and used to generate the live preview.
296
- *
297
- * @since 1.0.0
298
- *
299
- * @access protected
300
- */
301
- // protected function _content_template() {
302
- //
303
- // }
304
  /**
305
  * Print element template.
306
  *
3
  namespace WpvrElement\Elements\Wpvr;
4
 
5
  use Elementor\Controls_Stack;
 
6
  use Elementor\Widget_Base;
7
  use Elementor\Controls_Manager;
8
 
90
  return [ 'Wpvr-widget' ];
91
  }
92
 
93
+
94
  /**
95
  * Register the widget controls.
96
  *
116
  * get all tour info and store in $wpvr_post
117
  */
118
  $the_posts = get_posts(array('post_type' => 'wpvr_item',
119
+ 'posts_per_page' => -1));
120
 
121
  $wpvr_post = array();
122
 
140
  * add a select type field instead of text field
141
  */
142
  $this->add_control(
143
+ 'vr_id',
144
+ [
145
+ 'label' => __( 'ID:', 'wpvr' ),
146
+ 'type' => \Elementor\Controls_Manager::SELECT,
147
+ 'options' => $wpvr_post
148
+ ]
149
+ );
150
  $this->add_control(
151
  'vr_width',
152
  [
188
  * get all tour info and store in $wpvr_post
189
  */
190
  $the_posts = get_posts(array('post_type' => 'wpvr_item',
191
+ 'posts_per_page' => -1));
192
 
193
  $wpvr_post = array();
194
 
212
  * add a select type field instead of text field
213
  */
214
  $this->add_control(
215
+ 'vr_id',
216
+ [
217
+ 'label' => __( 'ID:', 'wpvr' ),
218
+ 'type' => \Elementor\Controls_Manager::SELECT,
219
+ 'options' => $wpvr_post
220
+ ]
221
+ );
222
  $this->add_control(
223
  'vr_width',
224
  [
289
  }
290
  }
291
 
 
 
 
 
 
 
 
 
 
 
 
 
292
  /**
293
  * Print element template.
294
  *
includes/class-wpvr-activator.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  /**
4
  * Fired during plugin activation
5
  *
6
  * @link http://rextheme.com/
7
- * @since 1.0.0
8
  *
9
  * @package Wpvr
10
  * @subpackage Wpvr/includes
@@ -15,10 +15,10 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
15
  *
16
  * This class defines all code necessary to run during the plugin's activation.
17
  *
18
- * @since 1.0.0
19
  * @package Wpvr
20
  * @subpackage Wpvr/includes
21
- * @author Rextheme <sakib@coderex.co>
22
  */
23
  class Wpvr_Activator {
24
 
@@ -27,10 +27,10 @@ class Wpvr_Activator {
27
  *
28
  * Long Description.
29
  *
30
- * @since 1.0.0
31
  */
32
  public static function activate() {
33
- flush_rewrite_rules();
34
  }
35
 
36
  }
1
  <?php
2
+
3
  /**
4
  * Fired during plugin activation
5
  *
6
  * @link http://rextheme.com/
7
+ * @since 8.0.0
8
  *
9
  * @package Wpvr
10
  * @subpackage Wpvr/includes
15
  *
16
  * This class defines all code necessary to run during the plugin's activation.
17
  *
18
+ * @since 8.0.0
19
  * @package Wpvr
20
  * @subpackage Wpvr/includes
21
+ * @author Rextheme <support@rextheme.com>
22
  */
23
  class Wpvr_Activator {
24
 
27
  *
28
  * Long Description.
29
  *
30
+ * @since 8.0.0
31
  */
32
  public static function activate() {
33
+
34
  }
35
 
36
  }
includes/class-wpvr-deactivator.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  /**
4
  * Fired during plugin deactivation
5
  *
6
  * @link http://rextheme.com/
7
- * @since 1.0.0
8
  *
9
  * @package Wpvr
10
  * @subpackage Wpvr/includes
@@ -15,10 +15,10 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
15
  *
16
  * This class defines all code necessary to run during the plugin's deactivation.
17
  *
18
- * @since 1.0.0
19
  * @package Wpvr
20
  * @subpackage Wpvr/includes
21
- * @author Rextheme <sakib@coderex.co>
22
  */
23
  class Wpvr_Deactivator {
24
 
@@ -27,7 +27,7 @@ class Wpvr_Deactivator {
27
  *
28
  * Long Description.
29
  *
30
- * @since 1.0.0
31
  */
32
  public static function deactivate() {
33
 
1
  <?php
2
+
3
  /**
4
  * Fired during plugin deactivation
5
  *
6
  * @link http://rextheme.com/
7
+ * @since 8.0.0
8
  *
9
  * @package Wpvr
10
  * @subpackage Wpvr/includes
15
  *
16
  * This class defines all code necessary to run during the plugin's deactivation.
17
  *
18
+ * @since 8.0.0
19
  * @package Wpvr
20
  * @subpackage Wpvr/includes
21
+ * @author Rextheme <support@rextheme.com>
22
  */
23
  class Wpvr_Deactivator {
24
 
27
  *
28
  * Long Description.
29
  *
30
+ * @since 8.0.0
31
  */
32
  public static function deactivate() {
33
 
includes/class-wpvr-i18n.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  /**
4
  * Define the internationalization functionality
5
  *
@@ -22,7 +22,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
22
  * @since 1.0.0
23
  * @package Wpvr
24
  * @subpackage Wpvr/includes
25
- * @author Rextheme <sakib@coderex.co>
26
  */
27
  class Wpvr_i18n {
28
 
1
  <?php
2
+
3
  /**
4
  * Define the internationalization functionality
5
  *
22
  * @since 1.0.0
23
  * @package Wpvr
24
  * @subpackage Wpvr/includes
25
+ * @author Rextheme <support@rextheme.com>
26
  */
27
  class Wpvr_i18n {
28
 
includes/class-wpvr-loader.php CHANGED
@@ -1,5 +1,5 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
  /**
4
  * Register all actions and filters for the plugin
5
  *
@@ -19,7 +19,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
19
  *
20
  * @package Wpvr
21
  * @subpackage Wpvr/includes
22
- * @author Rextheme <sakib@coderex.co>
23
  */
24
  class Wpvr_Loader {
25
 
1
  <?php
2
+
3
  /**
4
  * Register all actions and filters for the plugin
5
  *
19
  *
20
  * @package Wpvr
21
  * @subpackage Wpvr/includes
22
+ * @author Rextheme <support@rextheme.com>
23
  */
24
  class Wpvr_Loader {
25
 
includes/class-wpvr.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
 
4
  /**
5
  * The file that defines the core plugin class
@@ -8,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
8
  * public-facing side of the site and the admin area.
9
  *
10
  * @link http://rextheme.com/
11
- * @since 1.0.0
12
  *
13
  * @package Wpvr
14
  * @subpackage Wpvr/includes
@@ -23,19 +22,18 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
23
  * Also maintains the unique identifier of this plugin as well as the current
24
  * version of the plugin.
25
  *
26
- * @since 1.0.0
27
  * @package Wpvr
28
  * @subpackage Wpvr/includes
29
- * @author Rextheme <sakib@coderex.co>
30
  */
31
-
32
  class Wpvr {
33
 
34
  /**
35
  * The loader that's responsible for maintaining and registering all hooks that power
36
  * the plugin.
37
  *
38
- * @since 1.0.0
39
  * @access protected
40
  * @var Wpvr_Loader $loader Maintains and registers all hooks for the plugin.
41
  */
@@ -44,7 +42,7 @@ class Wpvr {
44
  /**
45
  * The unique identifier of this plugin.
46
  *
47
- * @since 1.0.0
48
  * @access protected
49
  * @var string $plugin_name The string used to uniquely identify this plugin.
50
  */
@@ -53,7 +51,7 @@ class Wpvr {
53
  /**
54
  * The current version of the plugin.
55
  *
56
- * @since 1.0.0
57
  * @access protected
58
  * @var string $version The current version of the plugin.
59
  */
@@ -62,10 +60,27 @@ class Wpvr {
62
  /**
63
  * The post type for the plugin
64
  *
65
- * @since 1.0.0
66
  */
67
  protected $post_type;
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  /**
70
  * Define the core functionality of the plugin.
71
  *
@@ -73,14 +88,13 @@ class Wpvr {
73
  * Load the dependencies, define the locale, and set the hooks for the admin area and
74
  * the public-facing side of the site.
75
  *
76
- * @since 1.0.0
77
  */
78
  public function __construct() {
79
-
80
- if ( defined( 'WPVR' ) ) {
81
- $this->version = WPVR;
82
  } else {
83
- $this->version = '1.0.0';
84
  }
85
  $this->plugin_name = 'wpvr';
86
  $this->post_type = 'wpvr_item';
@@ -92,6 +106,7 @@ class Wpvr {
92
 
93
  }
94
 
 
95
  /**
96
  * Load the required dependencies for this plugin.
97
  *
@@ -105,148 +120,78 @@ class Wpvr {
105
  * Create an instance of the loader which will be used to register the hooks
106
  * with WordPress.
107
  *
108
- * @since 1.0.0
109
  * @access private
110
  */
111
  private function load_dependencies() {
112
 
113
  /**
114
- * The class responsible for orchestrating the actions and filters of the
115
- * core plugin.
116
- */
117
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpvr-loader.php';
118
 
119
  /**
120
- * The class responsible for defining internationalization functionality
121
- * of the plugin.
122
  */
123
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpvr-i18n.php';
124
-
125
- /**
126
- * The class responsible for defining all actions that occur in the admin area.
127
- */
128
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpvr-admin-pages.php';
129
-
130
- /**
131
- * The class responsible for defining all actions that occur in the admin area.
132
- */
133
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpvr-admin.php';
134
-
135
- /**
136
- * The class responsible for defining all JQuery Ajax.
137
- */
138
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpvr-ajax.php';
139
-
140
- /**
141
- * Plugin version rollback.
142
- */
143
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpvr-rollback.php';
144
-
145
- /**
146
- * The class responsible for defining all JQuery Ajax.
147
- */
148
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpvr-icon.php';
149
 
150
  /**
151
- * The class responsible for defining all actions that occur in the public-facing
152
- * side of the site.
153
  */
154
- require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wpvr-public.php';
155
 
156
  $this->loader = new Wpvr_Loader();
157
 
158
  }
159
 
 
160
  /**
161
  * Define the locale for this plugin for internationalization.
162
  *
163
  * Uses the Wpvr_i18n class in order to set the domain and to register the hook
164
  * with WordPress.
165
  *
166
- * @since 1.0.0
167
  * @access private
168
  */
169
- private function set_locale() {
170
-
171
  $plugin_i18n = new Wpvr_i18n();
172
-
173
  $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
174
-
175
  }
176
 
 
177
  /**
178
  * Register all of the hooks related to the admin area functionality
179
  * of the plugin.
180
  *
181
- * @since 1.0.0
182
  * @access private
183
  */
184
- private function define_admin_hooks() {
185
-
186
- if (apply_filters('is_wpvr_premium', false)) {
187
- if (class_exists('Wpvrpro')) {
188
- $plugin_admin = new Wpvrpro( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
189
- }
190
- else {
191
- $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
192
- }
193
- }
194
- else {
195
- $plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
196
- }
197
 
198
- if (apply_filters('is_wpvr_pro_active', false)) {
199
- if (class_exists('Wpvr_Admin_Pages_pro')) {
200
- $plugin_admin_page = new Wpvr_Admin_Pages_pro();
201
- }
202
- else {
203
- $plugin_admin_page = new Wpvr_Admin_Pages();
204
- }
205
- }
206
- else {
207
- $plugin_admin_page = new Wpvr_Admin_Pages();
208
- }
209
 
210
- $plugin_admin_ajax = new Wpvr_Ajax();
211
-
212
- //plugin action links
213
- $this->loader->add_filter( 'plugin_action_links_' . WPVR_BASE, $plugin_admin, 'plugin_action_links_wpvr', 10, 4);
214
-
215
- $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
216
- $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
217
-
218
- $this->loader->add_action( 'admin_menu', $plugin_admin_page, 'wpvr_add_admin_pages' );
219
- $this->loader->add_action( 'init', $plugin_admin, 'wpvr_add_plugin_custom_post_type' );
220
- $this->loader->add_filter( 'manage_edit-' . $this->post_type . '_columns', $plugin_admin, 'wpvr_manage_post_columns' );
221
- $this->loader->add_filter( 'post_updated_messages', $plugin_admin, 'wpvr_post_updated_messages' );
222
- $this->loader->add_filter( 'manage_' . $this->post_type . '_posts_custom_column', $plugin_admin, 'wpvr_manage_posts_custom_column' );
223
- $this->loader->add_action( 'admin_init', $plugin_admin, 'wpvr_admin_init' );
224
- $this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'wpvr_add_setup_metabox' );
225
- $this->loader->add_action( 'wp_ajax_wpvr_preview', $plugin_admin_ajax, 'wpvr_show_preview' );
226
- $this->loader->add_action( 'wp_ajax_wpvr_save', $plugin_admin_ajax, 'wpvr_save_data' );
227
- $this->loader->add_action( 'wp_ajax_wpvrvideo_preview', $plugin_admin_ajax, 'wpvrvideo_preview' );
228
- $this->loader->add_action( 'wp_ajax_wpvrstreetview_preview', $plugin_admin_ajax, 'wpvrstreetview_preview' );
229
- $this->loader->add_action( 'wp_ajax_wpvr_file_import', $plugin_admin_ajax, 'wpvr_file_import' );
230
- $this->loader->add_action( 'wp_ajax_wpvr_role_management', $plugin_admin_ajax, 'wpvr_role_management' );
231
- $this->loader->add_action( 'wp_ajax_wpvr_notice', $plugin_admin_ajax, 'wpvr_notice' );
232
  $high_res_image = get_option('high_res_image');
233
  if ($high_res_image == 'true') {
234
  add_filter( 'big_image_size_threshold', '__return_false' );
235
-
236
- }
237
-
238
- $this->loader->add_action( 'admin_init', $plugin_admin, 'trigger_rollback' );
239
  }
240
 
 
241
  /**
242
  * Register all of the hooks related to the public-facing functionality
243
  * of the plugin.
244
  *
245
- * @since 1.0.0
246
  * @access private
247
  */
248
- private function define_public_hooks() {
249
-
250
  if (apply_filters('is_wpvr_pro_active', false)) {
251
  if (class_exists('Wpvrpropublic')) {
252
  $plugin_public = new Wpvrpropublic( $this->get_plugin_name(), $this->get_version() );
@@ -263,53 +208,57 @@ class Wpvr {
263
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
264
 
265
  $plugin_public->public_init();
266
-
267
  }
268
 
 
269
  /**
270
  * Run the loader to execute all of the hooks with WordPress.
271
  *
272
- * @since 1.0.0
273
  */
274
  public function run() {
275
  $this->loader->run();
276
  }
277
 
 
278
  /**
279
  * The name of the plugin used to uniquely identify it within the context of
280
  * WordPress and to define internationalization functionality.
281
  *
282
- * @since 1.0.0
283
  * @return string The name of the plugin.
284
  */
285
  public function get_plugin_name() {
286
  return $this->plugin_name;
287
  }
288
 
 
289
  /**
290
  * The reference to the class that orchestrates the hooks with the plugin.
291
  *
292
- * @since 1.0.0
293
  * @return Wpvr_Loader Orchestrates the hooks of the plugin.
294
  */
295
  public function get_loader() {
296
  return $this->loader;
297
  }
298
 
 
299
  /**
300
  * Retrieve the version number of the plugin.
301
  *
302
- * @since 1.0.0
303
  * @return string The version number of the plugin.
304
  */
305
  public function get_version() {
306
  return $this->version;
307
  }
 
308
 
309
  /**
310
  * Retrieve the post type of the plugin.
311
  *
312
- * @since 1.0.0
313
  */
314
  public function get_post_type() {
315
  return $this->post_type;
1
  <?php
 
2
 
3
  /**
4
  * The file that defines the core plugin class
7
  * public-facing side of the site and the admin area.
8
  *
9
  * @link http://rextheme.com/
10
+ * @since 8.0.0
11
  *
12
  * @package Wpvr
13
  * @subpackage Wpvr/includes
22
  * Also maintains the unique identifier of this plugin as well as the current
23
  * version of the plugin.
24
  *
25
+ * @since 8.0.0
26
  * @package Wpvr
27
  * @subpackage Wpvr/includes
28
+ * @author Rextheme <support@rextheme.com>
29
  */
 
30
  class Wpvr {
31
 
32
  /**
33
  * The loader that's responsible for maintaining and registering all hooks that power
34
  * the plugin.
35
  *
36
+ * @since 8.0.0
37
  * @access protected
38
  * @var Wpvr_Loader $loader Maintains and registers all hooks for the plugin.
39
  */
42
  /**
43
  * The unique identifier of this plugin.
44
  *
45
+ * @since 8.0.0
46
  * @access protected
47
  * @var string $plugin_name The string used to uniquely identify this plugin.
48
  */
51
  /**
52
  * The current version of the plugin.
53
  *
54
+ * @since 8.0.0
55
  * @access protected
56
  * @var string $version The current version of the plugin.
57
  */
60
  /**
61
  * The post type for the plugin
62
  *
63
+ * @since 8.0.0
64
  */
65
  protected $post_type;
66
 
67
+ /**
68
+ * Instacne of WPVR_Post_Type
69
+ *
70
+ * @var object
71
+ * @since 8.0.0
72
+ */
73
+ protected $wpvr_post_type;
74
+
75
+ /**
76
+ * Instance of Wpvr_Admin class
77
+ *
78
+ * @var object
79
+ * @since 8.0.0
80
+ */
81
+ protected $plugin_admin;
82
+
83
+
84
  /**
85
  * Define the core functionality of the plugin.
86
  *
88
  * Load the dependencies, define the locale, and set the hooks for the admin area and
89
  * the public-facing side of the site.
90
  *
91
+ * @since 8.0.0
92
  */
93
  public function __construct() {
94
+ if ( defined( 'WPVR_VERSION' ) ) {
95
+ $this->version = WPVR_VERSION;
 
96
  } else {
97
+ $this->version = '8.0.0';
98
  }
99
  $this->plugin_name = 'wpvr';
100
  $this->post_type = 'wpvr_item';
106
 
107
  }
108
 
109
+
110
  /**
111
  * Load the required dependencies for this plugin.
112
  *
120
  * Create an instance of the loader which will be used to register the hooks
121
  * with WordPress.
122
  *
123
+ * @since 8.0.0
124
  * @access private
125
  */
126
  private function load_dependencies() {
127
 
128
  /**
129
+ * The class responsible for auto loading all files of the core plugin.
130
+ */
131
+ require_once plugin_dir_path(dirname(__FILE__)) . 'vendor/autoload.php';
 
132
 
133
  /**
134
+ * The class responsible for orchestrating the actions and filters of the core plugin.
 
135
  */
136
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpvr-loader.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  /**
139
+ * The class responsible for defining internationalization functionality of the plugin.
 
140
  */
141
+ require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpvr-i18n.php';
142
 
143
  $this->loader = new Wpvr_Loader();
144
 
145
  }
146
 
147
+
148
  /**
149
  * Define the locale for this plugin for internationalization.
150
  *
151
  * Uses the Wpvr_i18n class in order to set the domain and to register the hook
152
  * with WordPress.
153
  *
154
+ * @since 8.0.0
155
  * @access private
156
  */
157
+ private function set_locale()
158
+ {
159
  $plugin_i18n = new Wpvr_i18n();
 
160
  $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
 
161
  }
162
 
163
+
164
  /**
165
  * Register all of the hooks related to the admin area functionality
166
  * of the plugin.
167
  *
168
+ * @since 8.0.0
169
  * @access private
170
  */
171
+ private function define_admin_hooks()
172
+ {
173
+ $this->plugin_admin = new Wpvr_Admin( $this->get_plugin_name(), $this->get_version(), $this->get_post_type() );
 
 
 
 
 
 
 
 
 
 
174
 
175
+ $this->loader->add_filter( 'plugin_action_links_' . WPVR_BASE, $this->plugin_admin, 'plugin_action_links_wpvr', 10, 4);
176
+ $this->loader->add_action( 'admin_enqueue_scripts', $this->plugin_admin, 'enqueue_styles' );
177
+ $this->loader->add_action( 'admin_enqueue_scripts', $this->plugin_admin, 'enqueue_scripts' );
 
 
 
 
 
 
 
 
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  $high_res_image = get_option('high_res_image');
180
  if ($high_res_image == 'true') {
181
  add_filter( 'big_image_size_threshold', '__return_false' );
182
+ }
 
 
 
183
  }
184
 
185
+
186
  /**
187
  * Register all of the hooks related to the public-facing functionality
188
  * of the plugin.
189
  *
190
+ * @since 8.0.0
191
  * @access private
192
  */
193
+ private function define_public_hooks()
194
+ {
195
  if (apply_filters('is_wpvr_pro_active', false)) {
196
  if (class_exists('Wpvrpropublic')) {
197
  $plugin_public = new Wpvrpropublic( $this->get_plugin_name(), $this->get_version() );
208
  $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
209
 
210
  $plugin_public->public_init();
 
211
  }
212
 
213
+
214
  /**
215
  * Run the loader to execute all of the hooks with WordPress.
216
  *
217
+ * @since 8.0.0
218
  */
219
  public function run() {
220
  $this->loader->run();
221
  }
222
 
223
+
224
  /**
225
  * The name of the plugin used to uniquely identify it within the context of
226
  * WordPress and to define internationalization functionality.
227
  *
228
+ * @since 8.0.0
229
  * @return string The name of the plugin.
230
  */
231
  public function get_plugin_name() {
232
  return $this->plugin_name;
233
  }
234
 
235
+
236
  /**
237
  * The reference to the class that orchestrates the hooks with the plugin.
238
  *
239
+ * @since 8.0.0
240
  * @return Wpvr_Loader Orchestrates the hooks of the plugin.
241
  */
242
  public function get_loader() {
243
  return $this->loader;
244
  }
245
 
246
+
247
  /**
248
  * Retrieve the version number of the plugin.
249
  *
250
+ * @since 8.0.0
251
  * @return string The version number of the plugin.
252
  */
253
  public function get_version() {
254
  return $this->version;
255
  }
256
+
257
 
258
  /**
259
  * Retrieve the post type of the plugin.
260
  *
261
+ * @since 8.0.0
262
  */
263
  public function get_post_type() {
264
  return $this->post_type;
languages/wpvr.pot CHANGED
@@ -1,292 +1,292 @@
1
- #, fuzzy
2
- msgid ""
3
- msgstr ""
4
- "Project-Id-Version: WP VR\n"
5
- "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2019-12-11 10:17+0000\n"
7
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
- "Language-Team: \n"
10
- "Language: \n"
11
- "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
12
- "MIME-Version: 1.0\n"
13
- "Content-Type: text/plain; charset=UTF-8\n"
14
- "Content-Transfer-Encoding: 8bit\n"
15
- "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Version: 2.3.1; wp-5.3"
17
-
18
- #: admin/partials/wpvr_license.php:28 admin/partials/wpvr_license.php:38
19
- msgid "Activate License"
20
- msgstr ""
21
-
22
- #: admin/partials/wpvr_documentation.php:53
23
- msgid ""
24
- "Before You start, you can check our Documentation to get familiar with WP VR "
25
- "- 360 Panorama and virtual tour creator for WordPress."
26
- msgstr ""
27
-
28
- #: admin/partials/wpvr_documentation.php:73
29
- msgid ""
30
- "Can't find solution on with our documentation? Just Post a ticket on Support "
31
- "forum. We are to solve your issue."
32
- msgstr ""
33
-
34
- #: admin/partials/wpvr-meta-box-shortcode-display.php:29
35
- msgid "Check how to use: "
36
- msgstr ""
37
-
38
- #: admin/partials/wpvr_documentation.php:166
39
- msgid "Company logo"
40
- msgstr ""
41
-
42
- #: admin/partials/wpvr_documentation.php:153
43
- msgid "Compass Switch"
44
- msgstr ""
45
-
46
- #: admin/partials/wpvr_documentation.php:164
47
- msgid "Custom control buttons"
48
- msgstr ""
49
-
50
- #: admin/partials/wpvr_documentation.php:163
51
- msgid "Custom scene gallery"
52
- msgstr ""
53
-
54
- #: admin/partials/wpvr_documentation.php:156
55
- msgid "Customize each scene's default face on load"
56
- msgstr ""
57
-
58
- #: admin/partials/wpvr_documentation.php:151
59
- msgid "Customized hotspot icon"
60
- msgstr ""
61
-
62
- #: admin/partials/wpvr_license.php:34
63
- msgid "Deactivate License"
64
- msgstr ""
65
-
66
- #: admin/partials/wpvr_documentation.php:154
67
- msgid "Default zoom level"
68
- msgstr ""
69
-
70
- #: admin/partials/wpvr_documentation.php:178
71
- msgid ""
72
- "Do not close or refresh the page during import process. It may take few "
73
- "minutes."
74
- msgstr ""
75
-
76
- #: admin/partials/wpvr_documentation.php:47
77
- msgid "Documentation"
78
- msgstr ""
79
-
80
- #: admin/partials/wpvr_documentation.php:161
81
- msgid "Duplicate tour support"
82
- msgstr ""
83
-
84
- #: admin/partials/wpvr_documentation.php:152
85
- msgid "Dynamic Icon background color on hotspot"
86
- msgstr ""
87
-
88
- #: admin/partials/wpvr_license.php:22
89
- msgid "Enter your license key, save changes and activate."
90
- msgstr ""
91
-
92
- #: admin/partials/wpvr_documentation.php:162
93
- msgid "File import & export system"
94
- msgstr ""
95
-
96
- #: admin/partials/wpvr-meta-box-shortcode-display.php:24
97
- msgid "For classic editor:"
98
- msgstr ""
99
-
100
- #: admin/partials/wpvr-meta-box-shortcode-display.php:27
101
- msgid "For gutenberg:"
102
- msgstr ""
103
-
104
- #: admin/partials/wpvr_documentation.php:23
105
- msgid "General"
106
- msgstr ""
107
-
108
- #: admin/partials/wpvr_documentation.php:169
109
- msgid "Get Premium Version"
110
- msgstr ""
111
-
112
- #: admin/partials/wpvr_documentation.php:25
113
- msgid "Go Premium"
114
- msgstr ""
115
-
116
- #: admin/partials/wpvr_documentation.php:165
117
- msgid "Google street view embed"
118
- msgstr ""
119
-
120
- #: admin/partials/wpvr_documentation.php:160
121
- msgid "Gyroscope support"
122
- msgstr ""
123
-
124
- #: elementor/elements/Wpvr-widget.php:133
125
- msgid "Height:"
126
- msgstr ""
127
-
128
- #: admin/partials/wpvr_documentation.php:159
129
- msgid "Hotspot based scene face support"
130
- msgstr ""
131
-
132
- #. Author URI of the plugin
133
- msgid "http://rextheme.com/"
134
- msgstr ""
135
-
136
- #. URI of the plugin
137
- msgid "https://rextheme.com/wpvr/"
138
- msgstr ""
139
-
140
- #: elementor/elements/Wpvr-widget.php:113
141
- msgid "ID:"
142
- msgstr ""
143
-
144
- #: admin/partials/wpvr_documentation.php:29
145
- msgid "Import"
146
- msgstr ""
147
-
148
- #: admin/partials/wpvr_documentation.php:177
149
- msgid "Import tour file: "
150
- msgstr ""
151
-
152
- #: admin/partials/wpvr_license.php:18
153
- msgid "License Key"
154
- msgstr ""
155
-
156
- #: admin/partials/wpvr_documentation.php:105
157
- msgid "Make WPVR Popular"
158
- msgstr ""
159
-
160
- #: admin/partials/wpvr_documentation.php:155
161
- msgid "Maximum and minimum zoom range"
162
- msgstr ""
163
-
164
- #: admin/partials/wpvr_documentation.php:167
165
- msgid "Personalized support on both support forum and our support e-mail."
166
- msgstr ""
167
-
168
- #: admin/partials/wpvr_documentation.php:77
169
- msgid "Post a Ticket"
170
- msgstr ""
171
-
172
- #: elementor/elements/Wpvr-widget.php:136
173
- msgid "Put value in (px)"
174
- msgstr ""
175
-
176
- #: elementor/elements/Wpvr-widget.php:143
177
- msgid "Radius:"
178
- msgstr ""
179
-
180
- #: admin/partials/wpvr_documentation.php:115
181
- msgid "Rate Us! "
182
- msgstr ""
183
-
184
- #. Author of the plugin
185
- msgid "Rextheme"
186
- msgstr ""
187
-
188
- #: admin/partials/wpvr_documentation.php:157
189
- msgid "Scene grab control and custom boundary for each scene"
190
- msgstr ""
191
-
192
- #: admin/partials/wpvr_documentation.php:158
193
- msgid "Scene title and author tag support"
194
- msgstr ""
195
-
196
- #: admin/partials/wpvr_documentation.php:125
197
- msgid "Share On"
198
- msgstr ""
199
-
200
- #: admin/partials/wpvr_documentation.php:130
201
- msgid "Share on Facebook"
202
- msgstr ""
203
-
204
- #: admin/partials/wpvr_documentation.php:132
205
- msgid "Share on Google+"
206
- msgstr ""
207
-
208
- #: admin/partials/wpvr_documentation.php:133
209
- msgid "Share on LinkedIn"
210
- msgstr ""
211
-
212
- #: admin/partials/wpvr_documentation.php:131
213
- msgid "Share on Twitter"
214
- msgstr ""
215
-
216
- #: admin/partials/wpvr_documentation.php:86
217
- msgid "Share Your Thoughts"
218
- msgstr ""
219
-
220
- #: admin/partials/wpvr_documentation.php:96
221
- msgid "Suggest"
222
- msgstr ""
223
-
224
- #: admin/partials/wpvr_documentation.php:67
225
- msgid "Support"
226
- msgstr ""
227
-
228
- #: admin/partials/wpvr-meta-box-shortcode-display.php:25
229
- msgid ""
230
- "To use this Wpvr tour in your posts or pages use the following shortcode:"
231
- msgstr ""
232
-
233
- #: admin/partials/wpvr_documentation.php:150
234
- msgid "Unlimited hotspots"
235
- msgstr ""
236
-
237
- #: admin/partials/wpvr_documentation.php:149
238
- msgid "Unlimited scenes"
239
- msgstr ""
240
-
241
- #: admin/partials/wpvr_documentation.php:204
242
- msgid "Upgrade to Pro"
243
- msgstr ""
244
-
245
- #: wpvr.php:810
246
- msgid "Upgrade to pro"
247
- msgstr ""
248
-
249
- #: admin/partials/wpvr_documentation.php:24
250
- msgid "Video Tutorials"
251
- msgstr ""
252
-
253
- #: admin/partials/wpvr_documentation.php:57
254
- msgid "View Documentation"
255
- msgstr ""
256
-
257
- #: admin/partials/wpvr_documentation.php:147
258
- msgid "Why upgrade to Premium Version?"
259
- msgstr ""
260
-
261
- #: elementor/elements/Wpvr-widget.php:123
262
- msgid "Width:"
263
- msgstr ""
264
-
265
- #. Name of the plugin
266
- msgid "WP VR"
267
- msgstr ""
268
-
269
- #. Description of the plugin
270
- msgid ""
271
- "WP VR - 360 Panorama and virtual tour creator for WordPress is a customized "
272
- "panaroma & virtual builder tool for WordPress Website."
273
- msgstr ""
274
-
275
- #: elementor/elements/Wpvr-widget.php:43
276
- msgid "Wpvr"
277
- msgstr ""
278
-
279
- #: elementor/elements/Wpvr-widget.php:105
280
- msgid "Wpvr Setup"
281
- msgstr ""
282
-
283
- #: admin/partials/wpvr_documentation.php:111
284
- msgid ""
285
- "Your rating and feedback matters to us. If you are happy with WP VR - 360 "
286
- "Panorama and virtual tour creator for WordPress give us a rating."
287
- msgstr ""
288
-
289
- #: admin/partials/wpvr_documentation.php:92
290
- msgid ""
291
- "Your suggestions are valubale to us. It can help to make wpvr even better."
292
- msgstr ""
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: WP VR\n"
5
+ "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2019-12-11 10:17+0000\n"
7
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
+ "Language-Team: \n"
10
+ "Language: \n"
11
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
12
+ "MIME-Version: 1.0\n"
13
+ "Content-Type: text/plain; charset=UTF-8\n"
14
+ "Content-Transfer-Encoding: 8bit\n"
15
+ "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.3.1; wp-5.3"
17
+
18
+ #: admin/partials/wpvr_license.php:28 admin/partials/wpvr_license.php:38
19
+ msgid "Activate License"
20
+ msgstr ""
21
+
22
+ #: admin/partials/wpvr_documentation.php:53
23
+ msgid ""
24
+ "Before You start, you can check our Documentation to get familiar with WP VR "
25
+ "- 360 Panorama and virtual tour creator for WordPress."
26
+ msgstr ""
27
+
28
+ #: admin/partials/wpvr_documentation.php:73
29
+ msgid ""
30
+ "Can't find solution on with our documentation? Just Post a ticket on Support "
31
+ "forum. We are to solve your issue."
32
+ msgstr ""
33
+
34
+ #: admin/partials/wpvr-meta-box-shortcode-display.php:29
35
+ msgid "Check how to use: "
36
+ msgstr ""
37
+
38
+ #: admin/partials/wpvr_documentation.php:166
39
+ msgid "Company logo"
40
+ msgstr ""
41
+
42
+ #: admin/partials/wpvr_documentation.php:153
43
+ msgid "Compass Switch"
44
+ msgstr ""
45
+
46
+ #: admin/partials/wpvr_documentation.php:164
47
+ msgid "Custom control buttons"
48
+ msgstr ""
49
+
50
+ #: admin/partials/wpvr_documentation.php:163
51
+ msgid "Custom scene gallery"
52
+ msgstr ""
53
+
54
+ #: admin/partials/wpvr_documentation.php:156
55
+ msgid "Customize each scene's default face on load"
56
+ msgstr ""
57
+
58
+ #: admin/partials/wpvr_documentation.php:151
59
+ msgid "Customized hotspot icon"
60
+ msgstr ""
61
+
62
+ #: admin/partials/wpvr_license.php:34
63
+ msgid "Deactivate License"
64
+ msgstr ""
65
+
66
+ #: admin/partials/wpvr_documentation.php:154
67
+ msgid "Default zoom level"
68
+ msgstr ""
69
+
70
+ #: admin/partials/wpvr_documentation.php:178
71
+ msgid ""
72
+ "Do not close or refresh the page during import process. It may take few "
73
+ "minutes."
74
+ msgstr ""
75
+
76
+ #: admin/partials/wpvr_documentation.php:47
77
+ msgid "Documentation"
78
+ msgstr ""
79
+
80
+ #: admin/partials/wpvr_documentation.php:161
81
+ msgid "Duplicate tour support"
82
+ msgstr ""
83
+
84
+ #: admin/partials/wpvr_documentation.php:152
85
+ msgid "Dynamic Icon background color on hotspot"
86
+ msgstr ""
87
+
88
+ #: admin/partials/wpvr_license.php:22
89
+ msgid "Enter your license key, save changes and activate."
90
+ msgstr ""
91
+
92
+ #: admin/partials/wpvr_documentation.php:162
93
+ msgid "File import & export system"
94
+ msgstr ""
95
+
96
+ #: admin/partials/wpvr-meta-box-shortcode-display.php:24
97
+ msgid "For classic editor:"
98
+ msgstr ""
99
+
100
+ #: admin/partials/wpvr-meta-box-shortcode-display.php:27
101
+ msgid "For gutenberg:"
102
+ msgstr ""
103
+
104
+ #: admin/partials/wpvr_documentation.php:23
105
+ msgid "General"
106
+ msgstr ""
107
+
108
+ #: admin/partials/wpvr_documentation.php:169
109
+ msgid "Get Premium Version"
110
+ msgstr ""
111
+
112
+ #: admin/partials/wpvr_documentation.php:25
113
+ msgid "Go Premium"
114
+ msgstr ""
115
+
116
+ #: admin/partials/wpvr_documentation.php:165
117
+ msgid "Google street view embed"
118
+ msgstr ""
119
+
120
+ #: admin/partials/wpvr_documentation.php:160
121
+ msgid "Gyroscope support"
122
+ msgstr ""
123
+
124
+ #: elementor/elements/Wpvr-widget.php:133
125
+ msgid "Height:"
126
+ msgstr ""
127
+
128
+ #: admin/partials/wpvr_documentation.php:159
129
+ msgid "Hotspot based scene face support"
130
+ msgstr ""
131
+
132
+ #. Author URI of the plugin
133
+ msgid "http://rextheme.com/"
134
+ msgstr ""
135
+
136
+ #. URI of the plugin
137
+ msgid "https://rextheme.com/wpvr/"
138
+ msgstr ""
139
+
140
+ #: elementor/elements/Wpvr-widget.php:113
141
+ msgid "ID:"
142
+ msgstr ""
143
+
144
+ #: admin/partials/wpvr_documentation.php:29
145
+ msgid "Import"
146
+ msgstr ""
147
+
148
+ #: admin/partials/wpvr_documentation.php:177
149
+ msgid "Import tour file: "
150
+ msgstr ""
151
+
152
+ #: admin/partials/wpvr_license.php:18
153
+ msgid "License Key"
154
+ msgstr ""
155
+
156
+ #: admin/partials/wpvr_documentation.php:105
157
+ msgid "Make WPVR Popular"
158
+ msgstr ""
159
+
160
+ #: admin/partials/wpvr_documentation.php:155
161
+ msgid "Maximum and minimum zoom range"
162
+ msgstr ""
163
+
164
+ #: admin/partials/wpvr_documentation.php:167
165
+ msgid "Personalized support on both support forum and our support e-mail."
166
+ msgstr ""
167
+
168
+ #: admin/partials/wpvr_documentation.php:77
169
+ msgid "Post a Ticket"
170
+ msgstr ""
171
+
172
+ #: elementor/elements/Wpvr-widget.php:136
173
+ msgid "Put value in (px)"
174
+ msgstr ""
175
+
176
+ #: elementor/elements/Wpvr-widget.php:143
177
+ msgid "Radius:"
178
+ msgstr ""
179
+
180
+ #: admin/partials/wpvr_documentation.php:115
181
+ msgid "Rate Us! "
182
+ msgstr ""
183
+
184
+ #. Author of the plugin
185
+ msgid "Rextheme"
186
+ msgstr ""
187
+
188
+ #: admin/partials/wpvr_documentation.php:157
189
+ msgid "Scene grab control and custom boundary for each scene"
190
+ msgstr ""
191
+
192
+ #: admin/partials/wpvr_documentation.php:158
193
+ msgid "Scene title and author tag support"
194
+ msgstr ""
195
+
196
+ #: admin/partials/wpvr_documentation.php:125
197
+ msgid "Share On"
198
+ msgstr ""
199
+
200
+ #: admin/partials/wpvr_documentation.php:130
201
+ msgid "Share on Facebook"
202
+ msgstr ""
203
+
204
+ #: admin/partials/wpvr_documentation.php:132
205
+ msgid "Share on Google+"
206
+ msgstr ""
207
+
208
+ #: admin/partials/wpvr_documentation.php:133
209
+ msgid "Share on LinkedIn"
210
+ msgstr ""
211
+
212
+ #: admin/partials/wpvr_documentation.php:131
213
+ msgid "Share on Twitter"
214
+ msgstr ""
215
+
216
+ #: admin/partials/wpvr_documentation.php:86
217
+ msgid "Share Your Thoughts"
218
+ msgstr ""
219
+
220
+ #: admin/partials/wpvr_documentation.php:96
221
+ msgid "Suggest"
222
+ msgstr ""
223
+
224
+ #: admin/partials/wpvr_documentation.php:67
225
+ msgid "Support"
226
+ msgstr ""
227
+
228
+ #: admin/partials/wpvr-meta-box-shortcode-display.php:25
229
+ msgid ""
230
+ "To use this Wpvr tour in your posts or pages use the following shortcode:"
231
+ msgstr ""
232
+
233
+ #: admin/partials/wpvr_documentation.php:150
234
+ msgid "Unlimited hotspots"
235
+ msgstr ""
236
+
237
+ #: admin/partials/wpvr_documentation.php:149
238
+ msgid "Unlimited scenes"
239
+ msgstr ""
240
+
241
+ #: admin/partials/wpvr_documentation.php:204
242
+ msgid "Upgrade to Pro"
243
+ msgstr ""
244
+
245
+ #: wpvr.php:810
246
+ msgid "Upgrade to pro"
247
+ msgstr ""
248
+
249
+ #: admin/partials/wpvr_documentation.php:24
250
+ msgid "Video Tutorials"
251
+ msgstr ""
252
+
253
+ #: admin/partials/wpvr_documentation.php:57
254
+ msgid "View Documentation"
255
+ msgstr ""
256
+
257
+ #: admin/partials/wpvr_documentation.php:147
258
+ msgid "Why upgrade to Premium Version?"
259
+ msgstr ""
260
+
261
+ #: elementor/elements/Wpvr-widget.php:123
262
+ msgid "Width:"
263
+ msgstr ""
264
+
265
+ #. Name of the plugin
266
+ msgid "WP VR"
267
+ msgstr ""
268
+
269
+ #. Description of the plugin
270
+ msgid ""
271
+ "WP VR - 360 Panorama and virtual tour creator for WordPress is a customized "
272
+ "panaroma & virtual builder tool for WordPress Website."
273
+ msgstr ""
274
+
275
+ #: elementor/elements/Wpvr-widget.php:43
276
+ msgid "Wpvr"
277
+ msgstr ""
278
+
279
+ #: elementor/elements/Wpvr-widget.php:105
280
+ msgid "Wpvr Setup"
281
+ msgstr ""
282
+
283
+ #: admin/partials/wpvr_documentation.php:111
284
+ msgid ""
285
+ "Your rating and feedback matters to us. If you are happy with WP VR - 360 "
286
+ "Panorama and virtual tour creator for WordPress give us a rating."
287
+ msgstr ""
288
+
289
+ #: admin/partials/wpvr_documentation.php:92
290
+ msgid ""
291
+ "Your suggestions are valubale to us. It can help to make wpvr even better."
292
+ msgstr ""
public/class-wpvr-public.php CHANGED
@@ -1,13 +1,10 @@
1
  <?php
2
- if (!defined('ABSPATH')) {
3
- exit;
4
- } // Exit if accessed directly
5
 
6
  /**
7
  * The public-facing functionality of the plugin.
8
  *
9
  * @link http://rextheme.com/
10
- * @since 1.0.0
11
  *
12
  * @package Wpvr
13
  * @subpackage Wpvr/public
@@ -21,64 +18,72 @@ if (!defined('ABSPATH')) {
21
  *
22
  * @package Wpvr
23
  * @subpackage Wpvr/public
24
- * @author Rextheme <sakib@coderex.co>
25
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- class Wpvr_Public
28
- {
29
 
30
  /**
31
- * The ID of this plugin.
32
- *
33
- * @since 1.0.0
34
- * @access private
35
- * @var string $plugin_name The ID of this plugin.
36
- */
37
- private $plugin_name;
38
-
39
- /**
40
- * The version of this plugin.
41
- *
42
- * @since 1.0.0
43
- * @access private
44
- * @var string $version The current version of this plugin.
45
- */
46
- private $version;
47
-
48
- /**
49
- * Initialize the class and set its properties.
50
- *
51
- * @since 1.0.0
52
- * @param string $plugin_name The name of the plugin.
53
- * @param string $version The version of this plugin.
54
- */
55
- public function __construct($plugin_name, $version)
56
- {
57
- $this->plugin_name = $plugin_name;
58
- $this->version = $version;
59
- }
60
-
61
- /**
62
- * Register the stylesheets for the public-facing side of the site.
63
- *
64
- * @since 1.0.0
65
  */
66
- public function enqueue_styles()
67
- {
68
-
69
- /**
70
- * This function is provided for demonstration purposes only.
71
- *
72
- * An instance of this class should be passed to the run() function
73
- * defined in Wpvr_Loader as all of the hooks are defined
74
- * in that particular class.
75
- *
76
- * The Wpvr_Loader will then create the relationship
77
- * between the defined hooks and the functions defined in this
78
- * class.
79
- */
80
-
81
- global $wp;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  $wpvr_script_control = get_option('wpvr_script_control');
83
  $wpvr_script_list = get_option('wpvr_script_list');
84
  $allowed_pages_modified = array();
@@ -87,7 +92,6 @@ class Wpvr_Public
87
  $allowed_pages_modified[] = untrailingslashit($value);
88
  }
89
  $current_url = home_url(add_query_arg(array($_GET), $wp->request));
90
-
91
  if ($wpvr_script_control == 'true') {
92
  foreach ($allowed_pages_modified as $value) {
93
  if ($value) {
@@ -111,34 +115,23 @@ class Wpvr_Public
111
  wp_enqueue_style($this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all');
112
  }
113
  wp_enqueue_style('panellium-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/pannellum.css', array(), true);
114
- wp_enqueue_style('videojs-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/video-js.css', array(), true); // commented for video js vr
115
- // wp_enqueue_style('videojs-css', 'https://vjs.zencdn.net/7.18.1/video-js.css', array(), true); // commented for video js vr
116
  wp_enqueue_style('videojs-vr-css', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.css', array(), true); //video js VR
117
  wp_enqueue_style('owl-css', plugin_dir_url(__FILE__) . 'css/owl.carousel.css', array(), $this->version, 'all');
118
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-public.css', array(), $this->version, 'all');
119
  }
120
- }
121
 
122
- /**
123
- * Register the JavaScript for the public-facing side of the site.
124
- *
125
- * @since 1.0.0
126
- */
127
- public function enqueue_scripts()
128
- {
 
129
 
130
- /**
131
- * This function is provided for demonstration purposes only.
132
- *
133
- * An instance of this class should be passed to the run() function
134
- * defined in Wpvr_Loader as all of the hooks are defined
135
- * in that particular class.
136
- *
137
- * The Wpvr_Loader will then create the relationship
138
- * between the defined hooks and the functions defined in this
139
- * class.
140
- */
141
- $notice = '';
142
  $wpvr_frontend_notice = get_option('wpvr_frontend_notice');
143
  if ($wpvr_frontend_notice) {
144
  $notice = get_option('wpvr_frontend_notice_area');
@@ -167,8 +160,8 @@ class Wpvr_Public
167
  if (strpos($current_url, $value) !== false) {
168
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
169
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
170
- wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true); //commented for video js vr
171
- // wp_enqueue_script('videojs-js', 'https://vjs.zencdn.net/7.18.1/video.min.js', array(), true);
172
  wp_enqueue_script('videojsvr-js', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.js', array(), true); //video js vr
173
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
174
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
@@ -183,8 +176,8 @@ class Wpvr_Public
183
  } else {
184
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
185
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
186
- wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true); // commented for video js vr
187
- // wp_enqueue_script('videojs-js', 'https://vjs.zencdn.net/7.18.1/video.min.js', array(), true);
188
  wp_enqueue_script('videojsvr-js', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.js', array(), true); //video js vr
189
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
190
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
@@ -208,1419 +201,17 @@ class Wpvr_Public
208
  wp_dequeue_script('videojs-js');
209
  }
210
  }
211
- }
212
 
213
- /**
 
 
214
  * Init the edit screen of the plugin post type item
215
  *
216
- * @since 1.0.0
217
  */
218
  public function public_init()
219
  {
220
- add_shortcode($this->plugin_name, array($this, 'wpvr_shortcode'));
221
  }
222
 
223
-
224
- /**
225
- * Shortcode output for the plugin
226
- *
227
- * @since 1.0.0
228
- */
229
- public function wpvr_shortcode($atts)
230
- {
231
- extract(
232
- shortcode_atts(
233
- array(
234
- 'id' => 0,
235
- 'width' => null,
236
- 'height' => null,
237
- 'mobile_height' => null,
238
- 'radius' => null
239
- ),
240
- $atts
241
- )
242
- );
243
-
244
- if (!$id) {
245
- $obj = get_page_by_path($slug, OBJECT, $this->post_type);
246
- if ($obj) {
247
- $id = $obj->ID;
248
- } else {
249
- return __('Invalid Wpvr slug attribute', $this->plugin_name);
250
- }
251
- }
252
-
253
- if (empty($mobile_height)) {
254
- $mobile_height = "300px";
255
- }
256
-
257
- $postdata = get_post_meta($id, 'panodata', true);
258
- $panoid = 'pano' . $id;
259
-
260
- if (isset($postdata['streetviewdata'])) {
261
- if (empty($width)) {
262
- $width = '600px';
263
- }
264
- if (empty($height)) {
265
- $height = '400px';
266
- }
267
- $streetviewurl = $postdata['streetviewurl'];
268
- $html = '';
269
- $html .= '<div class="vr-streetview" style="text-align: center; max-width:100%; width:' . $width . '; height:' . $height . '; margin: 0 auto;">';
270
- $html .= '<iframe src="' . $streetviewurl . '" frameborder="0" style="border:0; width:100px; height:100%;" allowfullscreen=""></iframe>';
271
- $html .= '</div>';
272
- return $html;
273
- }
274
- if (isset($postdata['vidid'])) {
275
- if (empty($width)) {
276
- $width = '600px';
277
- }
278
- if (empty($height)) {
279
- $height = '400px';
280
- }
281
-
282
- $videourl = $postdata['vidurl'];
283
- $autoplay = 'off';
284
- if (isset($postdata['autoplay'])) {
285
- $autoplay = $postdata['autoplay'];
286
- }
287
-
288
- $loop = 'off';
289
- if (isset($postdata['loop'])) {
290
- $loop = $postdata['loop'];
291
- }
292
- if (strpos($videourl, 'youtube') > 0 || strpos($videourl, 'youtu') > 0) {
293
- $explodeid = '';
294
- $explodeid = explode("=", $videourl);
295
- $foundid = '';
296
- $muted = '&mute=1';
297
-
298
- if ($loop == 'on') {
299
- $loop = '&loop=1';
300
- } else {
301
- $loop = '';
302
- }
303
-
304
- if (strpos($videourl, 'youtu') > 0) {
305
- $explodeid = explode("/", $videourl);
306
- $foundid = $explodeid[3] . '?' . $autoplay . $loop;
307
- $expdata = $explodeid[3];
308
- } else {
309
- $foundid = $explodeid[1] . '?' . $autoplay . $loop;
310
- $expdata = $explodeid[1];
311
- }
312
-
313
- $html = '';
314
- $html .= '<div style="text-align:center; max-width:100%; width:' . $width . '; height:' . $height . '; border-radius: ' . $radius . '; margin: 0 auto;">';
315
-
316
- // $html .= '
317
- // <iframe src="https://www.youtube.com/embed/' . $expdata . '?rel=0&modestbranding=1' . $loop . '&autohide=1' . $muted . '&showinfo=0&controls=1' . $autoplay . '&playlist='.$expdata.'" width="100%" height="100%" style="border-radius: '.$radius.';" frameborder="0" allowfullscreen></iframe>
318
- // ';
319
- $html .= '
320
- <iframe src="https://www.youtube.com/embed/' . $expdata . '?rel=0&modestbranding=1' . $loop . '&autohide=1' . $muted . '&showinfo=0&controls=1' . $autoplay . '" width="100%" height="100%" style="border-radius: ' . $radius . ';" frameborder="0" allowfullscreen></iframe>
321
- ';
322
- $html .= '</div>';
323
- } elseif (strpos($videourl, 'vimeo') > 0) {
324
- $explodeid = '';
325
- $explodeid = explode("/", $videourl);
326
- $foundid = '';
327
- if ($autoplay == 'on') {
328
- $autoplay = '&autoplay=1&muted=1';
329
- } else {
330
- $autoplay = '';
331
- }
332
-
333
- if ($loop == 'on') {
334
- $loop = '&loop=1';
335
- } else {
336
- $loop = '';
337
- }
338
- $foundid = $explodeid[3] . '?' . $autoplay . $loop;
339
- $html = '';
340
- $html .= '<div style="text-align: center; max-width:100%; width:' . $width . '; height:' . $height . '; margin: 0 auto;">';
341
- $html .= '<iframe src="https://player.vimeo.com/video/' . $foundid . '" width="' . trim($width, 'px') . '" height="' . trim($height, 'px') . '" style="border-radius: ' . $radius . ';" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
342
- $html .= '</div>';
343
- } else {
344
-
345
- $html = '';
346
- $html .= '<div id="pano' . $id . '" class="pano-wrap" style="max-width:100%; width: ' . $width . '; height: ' . $height . '; border-radius: ' . $radius . '; margin: 0 auto;">';
347
- $html .= '<div style="width:100%; height:100%; ">' . $postdata['panoviddata'] . '</div>';
348
-
349
- $html .= '
350
- <style>
351
- .video-js {
352
- border-radius:' . $radius . ';
353
- }
354
- .video-js canvas{
355
- border-radius:' . $radius . ';
356
- }
357
- </style>
358
-
359
- ';
360
- // $html .= '<script>';
361
- // $html .= 'var player = videojs(' . c . ', {';
362
- // $html .= 'plugins: {';
363
- // $html .= 'pannellum: {}';
364
- // $html .= '}';
365
- // $html .= '});';
366
- // $html .= '
367
- // videojs(' . $postdata['vidid'] . ').play();
368
- // ';
369
- // $html .= '</script>';
370
- $html .= '</div>';
371
-
372
-
373
- //video js vr setup //
374
- $html .= '<script>';
375
- $html .= '
376
- (function (window, videojs) {
377
- var player = window.player = videojs("' . $postdata['vidid'] . '");
378
- player.mediainfo = player.mediainfo || {};
379
- player.mediainfo.projection = "equirectangular";
380
-
381
- // AUTO is the default and looks at mediainfo
382
- var vr = window.vr = player.vr({ projection: "AUTO", debug: true, forceCardboard: false, antialias: false });
383
- }(window, window.videojs));
384
-
385
- ';
386
- $html .= '</script>';
387
- //video js vr end //
388
- }
389
-
390
- return $html;
391
- }
392
-
393
- $control = false;
394
- if (isset($postdata['showControls'])) {
395
- $control = $postdata['showControls'];
396
- }
397
-
398
- if ($control) {
399
- if (isset($postdata['customcontrol'])) {
400
- $custom_control = $postdata['customcontrol'];
401
- if ($custom_control['panupSwitch'] == "on" || $custom_control['panDownSwitch'] == "on" || $custom_control['panLeftSwitch'] == "on" || $custom_control['panRightSwitch'] == "on" || $custom_control['panZoomInSwitch'] == "on" || $custom_control['panZoomOutSwitch'] == "on" || $custom_control['panFullscreenSwitch'] == "on" || $custom_control['gyroscopeSwitch'] == "on" || $custom_control['backToHomeSwitch'] == "on") {
402
- $control = false;
403
- }
404
- }
405
- }
406
-
407
- $vrgallery = false;
408
- if (isset($postdata['vrgallery'])) {
409
- $vrgallery = $postdata['vrgallery'];
410
- }
411
-
412
- $vrgallery_title = false;
413
- if (isset($postdata['vrgallery_title'])) {
414
- $vrgallery_title = $postdata['vrgallery_title'];
415
- }
416
-
417
- $vrgallery_display = false;
418
- if (isset($postdata['vrgallery_display'])) {
419
- $vrgallery_display = $postdata['vrgallery_display'];
420
- }
421
-
422
- $gyro = false;
423
- $gyro_orientation = false;
424
- if (isset($postdata['gyro'])) {
425
- $gyro = $postdata['gyro'];
426
- if (isset($postdata['deviceorientationcontrol'])) {
427
- $gyro_orientation = $postdata['deviceorientationcontrol'];
428
- }
429
- }
430
-
431
- $compass = false;
432
- $audio_right = "5px";
433
- if (isset($postdata['compass'])) {
434
- $compass = $postdata['compass'];
435
- if ($compass) {
436
- $audio_right = "60px";
437
- }
438
- }
439
-
440
- //===explainer handle===//
441
-
442
- $explainer_right = "10px";
443
- if ((isset($postdata['compass']) && $postdata['compass'] == true) && (isset($postdata['bg_music']) && $postdata['bg_music'] == 'on')) {
444
- $explainer_right = "90px";
445
- } elseif (isset($postdata['compass']) && $postdata['compass'] == true) {
446
- $explainer_right = "60px";
447
- } elseif (isset($postdata['bg_music']) && $postdata['bg_music'] == "on") {
448
- $explainer_right = "30px";
449
- }
450
-
451
- //===explainer handle===//
452
-
453
- $mouseZoom = true;
454
- if (isset($postdata['mouseZoom'])) {
455
- $mouseZoom = $postdata['mouseZoom'];
456
- }
457
-
458
- $draggable = true;
459
- if (isset($postdata['draggable'])) {
460
- $draggable = $postdata['draggable'];
461
- }
462
-
463
- $diskeyboard = false;
464
- if (isset($postdata['diskeyboard'])) {
465
- $diskeyboard = $postdata['diskeyboard'];
466
- }
467
-
468
- $keyboardzoom = true;
469
- if (isset($postdata['keyboardzoom'])) {
470
- $keyboardzoom = $postdata['keyboardzoom'];
471
- }
472
-
473
- $autoload = false;
474
-
475
- if (isset($postdata['autoLoad'])) {
476
- $autoload = $postdata['autoLoad'];
477
- }
478
-
479
- $default_scene = '';
480
- if (isset($postdata['defaultscene'])) {
481
- $default_scene = $postdata['defaultscene'];
482
- }
483
-
484
- $default_global_zoom = '';
485
- if (isset($postdata['hfov'])) {
486
- $default_global_zoom = $postdata['hfov'];
487
- }
488
-
489
- $max_global_zoom = '';
490
- if (isset($postdata['maxHfov'])) {
491
- $max_global_zoom = $postdata['maxHfov'];
492
- }
493
-
494
- $min_global_zoom = '';
495
- if (isset($postdata['minHfov'])) {
496
- $min_global_zoom = $postdata['minHfov'];
497
- }
498
-
499
- $preview = '';
500
- if (isset($postdata['preview'])) {
501
- $preview = $postdata['preview'];
502
- }
503
-
504
- $autorotation = '';
505
- if (isset($postdata["autoRotate"])) {
506
- $autorotation = $postdata["autoRotate"];
507
- }
508
- $autorotationinactivedelay = '';
509
- if (isset($postdata["autoRotateInactivityDelay"])) {
510
- $autorotationinactivedelay = $postdata["autoRotateInactivityDelay"];
511
- }
512
- $autorotationstopdelay = '';
513
- if (isset($postdata["autoRotateStopDelay"])) {
514
- $autorotationstopdelay = $postdata["autoRotateStopDelay"];
515
- }
516
-
517
- $scene_fade_duration = '';
518
- if (isset($postdata['scenefadeduration'])) {
519
- $scene_fade_duration = $postdata['scenefadeduration'];
520
- }
521
-
522
- $panodata = '';
523
- if (isset($postdata['panodata'])) {
524
- $panodata = $postdata['panodata'];
525
- }
526
-
527
- $hotspoticoncolor = '#00b4ff';
528
- $hotspotblink = 'on';
529
- $default_data = array();
530
- if ($default_global_zoom != '' && $max_global_zoom != '' && $min_global_zoom != '') {
531
- $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration, "hfov" => $default_global_zoom, "maxHfov" => $max_global_zoom, "minHfov" => $min_global_zoom);
532
- } else {
533
- $default_data = array("firstScene" => $default_scene, "sceneFadeDuration" => $scene_fade_duration);
534
- }
535
-
536
- $scene_data = array();
537
-
538
- if (!empty($panodata["scene-list"])) {
539
- foreach ($panodata["scene-list"] as $panoscenes) {
540
- $scene_ititle = '';
541
- if (isset($panoscenes["scene-ititle"])) {
542
- $scene_ititle = sanitize_text_field($panoscenes["scene-ititle"]);
543
- }
544
-
545
- $scene_author = '';
546
- if (isset($panoscenes["scene-author"])) {
547
- $scene_author = sanitize_text_field($panoscenes["scene-author"]);
548
- }
549
-
550
- $scene_author_url = '';
551
- if (isset($panoscenes["scene-author-url"])) {
552
- $scene_author_url = sanitize_text_field($panoscenes["scene-author-url"]);
553
- }
554
-
555
- $scene_vaov = 180;
556
- if (isset($panoscenes["scene-vaov"])) {
557
- $scene_vaov = (float)$panoscenes["scene-vaov"];
558
- }
559
-
560
- $scene_haov = 360;
561
- if (isset($panoscenes["scene-haov"])) {
562
- $scene_haov = (float)$panoscenes["scene-haov"];
563
- }
564
-
565
-
566
- $scene_vertical_offset = 0;
567
- if (isset($panoscenes["scene-vertical-offset"])) {
568
- $scene_vertical_offset = (float)$panoscenes["scene-vertical-offset"];
569
- }
570
-
571
- $default_scene_pitch = null;
572
- if (isset($panoscenes["scene-pitch"])) {
573
- $default_scene_pitch = (float)$panoscenes["scene-pitch"];
574
- }
575
-
576
- $default_scene_yaw = null;
577
- if (isset($panoscenes["scene-yaw"])) {
578
- $default_scene_yaw = (float)$panoscenes["scene-yaw"];
579
- }
580
-
581
- $scene_max_pitch = '';
582
- if (isset($panoscenes["scene-maxpitch"])) {
583
- $scene_max_pitch = (float)$panoscenes["scene-maxpitch"];
584
- }
585
-
586
-
587
- $scene_min_pitch = '';
588
- if (isset($panoscenes["scene-minpitch"])) {
589
- $scene_min_pitch = (float)$panoscenes["scene-minpitch"];
590
- }
591
-
592
-
593
- $scene_max_yaw = '';
594
- if (isset($panoscenes["scene-maxyaw"])) {
595
- $scene_max_yaw = (float)$panoscenes["scene-maxyaw"];
596
- }
597
-
598
-
599
- $scene_min_yaw = '';
600
- if (isset($panoscenes["scene-minyaw"])) {
601
- $scene_min_yaw = (float)$panoscenes["scene-minyaw"];
602
- }
603
-
604
- $default_zoom = 100;
605
- if (isset($panoscenes["scene-zoom"]) && $panoscenes["scene-zoom"] != "") {
606
- $default_zoom = $panoscenes["scene-zoom"];
607
- } else {
608
- if ($default_global_zoom != '') {
609
- $default_zoom = (int)$default_global_zoom;
610
- }
611
- }
612
-
613
-
614
- $max_zoom = 120;
615
- if (isset($panoscenes["scene-maxzoom"]) && $panoscenes["scene-maxzoom"] != '') {
616
- $max_zoom = (int)$panoscenes["scene-maxzoom"];
617
- } else {
618
- if ($max_global_zoom != '') {
619
- $max_zoom = (int)$max_global_zoom;
620
- }
621
- }
622
-
623
-
624
-
625
- $min_zoom = 50;
626
- if (isset($panoscenes["scene-minzoom"]) && $panoscenes["scene-minzoom"] != '') {
627
- $min_zoom = (int)$panoscenes["scene-minzoom"];
628
- } else {
629
- if ($min_global_zoom != '') {
630
- $min_zoom = (int)$min_global_zoom;
631
- }
632
- }
633
-
634
-
635
- $hotspot_datas = array();
636
- if (isset($panoscenes["hotspot-list"])) {
637
- $hotspot_datas = $panoscenes["hotspot-list"];
638
- }
639
-
640
- $hotspots = array();
641
-
642
-
643
- foreach ($hotspot_datas as $hotspot_data) {
644
-
1
  <?php
 
 
 
2
 
3
  /**
4
  * The public-facing functionality of the plugin.
5
  *
6
  * @link http://rextheme.com/
7
+ * @since 8.0.0
8
  *
9
  * @package Wpvr
10
  * @subpackage Wpvr/public
18
  *
19
  * @package Wpvr
20
  * @subpackage Wpvr/public
21
+ * @author Rextheme <support@rextheme.com>
22
  */
23
+ class Wpvr_Public {
24
+
25
+ /**
26
+ * The ID of this plugin.
27
+ *
28
+ * @since 8.0.0
29
+ * @access private
30
+ * @var string $plugin_name The ID of this plugin.
31
+ */
32
+ private $plugin_name;
33
+
34
+ /**
35
+ * The version of this plugin.
36
+ *
37
+ * @since 8.0.0
38
+ * @access private
39
+ * @var string $version The current version of this plugin.
40
+ */
41
+ private $version;
42
 
 
 
43
 
44
  /**
45
+ * Instance of WPVR_Shortcode class
46
+ *
47
+ * @var object
48
+ * @since 8.0.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  */
50
+ private $shortcode;
51
+
52
+ /**
53
+ * Initialize the class and set its properties.
54
+ *
55
+ * @since 8.0.0
56
+ * @param string $plugin_name The name of the plugin.
57
+ * @param string $version The version of this plugin.
58
+ */
59
+ public function __construct( $plugin_name, $version ) {
60
+
61
+ $this->plugin_name = $plugin_name;
62
+ $this->version = $version;
63
+ $this->shortcode = new WPVR_Shortcode($this->plugin_name);
64
+
65
+ }
66
+
67
+ /**
68
+ * Register the stylesheets for the public-facing side of the site.
69
+ *
70
+ * @since 8.0.0
71
+ */
72
+ public function enqueue_styles() {
73
+
74
+ /**
75
+ * This function is provided for demonstration purposes only.
76
+ *
77
+ * An instance of this class should be passed to the run() function
78
+ * defined in Wpvr_Loader as all of the hooks are defined
79
+ * in that particular class.
80
+ *
81
+ * The Wpvr_Loader will then create the relationship
82
+ * between the defined hooks and the functions defined in this
83
+ * class.
84
+ */
85
+
86
+ global $wp;
87
  $wpvr_script_control = get_option('wpvr_script_control');
88
  $wpvr_script_list = get_option('wpvr_script_list');
89
  $allowed_pages_modified = array();
92
  $allowed_pages_modified[] = untrailingslashit($value);
93
  }
94
  $current_url = home_url(add_query_arg(array($_GET), $wp->request));
 
95
  if ($wpvr_script_control == 'true') {
96
  foreach ($allowed_pages_modified as $value) {
97
  if ($value) {
115
  wp_enqueue_style($this->plugin_name . 'fontawesome', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css', array(), $this->version, 'all');
116
  }
117
  wp_enqueue_style('panellium-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/pannellum.css', array(), true);
118
+ wp_enqueue_style('videojs-css', plugin_dir_url(__FILE__) . 'lib/pannellum/src/css/video-js.css', array(), true); // commented for video js vr
119
+ // wp_enqueue_style('videojs-css', 'https://vjs.zencdn.net/7.18.1/video-js.css', array(), true); // commented for video js vr
120
  wp_enqueue_style('videojs-vr-css', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.css', array(), true); //video js VR
121
  wp_enqueue_style('owl-css', plugin_dir_url(__FILE__) . 'css/owl.carousel.css', array(), $this->version, 'all');
122
  wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__) . 'css/wpvr-public.css', array(), $this->version, 'all');
123
  }
 
124
 
125
+ }
126
+
127
+ /**
128
+ * Register the JavaScript for the public-facing side of the site.
129
+ *
130
+ * @since 8.0.0
131
+ */
132
+ public function enqueue_scripts() {
133
 
134
+ $notice = '';
 
 
 
 
 
 
 
 
 
 
 
135
  $wpvr_frontend_notice = get_option('wpvr_frontend_notice');
136
  if ($wpvr_frontend_notice) {
137
  $notice = get_option('wpvr_frontend_notice_area');
160
  if (strpos($current_url, $value) !== false) {
161
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
162
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
163
+ wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true); //commented for video js vr
164
+ // wp_enqueue_script('videojs-js', 'https://vjs.zencdn.net/7.18.1/video.min.js', array(), true);
165
  wp_enqueue_script('videojsvr-js', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.js', array(), true); //video js vr
166
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
167
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
176
  } else {
177
  wp_enqueue_script('panellium-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/pannellum.js', array(), true);
178
  wp_enqueue_script('panelliumlib-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/libpannellum.js', array(), true);
179
+ wp_enqueue_script('videojs-js', plugin_dir_url(__FILE__) . 'js/video.js', array(), true); // commented for video js vr
180
+ // wp_enqueue_script('videojs-js', 'https://vjs.zencdn.net/7.18.1/video.min.js', array(), true);
181
  wp_enqueue_script('videojsvr-js', plugin_dir_url(__FILE__) . 'lib/videojs-vr/videojs-vr.js', array(), true); //video js vr
182
  wp_enqueue_script('panelliumvid-js', plugin_dir_url(__FILE__) . 'lib/pannellum/src/js/videojs-pannellum-plugin.js', array(), true);
183
  wp_enqueue_script('owl-js', plugin_dir_url(__FILE__) . 'js/owl.carousel.js', array('jquery'), false);
201
  wp_dequeue_script('videojs-js');
202
  }
203
  }
 
204
 
205
+ }
206
+
207
+ /**
208
  * Init the edit screen of the plugin post type item
209
  *
210
+ * @since 8.0.0
211
  */
212
  public function public_init()
213
  {
214
+ add_shortcode($this->plugin_name, array( $this->shortcode , 'wpvr_shortcode'));
215
  }
216