Mark import attachments as private. Schedule job to delete old import attachments. Introduce attachment context.

git-svn-id: https://develop.svn.wordpress.org/trunk@17999 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2011-05-22 23:25:28 +00:00
parent 722cbee7b6
commit da02537bb0
6 changed files with 38 additions and 13 deletions
+4 -2
View File
@@ -644,7 +644,8 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
'post_title' => $filename,
'post_content' => $url,
'post_mime_type' => $type,
'guid' => $url);
'guid' => $url,
'context' => 'custom-header');
// Save the data
$id = wp_insert_attachment($object, $file);
@@ -737,7 +738,8 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
'post_title' => basename($cropped),
'post_content' => $url,
'post_mime_type' => 'image/jpeg',
'guid' => $url
'guid' => $url,
'context' => 'custom-header'
);
// Update the attachment