Astra_Builder_Widget_Controller::widget_init()
Initiate Astra Widgets.
Description
Source
File: inc/builder/controllers/class-astra-builder-widget-controller.php
public function widget_init() { if ( false === Astra_Builder_Helper::$is_header_footer_builder_active ) { return; } // Register Footer Widgets. $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_footer_widgets; for ( $index = 1; $index <= $component_limit; $index++ ) { if ( ! is_customize_preview() && ! Astra_Builder_Helper::is_component_loaded( 'widget-' . $index, 'footer' ) ) { continue; } $this->register_sidebar( $index, 'footer' ); } $component_limit = defined( 'ASTRA_EXT_VER' ) ? Astra_Builder_Helper::$component_limit : Astra_Builder_Helper::$num_of_header_widgets; for ( $index = 1; $index <= $component_limit; $index++ ) { if ( ! is_customize_preview() && ! Astra_Builder_Helper::is_component_loaded( 'widget-' . $index, 'header' ) ) { continue; } $this->register_sidebar( $index, 'header' ); } }
Expand full source code Collapse full source code View on Trac