Filtering the Admin Comments List to Show Only Comments from the Current User?

Either of these 3 will help you: //Before getting the comments, on the WP_Comment_Query object for each comment add_action(‘pre_get_comments’, ‘wpse56652_filt_comm’); //Applied on the comments SQL Query, you can modify the ‘Where’ part of the query add_filter(‘comments_clauses’, ‘wpse56652_filt_comm’); //After the comments are fetched, you can modify the comments array add_filter(‘the_comments’, ‘wpse56652_filt_comm’); function wpse56652_filt_comm($param) { //access the … Read more

Find out which moderator approved comment?

To record the moderator that approves the comment: function wpse_comment_moderator_log( $comment ) { global $current_user; get_currentuserinfo(); update_comment_meta( $comment->comment_ID, ‘approved_by’, $current_user->user_login ); } add_action( ‘comment_unapproved_to_approved’, ‘wpse_comment_moderator_log’ ); To display it after the comment text: function wpse_display_moderator( $comment_text, $comment ) { $approved_by = get_comment_meta( $comment->comment_ID, ‘approved_by’, true ); if ( $approved_by ) { $comment_text .= ” – … Read more

Is it possible to pull comments from facebook into your blog?

I just added this feature to the beta branch of Simple Facebook Connect. It pulls comments back from auto-published stories and integrates them into the normal comments stream. Features: Integrated with Auto-Publish. When you post, and it’s auto-published to your Page or Profile, SFC notices and saves the resulting story IDs for later polling. Fast. … Read more

how to reduce the number of spam comments

For my blog, I too run Akismet to catch any spam that is posted to my blog, but I also prevent spam from being posted in the first place using a few plugins: Cookies For Comments requires that people leaving comments have cookies and CSS stylesheets enabled. A stylesheet is added to your site that … Read more

setting comments off as default for pages and custom post types?

From what I understand, you want to set pages and some custom post types to have commenting ‘off’ by default, while posts will still use the default option (i.e. commenting ‘on’). If this is the case, the following function will do it. function default_comments_off( $data ) { if( $data[‘post_type’] == ‘page’ && $data[‘post_status’] == ‘auto-draft’ … Read more

How to rearrange fields in comment_form()

That’s pretty simple. You just have to take the textarea out of the default fields – filter ‘comment_form_defaults’ – and print it on the action ‘comment_form_top’: <?php # -*- coding: utf-8 -*- /** * Plugin Name: T5 Comment Textarea On Top * Description: Makes the textarea the first field of the comment form. * Version: … Read more

Why do I get comment spam even with Akismet and Captcha?

On the Akismet side, a few things to note. First, in wp-admin under ‘Plugins -> Akismet Configuration’ is everything green? You mentioned that you confirmed the API key is correct. Did you check the ‘Server Connectivity’ section? All of the IP addresses listed should be green. If not then you server isn’t able to make … Read more

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