Unable to override theme function
So to help keep your theme files cleaner, the preference is to place theme overrides in a custom module. This allows you to switch themes without having copy, paste, and rename a bunch of code.

Also this may be your only choice if, for example, you're trying to override a theme function that's being called from an admin page, you have an admin theme enabled, and you don't want to bother with creating a subtheme for your admin theme.

The workaround here is to use hook_theme_registry_alter(); see this page on Drupal Stack Exchange.