-
Notifications
You must be signed in to change notification settings - Fork 5
/
icons.inc
42 lines (38 loc) · 879 Bytes
/
icons.inc
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
<?php
/**
* @file
* Icon API support to provide Bootstrap Framework glyphicons.
*/
use Drupal\bootstrap\Bootstrap;
/**
* Implements hook_icon_providers().
*/
function bootstrap_icon_providers() {
$providers['bootstrap'] = [
'title' => t('Bootstrap'),
'url' => 'https://getbootstrap.com/docs/3.3/components/#glyphicons',
];
return $providers;
}
/**
* Implements hook_icon_bundles().
*/
function bootstrap_icon_bundles() {
$bundles = [];
if (Bootstrap::getTheme()->hasGlyphicons()) {
$bundles['bootstrap'] = [
'render' => 'sprite',
'provider' => 'bootstrap',
'title' => t('Bootstrap'),
'version' => t('Icons by Glyphicons'),
'variations' => [
'icon-white' => t('White'),
],
'settings' => [
'tag' => 'span',
],
'icons' => Bootstrap::glyphicons(),
];
}
return $bundles;
}