evolved_custom_background_callback

The Evolved evolved custom background callback function.

Description

evolved_custom_background_callback(); 

Usage

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

Defined (1)

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

/functions.php  
  1. function evolved_custom_background_callback() { 
  2.  
  3. /** Get the background image. */ 
  4. $image = get_background_image(); 
  5.  
  6. /** If there's an image, just call the normal WordPress callback. We won't do anything here. */ 
  7. if ( !empty( $image ) ) { 
  8. _custom_background_cb(); 
  9. return; 
  10.  
  11. /** Get the background color. */ 
  12. $color = get_background_color(); 
  13.  
  14. /** If no background color, return. */ 
  15. if ( empty( $color ) ) 
  16. return; 
  17.  
  18. /** Use 'background' instead of 'background-color'. */ 
  19. $style = "background: #{$color};"; 
  20.  
  21. ?> 
  22. <style type="text/css">body { <?php echo trim( $style ); ?> }</style> 
  23. <?php 
  24.