added hooks for init and wp depending if were on the front or backend