type == 'competition' && $items = field_get_items('node', $node, 'field_competition_prizes')) { $allowed = (bool) count($items); // If unpublication is denied then inform the user why. This message will be // displayed during node edit and save. if (!$allowed) { drupal_set_message(t('The competition will only be unpublished after all prizes have been claimed by the winners.')); } } return $allowed; } /** * @} End of "addtogroup hooks". */