Last active
December 11, 2015 05:28
-
-
Save yec/4552556 to your computer and use it in GitHub Desktop.
patch fences 1.0 fixes an issue with featured fields & install profile showing errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CHANGELOG.txt b/CHANGELOG.txt | |
index 41aeb0e..42746a1 100644 | |
--- a/CHANGELOG.txt | |
+++ b/CHANGELOG.txt | |
@@ -1,3 +1,8 @@ | |
+Fences 7.x-1.x-dev, xxxx-xx-xx (development release) | |
+-------------------------- | |
+- #1711490 by dalberts69: @theme_name not properly replaced in UI | |
+- #1561244 by RoySegall and JohnAlbin: Undefined Index (with installation profiles and features?) | |
+ | |
Fences 7.x-1.0, 2012-04-26 | |
-------------------------- | |
- #1352202: Add option to limit field classes | |
diff --git a/fences.admin.inc b/fences.admin.inc | |
index e6f882a..7bb0565 100644 | |
--- a/fences.admin.inc | |
+++ b/fences.admin.inc | |
@@ -14,32 +14,34 @@ function _fences_theme($existing, $type, $theme, $path) { | |
$supported_hooks = array('field'); | |
foreach ($supported_hooks as $hook) { | |
- foreach ($fences[$hook] as $suggestion => $data) { | |
- // Manually register the suggestions for a module, but let hook_theme | |
- // auto-discover theme-owned suggestions as it normally does. | |
- if ($fences[$hook][$suggestion]['type'] == 'module') { | |
- $hook_suggestion = $hook . '__fences_' . str_replace('-', '_', $suggestion); | |
- $hook_suggestions = array($hook_suggestion); | |
- // Register the "-multiple" suggestion if that template was found. | |
- if ($fences[$hook][$suggestion]['multiple']) { | |
- $hook_suggestions[] = $hook_suggestion . '_multiple'; | |
- } | |
- foreach ($hook_suggestions as $name) { | |
- $hooks[$name] = array( | |
- 'base hook' => $hook, | |
- 'render element' => $existing[$hook]['render element'], | |
- 'type' => $fences[$hook][$suggestion]['type'], | |
- 'theme path' => $existing[$hook]['theme path'], | |
- 'template' => str_replace('_', '-', $name), | |
- 'path' => $fences[$hook][$suggestion]['path'], | |
- ); | |
+ if (!empty($existing[$hook])) { | |
+ foreach ($fences[$hook] as $suggestion => $data) { | |
+ // Manually register the suggestions for a module, but let hook_theme | |
+ // auto-discover theme-owned suggestions as it normally does. | |
+ if ($fences[$hook][$suggestion]['type'] == 'module') { | |
+ $hook_suggestion = $hook . '__fences_' . str_replace('-', '_', $suggestion); | |
+ $hook_suggestions = array($hook_suggestion); | |
+ // Register the "-multiple" suggestion if that template was found. | |
+ if ($fences[$hook][$suggestion]['multiple']) { | |
+ $hook_suggestions[] = $hook_suggestion . '_multiple'; | |
+ } | |
+ foreach ($hook_suggestions as $name) { | |
+ $hooks[$name] = array( | |
+ 'base hook' => $hook, | |
+ 'render element' => $existing[$hook]['render element'], | |
+ 'type' => $fences[$hook][$suggestion]['type'], | |
+ 'theme path' => $existing[$hook]['theme path'], | |
+ 'template' => str_replace('_', '-', $name), | |
+ 'path' => $fences[$hook][$suggestion]['path'], | |
+ ); | |
+ } | |
} | |
} | |
} | |
} | |
// Register theme hook suggestions for field_collection's entity. | |
- if (module_exists('entity')) { | |
+ if (module_exists('entity') && !empty($existing['entity'])) { | |
$hooks['entity__fences_no_wrapper'] = array( | |
'base hook' => 'entity', | |
'render element' => $existing['entity']['render element'], | |
@@ -162,7 +164,7 @@ function _fences_get_fences_suggestion_info(&$fences) { | |
'label' => $suggestion, | |
'element' => $suggestion, | |
'description' => t('A <@tag> tag', array('@tag' => $suggestion)), | |
- 'groups' => array(t('Provided by @theme_name', array('@theme_name', $theme))), | |
+ 'groups' => array(t('Provided by @theme_name', array('@theme_name' => $theme))), | |
'type' => $type, | |
); | |
} | |
diff --git a/fences.info b/fences.info | |
index b626269..1d8e8b9 100644 | |
--- a/fences.info | |
+++ b/fences.info | |
@@ -8,9 +8,9 @@ dependencies[] = field | |
configure = admin/config/content/fences | |
-; Information added by drupal.org packaging script on 2012-04-25 | |
-version = "7.x-1.0" | |
-core = "7.x" | |
+ | |
+; Information added by drush on 2013-01-16 | |
+version = "" | |
project = "fences" | |
-datestamp = "1335373578" | |
+datestamp = "1358385132" | |
diff --git a/templates/field--fences-figcaption.tpl.php b/templates/field--fences-figcaption.tpl.php | |
index b2eeccf..a50f060 100644 | |
--- a/templates/field--fences-figcaption.tpl.php | |
+++ b/templates/field--fences-figcaption.tpl.php | |
@@ -1,7 +1,7 @@ | |
<?php | |
/** | |
* @file field--fences-figcaption.tpl.php | |
- * Wrap each field value in the <figcaption> element. | |
+ * Wrap all field values in a single <figcaption> element. | |
* | |
* @see http://developers.whatwg.org/grouping-content.html#the-figcaption-element | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment