Conditional deactivate

I am sorry for being unable to use git.
This is a clean PR.
Oops, the reverse order.
Personally I do not use braces in PHP to wrap one statement. Only in JS.
Corrected.