4 * Makes our changes to the CSS
7 * @param theme_config $theme
10 function arialist_process_css($css, $theme) {
13 if (!empty($theme->settings
->linkcolor
)) {
14 $linkcolor = $theme->settings
->linkcolor
;
18 $css = arialist_set_linkcolor($css, $linkcolor);
20 // Set the region width
21 if (!empty($theme->settings
->regionwidth
)) {
22 $regionwidth = $theme->settings
->regionwidth
;
26 $css = arialist_set_regionwidth($css, $regionwidth);
29 if (!empty($theme->settings
->customcss
)) {
30 $customcss = $theme->settings
->customcss
;
34 $css = arialist_set_customcss($css, $customcss);
41 * Sets the background colour variable in CSS
44 * @param mixed $backgroundcolor
47 function arialist_set_linkcolor($css, $linkcolor) {
48 $tag = '[[setting:linkcolor]]';
49 $replacement = $linkcolor;
50 if (is_null($replacement)) {
51 $replacement = '#f25f0f';
53 $css = str_replace($tag, $replacement, $css);
58 * Sets the region width variable in CSS
61 * @param mixed $regionwidth
65 function arialist_set_regionwidth($css, $regionwidth) {
66 $tag = '[[setting:regionwidth]]';
67 $doubletag = '[[setting:regionwidthdouble]]';
68 $replacement = $regionwidth;
69 if (is_null($replacement)) {
72 $css = str_replace($tag, $replacement.'px', $css);
73 $css = str_replace($doubletag, ($replacement*2).'px', $css);
78 * Sets the custom css variable in CSS
81 * @param mixed $customcss
84 function arialist_set_customcss($css, $customcss) {
85 $tag = '[[setting:customcss]]';
86 $replacement = $customcss;
87 if (is_null($replacement)) {
90 $css = str_replace($tag, $replacement, $css);