Stating your pay is not illegal. In fact, Yelp Violates the State Employer laws by firing her on that account. No Terms of Service should ever interfere/break with state law or federal law. Yelp may be in trouble for that claim.
SEE A Adam Ruins Everything (Why You Should Tell Coworkers Your Salary) https://www.youtube.com/watch?v=7xH7eGFuSYI