WordPress.org

Make WordPress Core

Ticket #22986: 22986.patch

File 22986.patch, 515 bytes (added by toscho, 16 months ago)

Use wp_get_attachment_image_src() for URL

  • theme.php

     
    10061006                return array(); 
    10071007 
    10081008        foreach ( (array) $headers as $header ) { 
    1009                 $url = esc_url_raw( $header->guid ); 
     1009                $src = wp_get_attachment_image_src( $header->ID, 'medium' ); 
     1010                $url = esc_url_raw( $src[0] ); 
    10101011                $header_data = wp_get_attachment_metadata( $header->ID ); 
    10111012                $header_index = basename($url); 
    10121013                $header_images[$header_index] = array();