'."\n";
} else {
$GLOBALS['stylesheet'] = get_option('of_alt_stylesheet');
if($GLOBALS['stylesheet'] != '')
echo ''."\n";
else
echo ''."\n";
}
// This prints out the custom css and specific styling options
of_head_css();
}
}
add_action('wp_head', 'optionsframework_wp_head');
/*-----------------------------------------------------------------------------------*/
/* Output CSS from standarized options */
/*-----------------------------------------------------------------------------------*/
function of_head_css() {
$shortname = get_option('of_shortname');
$output = '';
$custom_css = get_option('of_custom_css');
if ($custom_css <> '') {
$output .= $custom_css . "\n";
}
// Output styles
if ($output <> '') {
$output = "\n\n";
echo $output;
}
}
/*-----------------------------------------------------------------------------------*/
/* Add Body Classes for Layout
/*-----------------------------------------------------------------------------------*/
// This used to be done through an additional stylesheet call, but it seemed like
// a lot of extra files for something so simple. Adds a body class to indicate sidebar position.
add_filter('body_class','of_body_class');
function of_body_class($classes) {
$shortname = get_option('of_shortname');
$layout = get_option($shortname .'_layout');
if ($layout == '') {
$layout = 'layout-2cr';
}
$classes[] = $layout;
return $classes;
}
/*-----------------------------------------------------------------------------------*/
/* Add Favicon
/*-----------------------------------------------------------------------------------*/
function childtheme_favicon() {
$shortname = get_option('of_shortname');
if (get_option($shortname . '_custom_favicon') != '') {
echo ''."\n";
}
else { ?>
"" )
echo stripslashes($output) . "\n";
}
add_action('wp_footer','childtheme_analytics');
?>