\n\n"; echo $output; } } } /*-----------------------------------------------------------------------------------*/ /* Add custom typograhpy to HEAD */ /*-----------------------------------------------------------------------------------*/ if (!function_exists( 'woo_custom_typography')) { function woo_custom_typography() { // Get options global $woo_options; // Reset $output = ''; // Add Text title and tagline if text title option is enabled if ( $woo_options[ 'woo_texttitle' ] == "true" ) { if ( $woo_options[ 'woo_font_site_title' ] ) $output .= '#logo .site-title a {'.woo_generate_font_css($woo_options[ 'woo_font_site_title' ]).'}' . "\n"; if ( $woo_options[ 'woo_font_tagline' ] ) $output .= '#logo .site-description {'.woo_generate_font_css($woo_options[ 'woo_font_tagline' ]).'}' . "\n"; } if ( $woo_options[ 'woo_typography' ] == "true") { if ( $woo_options[ 'woo_font_body' ] ) $output .= 'body { '.woo_generate_font_css($woo_options[ 'woo_font_body' ], '1.5').' }' . "\n"; if ( $woo_options[ 'woo_font_nav' ] ) $output .= '#navigation, #navigation .nav a { '.woo_generate_font_css($woo_options[ 'woo_font_nav' ], '1.4').' }' . "\n"; if ( $woo_options[ 'woo_font_post_title' ] ) $output .= '.post .title { '.woo_generate_font_css($woo_options[ 'woo_font_post_title' ]).' }' . "\n"; if ( $woo_options[ 'woo_font_post_meta' ] ) $output .= '.post-meta { '.woo_generate_font_css($woo_options[ 'woo_font_post_meta' ]).' }' . "\n"; if ( $woo_options[ 'woo_font_post_entry' ] ) $output .= '.entry, .entry p { '.woo_generate_font_css($woo_options[ 'woo_font_post_entry' ], '1.5').' } h1, h2, h3, h4, h5, h6 { font-family: \''.stripslashes($woo_options[ 'woo_font_post_entry' ]['face']).'\', sans-serif; }' . "\n"; if ( $woo_options[ 'woo_font_widget_titles' ] ) $output .= '.widget h3 { '.woo_generate_font_css($woo_options[ 'woo_font_widget_titles' ]).' }' . "\n"; // Add default typography Google Font } else { // Add to $woo_options so woo_google_webfonts() adds javascript $woo_options['woo_default_face'] = array('face' => 'Yanone Kaffeesatz'); $output .= '.archive_header, .meta-title, .post-date, #footer-top .social-icons, .searchform input.search-submit, a.button, .submit, .pagination, #logo .site-description, .widget h3, #post-entries, h1, h2, h3, h4, h5, h6, .widget_woo_blogroll, #donate .donate-meter .money-raised, #donate .donate-meter .money-target, .money-so-far { '.woo_generate_font_css($woo_options['woo_default_face']).' }' . "\n"; } // Output styles if (isset($output) && $output != '') { // Enable Google Fonts stylesheet in HEAD if (function_exists( 'woo_google_webfonts')) woo_google_webfonts(); $output = "\n\n\n"; echo $output; } } } if (!function_exists('woo_generate_font_css')) { // Returns proper font css output function woo_generate_font_css($option, $em = '1') { if (!$option["style"] && !$option["size"] && !$option["unit"] && !$option["color"]) return 'font-family:"'.stripslashes($option["face"]).'", serif;'; else return 'font:'.$option["style"].' '.$option["size"].$option["unit"].'/'.$em.'em '.stripslashes($option["face"]).';color:'.$option["color"].';'; } } // Output stylesheet and custom.css after custom styling remove_action( 'wp_head', 'woothemes_wp_head' ); add_action( 'woo_head', 'woothemes_wp_head' ); /*-----------------------------------------------------------------------------------*/ /* Add layout to body_class output */ /*-----------------------------------------------------------------------------------*/ if (!function_exists( 'woo_layout_body_class')) { function woo_layout_body_class($classes) { global $woo_options; $layout = $woo_options[ 'woo_site_layout' ]; // Set main layout on post or page if ( is_singular() ) { global $post; $single = get_post_meta($post->ID, '_layout', true); if ( $single != "" ) $layout = $single; } // Add layout to $woo_options array for use in theme $woo_options[ 'woo_layout' ] = $layout; // Add classes to body_class() output $classes[] = $layout; return $classes; } } /*-----------------------------------------------------------------------------------*/ /* Featured Slider Settings */ /*-----------------------------------------------------------------------------------*/ // add_filter('woo_head', 'woo_slider_options'); function woo_slider_options() { global $woo_options; if ($woo_options[ 'woo_slider' ] == 'true' && is_home() && !is_paged()): ?> theme_location == 'primary-menu' ) $items .= '