Changeset 14850
- Timestamp:
- 05/24/2010 07:42:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r14684 r14850 1715 1715 } 1716 1716 1717 /** 1718 * Checks an attachment, if it's a header or background image. If true remove the theme modification. 1719 * 1720 * @since 3.0.0 1721 * @param int $id the attachment id 1722 */ 1723 function _delete_attachment_theme_mod( $id ) { 1724 $attachment_image = wp_get_attachment_url( $id ); 1725 $header_image = get_header_image(); 1726 $background_image = get_background_image(); 1727 1728 if ( $header_image && $header_image == $attachment_image ) 1729 remove_theme_mod( 'header_image' ); 1730 1731 if ( $background_image && $background_image == $attachment_image ) 1732 remove_theme_mod( 'background_image' ); 1733 } 1734 1735 add_action( 'delete_attachment', '_delete_attachment_theme_mod' ); 1736 1717 1737 ?>
Note: See TracChangeset
for help on using the changeset viewer.