API page: http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_at...
Describe the problem you have found:
I think that one should not have to look at the implementation of drupal_attributes() just to determine whether or not it is safe to do
$xhtml .= '<img' . drupal_attributes($attributes) . '/>';
or not. I.e., someone might assume that they need to instead do:
$xhtml .= '<img ' . drupal_attributes($attributes) . '/>';
.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | drupal_attributes_doc-1180100-5.patch | 469 bytes | barbi |
Comments
Comment #1
jhodgdonGood point. I think this should be added to the @return section of the doc. 8.x first, then backport to 7.x. Good project for a novice doc contributor!
Comment #2
jhodgdonComment #3
barbi commentedCan we just add the below phrase at the end of @return? The @return would become
A string ready for insertion in a tag (starts with a space).
Comment #4
jhodgdonYes, that seems like a perfect solution to me.
Comment #5
barbi commentedComment #6
jhodgdonGo barbi! 8.x/7.x please.
Comment #7
webchickCommitted and pushed to 8.x and 7.x. Thanks!