PluginProbe
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress / 8.5.4
WPVR – 360 Panorama viewer and Virtual Tour Builder for WordPress v8.5.4
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.4, at elementor/elementor.php

92 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 /**
53 * On Widgets Registered
54 *
55 * @since 1.0.0
56 *
57 * @access public
58 */
59 public function on_widgets_registered() {
60 $this->includes();
61 $this->register_widget();
62 }
63
64 /**
65 * Includes
66 *
67 * @since 1.0.0
68 *
69 * @access private
70 */
71 private function includes() {
72 /*
73 * Return Wpvr widget file path
74 * i.e. PATH.'elementor/elements/Wpvr-element.php'
75 */
76 require __DIR__.'/elements/Wpvr-widget.php';
77 }
78
79 /**
80 * Register Widget
81 *
82 * @since 1.0.0
83 *
84 * @access private
85 */
86 private function register_widget() {
87 \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new Wpvr_Widget() );
88 }
89 }
90
91 new WpvrElementor();
92