You are here

function skinr_skin_features_export_options in Skinr 7.2

Implements hook_features_export_options().

File

./skinr.features.inc, line 40
Implements features integration for Skinr.

Code

function skinr_skin_features_export_options() {
  $skin_info = skinr_get_skin_info();
  $themes = list_themes();
  $options = array();
  foreach (skinr_skin_load_multiple(FALSE) as $skin) {
    $title = skinr_invoke_all('skinr_ui_element_title', $skin->module, $skin->element, $skin->theme);
    $title = reset($title);
    $name = $skin->skin == '_additional' ? t('Additional classes') : (isset($skin_info[$skin->skin]) ? $skin_info[$skin->skin]['title'] : $skin->skin);
    $options[$skin->uuid] = t('@theme: @type: @element: @name', array(
      '@type' => $skin->module,
      '@element' => $title ? strip_tags($title) : $skin->element,
      '@name' => $name,
      '@theme' => isset($themes[$skin->theme]) ? $themes[$skin->theme]->info['name'] : $skin->theme,
    ));
  }
  asort($options);
  return $options;
}