“Categories” for comments?

Comments are kind of “limited” in WordPress. You have three different types for them as get_comment_type() shows nicely and you can not extend that list. So, adding meta values to your comments is the easiest, and probably “most standard” way, to be able to distinguish different “types” of comments. Handling the comment in- and output … Read more

Post comment as different user than logged in

Yes, add an user-select field in the comment form: add_action(‘comment_form_after_fields’, function(){ // allow only users who can moderate comments to do this if(!current_user_can(‘moderate_comments’)) return; $user = wp_get_current_user(); wp_dropdown_users(array( ‘name’ => ‘alt_comment_user’, ‘selected’ => $user->ID, )); }); When the form gets processed, check if an user has been selected and change the comment data before it … Read more

Deep customization of the comment form?

This is hard. Output buffering could solve that: add_action( ‘comment_form_field_comment’, ‘ob_start’ ); add_action( ‘comment_form’, ‘wpse_83898_replace_submit’ ); function wpse_83898_replace_submit() { $html = ob_get_clean(); # do some magic echo $html; } Just an idea, not tested.

Comment Author Name In Reply Form

The WordPress function comment_form_title works only for users with Javascript disabled or pages without the comment-reply.js JavaScript loaded. WordPress may not fix this limitation at all Two tickets have been opened before and closed without fix. http://core.trac.wordpress.org/ticket/10084 http://core.trac.wordpress.org/ticket/8639 However I managed to get it work for the default twentyeleven theme by using some dirty fixes. … Read more

Set post comments open function

Have you tried go to Posts and checked the box next to the title and in the dropdown “Bulk Actions” choose Edit and then apply, Comments and in the dropdown “Allow”. And also have added the screen in the post edit area on the tab in the header called “Screen Options” and checked the field … Read more

Allowing more elements in comments via functions.php

Here is an example how to allow a commenter to insert HTML5 video into the comment. Both <video> and <source> elements has two allowed attributes. preprocess_comment filter is applied when saving the comment to the DB. See /wp-includes/kses.php for $allowedtags array structure. function myAllowHtmlComments($comment) { global $allowedtags; $allowedtags[‘video’] = array( ‘width’ => true, ‘height’ => … Read more

How can I control the comment counts filtering my CPT replies?

Here are three different methods to modify the trash count, to 999 as an example: Method #1 The views_edit-comments filter: add_filter( ‘views_edit-comments’, function( $views ) { $trash_count = 999; // <– Adjust this count // Override the ‘trash’ link: $views[‘trash’] = sprintf( “<a href=%s>%s <span class=”count”>(<span class=”trash-count”>%d</span>)</span></a>”, esc_url( admin_url( ‘edit-comments.php?comment_status=trash’) ), __( ‘Trash’ ), $trash_count … Read more

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