You are here

function styleguide_image in Style Guide 7

Same name and namespace in other branches
  1. 6 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.

2 calls to styleguide_image()
image_styleguide in modules/image.inc
Implements hook_styleguide().
styleguide_styleguide in ./styleguide.styleguide.inc
Implements hook_styleguide().

File

./styleguide.module, line 383

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;
  }
}