function _textimage_module_exists in Textimage 7.3
Helper - check if a module is enabled and at a specified release level.
Parameters
string $module: Module name.
string $version: (optional) Module version.
string $comparison_operator: (optional) A comparison operator to test against $version.
Return value
bool TRUE if module is enabled, FALSE otherwise.
2 calls to _textimage_module_exists()
- textimage_form_settings in ./
textimage.admin.inc - Textimage settings form.
- textimage_text_effect_form in effects/
textimage_text.inc - Settings for 'textimage_text' image effect.
File
- ./
textimage.module, line 1158 - Textimage - Provides text to image manipulations.
Code
function _textimage_module_exists($module, $version = NULL, $comparison_operator = '>=') {
if (!module_exists($module)) {
return FALSE;
}
if ($version) {
$module_info = system_get_info('module', $module);
if (empty($module_info['version'])) {
return TRUE;
}
return version_compare($module_info['version'], $version, $comparison_operator);
}
return TRUE;
}