Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293443

If theme() finds a new hook to use from theme_hook_suggestions, that new hook's default variables are not used.

$
0
0

For example, say we've called theme('node', $node) with a node of id 68.
If a theme hook is defined as follows:

[node__68] => array(
  'function' => 'foobar',
  'variables' => array('foo' => 'bar', 'biz' => 'baz'),
)

theme() will reset $info to use the more specific hook at includes/theme.inc:1136.
However, when it does so, the new hook's variables array is never merged into $variables like it was for the original hook at line 1075.
Thus when foobar() is called, it will not have access to the default variables.

Viewing all articles
Browse latest Browse all 293443

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>