/** * Outputs the content of the widget * * @param array $args * @param array $instance */ public function widget($args, $instance) { $no = $instance['form'] == '1' ? '' : $instance['form']; echo $args['before_widget']; if (!empty($instance['title'])) { echo $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title']; } insert_cform($no); echo $args['after_widget']; }
function widget_cforms($args) { $cformsSettings = get_option('cforms_settings'); $options = $cformsSettings['global']['widgets']; extract($args); $prefix = 'cforms'; $id = substr($widget_id, 7); $no = $options[$id]['form'] == '1' ? '' : $options[$id]['form']; $title = htmlspecialchars(stripslashes($options[$id]['title'])); echo $before_widget . $before_title . $title . $after_title; insert_cform($no); echo $after_widget; }
function insert_custom_cform($fields = '', $no = '') { insert_cform($no, $fields, '+'); }
function widget_cforms($args) { extract($args); preg_match('/^.*widgetcform([^"]*)".*$/', $before_widget, $form_no); $no = $form_no[1] == '0' ? '' : (int) $form_no[1]; echo $before_widget; insert_cform($no); echo $after_widget; }
?> </div> </div> <div id="ideas" class="section"> <h2 class="header">Submit!</h2> <div id="submission_directions" class="section intro"> <?php $submit = getPage('main-page-submit'); ?> </div> <?php if ($submit) { ?> <div id="submission_form"> <?php insert_cform('Idea Form'); ?> </div> <div id="submissions"> <h3>Submissions</h3> <?php getPage('main-page-submissions'); ?> </div> <?php } ?> <?php if (!$submit) { ?> <div id="lineup">