onetone_get_background

Get background ---------------------------------------------------------------------.

Description

onetone_get_background( $args ); 

Parameters (1)

0. $args
The args.

Usage

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

Defined (1)

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

/includes/theme-functions.php  
  1. function onetone_get_background($args) { 
  2. $background = ''; 
  3. if (is_array($args)) { 
  4. if (isset($args['image']) && $args['image']!="") { 
  5. $args['repeat'] = isset( $args['repeat'] )? esc_attr($args['repeat']) : ''; 
  6. $args['position'] = isset( $args['position'] )? esc_attr($args['position']) : ''; 
  7. $args['attachment'] = isset( $args['attachment'] )? esc_attr($args['attachment']) : ''; 
  8.  
  9. $background .= "background:url(".esc_url( $args['image'] ). ") ".$args['repeat']." ".$args['position']." ".$args['attachment'].";"; 
  10.  
  11. if(isset($args['color']) && $args['color'] !="") { 
  12. $background .= "background-color:".esc_attr($args['color']).";"; 
  13. return $background; 
  14.