Commit e5b7fb4b authored by alexpott's avatar alexpott

Issue #2010134 by alweb, pplantinga: Replace theme() with drupal_render() in...

Issue #2010134 by alweb, pplantinga: Replace theme() with drupal_render() in image module for theme_image_style().
parent 91c32e3d
......@@ -900,15 +900,25 @@ function theme_image_style($variables) {
image_style_transform_dimensions($variables['style_name'], $dimensions);
$variables['width'] = $dimensions['width'];
$variables['height'] = $dimensions['height'];
// Add in the image style name as an HTML class.
$variables['attributes']['class'][] = 'image-style-' . drupal_html_class($variables['style_name']);
// Determine the URL for the styled image.
$variables['uri'] = image_style_url($variables['style_name'], $variables['uri']);
return theme('image', $variables);
$image = array(
'#theme' => 'image',
'#width' => $dimensions['width'],
'#height' => $dimensions['height'],
'#attributes' => $variables['attributes'],
'#uri' => image_style_url($variables['style_name'], $variables['uri']),
);
if (isset($variables['alt'])) {
$image['#alt'] = $variables['alt'];
}
if (isset($variables['title'])) {
$image['#title'] = $variables['title'];
}
return drupal_render($image);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment