Changeset 14145
- Timestamp:
- 04/18/2010 08:52:18 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r14139 r14145 610 610 'src' => $src, 611 611 'class' => "attachment-$size", 612 'alt' => trim(strip_tags( $attachment->post_excerpt )),612 'alt' => trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) )), // Use Alt field first 613 613 'title' => trim(strip_tags( $attachment->post_title )), 614 614 ); 615 if ( empty($default_attr['alt']) ) 616 $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption 617 if ( empty($default_attr['alt']) ) 618 $default_attr['alt'] = trim(strip_tags( $attachment->post_title )); // Finally, use the title 619 615 620 $attr = wp_parse_args($attr, $default_attr); 616 621 $attr = apply_filters( 'wp_get_attachment_image_attributes', $attr, $attachment );
Note: See TracChangeset
for help on using the changeset viewer.