. */ require_once('ShortCodeLoader.php'); class CFDBShortcodeHtml extends ShortCodeLoader { /** * @param $atts array of short code attributes * @param $content string contents inside the shortcode tag * @return string value submitted to a form field as selected by $atts. See ExportToValue.php */ public function handleShortcode($atts, $content = null) { if ($content && isset($atts['form'])) { $atts = $this->decodeAttributes($atts); $atts['fromshortcode'] = true; $atts['content'] = $content; require_once('DereferenceShortcodeVars.php'); $deref = new DereferenceShortcodeVars; $form = $deref->convert($atts['form']); require_once('ExportToHtmlTemplate.php'); $export = new ExportToHtmlTemplate(); return $export->export($form, $atts); } return ''; } }