From 93196edb7888ed1878c586996ef7a822005f3f9b Mon Sep 17 00:00:00 2001
From: idebr <idebr@1879760.no-reply.drupal.org>
Date: Thu, 19 May 2016 20:58:32 +0200
Subject: [PATCH] Issue #1410364 by matglas86, idebr: Variable implementation
 for features

---
 nodeblock.module | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/nodeblock.module b/nodeblock.module
index cd09c95..1d7585b 100644
--- a/nodeblock.module
+++ b/nodeblock.module
@@ -968,3 +968,22 @@ function _nodeblock_node_languages($node) {
 
   return $langcodes;
 }
+
+/**
+ * Implements hook_features_pipe_COMPONENT_alter().
+ *
+ * Autodetect Nodeblock settings when creating a Feature.
+ */
+function nodeblock_features_pipe_node_alter(&$pipe, $data, $export) {
+  foreach ($data as $type) {
+    if (variable_get('nodeblock_' . $type, 0)) {
+      $pipe['variable'][] = 'nodeblock_' . $type;
+      $pipe['variable'][] = 'nodeblock_comment_link_' . $type;
+      $pipe['variable'][] = 'nodeblock_node_link_' . $type;
+      $pipe['variable'][] = 'nodeblock_view_mode_' . $type;
+      $pipe['variable'][] = 'nodeblock_node_overrides_' . $type;
+      $pipe['variable'][] = 'nodeblock_node_override_block_available_' . $type;
+      $pipe['variable'][] = 'nodeblock_node_override_block_title_field_' . $type;
+    }
+  }
+}
-- 
2.7.0.windows.2

