Move the storage of the metadata for trashed comments into the comment meta table rather than storing it in an option. See #4529.

git-svn-id: https://develop.svn.wordpress.org/trunk@11945 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood
2009-09-17 20:51:12 +00:00
parent 5fa5b6d05b
commit 8f93bd78f8
3 changed files with 16 additions and 37 deletions
+4 -7
View File
@@ -2193,13 +2193,10 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
if ( ('reply' == $action || 'quickedit' == $action) && ! $from_ajax )
$action .= ' hide-if-no-js';
elseif ($action == 'untrash' && $the_comment_status == 'trash') {
$trash_meta = get_option('wp_trash_meta');
if (is_array($trash_meta) && isset($trash_meta['comments'][$comment_id]['status'])) {
if ($trash_meta['comments'][$comment_id]['status'] == '1')
$action .= ' approve';
else
$action .= ' unapprove';
}
if ('1' == get_comment_meta($comment_id, '_wp_trash_meta_status', true))
$action .= ' approve';
else
$action .= ' unapprove';
}
echo "<span class='$action'>$sep$link</span>";