Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#23075 closed defect (bug) (fixed)

Missed attribute 'title' in wp_get_attachment_image function

Reported by: skydriver's profile SkyDriver Owned by:
Milestone: WordPress.org Priority: normal
Severity: normal Version: 3.5
Component: Media Keywords:
Focuses: Cc:

Description

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
);

Change History (1)

#1 @SergeyBiryukov
12 years ago

  • Keywords reporter-feedback needs-codex removed
  • Milestone changed from Awaiting Review to WordPress.org
  • Resolution set to fixed
  • Status changed from new to closed

Removed in [22409]. I've removed it from Codex as well.

Note: See TracTickets for help on using tickets.