Skip to:
Content

bbPress.org

Ticket #2997: 2997.2.patch

File 2997.2.patch, 1.8 KB (added by dilip2615, 3 months ago)

Attached a patch for #2997. It updates the reply column header on the user’s replies created view so it shows "Replies" consistently (instead of switching to "Posts" depending on threaded settings).

  • src/templates/default/bbpress/loop-replies.php

    diff --git a/src/templates/default/bbpress/loop-replies.php b/src/templates/default/bbpress/loop-replies.php
    index ba59bb1..61f3273 100644
    a b do_action( 'bbp_template_before_replies_loop' ); ?> 
    1616
    1717        <li class="bbp-header">
    1818                <div class="bbp-reply-author"><?php esc_html_e( 'Author',  'bbpress' ); ?></div><!-- .bbp-reply-author -->
    19                 <div class="bbp-reply-content"><?php bbp_show_lead_topic()
    20                         ? esc_html_e( 'Replies', 'bbpress' )
    21                         : esc_html_e( 'Posts',   'bbpress' );
    22                 ?></div><!-- .bbp-reply-content -->
     19                <div class="bbp-reply-content">
     20                        <?php
     21                        // On a user's replies view, always label the column as replies.
     22                        if ( bbp_is_single_user_replies() ) {
     23                                esc_html_e( 'Replies', 'bbpress' );
     24                        } else {
     25                                bbp_show_lead_topic()
     26                                        ? esc_html_e( 'Replies', 'bbpress' )
     27                                        : esc_html_e( 'Posts',   'bbpress' );
     28                        }
     29                        ?>
     30                </div><!-- .bbp-reply-content -->
    2331        </li><!-- .bbp-header -->
    2432
    2533        <li class="bbp-body">
    do_action( 'bbp_template_before_replies_loop' ); ?> 
    4250
    4351        <li class="bbp-footer">
    4452                <div class="bbp-reply-author"><?php esc_html_e( 'Author',  'bbpress' ); ?></div>
    45                 <div class="bbp-reply-content"><?php bbp_show_lead_topic()
    46                         ? esc_html_e( 'Replies', 'bbpress' )
    47                         : esc_html_e( 'Posts',   'bbpress' );
    48                 ?></div><!-- .bbp-reply-content -->
     53                <div class="bbp-reply-content">
     54                        <?php
     55                        // On a user's replies view, always label the column as replies.
     56                        if ( bbp_is_single_user_replies() ) {
     57                                esc_html_e( 'Replies', 'bbpress' );
     58                        } else {
     59                                bbp_show_lead_topic()
     60                                        ? esc_html_e( 'Replies', 'bbpress' )
     61                                        : esc_html_e( 'Posts',   'bbpress' );
     62                        }
     63                        ?>
     64                </div><!-- .bbp-reply-content -->
    4965        </li><!-- .bbp-footer -->
    5066</ul><!-- #topic-<?php bbp_topic_id(); ?>-replies -->
    5167