astra_get_custom_widget( string $option_name = '' )

Get custom widget added by user.


Description


Parameters

$option_name

(string) (Optional) Option name.

Default value: ''


Return

(Widget) added by user in options panel.


Source

File: inc/markup-extras.php

	function astra_get_custom_widget( $option_name = '' ) {

		ob_start();

		if ( 'header-main-rt-section' == $option_name ) {
			$widget_id = 'header-widget';
		}
		if ( 'footer-sml-section-1' == $option_name ) {
			$widget_id = 'footer-widget-1';
		} elseif ( 'footer-sml-section-2' == $option_name ) {
			$widget_id = 'footer-widget-2';
		}

		echo '<div class="ast-' . esc_attr( $widget_id ) . '-area"' . apply_filters( 'astra_sidebar_data_attrs', '', $widget_id ) . '>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
				astra_get_sidebar( $widget_id );
		echo '</div>';

		return ob_get_clean();
	}

Changelog

Changelog
Version Description
1.0.1.1 Introduced.


User Contributed Notes

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