advantage_scheme_css

The Advantage advantage scheme css function.

Description

advantage_scheme_css( $input ); 

Parameters (1)

0. $input
The input.

Usage

  1. if ( !function_exists( 'advantage_scheme_css' ) ) { 
  2. require_once '/inc/theme-options.php'; 
  3.  
  4. // The input. 
  5. $input = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = advantage_scheme_css($input); 
  9.  

Defined (1)

The function is defined in the following location(s).

/inc/theme-options.php  
  1. function advantage_scheme_css($input) { 
  2. $advantage_fonts = advantage_fonts_array(); 
  3. $css = ''; 
  4. if ( 1080 != $input['gridwidth'] ) { 
  5. $css .= '.row, .contain-to-grid .top-bar {max-width: ' . $input['gridwidth'] . 'px; }' . "\n";  
  6. if ( 1 == $input['sidebarresp'] && 3 != $input['sidebarpos'] ) { 
  7. if ( ( $input['content'] + $input['sidebar1'] + $input['sidebar2']) <= 12 ) { 
  8. $pct = 8.547008547 * ( $input['sidebar1'] + $input['sidebar2'] ) - 2.764102564; 
  9. $css .= '@media only screen and (min-width: 768px) '; 
  10. $css .= 'and (max-width: ' . $input['respbp'] . 'px) {' . "\n"; 
  11. $css .= '#sidebar_one, #sidebar_two { width: ' . $pct; 
  12. $css .= '%; float: left; }}' . "\n"; 
  13. if ( 1 == $input['sidebarresp'] ) { 
  14. $pct = 48.71794872; 
  15. $css .= '@media only screen and (min-width: 481px) '; 
  16. $css .= 'and (max-width: 767px) {' . "\n"; 
  17. $css .= '#sidebar_one, #sidebar_two { width: ' . $pct; 
  18. $css .= '%; float: left; } #sidebar_two { margin-left: 2.564102564%; } }' . "\n"; 
  19. if ( $input['bodyfont'] > 0 ) 
  20. $css .= 'body {font-family:' . $advantage_fonts[ $input['bodyfont'] ]['family'] . ';}' . "\n"; 
  21. if ( $input['headingfont'] > 0 ) 
  22. $css .= 'h1, h2, h3, h4, h5, h6 {font-family:' . $advantage_fonts[$input['headingfont']]['family'] . ';}' . "\n"; 
  23. if ( $input['entrytitlefont'] > 0 ) 
  24. $css .= '.entry-title {font-family:' . $advantage_fonts[$input['entrytitlefont']]['family'] . ';}' . "\n"; 
  25. if ( $input['sitetitlefont'] > 0 ) 
  26. $css .= '#site-title {font-family:' . $advantage_fonts[$input['sitetitlefont']]['family'] . ';}' . "\n"; 
  27. if ( $input['sitedescfont'] > 0 ) 
  28. $css .= '#site-description {font-family:' . $advantage_fonts[$input['sitedescfont']]['family'] . ';}' . "\n"; 
  29. if ( $input['widgettitlefont'] > 0 ) 
  30. $css .= '.widget-title {font-family:' . $advantage_fonts[$input['widgettitlefont']]['family'] . ';}' . "\n"; 
  31. if ( $input['sidebarfont'] > 0 ) 
  32. $css .= '.blog-widgets {font-family:' . $advantage_fonts[$input['sidebarfont']]['family'] . ';}' . "\n"; 
  33. if ( $input['footerfont'] > 0 ) 
  34. $css .= '#footer {font-family:' . $advantage_fonts[$input['footerfont']]['family'] . ';}' . "\n"; 
  35. if ( $input['mainmenufont'] > 0 ) 
  36. $css .= '#topbar {font-family:' . $advantage_fonts[$input['mainmenufont']]['family'] . ';}' . "\n"; 
  37. //Background 
  38. if ( ! empty( $input['headerbg'] ) ) 
  39. $css .= '.custom-background .site-header, .site-header {background:' . $input['headerbg'] . ';}' . "\n"; 
  40. if ( ! empty( $input['titlebarbg'] ) ) 
  41. $css .= '.custom-background .titlebar, .titlebar {background:' . $input['titlebarbg'] . ';}' . "\n"; 
  42. if ( ! empty( $input['contentbg'] ) ) 
  43. $css .= '.custom-background .content-area, .content-area {background:' . $input['contentbg'] . ';}' . "\n"; 
  44. if ( ! empty( $input['footerbg'] ) ) 
  45. $css .= '.custom-background #footer, #footer {background:' . $input['footerbg'] . ';}' . "\n"; 
  46. return apply_filters( 'advantage_scheme_css', $css );