beans_get_widget_area

Retrieve data from the current widget area in use.

beans_get_widget_area( string|bool $needle = false )

Return: (string) The current widget area data, or field data if the needle is specified. False if not found.

Parameters

NameTypeRequiredDefaultDescription
$needlestring|boolfalsefalseThe searched widget area needle.

Source

function beans_get_widget_area( $needle = false ) {

	global $_beans_widget_area;

	if ( ! $needle ) {
		return $_beans_widget_area;
	}

	return beans_get( $needle, $_beans_widget_area );

}