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
Name | Type | Required | Default | Description |
---|---|---|---|---|
$needle | string|bool | false | false | The searched widget needle. |
Source
function beans_get_widget( $needle = false ) {
global $_beans_widget;
if ( ! $needle ) {
return $_beans_widget;
}
return beans_get( $needle, $_beans_widget );
}