function facebook_requirements in Facebook Tracking Pixel 7
Same name and namespace in other branches
- 8 facebook_tracking_pixel.install \facebook_requirements()
Implements hook_requirements.
File
- ./
facebook_tracking_pixel.install, line 154 - Install, update, and uninstall functions for the Facebook Tracking Pixel module.
Code
function facebook_requirements($phase) {
if ($phase === 'install') {
$t = get_t();
// Check the version of PHP and set errors if less than 5.4.
$version = explode('.', PHP_VERSION);
if ($version[0] == 5 && $version[1] < 4) {
$requirements['facebook_tracking_pixel_phpversion']['title'] = $t('Incompatible PHP Version');
$requirements['facebook_tracking_pixel_phpversion']['value'] = $t('The Facebook Tracking Pixel module requires a minimum of PHP 5.4');
$requirements['facebook_tracking_pixel_phpversion']['severity'] = REQUIREMENT_ERROR;
}
}
}