You are here

function dynamic_background_css in Dynamic Background 7

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

Menu callback function used to generate an body style css with the selected background image. The callback is /background.css.

4 string references to 'dynamic_background_css'
dynamic_background_admin_settings in includes/settings.admin.inc
The dynamic background administration settings form.
dynamic_background_dynamic_background_css in ./dynamic_background.module
Implements hook_dynamic_background_css for the main module.
dynamic_background_menu in ./dynamic_background.module
Implements hook_menu().
dynamic_background_node_uninstall in modules/dynamic_background_node/dynamic_background_node.install
Implementation of hook_uninstall():

File

./dynamic_background.module, line 172
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_css() {

  // Load image configuration.
  $image_conf = dynamic_background_load_image_configuration($vars);

  // Generate the css and add it to the site.
  if (isset($image_conf)) {
    $css = dynamic_background_create_css($image_conf);
    if ($css) {
      echo $css;
    }
  }
}