Changeset 38831
- Timestamp:
- 10/19/2016 11:02:58 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r38705 r38831 1753 1753 if ( current_theme_supports( 'custom-header') ) { 1754 1754 $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true ); 1755 if ( ! empty( $meta_header ) && $meta_header == $stylesheet ) 1756 $media_states[] = __( 'Header Image' ); 1755 1756 if ( is_random_header_image() ) { 1757 $header_images = wp_list_pluck( get_uploaded_header_images(), 'attachment_id' ); 1758 1759 if ( $meta_header == $stylesheet && in_array( $post->ID, $header_images ) ) { 1760 $media_states[] = __( 'Header Image' ); 1761 } 1762 } else { 1763 $header_image = get_header_image(); 1764 1765 // Display "Header Image" if the image was ever used as a header image 1766 if ( ! empty( $meta_header ) && $meta_header == $stylesheet && $header_image !== wp_get_attachment_url( $post->ID ) ) { 1767 $media_states[] = __( 'Header Image' ); 1768 } 1769 1770 // Display "Current Header Image" if the image is currently the header image 1771 if ( $header_image && $header_image == wp_get_attachment_url( $post->ID ) ) { 1772 $media_states[] = __( 'Current Header Image' ); 1773 } 1774 } 1757 1775 } 1758 1776 1759 1777 if ( current_theme_supports( 'custom-background') ) { 1760 1778 $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true ); 1761 if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) 1779 1780 if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) { 1762 1781 $media_states[] = __( 'Background Image' ); 1782 1783 $background_image = get_background_image(); 1784 if ( $background_image && $background_image == wp_get_attachment_url( $post->ID ) ) { 1785 $media_states[] = __( 'Current Background Image' ); 1786 } 1787 } 1763 1788 } 1764 1789
Note: See TracChangeset
for help on using the changeset viewer.