Changeset 17793
- Timestamp:
- 05/04/2011 06:28:31 PM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/custom-background.php
r17771 r17793 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)); -
trunk/wp-admin/includes/class-wp-media-list-table.php
r17771 r17793 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 -
trunk/wp-admin/includes/template.php
r17656 r17793 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[] = __( 'Header Image' ); 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[] = __( 'Background Image' ); 1668 } 1669 1670 $media_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
Note: See TracChangeset
for help on using the changeset viewer.