summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2011-05-22 09:01:49 -0400
committerDries Buytaert <dries@buytaert.net>2011-05-22 09:01:49 -0400
commit42786ee70e01e1c06139789cf8bbbf701b050c71 (patch)
tree0ed926a3d33cb96478cb10d716e27b8124e6af60 /includes/theme.inc
parenta060d31f0aa8721de8afd33edd6abf2ff2825852 (diff)
downloadbrdo-42786ee70e01e1c06139789cf8bbbf701b050c71.tar.gz
brdo-42786ee70e01e1c06139789cf8bbbf701b050c71.tar.bz2
- Patch #1038788 by wojtha, sign: drupal_find_theme_functions() removes all theme 'prefix_' occurences.
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index 9bd706209..3ae50006a 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -985,7 +985,7 @@ function drupal_find_theme_functions($cache, $prefixes) {
// start with. The default is the name of the hook followed by '__'. An
// 'base hook' key is added to each entry made for a found suggestion,
// so that common functionality can be implemented for all suggestions of
- // the same base hook. To keep things simple, deep heirarchy of
+ // the same base hook. To keep things simple, deep hierarchy of
// suggestions is not supported: each suggestion's 'base hook' key
// refers to a base hook, not to another suggestion, and all suggestions
// are found using the base hook's pattern, not a pattern from an
@@ -995,7 +995,7 @@ function drupal_find_theme_functions($cache, $prefixes) {
$matches = preg_grep('/^' . $prefix . '_' . $pattern . '/', $functions['user']);
if ($matches) {
foreach ($matches as $match) {
- $new_hook = str_replace($prefix . '_', '', $match);
+ $new_hook = substr($match, strlen($prefix) + 1);
$arg_name = isset($info['variables']) ? 'variables' : 'render element';
$implementations[$new_hook] = array(
'function' => $match,