PluginProbe
Borderless – Addons and Templates for Elementor / 1.1.2
Borderless – Addons and Templates for Elementor v1.1.2
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 All 78 releases
borderless / modules / elementor / elementor.php

elementor.php in Borderless – Addons and Templates for Elementor 1.1.2, at modules/elementor/elementor.php

55 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // don't load directly
4 defined( 'ABSPATH' ) || exit;
5
6 /*-----------------------------------------------------------------------------------*/
7 /* *. Borderless Category
8 /*-----------------------------------------------------------------------------------*/
9
10 function add_elementor_widget_categories( $elements_manager ) {
11 $elements_manager->add_category(
12 'borderless',
13 [
14 'title' => __( 'Borderless', 'borderless' ),
15 'icon' => 'fa fa-plug',
16 ]
17 );
18 }
19 add_action( 'elementor/elements/categories_registered', 'add_elementor_widget_categories' );
20
21
22 /*-----------------------------------------------------------------------------------*/
23 /* *. Borderless Widgets
24 /*-----------------------------------------------------------------------------------*/
25
26 class Borderless_Widgets {
27
28 protected static $instance = null;
29
30 public static function get_instance() {
31 if ( ! isset( static::$instance ) ) {
32 static::$instance = new static;
33 }
34
35 return static::$instance;
36 }
37
38 protected function __construct() {
39 include('helper.php');
40 include('widgets/contact-form-7.php');
41 include('widgets/team-member.php');
42 add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_widgets' ] );
43 }
44
45 public function register_widgets() {
46 \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Borderless\Widgets\Contact_Form_7() );
47 \Elementor\Plugin::instance()->widgets_manager->register_widget_type( new \Borderless\Widgets\Team_Member() );
48 }
49
50 }
51
52 add_action( 'init', 'my_elementor_init' );
53 function my_elementor_init() {
54 Borderless_Widgets::get_instance();
55 }