3 function sky_high_process_css($css, $theme) {
5 if (!empty($theme->settings
->regionwidth
)) {
6 $regionwidth = $theme->settings
->regionwidth
;
10 $css = sky_high_set_regionwidth($css, $regionwidth);
12 if (!empty($theme->settings
->customcss
)) {
13 $customcss = $theme->settings
->customcss
;
17 $css = sky_high_set_customcss($css, $customcss);
23 * Sets the region width variable in CSS
26 * @param mixed $regionwidth
29 function sky_high_set_regionwidth($css, $regionwidth) {
30 $tag = '[[setting:regionwidth]]';
31 $doubletag = '[[setting:regionwidthdouble]]';
32 $leftmargintag = '[[setting:leftregionwidthmargin]]';
33 $rightmargintag = '[[setting:rightregionwidthmargin]]';
34 $replacement = $regionwidth;
35 if (is_null($replacement)) {
38 $css = str_replace($tag, $replacement.'px', $css);
39 $css = str_replace($doubletag, ($replacement*2).'px', $css);
40 $css = str_replace($rightmargintag, ($replacement*3-5).'px', $css);
41 $css = str_replace($leftmargintag, ($replacement+
5).'px', $css);
46 * Sets the custom css variable in CSS
49 * @param mixed $customcss
52 function sky_high_set_customcss($css, $customcss) {
53 $tag = '[[setting:customcss]]';
54 $replacement = $customcss;
55 if (is_null($replacement)) {
58 $css = str_replace($tag, $replacement, $css);