+ $header_image = persistent_get('wfplcms_header_image');
+ if ($header_image) {
+ $hi_css = "\n<style>\n";
+ if ($header_image['width'] != WFPL_SITE_WIDTH) {
+ $hi_css .= "#site_header {\n";
+ $hi_css .= 'width: ' . $header_image['width'] . "px;\n";
+ $hi_css .= "}\n";
+ }
+ $hi_css .= "#site_header:before {\n";
+ $hi_css .= "content: \"\";\n";
+ $hi_css .= 'background-image: url(' . $header_image['url'] . ");\n";
+ $hi_css .= 'padding-top: ' . ($header_image['height'] / $header_image['width'] * 100) . "%;\n";
+ $hi_css .= "}\n";
+ if ($header_image['caption']) {
+ $hi_css .= "#site_header:after {\n";
+ $hi_css .= "content: \"" . enc_css_str($header_image['caption']) . "\";\n";
+ $hi_css .= "}\n";
+ }
+ $hi_css .= "</style>\n";
+
+ $tem->set('$cms_css', $hi_css);
+ }
+