Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/28/2014 05:12:35 PM (12 years ago)
Author:
boonebgorges
Message:

Rework the building of the recipient list on single messages.

  • Deprecate bp_get_the_thread_recipients().
  • Move the recipient count logic into the members/single/messages/single.php template.
  • Introduce bp_get_thread_recipients_count() and bp_get_thread_recipients_list() to separate the logic of the deprecated function.

Props joshshashaty, Clean-Cole.
Fixes #5327.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/members/single/messages/single.php

    r9089 r9095  
    1010            <span class="highlight">
    1111
    12                 <?php if ( !bp_get_the_thread_recipients() ) : ?>
     12                <?php if ( ! bp_get_thread_recipients_count() ) : ?>
    1313
    1414                    <?php _e( 'You are alone in this conversation.', 'buddypress' ); ?>
    1515
     16                <?php elseif ( 5 <= bp_get_thread_recipients_count() ) : ?>
     17
     18                    <?php printf( __( 'Conversation between %s recipients.', 'buddypress' ), number_format_i18n( bp_get_thread_recipients_count() ) ); ?>
     19
    1620                <?php else : ?>
    1721
    18                     <?php printf( __( 'Conversation between %s and you.', 'buddypress' ), bp_get_the_thread_recipients() ); ?>
     22                    <?php printf( __( 'Conversation between %s and you.', 'buddypress' ), bp_get_thread_recipients_list() ); ?>
    1923
    2024                <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.