GetMeta('origin_url'); case 'EntryTotal': $form = AllInOneForms()->Form()->Get(Sanitizer::GetStringValueFromPath($entry, ['FormId']), false, 'form'); if($form == null) return ''; $total = Sanitizer::SanitizeNumber(Sanitizer::GetStringValueFromPath($entry, ['Total'])); return $form->FormatCurrency($total); case 'EntryNumber': return Sanitizer::GetStringValueFromPath($entry, ['FormattedSequence']); case 'SubmissionDate': $unix = Sanitizer::GetStringValueFromPath($entry, ['UnixDate']); if($unix == '') return ''; $format = Sanitizer::GetStringValueFromPath($options, ['Format']); if($format != '') $format = DateUtilities::JSDateToPHPDateFormat($format); else $format = get_option('date_format', 'F j, Y'); return wp_date($format, intval($unix)); case 'CurrentDate': $format = Sanitizer::GetStringValueFromPath($options, ['Format']); if($format != '') $format = DateUtilities::JSDateToPHPDateFormat($format); else $format = get_option('date_format', 'F j, Y'); return date($format, current_time('timestamp')); case 'FullUserName': case 'FirstName': case 'LastName': case 'Email': case 'UserMeta': case 'UserRole': $user = get_user_by('id', Sanitizer::GetValueFromPath($entry, ['UserId'])); if (!$user) return ''; switch ($id) { case 'FullUserName': return $user->user_firstname . ' ' . $user->user_lastname; case 'FirstName': return $user->first_name; case 'LastName': return $user->last_name; case 'Email': return $user->user_email; case 'UserMeta': if(is_string($options)) $options = json_decode($options, true); $id = Sanitizer::GetValueFromPath($options, ['Id']); return get_user_meta($user->ID, $id, true); case 'UserRole': return implode(', ', $user->roles); } } return $content; }, 10, 4);