function taxonomy_image_parse_tags in Taxonomy Image 5
Same name and namespace in other branches
- 6 taxonomy_image.module \taxonomy_image_parse_tags()
Function to parse tags (HTML) string.
1 call to taxonomy_image_parse_tags()
- taxonomy_image_display in ./
taxonomy_image.module - Function to display the image associated with the given term id. An html <img> tag will be returned if an image is found. The link format can be modified with the tags parameter.
File
- ./
taxonomy_image.module, line 165 - taxonomy_image.module Simple module for providing an association between taxonomy terms and images. Written by Jeremy Andrews <jeremy@kerneltrap.org>, May 2004.
Code
function taxonomy_image_parse_tags($tags) {
$attrs = array();
$arr = explode(' ', $tags);
foreach ($arr as $tag) {
if (!empty($tag)) {
// Ignore extra blanks.
$key_len = strpos($tag, '=');
$attrs[drupal_substr($tag, 0, $key_len)] = trim(drupal_substr($tag, $key_len + 1), '\'"');
}
}
return $attrs;
}