PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.71
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.71
9.1.2 9.1.1 9.1.0 9.0.3 9.0.2 9.0.1 9.0.0 8.5.79 8.5.78 8.5.77 8.5.76 8.5.75 8.5.74 8.5.73 8.5.72 8.5.71 8.5.70 8.5.69 8.5.68 8.5.35 8.5.36 8.5.37 8.5.38 8.5.39 8.5.4 All 221 releases
wpvr / includes / setup-wizard.php

setup-wizard.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.71, at includes/setup-wizard.php

105 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Setup wizard for the plugin
4 *
5 * @package ''
6 * @since 8.4.10
7 */
8
9 class WPVR_Setup_Wizard
10 {
11
12 /**
13 * Initialize setup wizards
14 *
15 * @since 8.4.10
16 */
17 public function setup_wizard()
18 {
19 add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
20 $this->output_html();
21 }
22
23 public function enqueue_scripts($hook) {
24 if (!isset($_GET['page']) || $_GET['page'] !== 'rex-wpvr-setup-wizard') {
25 return;
26 }
27 wp_enqueue_media();
28
29 wp_enqueue_style(
30 'wpvr-admin-post-type',
31 plugin_dir_url( __DIR__ ) . 'admin/css/wpvr-admin-post-type.css',
32 [],
33 WPVR_VERSION
34 );
35 wp_enqueue_style(
36 'wpvr-setup-wizard',
37 WPVR_CSS_PATH . 'setup-wizard.css',
38 [ 'wpvr-admin-post-type' ],
39 WPVR_VERSION
40 );
41 wp_enqueue_style(
42 'wpvr-pannellum-css',
43 WPVR_PLUGIN_DIR_URL . 'admin/lib/pannellum/src/css/pannellum.css',
44 [],
45 WPVR_VERSION
46 );
47
48 wp_enqueue_script(
49 'wpvr-libpannellum-js',
50 WPVR_PLUGIN_DIR_URL . 'admin/lib/pannellum/src/js/libpannellum.js',
51 ['jquery'],
52 WPVR_VERSION,
53 true
54 );
55 wp_enqueue_script(
56 'wpvr-pannellum-js',
57 WPVR_PLUGIN_DIR_URL . 'admin/lib/pannellum/src/js/pannellum.js',
58 ['jquery'],
59 WPVR_VERSION,
60 true
61 );
62 wp_enqueue_script(
63 'wpvr-onboarding-js',
64 WPVR_PLUGIN_DIR_URL . 'admin/lib/onboarding/js/onboarding.js',
65 ['jquery'],
66 WPVR_VERSION,
67 true
68 );
69 wp_enqueue_script(
70 'wpvr-setup-wizard',
71 WPVR_JS_PATH . 'setup-wizard.js',
72 ['jquery'],
73 WPVR_VERSION,
74 true
75 );
76
77 wp_localize_script(
78 'wpvr-setup-wizard',
79 'wpvrSetupWizardData',
80 array(
81 'is_pro' => (bool) apply_filters( 'is_wpvr_pro_active', false ),
82 'hotspot_limit' => 5,
83 'upgrade_url' => esc_url( 'https://rextheme.com/wpvr/pricing/' ),
84 'wizard_strings' => array(
85 'limit_heading' => __( 'Limit Reached', 'wpvr' ),
86 /* translators: %d: maximum number of hotspots allowed in free version */
87 'limit_line1' => sprintf( __( 'You can add up to %d hotspots on each scene in the Free version.', 'wpvr' ), 5 ),
88 'limit_line2' => __( 'Upgrade to Pro to add an unlimited number of hotspots.', 'wpvr' ),
89 ),
90 )
91 );
92 }
93
94 /**
95 * Output the rendered contents
96 *
97 * @since 8.4.10
98 */
99 private function output_html()
100 {
101 require_once plugin_dir_path(__FILE__) . '../admin/partials/wpvr-setup-wizard-views.php';
102 exit();
103 }
104 }
105