Index: ocupload.features.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- ocupload.features.inc	(revision )
+++ ocupload.features.inc	(revision )
@@ -0,0 +1,69 @@
+<?php
+
+/**
+ * Implementation of hook_features_export_options. [component_hook]
+ * @return mixed
+ */
+function ocupload_templates_features_export_options() {
+  return db_select('ocupload_templates', 'oc')
+    ->fields('oc', array('mask', 'mask'))
+    ->execute()
+    ->fetchAllKeyed();
+}
+
+/**
+ * Implements hook_features_export().
+ */
+function ocupload_templates_features_export($data, &$export, $module_name = '') {
+  $export['dependencies']['ocupload'] = 'ocupload';
+  foreach ($data as $mask) {
+    $export['features']['ocupload_templates'][$mask] = $mask;
+  }
+  return array();
+}
+
+/**
+ * Implements hook_features_export_render().
+ */
+function ocupload_templates_features_export_render($module_name, $data) {
+  $items = array();
+  foreach ($data as $mask) {
+    $template = db_select('ocupload_templates', 'oc')
+      ->fields('oc')
+      ->condition('mask', $mask)
+      ->execute()
+      ->fetchAssoc();
+    unset($template['tid']);
+    $items[$mask] = $template;
+  }
+
+  $code = "  \$items = " . features_var_export($items, '  ') . ";\n";
+  $code .= '  return $items;';
+  return array('ocupload_templates' => $code);
+}
+
+/**
+ * Implements hook_features_revert().
+ */
+function ocupload_templates_features_revert($module) {
+  $defaults = features_get_default('ocupload_templates', $module);
+  // Revert.
+  foreach ($defaults as $template) {
+    _ocupload_templates_save_template($template);
+  }
+}
+
+/**
+ * Saves a profile field to the database.
+ *
+ * @param array $field_data
+ *   The field data to save.
+ */
+function _ocupload_templates_save_template($template) {
+  if (!db_query("SELECT * FROM {ocupload_templates} WHERE mask = :mask", array(':mask' => $template['mask']))->fetchObject()) {
+    drupal_write_record('ocupload_templates', $template);
+  }
+  else {
+    drupal_write_record('ocupload_templates', $template, array('mask'));
+  }
+}
Index: ocupload.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- ocupload.module	(date 1409037118000)
+++ ocupload.module	(revision )
@@ -249,3 +249,17 @@
 function _ocupload_get_path() {
   return drupal_get_path('module', 'ocupload');
 }
+
+/**
+ * Implements hook_features_api().
+ */
+function ocupload_features_api() {
+  return array(
+    'ocupload_templates' => array(
+      'name' => t('One Click Upload'),
+      'file' => drupal_get_path('module', 'ocupload') . '/ocupload.features.inc',
+      'default_hook' => 'ocupload_templates',
+      'default_file' => FEATURES_DEFAULTS_INCLUDED,
+    )
+  );
+}
\ No newline at end of file
