You are here

function wysiwyg_template_export_get_code in Wysiwyg API template plugin 7.2

Generate exporting code for a template.

1 call to wysiwyg_template_export_get_code()
wysiwyg_template_export_form in ./wysiwyg_template.admin.inc
Generate a form for exporting a template.

File

./wysiwyg_template.admin.inc, line 341
Administrative page callbacks for the Wysiwyg Template module.

Code

function wysiwyg_template_export_get_code($template, $indent = '') {
  $code = array();
  $code[] = '$template = array();';
  foreach ($template as $key => $value) {
    $code[] = "\$template['{$key}'] = " . var_export($value, TRUE) . ";";
  }
  return implode("\n", $code);
}