1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* icons.inc
|
6
|
* Provide Bootstrap Glyphicons support via the Icon API module.
|
7
|
*/
|
8
|
|
9
|
require_once dirname(__FILE__) . '/common.inc';
|
10
|
|
11
|
/**
|
12
|
* Implements hook_icon_providers().
|
13
|
*/
|
14
|
function bootstrap_icon_providers() {
|
15
|
$providers['bootstrap'] = array(
|
16
|
'title' => t('Bootstrap'),
|
17
|
'url' => 'http://getbootstrap.com/components/#glyphicons',
|
18
|
);
|
19
|
return $providers;
|
20
|
}
|
21
|
|
22
|
/**
|
23
|
* Implements hook_icon_bundles().
|
24
|
*/
|
25
|
function bootstrap_icon_bundles() {
|
26
|
$bundles = array();
|
27
|
if (_bootstrap_glyphicons_supported()) {
|
28
|
$bundles['bootstrap'] = array(
|
29
|
'render' => 'sprite',
|
30
|
'provider' => 'bootstrap',
|
31
|
'title' => t('Bootstrap'),
|
32
|
'version' => t('Icons by Glyphicons'),
|
33
|
'variations' => array(
|
34
|
'icon-white' => t('White'),
|
35
|
),
|
36
|
'settings' => array(
|
37
|
'tag' => 'span',
|
38
|
),
|
39
|
'icons' => _bootstrap_glyphicons(),
|
40
|
);
|
41
|
}
|
42
|
return $bundles;
|
43
|
}
|