LPH
Well-known member
I updated the Posts.php file with the new API. This works fine with WordPress 4.8.
There was a glitch at one point of duplicate comments; however, I wasn't able to trace down what was happening. The code, of course, needs lots of testing and I'm willing to put it out there for beta testing - and not live production. I'm very uneasy about not figuring out why there was duplication at one point. I can't recreate it but don't want someone to try this on their site and run into issues.
To get the beta, simply open a ticket and Gracie should be able to attach it. I want to keep this limited. I'll keep tinkering because there is another location of my using get_comments. I'm also debating if there is a better way to narrow down the query.
This is the basic query.
There was a glitch at one point of duplicate comments; however, I wasn't able to trace down what was happening. The code, of course, needs lots of testing and I'm willing to put it out there for beta testing - and not live production. I'm very uneasy about not figuring out why there was duplication at one point. I can't recreate it but don't want someone to try this on their site and run into issues.
To get the beta, simply open a ticket and Gracie should be able to attach it. I want to keep this limited. I'll keep tinkering because there is another location of my using get_comments. I'm also debating if there is a better way to narrow down the query.
This is the basic query.
PHP:
// Get WordPress Comments
$args = array(
'meta_key' => 'thread_id',
'meta_value' => $threadId,
);
$comments_query = new WP_Comment_Query;
$comments = $comments_query->query( $args );