Astra_Builder_Widget_Controller::register_sidebar( integer $index, string $builder_type = 'header' )

Register widget for the builder.


Description


Parameters

$index

(integer) (Required) index of widget.

$builder_type

(string) (Optional) builder type.

Default value: 'header'


Source

File: inc/builder/controllers/class-astra-builder-widget-controller.php

		public function register_sidebar( $index, $builder_type = 'header' ) {
			register_sidebar(
				apply_filters(
					'astra_' . $builder_type . '_widget_' . $index . 'args',
					array(
						'name'          => ucfirst( $builder_type ) . ' Builder Widget ' . $index,
						'id'            => $builder_type . '-widget-' . $index,
						'description'   => esc_html__( 'Add widgets here:', 'astra' ),
						'before_widget' => '<section id="%1$s" class="widget %2$s">',
						'after_widget'  => '</section>',
						'before_title'  => '<h2 class="widget-title">',
						'after_title'   => '</h2>',
					)
				)
			);
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.