function image_effects_text_validate_font in ImageCache Actions 7
Same name and namespace in other branches
- 8 image_effects_text/image_effects_text.inc \image_effects_text_validate_font()
Validates that the file as specified in the element exists and is readable.
This is a Form API #element_validate callback.
Parameters
array $element:
1 string reference to 'image_effects_text_validate_font'
- image_effects_text_form_inc in image_effects_text/
image_effects_text.inc - Image effect form callback for the text effect.
File
- image_effects_text/
image_effects_text.inc, line 270
Code
function image_effects_text_validate_font(array &$element) {
if (!imagecache_actions_find_file($element['#value'])) {
drupal_set_message(t("Unable to find the font file '%file'. Please check the path. You can ignore this waning, if the font refers to a system or toolkit font, and the text shows correctly.", array(
'%file' => $element['#value'],
)), 'warning');
}
}