function render_widget_open($args, $instance) { ?> <div class="clear"></div> <?php parent::render_widget_open($args, $instance); }
function form($instance) { gantry_import('core.config.gantryform'); global $gantry; $defaults = $this->_defaults; $gantry->addScript('mootools.js'); $instance = wp_parse_args((array) $instance, $defaults); foreach ($instance as $variable => $value) { ${$variable} = GantryWidget::_cleanOutputVariable($variable, $value); $instance[$variable] = ${$variable}; } $this->_values = $instance; $form = GantryForm::getInstance($this, $this->short_name, $this->short_name); $form->bind($this->_values); ob_start(); $fieldSets = $form->getFieldsets(); foreach ($fieldSets as $name => $fieldSet) { ?> <fieldset class="panelform"> <?php foreach ($form->getFieldset($name) as $field) { ?> <div class="field-wrapper"> <?php echo $field->label; ?> <?php echo $field->input; ?> </div> <?php } ?> </fieldset> <?php } echo ob_get_clean(); }
function widget($args, $instance) { extract($args); $defaults = $this->_defaults; $instance = wp_parse_args((array) $instance, $defaults); foreach ($instance as $variable => $value) { ${$variable} = GantryWidget::_cleanOutputVariable($variable, $value); $instance[$variable] = ${$variable}; } ob_start(); $this->render_position_open($args, $instance); $this->render($args, $instance); $this->render_position_close($args, $instance); echo ob_get_clean(); }