Ticket #30394: patch
File patch, 789 bytes (added by , 10 years ago) |
---|
-
wp-includes/post.php
229 229 */ 230 230 $file = apply_filters( 'update_attached_file', $file, $attachment_id ); 231 231 232 if ( $file = _wp_relative_upload_path( $file ) )233 return update_post_meta( $attachment_id, '_wp_attached_file', $file ); 234 else232 $file = _wp_relative_upload_path( $file ); 233 234 if ( ! $file ) { 235 235 return delete_post_meta( $attachment_id, '_wp_attached_file' ); 236 } 237 238 if ( defined( 'IMAGE_EDIT_OVERWRITE' ) && IMAGE_EDIT_OVERWRITE ) { 239 update_post_meta( $attachment_id, '_wp_attached_file', 'temp' . time() ); 240 } 241 242 return update_post_meta( $attachment_id, '_wp_attached_file', $file ); 236 243 } 237 244 238 245 /**