Don't lose tags when saving a post with attachments. Props filosofo. fixes #4532

git-svn-id: https://develop.svn.wordpress.org/trunk@6121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-09-16 02:36:23 +00:00
parent 092bbfb049
commit aed5679ace
2 changed files with 6 additions and 2 deletions

View File

@@ -581,12 +581,14 @@ function wp_get_single_post($postid = 0, $mode = OBJECT) {
$post = get_post($postid, $mode);
// Set categories
// Set categories and tags
if($mode == OBJECT) {
$post->post_category = wp_get_post_categories($postid);
$post->tags_input = wp_get_post_tags($postid, array('fields' => 'names'));
}
else {
$post['post_category'] = wp_get_post_categories($postid);
$post['tags_input'] = wp_get_post_tags($postid, array('fields' => 'names'));
}
return $post;