I'm developing a theme where I'm using theme options to allow users to set various things -- text size, background colour, link colour, etc.
The basic code I'm using for the options is in header.php and looks like this:
<?php
$options = get_option('mytheme_theme_options');
if( isset( $options['backgroundcolour'] ) && ( !empty( $options['backgroundcolour'] ) ) )
printf( "body {background: #%s;}", $options['backgroundcolour'] );
if( isset( $options['linkcolour'] ) && ( !empty( $options['linkcolour'] ) ) )
printf( "a, a:link {color: #%s;}", $options['linkcolour'] );
?>
One of the options I want to set is a border radius for some chunks of content, which requires multiple declarations of the same value to work in all modern browsers:
.post {-webkit-border-radius: 8px; -moz-border-radius: 8px; border-radius: 8px;}
So, how do I get the PHP above to declare the same value three times in my CSS?
I should add that I'm not normally a PHP person; feeling a bit out of my depth here. :)
Thanks.