You are here

function image_gallery_taxonomy in Image 5.2

Same name and namespace in other branches
  1. 5 contrib/image_gallery/image_gallery.module \image_gallery_taxonomy()
  2. 6 contrib/image_gallery/image_gallery.module \image_gallery_taxonomy()
  3. 7 contrib/image_gallery/image_gallery.module \image_gallery_taxonomy()

Implementation of hook_taxonomy. If our vocabulary gets deleted, delete our variable pointing to it.

File

contrib/image_gallery/image_gallery.module, line 146

Code

function image_gallery_taxonomy($op, $type, $array) {
  if ($op == 'delete' && $type == 'vocabulary') {
    $vid = variable_get('image_gallery_nav_vocabulary', '');
    if ($vid == $array['vid']) {
      variable_set('image_gallery_nav_vocabulary', '');
    }
  }
}