Stellar feedback by radiation pressure and photoionization