Changeset 33278
- Timestamp:
- 07/15/2015 04:27:17 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r33240 r33278 1932 1932 * 1933 1933 * If true it removes the theme modification which would be pointing at the deleted 1934 * attachment 1934 * attachment. 1935 1935 * 1936 1936 * @access private 1937 1937 * @since 3.0.0 1938 * @param int $id the attachment id 1938 * @since 4.3.0 Also removes `header_image_data`. 1939 * 1940 * @param int $id The attachment id. 1939 1941 */ 1940 1942 function _delete_attachment_theme_mod( $id ) { 1941 1943 $attachment_image = wp_get_attachment_url( $id ); 1942 $header_image = get_header_image();1944 $header_image = get_header_image(); 1943 1945 $background_image = get_background_image(); 1944 1946 1945 if ( $header_image && $header_image == $attachment_image ) 1947 if ( $header_image && $header_image == $attachment_image ) { 1946 1948 remove_theme_mod( 'header_image' ); 1947 1948 if ( $background_image && $background_image == $attachment_image ) 1949 remove_theme_mod( 'header_image_data' ); 1950 } 1951 1952 if ( $background_image && $background_image == $attachment_image ) { 1949 1953 remove_theme_mod( 'background_image' ); 1954 } 1950 1955 } 1951 1956
Note: See TracChangeset
for help on using the changeset viewer.