What's the logic flaw in this conditional?
- by Scott B
I've created this code branch so that if the permalink settings do no match at least one of the OR conditions, I can execute the "do something" branch. However, I believe there is a flaw in the logic, since I've set permalinks to /%postname%.html and it still tries echo's true;
I believe I need to change the ORs to AND, right?
if (get_option('permalink_structure') !== "/%postname%/" ||
get_option('my_permalinks') !== "/%postname%/" ||
get_option('permalink_structure') !== "/%postname%.html" ||
get_option('my_permalinks') !== "/%postname%.html"))
{
//do something
echo "true";
}