function imagecache_token_token_info in Imagecache Token 7
Implements hook_token_info().
File
- ./
imagecache_token.tokens.inc, line 7
Code
function imagecache_token_token_info() {
$styles = image_styles();
$styles_tokens = array();
$image_style = array();
foreach ($styles as $style => $desc) {
$styles_tokens[$style] = array(
'name' => $style,
'description' => t("@s image style", array(
"@s" => $style,
)),
'type' => 'image-style',
);
foreach (_imagegecache_token_image_attributes() as $attribute => $none) {
$image_style[$attribute] = array(
'name' => $attribute,
'description' => t("@s image style attribute: @a", array(
"@s" => $style,
"@a" => $attribute,
)),
);
}
}
return array(
'types' => array(
'image-field' => array(
'name' => 'Image Field',
'description' => 'Image Field',
'needs-data' => 'image-field',
),
'image-style' => array(
'name' => 'Image Style',
'description' => 'Image Style',
'needs-data' => 'image-style',
),
),
'tokens' => array(
'image-field' => $styles_tokens,
'image-style' => $image_style,
),
);
}