-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathiek.api.php
73 lines (65 loc) · 1.71 KB
/
iek.api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* @file
* Hooks provided by iek module.
*/
/**
* Allows modules to add more fonts for the text watermark.
*/
function hook_iek_watermark_font() {
$path = drupal_get_path('module', 'iek') . '/fonts';
return [
'a_cut_above_the_rest' => [
'name' => 'a_cut_above_the_rest',
'title' => t('A Cut Above The Rest'),
'file' => 'a_cut_above_the_rest.ttf',
'path' => $path,
],
];
}
/**
* Allows modules to alter watermark fonts settings.
*/
function hook_iek_watermark_font_alter(&$fonts) {
if (isset($fonts['a_cut_above_the_rest'])) {
$fonts['a_cut_above_the_rest']['title'] = t('Custom title');
}
}
/**
* Allows modules to add more custom image overlays.
*/
function hook_iek_overlay() {
$path = drupal_get_path('module', 'iek') . '/overlays';
return [
'basic' => [
'name' => 'basic',
'title' => t('Basic'),
'children' => [
'basic_001_1024x768' => [
'name' => 'basic_001_1024x768',
'title' => t('Basic 001 - 1024x768'),
'path' => $path . '/basic',
'file' => 'basic-001-1024x768.png',
],
'basic_001_768x1024' => [
'name' => 'basic_001_768x1024',
'title' => t('Basic 001 - 768x1024'),
'path' => $path . '/basic',
'file' => 'basic-001-768x1024.png',
],
'basic_001_600x600' => [
'name' => 'basic_001_600x600',
'title' => t('Basic 001 - 600x600'),
'path' => $path . '/basic',
'file' => 'basic-001-600x600.png',
],
],
],
];
}
/**
* Allows modules to alter image overlays settings.
*/
function hook_iek_overlay_alter(&$overlays) {
$overlays['basic']['title'] = t('Custom title');
}