theme_field() not working in a module Writing in to custom.module:

function custom_field($variables) {
  dpm($variables)
}


Returns nothing is it working in a module? And i have devel installed and turned on
You can only use that method to override a theme function in a theme (template.php).

To override the callback function for a theme using a module, you need to implement hook_theme_registry_alter(), e.g.

function MYMODULE_theme_reigstry_alter(&amp;$registry) {
  $registry['field']['function'] = 'MYMODULE_theme_field_override';
}


You might need to change other things too (file path, preprocess functions, process functions, etc, depends on your use case). The above method will help with all of that too.