You are here

function _lazyloader_icon_path in Image Lazyloader 7.2

Same name and namespace in other branches
  1. 7 lazyloader.module \_lazyloader_icon_path()

Helper function to get the loading icon.

1 call to _lazyloader_icon_path()
theme_lazyloader_image in ./lazyloader.module
Returns HTML for an image.

File

./lazyloader.module, line 281
Lazyloader Module

Code

function _lazyloader_icon_path() {
  $icon = variable_get('lazyloader_icon', LAZYLOADER_ICON);
  $custom_icon_path = variable_get('lazyloader_custom_icon_path', LAZYLOADER_CUSTOM_ICON_PATH);
  if (!empty($icon)) {
    $base = base_path();
    if ($icon == 9) {
      return "{$base}{$custom_icon_path}";
    }
    else {
      $path = drupal_get_path('module', 'lazyloader');
      return "{$base}{$path}/loader/loader-{$icon}.gif";
    }
  }
  return '';
}