You are here

function token_custom_type_load in Custom Tokens 7.2

Load a single custom type.

Parameters

string $type: The type to load

Return value

bool|array The loaded type array or FALSE on error.

1 string reference to 'token_custom_type_load'
token_custom_type_edit_form in ./token_custom.admin.inc
The add/edit token type form

File

./token_custom.module, line 247
It gives the user the ability to create custom tokens using PHP code for specific replacements that can improve other modules relying on the token Drupal 7 core API.

Code

function token_custom_type_load($type) {
  $types = token_custom_type_load_multiple();
  return isset($types[$type]) ? $types[$type] : FALSE;
}