Viewing File: /home/maglabs/valv/wp-content/themes/indobi/inc/elementor-inc/integrations/elementor/elementor.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
require_once wp_elementor . '/elementor/traits.php';
class indobi_Elementor_Integration {
public $widgets;
public function __construct()
{
$this->widgets = [
'header',
'footer',
'header-slider',
'header-slider-center',
'skill',
'features',
'about',
'video',
'our-plans',
'newsletter',
'service',
'service-one',
'portfolio',
'counter',
'team',
'team-two',
'testimonial',
'support',
'blog',
'price',
'faq',
'brand',
'contact-sections',
'contact-info',
];
add_action( 'elementor/init', array( $this, 'widgets_registered' ) );
}
public function widgets_registered()
{
if ( ! defined( 'ELEMENTOR_PATH' ) || ! class_exists( 'Elementor\Widget_Base' ) || ! class_exists( 'Elementor\Plugin' ) ) {
return false;
}
$elementor = Elementor\Plugin::instance();
foreach ($this->widgets as $widget) {
$template_file = wp_elementor . "/elementor/widgets/{$widget}.php";
if ( file_exists( $template_file ) ) {
require_once $template_file;
}
}
}
}
new indobi_Elementor_Integration;
Back to Directory
File Manager