diff --git src/wp-includes/post-template.php src/wp-includes/post-template.php
index be15252..a894c6b 100644
|
|
function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals |
1459 | 1459 | $link_text = ''; |
1460 | 1460 | } |
1461 | 1461 | |
1462 | | if ( trim( $link_text ) == '' ) |
1463 | | $link_text = $_post->post_title; |
| 1462 | if ( trim( $link_text ) == '' ) { |
| 1463 | $parts = pathinfo( get_attached_file( $_post->ID ) ); |
| 1464 | $link_text = esc_html( $parts['filename'] ); |
| 1465 | } |
1464 | 1466 | |
1465 | 1467 | /** |
1466 | 1468 | * Filters a retrieved attachment page link. |