forked from bmbrands/theme_bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlib.php
More file actions
24 lines (18 loc) · 652 Bytes
/
lib.php
File metadata and controls
24 lines (18 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
defined('MOODLE_INTERNAL') || die();
function bootstrap_user_settings($css, $theme) {
global $CFG;
if (!empty($theme->settings->customcss)) {
$customcss = $theme->settings->customcss;
} else {
$customcss = null;
}
$tag = '[[setting:customcss]]';
$css = str_replace($tag, $customcss, $css);
if ($theme->settings->enableglyphicons == 1) {
$bootstrapicons = '
[class ^="icon-"],[class *=" icon-"] { background-image: url("'.$CFG->wwwroot.'/theme/image.php?theme=bootstrap&component=theme&image=glyphicons-halflings"); }';
$css .= $bootstrapicons;
}
return $css;
}