You are here

function wysiwyg_features_export_render in Wysiwyg 7.2

Implements hook_features_export_render().

File

./wysiwyg.features.inc, line 48

Code

function wysiwyg_features_export_render($module, $data, $export = NULL) {
  $code = array();
  $code[] = '  $profiles = array();';
  $code[] = '';
  foreach ($data as $name) {
    if ($profile = wysiwyg_get_profile($name)) {
      $profile = (array) $profile;
      $profile_export = features_var_export($profile, '  ');
      $profile_identifier = features_var_export($profile['format']);
      $code[] = "  // Exported profile: {$profile['format']}.";
      $code[] = "  \$profiles[{$profile_identifier}] = {$profile_export};";
      $code[] = "";
    }
  }
  $code[] = '  return $profiles;';
  $code = implode("\n", $code);
  return array(
    'wysiwyg_default_profiles' => $code,
  );
}