Passing variables to a theme from a custom module
The correct code is the following one.


Theme call  

theme('my_widget', array('node' =&gt; $node)); 

Theme declaration  

function my_module_theme() {
  return array(
    'my_widget' =&gt; array(
      'template' =&gt; 'my_widget',
      // This array contains the default values.
      // You should not use a PHP variable.
      'variables' =&gt; array('node' =&gt; NULL),
    ),
  );
}