minileven_get_background

This function grabs the custom background image from the user's current theme so that Minileven can display it.

Description

minileven_get_background(); 

Usage

  1. if ( !function_exists( 'minileven_get_background' ) ) { 
  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_get_background(); 
  7.  

Defined (1)

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

/modules/minileven/theme/pub/minileven/functions.php  
  1. function minileven_get_background() { 
  2. $theme_slug = minileven_actual_current_theme(); 
  3. $mods = get_option( "theme_mods_$theme_slug" ); 
  4.  
  5. if ( ! empty( $mods ) ) { 
  6. return array( 
  7. 'color' => isset( $mods['background_color'] ) ? $mods['background_color'] : null,  
  8. 'image' => isset( $mods['background_image'] ) ? $mods['background_image'] : null,  
  9. 'repeat' => isset( $mods['background_repeat'] ) ? $mods['background_repeat'] : null,  
  10. 'position' => isset( $mods['background_position_x'] ) ? $mods['background_position_x'] : null,  
  11. 'attachment' => isset( $mods['attachment'] ) ? $mods['attachment'] : null,  
  12. ); 
  13. return false;