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['forumax_solve_topic']) && $GLOBALS['forumax_solve_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 = wp_nonce_url( admin_url( 'admin.php?bbpc_approve_topic_id=' . $current_topic_id ), 'bbpc_approve_topic_' . $current_topic_id ); $approve_btn = sprintf( '', esc_url( $url ), esc_attr__( 'Approve this Topic', 'forumax' ) ); } $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', 'forumax' ) ?> '; } ?>

    get_the_ID(), 'type' => 'name', ) ) ); ?> [ '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 ) : ?>
      >
    • ', esc_url( $url ), esc_attr__( 'Approve This Reply', 'forumax' ) ); } $allowed_html = [ 'a' => [ 'href' => [], 'class' => [], ], 'span' => [ 'class' => [], 'title' => [], ], ]; echo wp_kses( $approve_btn, $allowed_html ); ?>