Can I have Comments open to specific users only?

You can check for a user role. This should work when you put the code into the template above the call to comments.php: if ( current_user_can( ‘actor’ ) ) // or use ‘publish_posts’ add_filter( ‘comments_open’, ‘__return_true’ );

How to limit comment indentations to one level?

This can be done, there is even a possibility to control this via the backend, just go to: → Settings → Discussion And there under: → Other comment settings You have the point: → Enable threaded (nested) comments | X | levels deep

What do comments with […] mean?

Its most likely to be a TrackBack or pingback: In a nutshell, TrackBack was designed to provide a method of notification between websites: it is a method of person A saying to person B, “This is something you may be interested in.” To do that, person A sends a TrackBack ping to person B.

Remove the deleted user comment

+1 @toscho ‘s comment. This will break nested comment / conversation in comment. You should disable nested comments in the Settings. Try this code. Note that this is not tested add_action( ‘delete_user’, ‘my_delete_user’); function my_delete_user($user_id) { $user = get_user_by(‘id’, $user_id); // delete comment with that user email $comments = get_comments(‘author_email=”.$user->user_email); foreach($comments as $comment) : wp_delete_comment($comment->$comment_id, … Read more

Wp admin – Set default value to 999 in comments

You can use add_filter(‘edit_comments_per_page’, ‘return_999’); function return_999(){ return 999; } since the user options are filtered in the WP_List_Table::get_items_per_page() class method : /** * Get number of items to display on a single page * * @since 3.1.0 * @access protected * * @return int */ function get_items_per_page( $option, $default = 20 ) { $per_page … Read more

Get all child comments ids from parent comment id

I found this post because I was looking for a similar solution. As suggested by Captain47, get_comments with parent args, won’t work because it’s return only 1 level nested comments. To get unlimited nested you need to use hierarchical arg as: $args = array( ‘parent’ => $comment_ID, ‘hierarchical’ => true, ); $questions = get_comments($args); Reference: … Read more

How to allow duplicate comments AND without comment text

WordPress will not allow you, using its default comment process, to insert empty comments into the database. This is enforced by wp_handle_comment_submission() with the following unconditional code: if ( ” == $comment_content ) { return new WP_Error( ‘require_valid_comment’, __( ‘<strong>ERROR</strong>: please type a comment.’ ), 200 ); } If you insist on using comments, you … Read more