WordPress.org

Make WordPress Core

Ticket #33070: post-template-2.diff

File post-template-2.diff, 496 bytes (added by atomicjack, 5 years ago)

Fixed an undefined variable of $post_id issue: removed the $post_id variable. Let me know if anyone feels this is needed here.

  • wp-includes/post-template.php

    diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php
    index d185e27..f54e707 100644
    a b function the_title($before = '', $after = '', $echo = true) { 
    5959* Takes no parameters!
    6060*/
    6161function the_thumbnail_url() {
    62  $thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id( $post_id ) );
     62 $thumbnail_url = wp_get_attachment_url( get_post_thumbnail_id() );
    6363    echo $thumbnail_url;
    6464}
    6565