You are here

function _invite_substitutions in Invite 6.2

Same name and namespace in other branches
  1. 5.2 invite.module \_invite_substitutions()
  2. 5 invite.module \_invite_substitutions()

Create an invite object with reasonable default values for use in token replacements.

Parameters

$args: Associative array of additional arguments to merge into the invite object.

Return value

The invite object.

2 calls to _invite_substitutions()
invite_form_submit in ./invite.module
Forms API callback; process submitted form data.
_invite_token_types in ./invite.module
Provide token types for use in invite message replacements.

File

./invite.module, line 1401
Allows your users to send and track invitations to join your site.

Code

function _invite_substitutions($args = array()) {
  global $user;
  $defaults = array(
    'inviter' => $user,
    'email' => t('--recipient-email--'),
    'code' => t('--invite-code--'),
    'resent' => 0,
    'data' => array(
      'subject' => NULL,
      'message' => NULL,
    ),
  );
  return (object) array_merge($defaults, $args);
}