Move generic wordpress functions in their own file.