Ticket #49446: 49446.diff
File 49446.diff, 923 bytes (added by , 5 years ago) |
---|
-
src/wp-admin/includes/template.php
2179 2179 * @return string Media states string. 2180 2180 */ 2181 2181 function _media_states( $post ) { 2182 static $header_images; 2183 2182 2184 $media_states = array(); 2183 2185 $stylesheet = get_option( 'stylesheet' ); 2184 2186 … … 2186 2188 $meta_header = get_post_meta( $post->ID, '_wp_attachment_is_custom_header', true ); 2187 2189 2188 2190 if ( is_random_header_image() ) { 2189 $header_images = wp_list_pluck( get_uploaded_header_images(), 'attachment_id' ); 2191 if ( ! isset( $header_images ) ) { 2192 $header_images = wp_list_pluck( get_uploaded_header_images(), 'attachment_id' ); 2193 } 2190 2194 2191 2195 if ( $meta_header == $stylesheet && in_array( $post->ID, $header_images ) ) { 2192 2196 $media_states[] = __( 'Header Image' );