updated upgrade rename code to be more similar for both plugins and themes for eventual refactoring