The code in imagecache_token_token_info loops through each image style, and also within each imagecache token, to build the image field tokens.
The problem is the $image_style array has no keys other than the image attributes. This causes the descriptions to be overwritten for each image field to match whatever is the last image style in the array.
For example, if a site has three image styles called "32x32", "64x64" and "80x80", all three of them will have the same token descriptions:
80x80 image style attribute: alt
80x80 image style attribute: extension
80x80 image style attribute: filesize
80x80 image style attribute: first
...
etc.
I've written a patch that removes the image style name prefix, since it's already listed in the top line for each image style token and in the token itself. From what I can see, other tokens avoid writing customized token descriptions per line item.
See attached. I also fixed the function name typo that is part of this same code. Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| imagecache_token-token_tree_descriptions-1.patch | 1.48 KB | sgdev |
Comments