You are here

public static function OpenGraphMetaDrupalLayer::theme_selector_image in Open Graph meta tags 7

Same name and namespace in other branches
  1. 6 opengraph_meta.common.inc \OpenGraphMetaDrupalLayer::theme_selector_image()

Get rendered IMG tag for the OGMT node image selector.

1 call to OpenGraphMetaDrupalLayer::theme_selector_image()
opengraph_meta_form_alter in ./opengraph_meta.module
Implementation of hook_form_alter.

File

./opengraph_meta.common.inc, line 517

Class

OpenGraphMetaDrupalLayer
Drupal compatibility layer.

Code

public static function theme_selector_image($image) {
  $attributes = array(
    'class' => 'opengraph-thumb',
  );
  $abs_path = url(ltrim($image['url'], '/'));
  return theme('image', array(
    'path' => $abs_path,
    'alt' => $image['alt'],
    'height' => '60px',
    'attributes' => array_merge($attributes, array(
      'title' => $image['title'],
    )),
  ));
}