You are here

function resp_img_theme_registry_alter in Responsive images and styles 7

Implements hook_theme_registry_alter().

File

./resp_img.module, line 209

Code

function resp_img_theme_registry_alter(&$theme_registry) {
  foreach ($theme_registry as $key => $info) {
    if ($key == 'image') {
      if (isset($theme_registry[$key]['preprocess functions']) && is_array($theme_registry[$key]['preprocess functions'])) {
        array_unshift($theme_registry[$key]['preprocess functions'], 'resp_img_pp_image');
      }
      else {
        $theme_registry[$key]['preprocess functions'] = array(
          'resp_img_pp_image',
        );
      }
    }
    if ($key == 'field_slideshow') {
      if (isset($theme_registry[$key]['preprocess functions']) && is_array($theme_registry[$key]['preprocess functions'])) {
        array_unshift($theme_registry[$key]['preprocess functions'], 'resp_img_pp_field_slideshow');
      }
      else {
        $theme_registry[$key]['preprocess functions'] = array(
          'resp_img_pp_field_slideshow',
        );
      }
    }
  }
}