You are here

function flickr_requirements in Flickr 7

Implements hook_requirements().

File

./flickr.install, line 99
The Flickr database schema and uninstall hook.

Code

function flickr_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $t = get_t();
    $requirements['flickr_requirements'] = array(
      'title' => $t('Flickr'),
      'value' => variable_get('flickr_api_key', NULL) ? $t('A Flickr API key has been set.') : $t("No Flickr API key has been set at !link.", array(
        '!link' => l('admin/config/media/flickr', 'admin/config/media/flickr'),
      )),
      'severity' => variable_get('flickr_api_key', NULL) ? REQUIREMENT_OK : REQUIREMENT_ERROR,
    );
  }
  return $requirements;
}