function imageinfo_cache_get_images_in_node in Imageinfo Cache 6
Same name and namespace in other branches
- 6.2 imageinfo_cache.module \imageinfo_cache_get_images_in_node()
Given a node, get all images associated with it.
Currently this only works with images stored in filefields.
Parameters
$node: Node object.
Return value
An array of info from the files table.
1 call to imageinfo_cache_get_images_in_node()
- imageinfo_cache_nodeapi in ./
imageinfo_cache.module - Implementation of hook_nodeapi().
File
- ./
imageinfo_cache.module, line 645 - Cache image info for theme_imagecache & theme_imagefield_image.
Code
function imageinfo_cache_get_images_in_node(&$node) {
$files = array();
if (module_exists('filefield')) {
$data = imageinfo_cache_get_node_files($node);
foreach ($data as $key => $value) {
if (stristr($value['filemime'], 'image')) {
$files[$key] = $value;
}
}
}
return $files;
}