. */ require_once('ShortCodeLoader.php'); class CFDBShortcodeJson extends ShortCodeLoader { /** * @param $atts array of short code attributes * @param $content string inner content of short code * @return string JSON. See ExportToJson.php */ public function handleShortcode($atts, $content = null) { if (isset($atts['form'])) { $atts = $this->decodeAttributes($atts); $atts['content'] = $content; $atts['html'] = true; $atts['fromshortcode'] = true; require_once('DereferenceShortcodeVars.php'); $deref = new DereferenceShortcodeVars; $form = $deref->convert($atts['form']); require_once('ExportToJson.php'); $export = new ExportToJson(); return $export->export($form, $atts); } return ''; } }