Please WordPress people – keep custom logic that is not theme-specific out of your themes. It really matters as that project grows.

Even if you dump it in a single file plugin, that’s way better. Pretend its’ functions.php, I don’t care – just keep it out of the theme ๐Ÿ™๐Ÿ™๐Ÿ™