function cyberchimps_css_styles() { $body_styles = cyberchimps_body_styles(); $link_styles = cyberchimps_link_styles(); $container_styles = cyberchimps_layout_styles(); $headings_styles = cyberchimps_headings_styles(); ?> <style type="text/css" media="all"> <?php if (!empty($body_styles)) { ?> body { <?php foreach ($body_styles as $key => $body_style) { ?> <?php echo $key; ?> : <?php echo $body_style; ?> ; <?php } ?> } <?php } ?> <?php if (!empty($link_styles)) { ?> <?php foreach ($link_styles as $key2 => $link_style) { ?> <?php echo $key2; ?> { color: <?php echo $link_style; ?> ; } <?php } ?> <?php } ?> <?php if (!empty($container_styles)) { ?> .container { <?php foreach ($container_styles as $key3 => $container_style) { ?> <?php echo $key3; ?> : <?php echo $container_style; ?> px; <?php } ?> } <?php } ?> <?php if (!empty($headings_styles)) { ?> h1, h2, h3, h4, h5, h6 { <?php foreach ($headings_styles as $key => $headings_style) { echo $key; ?> : <?php echo $headings_style; ?> ; <?php } ?> } <?php } $width = intval(cyberchimps_get_option('max_width')) . 'px'; if (!cyberchimps_get_option('responsive_design', 'checked')) { ?> @media screen and (max-width: <?php echo $width; ?> ) { .container-full-width { width: <?php echo $width; ?> ; } } <?php } ?> </style> <?php return; }
/** * Overwrites the core body style functions to place background image in the #sub_body div * * @return array */ function cyberchimps_css_styles() { $body_styles = cyberchimps_body_styles(); $link_styles = cyberchimps_link_styles(); $container_styles = cyberchimps_layout_styles(); ?> <style type="text/css" media="all"> <?php if (!empty($body_styles)) { ?> body { <?php foreach ($body_styles as $key => $body_style) { ?> <?php echo $key; ?> : <?php echo $body_style; ?> ; <?php } ?> } <?php if (isset($body_styles['background-image'])) { ?> #sub_body { background: <?php echo $body_styles['background-image']; ?> ; } <?php } ?> <?php } ?> <?php if (!empty($link_styles)) { ?> <?php foreach ($link_styles as $key2 => $link_style) { ?> <?php echo $key2; ?> { color: <?php echo $link_style; ?> ; } <?php } ?> <?php } ?> <?php if (!empty($container_styles)) { ?> .container { <?php foreach ($container_styles as $key3 => $container_style) { ?> <?php echo $key3; ?> : <?php echo $container_style; ?> px; <?php } ?> } <?php } ?> </style> <?php return; }