You are here

function styleguide_image in Style Guide 6

Same name and namespace in other branches
  1. 7 styleguide.module \styleguide_image()

Provide a default image for display.

Images should be in the assets directory. The current images are (c) Ken Rickard and used by permission.

Parameters

$image: The name of the image. Will be prefixed with 'image-'.

$type: The file type, (jpg, png, gif). Do not include a dot.

Return value

The Drupal path to the file.

1 call to styleguide_image()
styleguide_styleguide in ./styleguide.styleguide.inc
Implements hook_styleguide().

File

./styleguide.module, line 321

Code

function styleguide_image($image = 'vertical', $type = 'jpg') {
  $path = drupal_get_path('module', 'styleguide');
  $filepath = $path . '/assets/image-' . $image . '.' . $type;
  if (file_exists($filepath)) {
    return $filepath;
  }
}