' . $notice_text . '';
$message .= '' . $button_label . '
';
printf(
'%s
',
wp_kses_post( $message )
);
}
// Container Full site
public function easyel_before_content_container_hfe() {
if ( is_admin() ) return;
if ( function_exists( 'elementor_theme_do_location' ) && \Elementor\Plugin::$instance->preview->is_preview() ) {
return;
}
echo '';
}
/**
* Close container before HFE Footer
*/
function easyel_after_content_container_hfe() {
if ( is_admin() ) return;
if ( function_exists( 'elementor_theme_do_location' ) && \Elementor\Plugin::$instance->preview->is_preview() ) {
return;
}
echo '
';
}
public function easy_add_extra_body_class( $classes ) {
if ( is_plugin_active( 'easy-elements/easy-elements.php' ) ) {
$classes[] = 'eel-easy-elements';
}
return $classes;
}
public function add_elementor_categories( $elements_manager ) {
$new_categories = [
'easyelements_category' => [
'title' => __( 'Easy Elements', 'easy-elements' ),
'icon' => 'fa fa-plug',
],
'easyelements_post_category' => [
'title' => __( 'Easy Post Type Elements', 'easy-elements' ),
'icon' => 'fa fa-file-alt',
],
'easyelements_header_footer_category' => [
'title' => __( 'Easy Header Footer Elements', 'easy-elements' ),
'icon' => 'fa fa-header',
],
'easyelements_category_form' => [
'title' => __( 'Easy Elements Form', 'easy-elements' ),
'icon' => 'fa fa-plug',
],
'easyelements_category_pro' => [
'title' => __( 'Easy Elements Pro', 'easy-elements' ),
'icon' => 'fa fa-plug',
],
];
$existing = $elements_manager->get_categories();
$final_list = [];
foreach ( $existing as $key => $cat ) {
$final_list[ $key ] = $cat;
if ( $key === 'layout' ) {
foreach ( $new_categories as $new_key => $new_cat ) {
$final_list[ $new_key ] = $new_cat;
}
}
}
$apply_categories = function( $cats ) {
$this->categories = $cats;
};
$apply_categories->call( $elements_manager, $final_list );
}
public function init_widgets() {
$widgets_manager = \Elementor\Plugin::instance()->widgets_manager;
$widgets = [
'site_logo' => [
'class' => '\Easyel_Site_Logo_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/site-logo/site-logo.php',
'tab' => 'widget'
],
'heading' => [
'class' => '\Easyel_Heading_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/heading/heading.php',
'tab' => 'widget'
],
'clients_logo' => [
'class' => '\Easyel_Clients_Logo__Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/clients-logo-grid/logo.php',
'tab' => 'widget'
],
'icon_box' => [
'class' => '\Easyel_Icon_Box__Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/icon-box/icon.php',
'tab' => 'widget'
],
'simple_tab' => [
'class' => '\Easyel_Tab_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/tab/tab.php',
'tab' => 'widget'
],
'testimonials' => [
'class' => '\Easyel_Testimonials__Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/testimonials-grid/testimonials.php',
'tab' => 'widget'
],
'team_grid' => [
'class' => '\Easyel_Team_Grid__Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/team-grid/team-grid.php',
'tab' => 'widget'
],
'search' => [
'class' => '\Easyel_Search_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/search/search.php',
'tab' => 'widget'
],
'contact_box' => [
'class' => '\Easyel_Contact_Box__Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/contact-box/contact.php',
'tab' => 'widget'
],
'faq' => [
'class' => '\Easyel_FAQ_Accordion_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/faq/faq.php',
'tab' => 'widget'
],
'blog_grid' => [
'class' => '\Easyel_Blog_Grid__Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/blog-grid/blog-grid.php',
'tab' => 'widget'
],
'video' => [
'class' => '\Easyel_Video_Popup_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/video/video.php',
'tab' => 'widget'
],
'pricing_table' => [
'class' => '\Easyel_Pricing_Table_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/pricing-table/pricing.php',
'tab' => 'widget'
],
'service_list' => [
'class' => '\Easyel_Service_List_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/service-list/service-list.php',
'tab' => 'widget'
],
'navigation_menu' => [
'class' => '\Easyel_Navigation_Menu_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/navigation-menu/navigation-menu.php',
'tab' => 'widget'
],
'page_title' => [
'class' => '\Easyel_Page_Title_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/page-title/page-title.php',
'tab' => 'widget'
],
'button' => [
'class' => '\Easyel_Button_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/button/button.php',
'tab' => 'widget'
],
'process_grid' => [
'class' => '\Easyel_Process_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/process-grid/process-grid.php',
'tab' => 'widget'
],
'process_list' => [
'class' => '\Easyel_Process_list_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/process-list/process-list.php',
'tab' => 'widget'
],
'social_share' => [
'class' => '\Easyel_Social_Share_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/social-share/social-share.php',
'tab' => 'widget'
],
'social_icon' => [
'class' => '\Easyel_Social_Icon_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/social-icon/social.php',
'tab' => 'widget'
],
'breadcrumb' => [
'class' => '\Easyel_Breadcrumb_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/breadcrumb/breadcrumb.php',
'tab' => 'widget'
],
'domain_search' => [
'class' => '\Easyel_Domain_Search_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/domain-search/domain-search.php',
'tab' => 'widget'
],
'easy_offcanvas' => [
'class' => '\Easyel_Offcanvas_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/offcanvas/offcanvas.php',
'tab' => 'widget'
],
'easy_table' => [
'class' => '\Easyel_Table_Elementor_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/table/table-normal.php',
'tab' => 'widget'
],
'easy_scroll_to_top' => [
'class' => '\Easyel_Scroll_To_Top_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/scroll-to-top/scroll.php',
'tab' => 'widget'
],
'easy_cf7' => [
'class' => '\easyel__CF7_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/cf7/contact-cf7.php',
'tab' => 'widget'
],
'easy_gallery' => [
'class' => '\Easyel__Gallery_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/gallery/gallery.php',
'tab' => 'widget'
],
'easy_progress' => [
'class' => '\Easyel_Progress_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/progress/progress.php',
'tab' => 'widget'
],
'counter' => [
'class' => '\Easyel_Counter_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/counter/counter.php',
'tab' => 'widget'
],
'countdown' => [
'class' => '\Easyel_Count_Down_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/countdown/countdown.php',
'tab' => 'widget'
],
'excerpt' => [
'class' => '\Easyel_Free_Excerpt_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/excerpt/excerpt.php',
'tab' => 'widget'
],
'post_title' => [
'class' => '\Easyel_Free_Post_Title_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-title/post-title.php',
'tab' => 'widget'
],
'post_content' => [
'class' => '\Easyel_Free_Post_content_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-content/post-content.php',
'tab' => 'widget'
],
'featured_image' => [
'class' => '\Easyel_free_Featured_Image_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/featured-image/featured-image.php',
'tab' => 'widget'
],
'post_meta' => [
'class' => '\Easyel_Free_Post_Meta_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-meta/post-meta.php',
'tab' => 'widget'
],
'post_pagination' => [
'class' => '\Easyel_Free_Post_Pagination_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-pagination/post-pagination.php',
'tab' => 'widget'
],
'post_comments' => [
'class' => '\Easyel_Free_Post_Comments_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-comments/post-comments.php',
'tab' => 'widget'
],
'post_tags' => [
'class' => '\Easyel_Free_Post_Tags_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-tag/post-tag.php',
'tab' => 'widget'
],
'post_author' => [
'class' => '\Easyel_Free_Post_Author_Info_Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/post-author/post-author.php',
'tab' => 'widget'
],
'archive_post' => [
'class' => '\Easyel_Free_Archive_Post__Widget',
'file' => EASYELEMENTS_DIR_PATH . '/widgets/archive-post/archive-post.php',
'tab' => 'widget',
],
'login_register' => [
'class' => '\Easyel_Login_Register_Widget',
'file' => __DIR__ . '/widgets/login-register/login-register.php',
'tab' => 'widget',
],
];
foreach ( $widgets as $key => $data ) {
$option_name = 'easy_element_' . $data['tab'] . '_' . $key;
$enabled = get_option( $option_name, '1' );
if ( 1 !== ( int ) $enabled ) {
continue; // Skip disabled widgets
}
if ( file_exists( $data['file'] ) ) {
require_once $data['file'];
if ( class_exists( $data['class'] ) ) {
$widgets_manager->register( new $data['class']() );
}
}
}
}
}
Easyel_Elements_Elementor_Extension::instance();