PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.68
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.68
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 / bricks / bricks.php

bricks.php in WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress 8.5.68, at bricks/bricks.php

82 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPVR Bricks Widget
4 *
5 * @package WPVR
6 * @since 8.5.19
7 */
8 namespace WpvrElement;
9
10 use WpvrElement\Elements\Wpvr\Wpvr_Widget;
11
12
13 if ( ! defined( 'ABSPATH' ) ) exit;
14 /**
15 * Class Manager
16 *
17 * @package WpvrElement\Elements\Wpvr\Wpvr_Widget
18 * @since 8.5.19
19 */
20 class Manager {
21
22
23 /**
24 * Instance of the class
25 *
26 * @access private
27 * @static
28 *
29 * @var Manager The single instance of the class.
30 * @since 8.5.19
31 */
32 private static $instance = null;
33
34 /**
35 * Instance
36 *
37 * Ensures only one instance of the class is loaded or can be loaded.
38 *
39 * @return Manager An instance of the class.
40 * @since 8.5.19
41 *
42 * @access public
43 * @static
44 */
45 public static function instance() {
46 if (is_null(self::$instance)) {
47 self::$instance = new self();
48 }
49 return self::$instance;
50 }
51
52 /**
53 * Constructor for the class
54 *
55 * @since 8.5.19
56 *
57 * @access public
58 */
59 public function __construct() {
60 add_action('init', array($this, 'init'), 11);
61 }
62
63
64 /**
65 * Register checkout elements for bricks
66 *
67 * @since 8.5.19
68 *
69 * @access public
70 */
71 public function init() {
72 $element_files = [
73 WPVR_PLUGIN_DIR_PATH. 'bricks/Wpvr-widget.php'
74 ];
75 foreach ( $element_files as $file ) {
76 \Bricks\Elements::register_element( $file, '', 'WpvrElement\Bricks\Wpvr\WpvrWidget' );
77 }
78 }
79
80 }
81
82 Manager::instance();