Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function ozh_delete( $cid ) {
- $result = wp_delete_comment( $cid, $force ); // true or false
- }
- function ozh_trash( $cid ) {
- $result = wp_trash_comment( $cid ); // true or false
- }
- function ozh_untrash( $cid ) {
- $result = wp_untrash_comment( $cid ); // true or false
- }
- function ozh_spam( $cid ) {
- $result = wp_spam_comment( $cid ); // true or false
- }
- function ozh_unspam( $cid ) {
- $result = wp_unspam_comment( $cid ); // true or false
- }
- function ozh_approve( $comment_id ) {
- wp_set_comment_status( $comment_id, 'approve', true ); // true or error message
- }
- function ozh_unapprove( $comment_id ) {
- wp_set_comment_status( $comment_id, 'hold', true ); // true or error message
- }
- function ozh_status( $cid ) {
- $result = wp_get_comment_status( $cid ); // approved, unapproved, spam, trash, or false on failure
- return $result;
- }
- function ozh_count( $post_id = 0 ) {
- $result = wp_count_comments( $post_id );
- return $result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement