Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.231
diff -u -F^function -r1.231 theme.inc
--- includes/theme.inc 30 Apr 2005 17:47:57 -0000 1.231
+++ includes/theme.inc 5 May 2005 14:32:02 -0000
@@ -449,15 +449,16 @@ function theme_links($links, $delimiter
* @param $title
* The title text is displayed when the image is hovered in some popular browsers.
* @param $attr
- * Attributes placed in the img tag.
+ * Associative array of attributes to be placed in the img tag.
* @param $getsize
* If set to true, the image's dimension are fetched and added as width/height attributes.
* @return
* A string containing the image tag.
*/
-function theme_image($path, $alt = '', $title = '', $attr = '', $getsize = true) {
- if (!$getsize || (file_exists($path) && (list($width, $height, $type, $attr) = @getimagesize($path)))) {
- return "";
+function theme_image($path, $alt = '', $title = '', $attr = NULL, $getsize = true) {
+ if (!$getsize || (file_exists($path) && (list($width, $height, $type, $imgattr) = @getimagesize($path)))) {
+ $attr = drupal_attributes($attr);
+ return "";
}
}