WordPress.org

Make WordPress Core

Ticket #37343: 37343-03.patch

File 37343-03.patch, 530 bytes (added by Jonnyauk, 3 years ago)

Updated patch file in correct format (trunk dev version)

  • wp-includes/post-template.php

    diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
    index be15252..3d91d2b 100644
    a b function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals 
    14621462        if ( trim( $link_text ) == '' )
    14631463                $link_text = $_post->post_title;
    14641464
     1465        // If no title set, fallback to filename
     1466        if ( trim( $link_text ) == '' )
     1467                $link_text = basename($_post->guid);
     1468
    14651469        /**
    14661470         * Filters a retrieved attachment page link.
    14671471         *