mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
27 lines
546 B
PHP
27 lines
546 B
PHP
<?php
|
|
|
|
function anomaly_process_css($css, $theme) {
|
|
|
|
// Set custom CSS
|
|
if (!empty($theme->settings->customcss)) {
|
|
$customcss = $theme->settings->customcss;
|
|
} else {
|
|
$customcss = null;
|
|
}
|
|
$css = anomaly_set_customcss($css, $customcss);
|
|
|
|
return $css;
|
|
}
|
|
|
|
function anomaly_set_customcss($css, $customcss) {
|
|
$tag = '[[setting:customcss]]';
|
|
$replacement = $customcss;
|
|
if (is_null($replacement)) {
|
|
$replacement = '';
|
|
}
|
|
|
|
$css = str_replace($tag, $replacement, $css);
|
|
|
|
return $css;
|
|
}
|