/** * Configuration panel for widget * * @access public */ function control($options, $form_id) { // settings entirely dependant on text area // Display control panel for this widget // extract($options); ?> <div> <?php $this->controlCommon($options); ?> <h4><?php _e("Excerpt of Post", "tdomf"); ?> </h4> <?php $tashow = array('excerpt-cols', 'excerpt-rows', 'excerpt-quicktags', 'excerpt-restrict-tags', 'excerpt-allowable-tags', 'excerpt-char-limit', 'excerpt-word-limit', 'excerpt-required', 'excerpt-title', 'excerpt-default-text'); $taoptions = $this->textarea->control($options, $form_id, $tashow, false, $_POST[$this->internalName . '-submit']); if ($_POST[$this->internalName . '-submit']) { $options = wp_parse_args($taoptions, $options); $this->updateOptions($options, $form_id); } ?> </div> <?php }
/** * Configuration panel for widget * * @access public */ function control($options, $form_id) { // Store settings for this widget // if ($_POST[$this->internalName . '-submit']) { $newoptions['title-enable'] = isset($_POST['content-title-enable']); $newoptions['text-enable'] = isset($_POST['content-text-enable']); $options = wp_parse_args($newoptions, $options); $this->updateOptions($options, $form_id); } // Display control panel for this widget // extract($options); ?> <div> <?php $this->controlCommon($options); if (TDOMF_Widget::isSubmitForm($mode, $form_id)) { $tashow = array('content-text-cols', 'content-text-rows', 'content-text-quicktags', 'content-text-restrict-tags', 'content-text-allowable-tags', 'content-text-char-limit', 'content-text-word-limit', 'content-text-required', 'content-text-title', 'content-text-default-text'); $tfshow = array('content-title-size', 'content-title-required', 'content-title-title', 'content-title-default-text'); } else { $tashow = array('content-text-cols', 'content-text-rows', 'content-text-quicktags', 'content-text-restrict-tags', 'content-text-allowable-tags', 'content-text-char-limit', 'content-text-word-limit', 'content-text-required', 'content-text-title'); $tfshow = array('content-title-size', 'content-title-required', 'content-title-title'); } ?> <h4><?php _e("Title of Post", "tdomf"); ?> </h4> <label for="content-title-enable" style="line-height:35px;"><?php _e("Show", "tdomf"); ?> </label> <input type="checkbox" name="content-title-enable" id="content-title-enable" <?php if ($options['title-enable']) { echo "checked"; } ?> > <?php $tfoptions = $this->textfield->control($options, $form_id, $tfshow, false, $_POST[$this->internalName . '-submit']); if ($_POST[$this->internalName . '-submit']) { $options = wp_parse_args($tfoptions, $options); $this->updateOptions($options, $form_id); } ?> <h4><?php _e("Content of Post", "tdomf"); ?> </h4> <label for="content-text-enable" style="line-height:35px;"><?php _e("Show", "tdomf"); ?> <label> <input type="checkbox" name="content-text-enable" id="content-text-enable" <?php if ($options['text-enable']) { echo "checked"; } ?> > <?php $taoptions = $this->textarea->control($options, $form_id, $tashow, false, $_POST[$this->internalName . '-submit']); if ($_POST[$this->internalName . '-submit']) { $options = wp_parse_args($taoptions, $options); $this->updateOptions($options, $form_id); } ?> </div> <?php }