You are here

function icomoon_icon_icomoon_import_validate in Icomoon 7

Implements hook_icon_PROVIDER_import_validate().

File

./icomoon.module, line 62
icomoon.module Integrates the Icomoon service as an icon provider for Icon API.

Code

function icomoon_icon_icomoon_import_validate(&$bundle) {
  if ($json = icomoon_get_json($bundle['path'])) {
    return TRUE;
  }
  return t('The uploaded archive file does not contain the %json file. Ensure that this is a proper archive file generated by <a href="!url">@provider</a>.', array(
    '%json' => 'selection.json',
    '@provider' => t('IcoMoon'),
    '!url' => url('http://icomoon.io'),
  ));
}