You are here

function imageinfo_cache_nodeapi in Imageinfo Cache 6.2

Same name and namespace in other branches
  1. 6 imageinfo_cache.module \imageinfo_cache_nodeapi()

Implements hook_nodeapi().

Grab files after being saved to node object

File

./imageinfo_cache.module, line 131
Cache image info for theme_imagecache & theme_imagefield_image.

Code

function imageinfo_cache_nodeapi(&$node, $op) {
  if ($op == 'insert' || $op == 'update') {
    $op = 'insert';
    $files = imageinfo_cache_get_images_in_node($node);
    foreach ($files as $file) {
      $file = (object) $file;
      if (imageinfo_cache_check_file($file, $op)) {
        imageinfo_cache_shutdown_async($file, $op, 'nodeapi');
      }
    }
  }
}