register_widget_type( new Bloglex_Elementor_Widgets_Block_1() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Block_2() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Block_3() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Block_4() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Block_5() ); // 2. Grid Widgets. $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Grid_1() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Grid_2() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Grid_3() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Grid_4() ); $widgets_manager->register_widget_type( new Bloglex_Elementor_Widgets_Grid_5() ); // 3. Global Widgets. $widgets_manager->register_widget_type( new Bloglex_Elementor_Global_Widgets_Title() ); } endif; add_action( 'elementor/widgets/widgets_registered', 'bloglex_elementor_widgets_registered' ); if ( ! function_exists( 'bloglex_elementor_category' ) ) : /** * Add the Elementor category for use in Bloglex widgets as separator. * * @since Bloglex 1.0.0 */ function bloglex_elementor_category() { // Register widget block category for Elementor section. \Elementor\Plugin::instance()->elements_manager->add_category( 'bloglex-widget-blocks', array( 'title' => esc_html__( 'Bloglex Widget Blocks', 'bloglex' ), ), 1 ); // Register widget grid category for Elementor section. \Elementor\Plugin::instance()->elements_manager->add_category( 'bloglex-widget-grid', array( 'title' => esc_html__( 'Bloglex Widget Grid', 'bloglex' ), ), 1 ); // Register widget global category for Elementor section. \Elementor\Plugin::instance()->elements_manager->add_category( 'bloglex-widget-global', array( 'title' => esc_html__( 'Bloglex Global Widgets', 'bloglex' ), ), 1 ); } endif; add_action( 'elementor/init', 'bloglex_elementor_category' ); if ( ! function_exists( 'bloglex_elementor_enqueue_style' ) ) : /** * Enqueue the styles for use within Elementor only. * * @since Bloglex 1.0.0 */ function bloglex_elementor_enqueue_style() { $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Enqueue the main Elementor CSS file for use with Elementor. wp_enqueue_style( 'bloglex-elementor', get_template_directory_uri() . '/inc/compatibility/elementor/assets/css/elementor' . $suffix . '.css', array(), BLOGLEX_VERSION); wp_style_add_data( 'bloglex-elementor', 'rtl', 'replace' ); } endif; add_action( 'elementor/frontend/after_enqueue_styles', 'bloglex_elementor_enqueue_style' );