1

You mean, something like this? add_filter( 'comment_reply_link_args', 'change_author_title', 10, 2 ); function change_author_title( $args, $comment ) { $args['reply_to_text'] = 'Reply to ' . get_comment_author( $comment ); return $args; } Explanation: I changed the function declaration so that it accepts the second parameter ($comment) which is the ...


1

You can manually adjust this number using the following method. function adjust_wp_comments_count( $original_counts ) { $counts = new \stdClass(); $counts->moderated = 99; return $counts; } add_filter( 'wp_count_comments', 'adjust_wp_comments_count', 100, 1 ); The line: $counts->moderated = 99 is what you will need to adjust if you want to ...


1

Update In response to the new code in the updated question, you could actually use $wpdb->get_col() with a single SQL command via a JOIN clause, like so: $query = "SELECT c.comment_ID FROM $wpdb->comments c JOIN $wpdb->posts p ON p.ID = c.comment_post_ID WHERE c.user_id = $user_ID OR p.post_author = $user_ID"; $comment_ids = $wpdb-...


1

I'm a little unclear as to exactly the final data you're looking for. You said "array form", but that's not specific enough. So based on your code snippet, this code will provide you an array of all unique commenter user IDs. The code is essentially the same as yours, but I've combined a few parts together as they don't need to be their own ...


Only top voted, non community-wiki answers of a minimum length are eligible