+
+ // If a theme implementation definition provides both 'template' and
+ // 'function', the 'function' will be used. In this case, if the new
+ // result provides a 'template' value, any existing 'function' value
+ // must be removed for the override to be called.
+ if (isset($result[$hook]['template'])) {
+ unset($cache[$hook]['function']);
+ }