Make WordPress Core


Ignore:
Timestamp:
02/16/2016 10:11:14 PM (8 years ago)
Author:
ocean90
Message:

Themes: Use the attachment ID as the key in get_uploaded_header_images().

Prevents missing header images when an image has the same name as another header image.

Props sirbrillig.
Fixes #31786.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r36502 r36539  
    12081208        $url = esc_url_raw( wp_get_attachment_url( $header->ID ) );
    12091209        $header_data = wp_get_attachment_metadata( $header->ID );
    1210         $header_index = basename($url);
     1210        $header_index = $header->ID;
    12111211
    12121212        $header_images[$header_index] = array();
Note: See TracChangeset for help on using the changeset viewer.