You are here

function dynamic_background_dynamic_background_css in Dynamic Background 6

Same name and namespace in other branches
  1. 7.2 dynamic_background.module \dynamic_background_dynamic_background_css()
  2. 7 dynamic_background.module \dynamic_background_dynamic_background_css()

Implementation of hook_dynamic_background_css().

File

./dynamic_background.module, line 169
This module enables administrators to upload images used as background on the site. The selected background image link is exposed as either $background in the page.tpl file or as /background.css.

Code

function dynamic_background_dynamic_background_css($vars) {
  $image = variable_get('dynamic_background_active', FALSE);
  $imagecache = variable_get('dynamic_background_imagecache', FALSE);
  if ($image) {
    return array(
      'image' => $image,
      'configuration' => variable_get('dynamic_background_css', array()),
      'imagecache' => $imagecache ? $imagecache['present'] : FALSE,
      'weight' => 200,
    );
  }
}