~ubuntu-fr/ubuntu-fr-website/www.dev

« back to all changes in this revision

Viewing changes to sites/all/modules/token/token.api.php

  • Committer: Vincent Liefooghe
  • Date: 2010-11-16 20:51:54 UTC
  • Revision ID: vl@ubuntovo-20101116205154-fuyfka524rm2zgni
Mise à jour des modules Backup & Migrate, Image API, Token et Pathauto

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: token.api.php,v 1.1.2.1 2010/08/10 03:42:54 davereid Exp $
 
2
// $Id: token.api.php,v 1.1.2.2 2010/09/23 01:04:12 davereid Exp $
3
3
 
4
4
/**
5
5
 * @file
14
14
/**
15
15
 * Provide metadata about available placeholder tokens and token types.
16
16
 *
 
17
 * @param $type
 
18
 *   The type of tokens to list (e.g. 'global', 'node', or 'user'). To list all
 
19
 *   tokens, use 'all'.
 
20
 *
17
21
 * @return
18
22
 *   An associative array of available tokens. The base array is keys of token
19
23
 *   types and an array of its tokens. The token arrays are keys containing the
20
24
 *   raw name of the token and values containing its user-friendly name.
21
25
 */
22
 
function hook_token_list() {
 
26
function hook_token_list($type = 'all') {
23
27
  $tokens = array();
24
28
 
25
29
  if ($type == 'global' || $type == 'all') {
37
41
 * Provide replacement values for placeholder tokens.
38
42
 *
39
43
 * @param $type
40
 
 *   The type of token being replaced. 'global', 'node', and 'user', are
41
 
 *   common.
 
44
 *   The type of token being replaced (e.g. 'global', 'node', or 'user').
42
45
 * @param $data
43
46
 *   (optional) An object to be used when generating replacement values.
44
47
 * @param $options