Use wp_get_attachment_url()
instead of the GUID when getting header image URLs. Fixes #27222. Props Kopepasah.
git-svn-id: https://develop.svn.wordpress.org/trunk@27434 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
5a3f52fe39
commit
745f24b2d4
@ -1137,7 +1137,7 @@ function get_uploaded_header_images() {
|
|||||||
return array();
|
return array();
|
||||||
|
|
||||||
foreach ( (array) $headers as $header ) {
|
foreach ( (array) $headers as $header ) {
|
||||||
$url = esc_url_raw( $header->guid );
|
$url = esc_url_raw( wp_get_attachment_url( $header->ID ) );
|
||||||
$header_data = wp_get_attachment_metadata( $header->ID );
|
$header_data = wp_get_attachment_metadata( $header->ID );
|
||||||
$header_index = basename($url);
|
$header_index = basename($url);
|
||||||
$header_images[$header_index] = array();
|
$header_images[$header_index] = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user