onetone_get_typography

Get typography.

Description

onetone_get_typography( (array) $option = array(), (array) $name = array() ); 

Parameters (2)

0. $option — Optional. (array) => array()
The option.
1. $name — Optional. (array) => array()
The name.

Usage

  1. if ( !function_exists( 'onetone_get_typography' ) ) { 
  2. require_once '/includes/theme-functions.php'; 
  3.  
  4. // The option. 
  5. $option = array(); 
  6.  
  7. // The name. 
  8. $name = array(); 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = onetone_get_typography($option, $name); 
  12.  

Defined (1)

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

/includes/theme-functions.php  
  1. function onetone_get_typography( $option= array(), $name= array()) { 
  2.  
  3. $return = ""; 
  4. if( $option && is_array($option) ): 
  5. if(isset($name) && !empty($name)) { 
  6.  
  7. if( in_array('face', $name) && $option['face']) { 
  8. $return .= 'font-family:'.$option['face'].';' ; 
  9. if( in_array('size', $name) && isset($option['size'])) 
  10. $return .= 'font-size:'.$option['size'].';' ; 
  11. if( in_array('style', $name) && $option['style']) 
  12. $return .= 'font-weight:'.$option['style'].';' ; 
  13. if( in_array('color', $name) && $option['color']) 
  14. $return .= 'color:'.$option['color'].';' ; 
  15.  
  16. }else{ 
  17.  
  18. if($option['face']) { 
  19. $return .= 'font-family:'.$option['face'].';' ; 
  20. if(isset($option['size'])) 
  21. $return .= 'font-size:'.$option['size'].';' ; 
  22. if($option['style']) 
  23. $return .= 'font-weight:'.$option['style'].';' ; 
  24. if($option['color']) 
  25. $return .= 'color:'.$option['color'].';' ; 
  26.  
  27. endif; 
  28. return $return ; 
  29.  
  30. }