have_posts() ) : $children->the_post(); $current_topic_id = get_the_ID(); $replies = new WP_Query( [ 'post_parent' => $current_topic_id, 'post_type' => bbp_get_reply_post_type(), 'post_status' => [ 'publish', 'draft', 'pending' ], ] ); $pending_replies = []; $no_reply = 0 == $replies->found_posts ? 'no-reply' : ''; $is_solved = isset($GLOBALS['bbp_solved_topic']) && $GLOBALS['bbp_solved_topic']->is_solved( $current_topic_id ) ? ' solved' : ' unsolved'; $is_open = bbp_is_topic_closed( $current_topic_id ) ? ' closed-topics' : ' open-topics'; $is_hidden = bbp_is_topic_spam( $current_topic_id ) || bbp_is_topic_pending( $current_topic_id ) ? ' hidden-topics' : ''; $approve_btn = ''; if ( bbp_is_topic_spam( $current_topic_id ) ) { $url = admin_url( 'admin.php' ) . '/Approve_Topic.php?bbpc_approve_topic_id=' . $current_topic_id; $approve_btn = sprintf( '', $url, __( 'Approve this topic', 'bbp-core' ) ); } $filter_class = $no_reply . $is_solved . $is_open . $is_hidden; ?>
  • data-id="">
    '; } elseif ( bbp_is_topic_spam( $current_topic_id ) || bbp_is_topic_pending( $current_topic_id ) ) { $hidden_status = bbp_is_topic_spam( $current_topic_id ) ? 'Spam' : 'Pending'; echo ''; } elseif ( bbp_is_topic_open( $current_topic_id ) ) { ?> <?php esc_attr_e( 'Open icon', 'bbp-core' ) ?> '; } ?>

    [ 'href' => [], 'class' => [], ], 'span' => [ 'class' => [], 'title' => [], ], ]; echo wp_kses( $approve_btn, $allowed_html ); while ( $replies->have_posts() ) : $replies->the_post(); $reply_id = get_the_ID(); if ( bbp_is_reply_pending( $reply_id ) ) { $pending_replies[] = $reply_id; } endwhile; wp_reset_postdata(); $pending_replies_count = count( $pending_replies ); $reply_count = $replies->found_posts - $pending_replies_count; ?>
    0 ) : ?>

      >
    • ', $url, __( 'Approve this topic', 'bbp-core' ) ); } $allowed_html = [ 'a' => [ 'href' => [], 'class' => [], ], 'span' => [ 'class' => [], 'title' => [], ], ]; echo wp_kses( $approve_btn, $allowed_html ); ?>