skt_black_font_url

The SKT Black skt black font url function.

Description

skt_black_font_url(); 

Usage

  1. if ( !function_exists( 'skt_black_font_url' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = skt_black_font_url(); 
  7.  

Defined (1)

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

/functions.php  
  1. function skt_black_font_url() { 
  2. $font_url = ''; 
  3.  
  4. /** Translators: If there are any character that are 
  5. * not supported by Roboto, translate this to off, do not 
  6. * translate into your own language. 
  7. */ 
  8. $roboto = _x('on', 'Roboto font:on or off', 'skt-black'); 
  9.  
  10. /** Translators: If there are any character that are not 
  11. * supported by Open sans, trsnalate this to off, do not 
  12. * translate into your own language. 
  13. */ 
  14. $open_sans = _x('on', 'Open Sans:on or off', 'skt-black'); 
  15.  
  16. /** Translators: If there has any character that are not supported  
  17. * by Roboto Condensed, translate this to off, do not translate 
  18. * into your own language. 
  19. */ 
  20. $roboto_condensed = _x('on', 'Roboto Condensed:on or off', 'skt-black'); 
  21.  
  22. if('off' !== $roboto || 'off' !== $open_sans || 'off' !== $roboto_condensed) { 
  23. $font_family = array(); 
  24.  
  25. if('off' !== $roboto) { 
  26. $font_family[] = 'Roboto:400, 600, 700, 800, 900'; 
  27.  
  28. if('off' !== $open_sans) { 
  29. $font_family[] = 'Open Sans:300, 400, 600, 700'; 
  30.  
  31. if('off' !== $roboto_condensed) { 
  32. $font_family[] = 'Roboto Condensed:300, 400, 700, 800'; 
  33.  
  34. $query_args = array( 
  35. 'family' => urlencode(implode('|', $font_family)),  
  36. ); 
  37.  
  38. $font_url = add_query_arg($query_args, '//fonts.googleapis.com/css'); 
  39.  
  40. return $font_url;