config['self_closing'] = 'yes';
$this->config['name'] = __('Widget Area', 'avia_framework' );
$this->config['tab'] = __('Content Elements', 'avia_framework' );
$this->config['icon'] = AviaBuilder::$path['imagesURL']."sc-sidebar.png";
$this->config['order'] = 10;
$this->config['target'] = 'avia-target-insert';
$this->config['shortcode'] = 'av_sidebar';
$this->config['tinyMCE'] = array('instantInsert' => "[av_sidebar widget_area='Displayed Everywhere']");
$this->config['tooltip'] = __('Display one of the themes widget areas', 'avia_framework' );
}
/**
* Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas
* Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container
* Less often used: $params['data'] to add data attributes, $params['class'] to modify the className
*
*
* @param array $params this array holds the default values for $content and $args.
* @return $params the return array usually holds an innerHtml key that holds item specific markup.
*/
function editor_element($params)
{
//fetch all registered sidebars
$sidebars = AviaHelper::get_registered_sidebars();
if(empty($params['args']['widget_area'])) $params['args']['widget_area'] = reset($sidebars);
$element = array(
'subtype' => $sidebars,
'type'=>'select',
'std' => htmlspecialchars_decode($params['args']['widget_area']),
'class' => 'avia-recalc-shortcode',
'data' => array('attr'=>'widget_area')
);
$inner = "";
$inner .= "