diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 4aeb8053c3..6ca3567f42 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -279,12 +279,13 @@ class Custom_Image_Header { $header_thumbnail = $header['thumbnail_url']; $header_url = $header['url']; $header_desc = empty( $header['description'] ) ? '' : $header['description']; + $header_alt_text = empty( $header['alt_text'] ) ? $header_desc : $header['alt_text']; echo '
'; echo ''; + echo '' . esc_attr( $header_alt_text ) .''; echo '
'; } echo '
'; diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 65c7d3001f..e142795709 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -1209,10 +1209,13 @@ function get_uploaded_header_images() { $url = esc_url_raw( wp_get_attachment_url( $header->ID ) ); $header_data = wp_get_attachment_metadata( $header->ID ); $header_index = basename($url); + $header_images[$header_index] = array(); - $header_images[$header_index]['attachment_id'] = $header->ID; + $header_images[$header_index]['attachment_id'] = $header->ID; $header_images[$header_index]['url'] = $url; - $header_images[$header_index]['thumbnail_url'] = $url; + $header_images[$header_index]['thumbnail_url'] = $url; + $header_images[$header_index]['alt_text'] = get_post_meta( $header->ID, '_wp_attachment_image_alt', true ); + if ( isset( $header_data['width'] ) ) $header_images[$header_index]['width'] = $header_data['width']; if ( isset( $header_data['height'] ) ) diff --git a/wp-includes/version.php b/wp-includes/version.php index 4a706837e9..49068a0087 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32997'; +$wp_version = '4.3-alpha-32998'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.