Changeset 41937 for trunk/src/wp-admin/custom-header.php
- Timestamp:
- 10/19/2017 04:17:31 AM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/custom-header.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/custom-header.php
r41732 r41937 1188 1188 $metadata = wp_generate_attachment_metadata( $attachment_id, $cropped ); 1189 1189 1190 // If this is a crop, save the original attachment ID as metadata. 1191 if ( $parent_id ) { 1192 $metadata['attachment_parent'] = $parent_id; 1193 } 1194 1190 1195 /** 1191 1196 * Filters the header image attachment metadata. … … 1198 1203 */ 1199 1204 $metadata = apply_filters( 'wp_header_image_attachment_metadata', $metadata ); 1205 1200 1206 wp_update_attachment_metadata( $attachment_id, $metadata ); 1201 1202 if ( $parent_id ) {1203 $meta = add_post_meta( $attachment_id, '_wp_attachment_parent', $parent_id, true );1204 }1205 1207 1206 1208 return $attachment_id;
Note: See TracChangeset
for help on using the changeset viewer.