Ticket #17291: 17291.patch
File 17291.patch, 2.9 KB (added by , 14 years ago) |
---|
-
wp-admin/includes/class-wp-media-list-table.php
215 215 216 216 case 'title': 217 217 ?> 218 <td <?php echo $attributes ?>><strong><?php if ( $this->is_trash ) echo $att_title; else { ?><a href="<?php echo get_edit_post_link( $post->ID, true ); ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); ?>"><?php echo $att_title; ?></a><?php } ?></strong>218 <td <?php echo $attributes ?>><strong><?php if ( $this->is_trash ) echo $att_title; else { ?><a href="<?php echo get_edit_post_link( $post->ID, true ); ?>" title="<?php echo esc_attr( sprintf( __( 'Edit “%s”' ), $att_title ) ); ?>"><?php echo $att_title; ?></a><?php }; _media_states( $post ); ?></strong> 219 219 <p> 220 220 <?php 221 221 if ( preg_match( '/^.*?\.(\w+)$/', get_attached_file( $post->ID ), $matches ) ) -
wp-admin/includes/template.php
1651 1651 echo ' - <span class="post-state-format">' . get_post_format_string( get_post_format( $post->ID ) ) . '</span>'; 1652 1652 } 1653 1653 1654 function _media_states( $post ) { 1655 $media_states = array(); 1656 $stylesheet = get_option('stylesheet'); 1657 1658 if ( current_theme_supports( 'custom-header') ) { 1659 $meta_header = get_post_meta($post->ID, '_wp_attachment_is_custom_header', true ); 1660 if ( ! empty( $meta_header ) && $meta_header == $stylesheet ) 1661 $media_states[] = __( 'Custom Header Image', ' Media list state'); 1662 } 1663 1664 if ( current_theme_supports( 'custom-background') ) { 1665 $meta_background = get_post_meta($post->ID, '_wp_attachment_is_custom_background', true ); 1666 if ( ! empty( $meta_background ) && $meta_background == $stylesheet ) 1667 $media_states[] = __( 'Custom Background Image', ' Media list state'); 1668 } 1669 1670 $post_states = apply_filters( 'display_media_states', $media_states ); 1671 1672 if ( ! empty( $media_states ) ) { 1673 $state_count = count( $media_states ); 1674 $i = 0; 1675 echo ' - '; 1676 foreach ( $media_states as $state ) { 1677 ++$i; 1678 ( $i == $state_count ) ? $sep = '' : $sep = ', '; 1679 echo "<span class='post-state'>$state$sep</span>"; 1680 } 1681 } 1682 } 1683 1654 1684 /** 1655 1685 * Convert a screen string to a screen object 1656 1686 * -
wp-admin/custom-background.php
345 345 346 346 // Add the meta-data 347 347 wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 348 update_post_meta( $id, '_wp_attachment_is_custom_background', get_option('stylesheet' ) ); 348 349 349 350 set_theme_mod('background_image', esc_url($url)); 350 351