2 function overlay_set_linkcolor($css, $linkcolor) {
3 $tag = '[[setting:linkcolor]]';
4 $replacement = $linkcolor;
5 if (is_null($replacement)) {
6 $replacement = '#428ab5';
8 $css = str_replace($tag, $replacement, $css);
14 function overlay_set_headercolor($css, $headercolor) {
15 $tag = '[[setting:headercolor]]';
16 $replacement = $headercolor;
17 if (is_null($replacement)) {
18 $replacement = '#2a4c7b';
20 $css = str_replace($tag, $replacement, $css);
27 function overlay_set_customcss($css, $customcss) {
28 $tag = '[[setting:customcss]]';
29 $replacement = $customcss;
30 if (is_null($replacement)) {
33 $css = str_replace($tag, $replacement, $css);
41 function overlay_process_css($css, $theme) {
43 if (!empty($theme->settings
->linkcolor
)) {
44 $linkcolor = $theme->settings
->linkcolor
;
48 $css = overlay_set_linkcolor($css, $linkcolor);
50 if (!empty($theme->settings
->headercolor
)) {
51 $headercolor = $theme->settings
->headercolor
;
55 $css = overlay_set_headercolor($css, $headercolor);
57 if (!empty($theme->settings
->customcss
)) {
58 $customcss = $theme->settings
->customcss
;
62 $css = overlay_set_customcss($css, $customcss);