WordPress.org

Make WordPress Core

Ticket #33070: 33070.diff

File 33070.diff, 819 bytes (added by swissspidy, 4 years ago)
  • src/wp-includes/post-thumbnail-template.php

    diff --git src/wp-includes/post-thumbnail-template.php src/wp-includes/post-thumbnail-template.php
    index 7b8d1a2..bb7b2a8 100644
    function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { 
    5757}
    5858
    5959/**
     60 * Return the post thumbnail URL.
     61 *
     62 * @since 4.4.0
     63 *
     64 * @param int|null $post_id Optional. Post ID.
     65 *
     66 * @return bool|string
     67 */
     68function get_post_thumbnail_url( $post_id = null ) {
     69        return wp_get_attachment_url( get_post_thumbnail_id( $post_id ) );
     70}
     71
     72/**
     73 * Display the post thumbnail URL.
     74 *
     75 * @since 4.4.0
     76 */
     77function the_post_thumbnail_url() {
     78        echo get_post_thumbnail_url( null );
     79}
     80
     81/**
    6082 * Update cache for thumbnails in the current loop
    6183 *
    6284 * @since 3.2.0