Sets up the current widget.
This function also prepares the next widget integer.
beans_setup_widget( )
Return: (bool) True on success, false on failure.
Source
function beans_setup_widget() {
global $_beans_widget_area;
$widgets = array_keys( $_beans_widget_area['widgets'] );
// Retrieve widget id if exists.
if ( ! $id = beans_get( $_beans_widget_area['current_widget'], $widgets ) ) {
return false;
}
// Set next current widget integer.
$_beans_widget_area['current_widget'] = $_beans_widget_area['current_widget'] + 1;
_beans_setup_widget( $id );
return true;
}