CFDBShortcodeJson

The Contact Form DB CFDBShortcodeJson class.

Defined (1)

The class is defined in the following location(s).

/CFDBShortcodeJson.php  
  1. class CFDBShortcodeJson extends ShortCodeLoader { 
  2.  
  3. /** 
  4. * @param $atts array of short code attributes 
  5. * @param $content string inner content of short code 
  6. * @return string JSON. See ExportToJson.php 
  7. */ 
  8. public function handleShortcode($atts, $content = null) { 
  9. if (isset($atts['form'])) { 
  10. $atts = $this->decodeAttributes($atts); 
  11. $atts['content'] = $content; 
  12. $atts['html'] = true; 
  13. $atts['fromshortcode'] = true; 
  14. require_once('ExportToJson.php'); 
  15. $export = new ExportToJson(); 
  16. return $export->export($atts['form'], $atts); 
  17. return '';