[wp-trac] [WordPress Trac] #23075: Missed attribute 'title' in wp_get_attachment_image function

WordPress Trac noreply at wordpress.org
Sat Dec 29 13:41:27 UTC 2012


#23075: Missed attribute 'title' in wp_get_attachment_image function
-------------------------------------------+--------------------------
 Reporter:  SkyDriver                      |       Type:  defect (bug)
   Status:  new                            |   Priority:  normal
Milestone:  Awaiting Review                |  Component:  Media
  Version:  3.5                            |   Severity:  normal
 Keywords:  reporter-feedback needs-codex  |
-------------------------------------------+--------------------------
 In codex
 (http://codex.wordpress.org/Function_Reference/wp_get_attachment_image)
 {{{
 $default_attr = array(
         'src'   => $src,
         'class' => "attachment-$size",
         'alt'   => trim(strip_tags( get_post_meta($attachment_id,
 '_wp_attachment_image_alt', true) )),
         'title' => trim(strip_tags( $attachment->post_title )),
 );
 }}}

 In media.php (Line: 554, http://core.trac.wordpress.org/browser/tags/3.5
 /wp-includes/media.php#L0)
 {{{
 $default_attr = array(
         'src'   => $src,
         'class' => "attachment-$size",
         'alt'   => trim(strip_tags( get_post_meta($attachment_id,
 '_wp_attachment_image_alt', true) )), // Use Alt field first
 );
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23075>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list