beans_get_widget

Retrieve data from the current widget in use.

beans_get_widget( string|bool $needle = false )

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

Parameters

NameTypeRequiredDefaultDescription
$needlestring|boolfalsefalseThe searched widget needle.

Source

function beans_get_widget( $needle = false ) {

	global $_beans_widget;

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

	return beans_get( $needle, $_beans_widget );

}