[wp-trac] Re: [WordPress Trac] #8732: Empty Alt Text in
wp_get_attachment_image()
WordPress Trac
wp-trac at lists.automattic.com
Mon Jan 12 04:02:33 GMT 2009
#8732: Empty Alt Text in wp_get_attachment_image()
------------------------------+---------------------------------------------
Reporter: miqrogroove | Owner: Sam_a
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 2.7.1
Component: General | Version: 2.7
Severity: normal | Resolution:
Keywords: has-patch tested |
------------------------------+---------------------------------------------
Changes (by Sam_a):
* keywords: => has-patch tested
* owner: anonymous => Sam_a
* status: new => assigned
Comment:
Attached patch `wp_get_attachment_image_alt.diff` works in trunk (revision
10347) with no errors.
Patch uses attachment excerpt as alt text ("caption" field in WP 2.6 media
interface) if non-empty; otherwise it uses the attachment title. (There
was no "caption" field before 2.6, so attachments created then probably
have empty excerpts.)
I also added a new filter hook, `wp_get_attachment_image_alt`, so people
can choose some other alt text if they like.
--
Ticket URL: <http://trac.wordpress.org/ticket/8732#comment:3>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list