Index: sites/all/modules/owlcarousel/owlcarousel.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/all/modules/owlcarousel/owlcarousel.module	(date 1476362788000)
+++ sites/all/modules/owlcarousel/owlcarousel.module	(revision )
@@ -72,6 +72,23 @@
 }
 
 /**
+ * Implementation of hook_features_api().
+ *
+ * Allow exporting of groups settings  by the Features module.
+ */
+function owlcarousel_features_api() {
+  return array(
+    'owlcarousel_group' => array(
+      'name' => t('Owlcarousel settings group'),
+      'feature_source' => TRUE,
+      'default_hook' => 'owlcarousel_group_defaults',
+      'default_file' => FEATURES_DEFAULTS_INCLUDED,
+      'file' => drupal_get_path('module', 'owlcarousel') . '/owlcarousel.features.inc',
+    )
+  );
+}
+
+/**
  * Load Owl Carousel settings.
  *
  * @param string $instance
@@ -186,6 +203,38 @@
 }
 
 /**
+ * Load all groups settings. Just load one group if $name is passed in.
+ */
+function owlcarousel_group_load($name = NULL){
+  $groups = array();
+  if(empty($groups)){
+    $groups_result = db_select('variable', 'v')->fields('v');
+    if($name){
+      $groups_result =  $groups_result->condition('name', $name);
+    }
+    else{
+      $groups_result =  $groups_result->condition('name', db_like('owlcarousel_settings_') . '%','LIKE');
+    }
+
+    $groups_result = $groups_result->execute();
+
+    foreach ($groups_result as $data){
+      $data->value = unserialize($data->value);
+      $data->settings = array();
+      $settings_result = db_select('variable', 'v')
+        ->fields('v')
+        ->condition('name', '%' . db_like($data->name), 'LIKE')
+        ->execute();
+      foreach($settings_result as $settings){
+        $data->settings[$settings->name] = unserialize($settings->value);
+      }
+      $groups[$data->name] = $data;
+    }
+  }
+  return $groups;
+}
+
+/**
  * Wrapper function for variable_get
  *
  * @param string $name
@@ -252,3 +301,4 @@
 
   return $results;
 }
+
Index: sites/all/modules/owlcarousel/owlcarousel.features.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- sites/all/modules/owlcarousel/owlcarousel.features.inc	(revision )
+++ sites/all/modules/owlcarousel/owlcarousel.features.inc	(revision )
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * @file
+ * Features Owl Carousel.
+ */
+
+/**
+ * Implementation of hook_features_export_options()
+ */
+function owlcarousel_group_features_export_options() {
+  $options = array();
+  $groups = (array) owlcarousel_group_load();
+  foreach ($groups as $name => $group) {
+    $options[$name] = str_replace('_', ' ', $group->value);
+  }
+  return $options;
+}
+
+/**
+ * Implementation of hook_features_export()
+ */
+function owlcarousel_group_features_export($data, &$export, $module_name = '') {
+  $pipe = array();
+  foreach ((array) $data as $name) {
+    $group = owlcarousel_group_load($name);
+  //  dpm($group);
+    if ($group) {
+      $export['features']['owlcarousel_group'][$name] = $name;
+    }
+  }
+  $export['dependencies'][] = 'owlcarousel';
+  return $pipe;
+}
+
+/**
+ * Implementation of hook_features_export_render()
+ */
+function owlcarousel_group_features_export_render($module_name, $data) {
+  $groups = array();
+
+  foreach ($data as $name) {
+    $group = (array) owlcarousel_group_load($name);
+    $groups[$name] = $group;
+  }
+
+  $code = '  $data = ' . features_var_export($groups, '  ') . ';' . PHP_EOL;
+  $code .= '  return $data;';
+
+  return array('owlcarousel_group_defaults' => $code);
+}
+
+/**
+ * Implementation of hook_features_rebuild()
+ */
+function owlcarousel_group_features_rebuild($module) {
+  owlcarousel_group_features_revert($module);
+}
+
+/**
+ * Implementation of hook_features_revert()
+ */
+function owlcarousel_group_features_revert($module) {
+  if ($data = features_get_default('owlcarousel_group', $module)) {
+    foreach ($data as $name => $group) {
+      // Restore the group settings
+      db_query("DELETE FROM {variable} WHERE name LIKE :name", array(':name' => '%' . db_like($name)));
+      $group = array_shift($group);
+      foreach($group['settings'] as $name => $value)
+      db_query("INSERT INTO {variable} (name, value) VALUES(:name, :value)", array(':name' => $name, ':value' => serialize($value)));
+    }
+  }
+}
