\n";
if ($style != '') {
echo ''."\n\n";
} else {
$style = get_option( 'woo_alt_stylesheet' );
if( $style != '' ) {
// Sanitize value.
$style = strtolower( strip_tags( trim( $style ) ) );
echo ''."\n\n";
} else {
echo ''."\n\n";
}
}
}
}
/*-----------------------------------------------------------------------------------*/
/* Output favicon link - woo_custom_favicon() */
/*-----------------------------------------------------------------------------------*/
if ( ! function_exists( 'woo_output_custom_favicon' ) ) {
function woo_output_custom_favicon() {
// Favicon
if(get_option( 'woo_custom_favicon') != '') {
echo "\n";
echo ''."\n\n";
}
}
}
/*-----------------------------------------------------------------------------------*/
/* Load textdomain - woo_load_textdomain() */
/*-----------------------------------------------------------------------------------*/
if ( ! function_exists( 'woo_load_textdomain' ) ) {
function woo_load_textdomain() {
load_theme_textdomain( 'woothemes' );
load_theme_textdomain( 'woothemes', get_template_directory() . '/lang' );
if ( function_exists( 'load_child_theme_textdomain' ) )
load_child_theme_textdomain( 'woothemes' );
}
}
add_action( 'init', 'woo_load_textdomain' );
/*-----------------------------------------------------------------------------------*/
/* Output CSS from standarized options */
/*-----------------------------------------------------------------------------------*/
if ( ! function_exists( 'woo_head_css' ) ) {
function woo_head_css() {
$output = '';
$text_title = get_option( 'woo_texttitle' );
$tagline = get_option( 'woo_tagline' );
$custom_css = get_option( 'woo_custom_css' );
$template = get_option( 'woo_template' );
if (is_array($template)) {
foreach($template as $option){
if(isset($option['id'])){
if($option['id'] == 'woo_texttitle') {
// Add CSS to output
if ( $text_title == "true" ) {
$output .= '#logo img { display:none; } #logo .site-title { display:block; }' . "\n";
if ( $tagline == "false" )
$output .= '#logo .site-description { display:none; }' . "\n";
else
$output .= '#logo .site-description { display:block; }' . "\n";
}
}
}
}
}
if ($custom_css <> '') {
$output .= $custom_css . "\n";
}
// Output styles
if ($output <> '') {
$output = strip_tags($output);
echo "\n";
$output = "\n\n";
echo $output;
}
}
}
/*-----------------------------------------------------------------------------------*/
/* Output custom.css - woo_custom_css() */
/*-----------------------------------------------------------------------------------*/
if (!function_exists( 'woo_output_custom_css')) {
function woo_output_custom_css() {
// Custom.css insert
echo "\n";
echo ''."\n";
}
}
/*-----------------------------------------------------------------------------------*/
/* Post Images from WP2.9+ integration /*
/*-----------------------------------------------------------------------------------*/
if(function_exists( 'add_theme_support')){
if(get_option( 'woo_post_image_support') == 'true'){
add_theme_support( 'post-thumbnails' );
// set height, width and crop if dynamic resize functionality isn't enabled
if ( get_option( 'woo_pis_resize') != 'true' ) {
$thumb_width = get_option( 'woo_thumb_w' );
$thumb_height = get_option( 'woo_thumb_h' );
$single_width = get_option( 'woo_single_w' );
$single_height = get_option( 'woo_single_h' );
$hard_crop = get_option( 'woo_pis_hard_crop' );
if($hard_crop == 'true') {$hard_crop = true; } else { $hard_crop = false;}
set_post_thumbnail_size($thumb_width,$thumb_height, $hard_crop); // Normal post thumbnails
add_image_size( 'single-post-thumbnail', $single_width, $single_height, $hard_crop );
}
}
}
/*-----------------------------------------------------------------------------------*/
/* Enqueue comment reply script */
/*-----------------------------------------------------------------------------------*/
if (!function_exists( 'woo_comment_reply')) {
function woo_comment_reply() {
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'get_header', 'woo_comment_reply' );
?>