5 * Install, update and uninstall functions for the color module.
9 * Implements hook_requirements().
11 function color_requirements($phase) {
14 if ($phase == 'runtime') {
15 // Check for the PHP GD library.
16 if (function_exists('imagegd2')) {
18 $requirements['color_gd'] = [
19 'value' => $info['GD Version'],
22 // Check for PNG support.
23 if (!function_exists('imagecreatefrompng')) {
24 $requirements['color_gd']['severity'] = REQUIREMENT_WARNING;
25 $requirements['color_gd']['description'] = t('The GD library for PHP is enabled, but was compiled without PNG support. Check the <a href="http://php.net/manual/ref.image.php">PHP image documentation</a> for information on how to correct this.');
29 $requirements['color_gd'] = [
30 'value' => t('Not installed'),
31 'severity' => REQUIREMENT_ERROR,
32 'description' => t('The GD library for PHP is missing or outdated. Check the <a href="http://php.net/manual/book.image.php">PHP image documentation</a> for information on how to correct this.'),
35 $requirements['color_gd']['title'] = t('GD library PNG support');