Fix yoda conditionals

As per WP coding standards, when comparing a string against a variable, the string should be on the left. If not, then it's easy to introduce a logic error by accidentally doing an assignment (`=`) instead of a comparison (`==`) which can be tricky to track down.