Clean up remnants from having negative Post_IDs, props markjaquith, fixes #18235

git-svn-id: https://develop.svn.wordpress.org/trunk@18823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-09-29 21:47:52 +00:00
parent 25df5fe335
commit b969d2ea80
4 changed files with 13 additions and 55 deletions

View File

@@ -3728,9 +3728,6 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
clean_post_cache($post_ID);
if ( isset($post_parent) && $post_parent < 0 )
add_post_meta($post_ID, '_wp_attachment_temp_parent', $post_parent, true);
if ( ! empty( $context ) )
add_post_meta( $post_ID, '_wp_attachment_context', $context, true );