You are here

function user_relationship_invites_token_list in User Relationships 5.2

#542450 create the special tokens invite-if-rel-start and invite-if-rel-end which can be used to hide all text between them if there is no relationship when used along with the patch at http://drupal.org/node/542436.

File

plugins/user_relationship_invites/user_relationship_invites.module, line 163
Drupal Module: User Relationship Invites

Code

function user_relationship_invites_token_list($type = 'all') {
  if ($type == 'invite' || $type == 'all') {
    $tokens['invite']['invite-rel'] = t('ID of requested relationship');
    $tokens['invite']['invite-rel-name'] = t('Name of requested relationship');
    $tokens['invite']['invite-rel-plural-name'] = t('Plural name of requested relationship');
    $tokens['invite']['invite-if-rel-start'] = t('Hide if no relationship');
    $tokens['invite']['invite-if-rel-end'] = t('Unhide if no relationship');
    return $tokens;
  }
}