PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 9.1.2
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v9.1.2
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 / src / Bootstrap.php

Bootstrap.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 9.1.2, at src/Bootstrap.php

45 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace RexTheme\WPVR;
4
5 class Bootstrap {
6
7 public static function init() {
8 self::boot();
9 }
10
11 public static function activate() {
12 if ( function_exists( 'activate_wpvr' ) ) {
13 activate_wpvr();
14 } else {
15 require_once WPVR_PLUGIN_LEGACY_DIR_PATH . 'includes/class-wpvr-activator.php';
16 \Wpvr_Activator::activate();
17 do_action( 'wpvr_plugin_activated' );
18 }
19 }
20
21 public static function deactivate() {
22 if ( function_exists( 'deactivate_wpvr' ) ) {
23 deactivate_wpvr();
24 } else {
25 require_once WPVR_PLUGIN_LEGACY_DIR_PATH . 'includes/class-wpvr-deactivator.php';
26 \Wpvr_Deactivator::deactivate();
27 do_action( 'wpvr_plugin_deactivated' );
28 }
29 }
30
31 public static function boot() {
32 // Full legacy stack — zero breaking changes guarantee.
33 require_once WPVR_PLUGIN_LEGACY_DIR_PATH . 'wpvr.php';
34
35 // Override shortcode handler to support new-UI tour formats (street-view saved without streetviewdata).
36 new Frontend\Shortcode();
37
38 // New tour editor admin UI.
39 new Admin\Admin();
40
41 // REST API routes.
42 add_action( 'rest_api_init', [ new Api\Router(), 'register' ] );
43 }
44 }
45