$value) { if (is_array($value)) { // Element is nested, render it recursively. // Instead of the overhead of theme(), just call ourself directly. $output .= "\n\r". call_user_func(__FUNCTION__, $value) ."\n\r"; } else { $output .= $key .': '. $value ."\n\r"; } } return $output; } /** * Controls the body of the copy of the broadcast message sent to the sender. * * @param $raw_message * The raw message typed in by the sender with no tokens replaced. * @param $cooked_message * The message after all the tokens have been replaced. * * @return * The final text to put in the email body sent to the broadcast sender. */ function theme_signup_broadcast_sender_copy($raw_message, $cooked_message) { $output = t('This is a copy of the signup broadcast you just sent.') ."\n"; $output .= wordwrap(t('Here is the original text you entered, with none of the tokens replaced:'), 72) ."\n"; $output .= "----------\n"; $output .= $raw_message; $output .= "\n----------\n\n"; $output .= wordwrap(t('Here is how the message that was sent to each user looked, with all of the tokens replaced (using your account for the user-related tokens):'), 72) ."\n"; $output .= "----------\n"; $output .= $cooked_message; $output .= "\n----------\n\n"; return $output; }