Changes between Initial Version and Version 1 of Ticket #30144, comment 3
- Timestamp:
- 11/13/2014 08:38:06 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30144, comment 3
initial v1 1 2 1 {{{ 3 2 the_post_thumbnail( 'post-thumbnail', array( 'alt'=>get_the_title() ) ); 4 3 }}} 5 4 6 The parameter {{{post-thumbnail}}} seems redundant as {{{post-thumbnail}}} is the default value for size parameter of function {{{the_post_thumbnail()}}}. And second defined parameter overrides the default value for image {{{alt}}} of {{{ 'alt' => trim( strip_tags( $wp_postmeta->_wp_attachment_image_alt ) ) }}}.5 The parameter {{{post-thumbnail}}} seems redundant as {{{post-thumbnail}}} is the default value for size parameter of function {{{the_post_thumbnail()}}}. And second defined parameter overrides the default value for image {{{alt}}} which either returns the attachment except and if empty the attachment title: 7 6 8 Is there a reason for returning the post title in place of the image alt value for the image {{{alt}}}? 7 In function {{{wp_get_attachment_image()}}} on line 710 if wp-includes/media.php 8 {{{ 9 if ( empty($default_attr['alt']) ) 10 $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption 11 if ( empty($default_attr['alt']) ) 12 $default_attr['alt'] = trim(strip_tags( $attachment->post_title )); // Finally, use the title 13 14 }}} 15 16 Is there a reason for returning the post title in place of the attachment except or title for that image {{{alt}}}?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)