Skip to:
Content

bbPress.org

Ticket #3652: 3652.diff

File 3652.diff, 963 bytes (added by johnjamesjacoby, 7 months ago)

Add missing condition where voice count is 0 but last-activity exists

  • template.php

     
    33203320                        $last_updated_by = bbp_get_author_link( array( 'post_id' => $last_active, 'size' => $r['size'] ) );
    33213321                        $retstr          = sprintf( esc_html__( 'This topic has %1$s, %2$s, and was last updated %3$s by %4$s.', 'bbpress' ), $reply_count, $voice_count, $time_since, $last_updated_by );
    33223322
     3323                // Topic has no voices (likely created by an anonymous user)
     3324                } elseif ( empty( $vc_int ) && ! empty( $last_active ) ) {
     3325                        $last_updated_by = bbp_get_author_link( array( 'post_id' => $last_active, 'size' => $r['size'] ) );
     3326                        $retstr          = sprintf( esc_html__( 'This topic was last updated %3$s by %4$s.', 'bbpress' ), $reply_count, $voice_count, $time_since, $last_updated_by );
     3327
    33233328                // Topic has no replies
    33243329                } elseif ( ! empty( $vc_int ) && ! empty( $reply_count ) ) {
    33253330                        $retstr = sprintf( esc_html__( 'This topic has %1$s and %2$s.', 'bbpress' ), $voice_count, $reply_count );