minileven_fonts

The Jetpack by WordPress.com minileven fonts function.

Description

minileven_fonts(); 

Usage

  1. if ( !function_exists( 'minileven_fonts' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/minileven/theme/pub/minileven/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = minileven_fonts(); 
  7.  

Defined (1)

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

/modules/minileven/theme/pub/minileven/functions.php  
  1. function minileven_fonts() { 
  2.  
  3. /** translators: If there are characters in your language that are not supported 
  4. by Open Sans, translate this to 'off'. Do not translate into your own language. */ 
  5.  
  6. if ( 'off' !== _x( 'on', 'Open Sans font: on or off', jetpack ) ) { 
  7.  
  8. $opensans_subsets = 'latin, latin-ext'; 
  9.  
  10. /** translators: To add an additional Open Sans character subset specific to your language, translate 
  11. this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language. */ 
  12. $opensans_subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)', jetpack ); 
  13.  
  14. if ( 'cyrillic' == $opensans_subset ) 
  15. $opensans_subsets .= ', cyrillic, cyrillic-ext'; 
  16. elseif ( 'greek' == $opensans_subset ) 
  17. $opensans_subsets .= ', greek, greek-ext'; 
  18. elseif ( 'vietnamese' == $opensans_subset ) 
  19. $opensans_subsets .= ', vietnamese'; 
  20.  
  21. $opensans_query_args = array( 
  22. 'family' => 'Open+Sans:200, 200italic, 300, 300italic, 400, 400italic, 600, 600italic, 700, 700italic',  
  23. 'subset' => $opensans_subsets,  
  24. ); 
  25. wp_register_style( 'minileven-open-sans', add_query_arg( $opensans_query_args, "//fonts.googleapis.com/css" ), array(), null );