fontawesome.install in Font Awesome Icons 7
Same filename and directory in other branches
Requirements page for Font Awesome.
File
fontawesome.installView source
<?php
/**
* @file
* Requirements page for Font Awesome.
*/
/**
* Implements hook_requirements().
*/
function fontawesome_requirements($phase) {
$requirements = array();
// Report the version of Font Awesome.
if ($phase == 'runtime') {
// Make sure Libraries is loaded before loading Font Awesome.
drupal_load('module', 'libraries');
$fontawesome = libraries_detect('fontawesome');
$requirements['fontawesome'] = array(
'title' => $fontawesome['name'],
'severity' => $fontawesome['installed'] ? REQUIREMENT_OK : REQUIREMENT_WARNING,
'value' => $fontawesome['installed'] ? $fontawesome['version'] : $fontawesome['error message'],
);
}
return $requirements;
}
Functions
Name | Description |
---|---|
fontawesome_requirements | Implements hook_requirements(). |