diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-04-30 12:53:47 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-04-30 12:53:47 +0000 |
commit | 5f98fb812bce1fcdf9b14bda17ce70fe0e0a3cc4 (patch) | |
tree | 068bb51b16ccb32564c4800bec0140f61d2e15e8 /modules | |
parent | 7d83f7c89341d53d0ebf8e1cea69513b850fe1ec (diff) | |
download | brdo-5f98fb812bce1fcdf9b14bda17ce70fe0e0a3cc4.tar.gz brdo-5f98fb812bce1fcdf9b14bda17ce70fe0e0a3cc4.tar.bz2 |
- Patch #555830 by sun, effulgentsia, mgifford, TheRec, aspilicious: clean up theme_image() to use drupal_attributes() for all attributes and revisit defaults for 'alt' and 'title'.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/image/image.field.inc | 5 | ||||
-rw-r--r-- | modules/image/image.module | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/modules/image/image.field.inc b/modules/image/image.field.inc index 47a91c01d..f41df500f 100644 --- a/modules/image/image.field.inc +++ b/modules/image/image.field.inc @@ -511,8 +511,11 @@ function theme_image_formatter($variables) { $image = array( 'path' => $item['uri'], 'alt' => $item['alt'], - 'title' => $item['title'], ); + // Do not output an empty 'title' attribute. + if (drupal_strlen($item['title']) > 0) { + $image['title'] = $item['title']; + } if ($variables['image_style']) { $image['style_name'] = $variables['image_style']; diff --git a/modules/image/image.module b/modules/image/image.module index de99369f7..1793447ab 100644 --- a/modules/image/image.module +++ b/modules/image/image.module @@ -178,7 +178,7 @@ function image_theme() { 'style_name' => NULL, 'path' => NULL, 'alt' => '', - 'title' => '', + 'title' => NULL, 'attributes' => array(), 'getsize' => TRUE, ), |