Why are authors allowed to approve comments on their posts? How to revoke privilege?

The ability to set comment status is tied to the “edit_comment” capability, which is a meta-capability in WordPress. It maps to the “edit_post” capability, which is another meta-capability that varies depending on whether a post is published or not. In the end, if a post is published, then edit_comment ends up mapping to “edit_published_posts” for … Read more

default callback function in wp_list_comments

The wp_list_comments() function uses the HTML comment list class Walker_Comment by default: A single comment is then displayed with the Walker_Comment::comment() method (#source). If the comment format is HTML5 then the Walker_Comment::html5_comment() is used instead (#source). The pingbacks are rendered with the Walker_Comment::ping() method (#source).

Bots posting comments on pages

In order to add a new comment you really only need a couple of fields and a POST method. In a typical comment form, requests are submitted to http://www.example.com/wp-comments-post.php which parses the $_POST data and sends it off to wp_handle_comment_submission. A POST method varies from a GET request in that params are usually sent in … Read more

Sort comments by karma

Just incase if you have not checked out the plugin developers page but heres something that you could try if (function_exists(ckrating_get_comments)) { $post_id = $post->ID; $mycomments = ckrating_get_comments( “post_id=$post_id&status=approve& orderby=comment_karma&order=DESC”); } else $mycomments = null; wp_list_comments(array(), $mycomments); UPDATE I got it working placing in functions.php I got it working placing in functions.php `function comment_comparator($a, $b) … Read more

Add action on delete comments?

Look at the function wp_delete_comment(). It fires an action before the comment is deleted: /** * Fires immediately before a comment is deleted from the database. * * @since 1.2.0 * * @param int $comment_id The comment ID. */ do_action( ‘delete_comment’, $comment_id ); … and one after deletion: /** * Fires immediately after a comment … Read more

Opening all posts for comments

I wrote up this quick plugin that updates all posts of type post to comment_status open on activation, it should work for you. you can immediately deactivate and delete it once you activate it that once. <?php /* Plugin Name: update comment status */ function activate_update_comment_status() { global $wpdb; $wpdb->update( $wpdb->posts, array( ‘comment_status’ => ‘open’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)