You are here

function pet_isset_or in Previewable email templates 7

Same name and namespace in other branches
  1. 8.4 pet.module \pet_isset_or()
  2. 8 pet.module \pet_isset_or()
  3. 6 pet.admin.inc \pet_isset_or()

Check if a variable is set and return it if so, otherwise the alternative.

5 calls to pet_isset_or()
pet_make_preview in includes/pet.admin.inc
Generate a preview of the tokenized email for the first in the list.
pet_send_mail in ./pet.module
Send tokenized email to a list of recipients.
pet_substitutions in ./pet.module
Load the token objects for a PET template in preparation for token substitution.
pet_user_form in includes/pet.admin.inc
Multi-step form for previewing and sending a PET.
pet_user_form_submit in includes/pet.admin.inc
Form submission. Take action on step 2 (confirmation of the populated templates).

File

./pet.module, line 516
Previewable Email Template module.

Code

function pet_isset_or(&$val, $alternate = NULL) {
  return isset($val) ? $val : $alternate;
}