function iek_get_watermark_fonts in Image effect kit 7
Same name and namespace in other branches
- 8 iek.module \iek_get_watermark_fonts()
Gets a list of available watermark fonts.
Parameters
string $font_name: A font name if you just want to get a particular watermark font. Leaves empty if you want to get all available watermark fonts.
Return value
array Particular watermark font if the 'font_name' is given. All available watermark fonts otherwise.
2 calls to iek_get_watermark_fonts()
- iek_gd_watermark in ./
iek.gd.inc - Add a watermark text on an image by using the GD toolkit.
- iek_image_watermark_form in ./
iek.module - Effect configuration form for iek_image_watermark.
File
- ./
iek.module, line 1244 - Primarily Drupal hooks and global API functions to manipulate image styles.
Code
function iek_get_watermark_fonts($font_name = '') {
$fonts = module_invoke_all('iek_watermark_font');
// Invoke hook_iek_watermark_fonts_alter().
// To allow all modules to alter the fonts.
drupal_alter('iek_watermark_font', $fonts);
if (!empty($font_name)) {
if (isset($fonts[$font_name])) {
return $fonts[$font_name];
}
else {
return array();
}
}
return $fonts;
}