Move "Pass Trigger" requirements to a function

Using a function insures that the test is performed the same way
every time.

Also move the declaration of the trigger name strings to the location of
their use.