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

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

91 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WpvrElement;
4
5 use WpvrElement\Elements\Wpvr\Wpvr_Widget;
6
7
8 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
9
10 /**
11 * Main Plugin Class
12 *
13 * Register new elementor widget.
14 *
15 * @since 1.0.0
16 */
17 class WpvrElementor {
18
19 /**
20 * Constructor
21 *
22 * @since 1.0.0
23 *
24 * @access public
25 */
26 public function __construct() {
27 $this->add_actions();
28 }
29
30 /**
31 * Add Actions
32 *
33 * @since 1.0.0
34 *
35 * @access private
36 */
37 private function add_actions() {
38 add_action( 'elementor/widgets/widgets_registered', [ $this, 'on_widgets_registered' ] );
39
40 //font css per icone
41 add_action( 'elementor/editor/before_enqueue_scripts', function () {
42 wp_enqueue_style( 'Wpvr-elementor',plugins_url( '../assets/admin.css', __FILE__ ) );
43 } );
44
45 add_action( 'elementor/frontend/after_register_scripts', function() {
46 wp_register_script( 'Wpvr-elementor', 'script path', [ 'jquery' ], false, true );
47 } );
48
49 }
50
51 /**
52 * On Widgets Registered
53 *
54 * @since 1.0.0
55 *
56 * @access public
57 */
58 public function on_widgets_registered() {
59 $this->includes();
60 $this->register_widget();
61 }
62
63 /**
64 * Includes
65 *
66 * @since 1.0.0
67 *
68 * @access private
69 */
70 private function includes() {
71 /*
72 * Return Wpvr widget file path
73 * i.e. PATH.'elementor/elements/Wpvr-element.php'
74 */
75 require __DIR__.'/elements/Wpvr-widget.php';
76 }
77
78 /**
79 * Register Widget
80 *
81 * @since 1.0.0
82 *
83 * @access private
84 */
85 private function register_widget() {
86 \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Wpvr_Widget() );
87 }
88 }
89
90 new WpvrElementor();
91