Skip to content

Commit

Permalink
Pledge details: Prevent count & label from wrapping for contributor d…
Browse files Browse the repository at this point in the history
…ata string.

Fixes #316
  • Loading branch information
ryelle committed Sep 30, 2024
1 parent fbe64d8 commit 32b4cdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions themes/wporg-5ftf-2024/inc/block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ function get_meta_binding_value( $args, $block ) {
case 'org-contribution-details':
$contribution_data = XProfile\get_aggregate_contributor_data_for_pledge( $block->context['postId'] );
return sprintf(
__( '%1$s sponsors %2$s for a total of <strong>%3$s hours</strong> per week across <strong>%4$d teams</strong>.', 'wporg-5ftf' ),
__( '%1$s sponsors %2$s for a total of <strong>%3$s&nbsp;hours</strong> per week across <strong>%4$d&nbsp;teams</strong>.', 'wporg-5ftf' ),
get_the_title( $block->context['postId'] ),
sprintf(
_n( '<strong>%d contributor</strong>', '<strong>%d contributors</strong>', $contribution_data['contributors'], 'wporg-5ftf' ),
_n( '<strong>%d&nbsp;contributor</strong>', '<strong>%d&nbsp;contributors</strong>', $contribution_data['contributors'], 'wporg-5ftf' ),
number_format_i18n( absint( $contribution_data['contributors'] ) )
),
number_format_i18n( absint( $contribution_data['hours'] ) ),
Expand Down

0 comments on commit 32b4cdb

Please sign in to comment.