diff --git a/themes/wporg-5ftf/template-parts/5ftf_pledge-single.php b/themes/wporg-5ftf/template-parts/5ftf_pledge-single.php index fd222a0..e9a5dd0 100644 --- a/themes/wporg-5ftf/template-parts/5ftf_pledge-single.php +++ b/themes/wporg-5ftf/template-parts/5ftf_pledge-single.php @@ -2,8 +2,15 @@ namespace WordPressDotOrg\FiveForTheFuture\Theme; use WordPressDotOrg\FiveForTheFuture\Contributor; +use WordPressDotOrg\FiveForTheFuture\XProfile; use WP_Post; +$contribution_data = XProfile\get_aggregate_contributor_data_for_pledge( get_the_ID() ); + +$contributors = Contributor\get_contributor_user_objects( + Contributor\get_pledge_contributors( get_the_ID(), 'pending' ) // TODO set to 'publish' when finished testing +); + /** @var WP_Post $post */ ?> @@ -26,31 +33,63 @@ use WP_Post; {'5ftf_org-description'} ) ) ?> -

+ +

- +

+ %3$s hours per week.', 'wporg' ) ), + get_the_title(), + sprintf( + _n( '%d contributor', '%d contributors', $contribution_data['contributors'], 'wporg' ), + number_format_i18n( absint( $contribution_data['contributors'] ) ) + ), + number_format_i18n( absint( $contribution_data['hours'] ) ) + ); + ?> +

+

+ +

+ +

- + + + +

+