"Trash" updates, props caesarsgrunt, see #4529

git-svn-id: http://svn.automattic.com/wordpress/trunk@11841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2009-08-19 08:35:24 +00:00
parent 4c13a5acf4
commit be026258fa
12 changed files with 54 additions and 24 deletions

View File

@@ -1264,7 +1264,7 @@ function wp_untrash_post($postid = 0) {
do_action('untrash_post', $postid);
$post['post_status'] = 'draft';
$post['post_status'] = ($post->post_type == 'attachment') ? 'inherit' : 'draft';
$trash_meta = get_option('wp_trash_meta');
if ( is_array($trash_meta) && isset($trash_meta['posts'][$postid]) ) {