Example #1
0
 function woo_custom_typography()
 {
     // Get options
     global $woo_options;
     // Reset
     $output = '';
     $default_google_font = false;
     // Add Text title and tagline if text title option is enabled
     if (isset($woo_options['woo_texttitle']) && $woo_options['woo_texttitle'] == 'true') {
         if ($woo_options['woo_font_site_title']) {
             $output .= '#header .site-title a {' . woo_generate_font_css($woo_options['woo_font_site_title']) . '}' . "\n";
         }
         if ($woo_options['woo_tagline'] == "true" and $woo_options['woo_font_tagline']) {
             $output .= '#header .site-description {' . woo_generate_font_css($woo_options['woo_font_tagline']) . '}' . "\n";
         }
     }
     if (isset($woo_options['woo_typography']) && $woo_options['woo_typography'] == 'true') {
         if (isset($woo_options['woo_font_body']) && $woo_options['woo_font_body']) {
             $output .= 'body { ' . woo_generate_font_css($woo_options['woo_font_body'], '1.5') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_nav']) && $woo_options['woo_font_nav']) {
             $output .= '#navigation { font-size: 1em; } #navigation .nav a { ' . woo_generate_font_css($woo_options['woo_font_nav'], '1.4') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_intro_section']) && $woo_options['woo_font_intro_section']) {
             $output .= '#intro h1 { ' . woo_generate_font_css($woo_options['woo_font_intro_section'], '1.3') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_page_title']) && $woo_options['woo_font_page_title']) {
             $output .= '.page header h1 { ' . woo_generate_font_css($woo_options['woo_font_page_title'], '1.2') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_title']) && $woo_options['woo_font_post_title']) {
             $output .= '.post header h1 { font-size: 1em; }  .single-post .post header h1, .post header h1 a:link, .post header h1 a:visited { ' . woo_generate_font_css($woo_options['woo_font_post_title'], '1.2') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_meta']) && $woo_options['woo_font_post_meta']) {
             $output .= '.post-meta { ' . woo_generate_font_css($woo_options['woo_font_post_meta']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_entry']) && $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']) . ', arial, sans-serif; }' . "\n";
         }
         if (isset($woo_options['woo_font_widget_titles']) && $woo_options['woo_font_widget_titles']) {
             $output .= '.widget h3 { ' . woo_generate_font_css($woo_options['woo_font_widget_titles']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_widget_titles']) && $woo_options['woo_font_widget_titles']) {
             $output .= '.widget h3 { ' . woo_generate_font_css($woo_options['woo_font_widget_titles']) . ' }' . "\n";
         }
         // Component titles
         if (isset($woo_options['woo_font_component_titles']) && $woo_options['woo_font_component_titles']) {
             $output .= '.component h2.component-title { ' . woo_generate_font_css($woo_options['woo_font_component_titles']) . ' }' . "\n";
         }
         // Add default typography Google Font
     } else {
         // Load default Google Fonts
         global $default_google_fonts;
         if (is_array($default_google_fonts) and count($default_google_fonts) > 0) {
             $count = 0;
             foreach ($default_google_fonts as $font) {
                 $count++;
                 $woo_options['woo_default_google_font_' . $count] = array('face' => $font);
             }
             $default_google_font = true;
         }
     }
     // Output styles
     if (isset($output) && $output != '') {
         // Load Google Fonts stylesheet in HEAD
         if (function_exists('woo_google_webfonts')) {
             woo_google_webfonts();
         }
         $output = "\n" . "<!-- Woo Custom Typography -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
         echo $output;
         // Check if default google font is set and load Google Fonts stylesheet in HEAD
     } elseif ($default_google_font) {
         // Enable Google Fonts stylesheet in HEAD
         if (function_exists('woo_google_webfonts')) {
             woo_google_webfonts();
         }
     }
 }
 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_tagline'] == "true" and $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, .archive_header { ' . 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 {
         $woo_options['woo_just_face'] = array('face' => 'Droid Sans');
         $output .= 'body, h1, h2, h3, h4, h5, h6, .widget h3, .post .title, .section .post .title, .archive_header, .entry, .entry p, .post-meta { ' . woo_generate_font_css($woo_options['woo_just_face']) . ' }' . "\n";
         $woo_options['woo_just_face'] = array('face' => 'Droid Serif');
         $output .= '.feedback blockquote p, #post-entries, #breadcrumbs { ' . woo_generate_font_css($woo_options['woo_just_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<!-- Woo Custom Typography -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
         echo $output;
     }
 }
 function woo_custom_typography()
 {
     // Get options
     global $woo_options;
     // Reset
     $output = '';
     // Add Text title and tagline if text title option is enabled
     if (isset($woo_options['woo_texttitle']) && $woo_options['woo_texttitle'] == 'true') {
         if ($woo_options['woo_font_site_title']) {
             $output .= 'body #wrapper #logo .site-title a { ' . woo_generate_font_css($woo_options['woo_font_site_title']) . ' }' . "\n";
         }
         if ($woo_options['woo_tagline'] == "true" and $woo_options['woo_font_tagline']) {
             $output .= '#logo .site-description { ' . woo_generate_font_css($woo_options['woo_font_tagline']) . '; }' . "\n";
         }
     }
     if (isset($woo_options['woo_typography']) && $woo_options['woo_typography'] == 'true') {
         if (isset($woo_options['woo_font_body']) && $woo_options['woo_font_body']) {
             $output .= 'body { ' . woo_generate_font_css($woo_options['woo_font_body'], '1.5') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_nav']) && $woo_options['woo_font_nav']) {
             $output .= '#navigation, #navigation .nav a { ' . woo_generate_font_css($woo_options['woo_font_nav'], '1.4') . ' !important; }' . "\n";
         }
         if (isset($woo_options['woo_font_post_title']) && $woo_options['woo_font_post_title']) {
             $output .= '.post .title { ' . woo_generate_font_css($woo_options['woo_font_post_title']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_meta']) && $woo_options['woo_font_post_meta']) {
             $output .= '.post-meta { ' . woo_generate_font_css($woo_options['woo_font_post_meta']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_entry']) && $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']) . ', arial, sans-serif; }' . "\n";
         }
         if (isset($woo_options['woo_font_widget_titles']) && $woo_options['woo_font_widget_titles']) {
             $output .= '#sidebar .widget h3 { ' . woo_generate_font_css($woo_options['woo_font_widget_titles']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_footer_widget_titles']) && $woo_options['woo_font_footer_widget_titles']) {
             $output .= '#footer-widgets .widget h3 { ' . woo_generate_font_css($woo_options['woo_font_footer_widget_titles']) . ' }' . "\n";
         }
         // Add default typography Google Font
     } else {
         // Set default font face
         // $woo_options['woo_default_face'] = array('face' => 'Arial, Helvetica, sans-serif');
         // Output default font face
         if (isset($woo_options['woo_default_face']) && !empty($woo_options['woo_default_face'])) {
             $output .= 'h1, h2, h3, h4, h5, h6, .post .title, .archive_header { ' . 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 = "<!-- Woo Custom Typography -->\n<style type=\"text/css\">\n" . $output . "</style>\n\n";
         echo $output;
     }
 }
Example #4
0
 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_about']) {
             $output .= '#about .bio p { ' . woo_generate_font_css($woo_options['woo_font_about'], '1.5') . ' }' . "\n";
         }
         if ($woo_options['woo_font_nav']) {
             $output .= '.nav a:link, .nav a:visited { ' . 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 .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']) . '}' . "\n";
         }
         if ($woo_options['woo_font_widget_titles']) {
             $output .= '.widget h3 { ' . woo_generate_font_css($woo_options['woo_font_widget_titles'], '2') . ' }' . "\n";
         }
     }
     // Output styles
     if (isset($output) && $output != "") {
         // Enable Google Fonts stylesheet in HEAD
         if (function_exists('woo_google_webfonts')) {
             woo_google_webfonts();
         }
         $output = "\n<!-- Woo Custom Typography -->\n<style type=\"text/css\">\n" . $output . "</style>\n";
         echo $output;
     }
 }
 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 .= '#tagline .site-description {' . woo_generate_font_css($woo_options['woo_font_tagline']) . '; line-height:28px; }' . "\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 .nav a { ' . woo_generate_font_css($woo_options['woo_font_nav']) . ' }' . "\n";
         }
         if ($woo_options['woo_font_post_title']) {
             $output .= '.post .title { ' . woo_generate_font_css($woo_options['woo_font_post_title']) . ' }' . "\n";
         }
         $output .= '#feat-title .title { font-family:' . stripslashes($woo_options['woo_font_post_title']['face']) . '; }' . "\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']) . '}' . "\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 {
         $woo_options['woo_just_face'] = array('face' => 'PT Sans');
         $output .= 'h1, h2, h3, h4, h5, h6, .widget h3, .post .title, .nav a, .section .post .title, .archive_header, .site-description, #tabs-home ul.wooTabs li a { ' . woo_generate_font_css($woo_options['woo_just_face']) . ' }' . "\n";
     }
     // Output styles
     if (isset($output) && $output != '') {
         // Enable Google Fonts stylesheet in HEAD
         if (function_exists('woo_google_webfonts')) {
             woo_google_webfonts();
         }
         $output = "<!-- Woo Custom Typography -->\n<style type=\"text/css\">\n" . $output . "</style>\n\n";
         echo $output;
     }
 }
 function woo_custom_typography()
 {
     // Get options
     global $woo_options;
     // Reset
     $output = '';
     // Add Text title and tagline if text title option is enabled
     if (isset($woo_options['woo_texttitle']) && $woo_options['woo_texttitle'] == 'true') {
         if ($woo_options['woo_font_site_title']) {
             $output .= '#header .site-title a {' . woo_generate_font_css($woo_options['woo_font_site_title']) . '}' . "\n";
         }
         if ($woo_options['woo_tagline'] == "true" and $woo_options['woo_font_tagline']) {
             $output .= '#header .site-description {' . woo_generate_font_css($woo_options['woo_font_tagline']) . '}' . "\n";
         }
     }
     if (isset($woo_options['woo_typography']) && $woo_options['woo_typography'] == 'true') {
         if (isset($woo_options['woo_font_body']) && $woo_options['woo_font_body']) {
             $output .= 'body { ' . woo_generate_font_css($woo_options['woo_font_body'], '1.5') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_nav']) && $woo_options['woo_font_nav']) {
             $output .= '#navigation, #navigation .nav a { ' . woo_generate_font_css($woo_options['woo_font_nav'], '1.4') . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_page_title']) && $woo_options['woo_font_page_title']) {
             $output .= '.page header h1 { ' . woo_generate_font_css($woo_options['woo_font_page_title']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_title']) && $woo_options['woo_font_post_title']) {
             $output .= '.post header h1, .post header h1 a:link, .post header h1 a:visited { ' . woo_generate_font_css($woo_options['woo_font_post_title']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_meta']) && $woo_options['woo_font_post_meta']) {
             $output .= '.post-meta { ' . woo_generate_font_css($woo_options['woo_font_post_meta']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_post_entry']) && $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']) . ', arial, sans-serif; }' . "\n";
         }
         if (isset($woo_options['woo_font_widget_titles']) && $woo_options['woo_font_widget_titles']) {
             $output .= '.widget h3 { ' . woo_generate_font_css($woo_options['woo_font_widget_titles']) . ' }' . "\n";
         }
         if (isset($woo_options['woo_font_widget_titles']) && $woo_options['woo_font_widget_titles']) {
             $output .= '.widget h3 { ' . woo_generate_font_css($woo_options['woo_font_widget_titles']) . ' }' . "\n";
         }
         // Component titles
         if (isset($woo_options['woo_font_component_titles']) && $woo_options['woo_font_component_titles']) {
             $output .= '.component h2.component-title { ' . woo_generate_font_css($woo_options['woo_font_component_titles']) . ' }' . "\n";
         }
         // Add default typography Google Font
     } else {
         // Set default font face
         //$woo_options['woo_default_face'] = array('face' => 'Droid Serif');
         // Output default font face
         //if ( isset( $woo_options['woo_default_face'] ) && !empty( $woo_options['woo_default_face'] ) )
         //	$output .= 'h1, h2, h3, h4, h5, h6, .post .title, .page .title, .archive_header { '.woo_generate_font_css($woo_options['woo_default_face']).' }' . "\n";
         $woo_options['woo_just_face2'] = array('face' => 'Schoolbell');
         $output .= '.shortcode-sticky { ' . woo_generate_font_css($woo_options['woo_just_face2']) . ' }' . "\n";
     }
     // Output styles
     if (isset($output) && $output != '') {
         // Enable Google Fonts stylesheet in HEAD
         if (function_exists('woo_google_webfonts')) {
             woo_google_webfonts();
         }
         $output = "<!-- Woo Custom Typography -->\n<style type=\"text/css\">\n" . $output . "</style>\n\n";
         echo $output;
     }
 }