Adding theme hook to register template file handling