wp_trash_comment [ WordPress Function ]
wp_trash_comment ( $comment_id )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: wp_untrash_comment, wp_trash_post_comments, wp_untrash_post_comments, wp_filter_comment, wp_spam_comment
Moves a comment to the Trash
If trash is disabled, comment is permanently deleted.
Source
<?php
function wp_trash_comment($comment_id) {
if ( !EMPTY_TRASH_DAYS )
return wp_delete_comment($comment_id, true);
if ( !$comment = get_comment($comment_id) )
return false;
do_action('trash_comment', $comment_id);
if ( wp_set_comment_status($comment_id, 'trash') ) {
add_comment_meta($comment_id, '_wp_trash_meta_status', $comment->comment_approved);
add_comment_meta($comment_id, '_wp_trash_meta_time', time() );
do_action('trashed_comment', $comment_id);
return true;
}
return false;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_trash_comment (WordPress Function) - WPSeek.com
WordPress lookup for wp_trash_comment, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - wp_trash_comment() WordPress function reference, arguments and ...
Blog. wp_trash_comment(). Moves a comment to the Trash. If trash is disabled, comment is permanently deleted. Signature. wp_trash_comment( $comment_id ) ...
queryposts.com - WordPress › Support » Automatic upgrade of 2.9 failed
Fatal error: Call to undefined function wp_trash_comment() in /home/mwda1161/ public_html/wordpress/wp-admin/admin-ajax.php on line 217. Any thoughts?
wordpress.org - <?php /** * Manages WordPress comments * * @package ...
@return mixed False on failure */ function wp_trash_comment($comment_id) { if ( !EMPTY_TRASH_DAYS ) return wp_delete_comment($comment_id, true); if ( !
core.svn.wordpress.org