Hello again.
I’ve noticed that problem is in following part of code:
$args = array(
‘post_parent’ => $post_id,
‘post_type’ => ‘reply’,
‘numberposts’ => -1,
‘post_status’ => ‘pending’
);
$children = get_children( $args );
It looks like
get_children( $args );
ignores
‘post_status’ => ‘pending’.
ps.
I use PHP7 and apache 2.4
-
This reply was modified 8 years, 9 months ago by fobtron.
If I do steps like below:
1. I publish new reply in BBPress forum
2. Now, reply has status “pending”
3. In Admin Panel I can see this spost as “awaiting moderation”
4. If I open this reply and klick “Publish” and forum topic and see “(XX Reply awaiting moderation)”. Where XX – is number of moderated replies growed by 1.
For me it looks like all moderated replies (even already published) are displayed as awaiting for moderation in forum frontend.