/** * Code for hacking form output * * @access public * @return String */ function formHack($args, $options) { if (!$options['title-enable'] && !$options['text-enable']) { return ""; } extract($args); $output = ""; if (TDOMF_Widget::isEditForm($mode, $tdomf_form_id)) { // @todo $output .= "\t\t" . '<?php $post = get_post($post_id); if($post) {' . "\n"; if ($options['title-enable']) { $output .= "\t\t\t" . 'if(!isset($post_args[\'content-title-tf\'])) { $post_args[\'content-title-tf\'] = $post->post_title; }' . "\n"; } if ($options['text-enable']) { $output .= "\t\t\t" . 'if(!isset($post_args[\'content-text-ta\'])) { $post_args[\'content-text-ta\'] = $post->post_content; }' . "\n"; } $output .= "\t\t" . '} ?>' . "\n"; } if ($options['title-enable']) { $output .= $this->textfield->formHack($args, $options); if ($options['text-enable']) { $output .= "\n\t\t" . '<br/><br/>' . "\n"; } } if ($options['text-enable']) { $output .= $this->textarea->formHack($args, $options); } return $output; }
/** * Code for hacking form output * * @access public * @return String */ function formHack($args, $options) { return $this->textarea->formHack($args, $options); }