mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@36539 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1207,7 +1207,7 @@ function get_uploaded_header_images() {
|
||||
foreach ( (array) $headers as $header ) {
|
||||
$url = esc_url_raw( wp_get_attachment_url( $header->ID ) );
|
||||
$header_data = wp_get_attachment_metadata( $header->ID );
|
||||
$header_index = basename($url);
|
||||
$header_index = $header->ID;
|
||||
|
||||
$header_images[$header_index] = array();
|
||||
$header_images[$header_index]['attachment_id'] = $header->ID;
|
||||
|
||||
Reference in New Issue
Block a user