Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
timiwahalahti committed Sep 20, 2023
1 parent 2f52e88 commit 2b19ae8
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,30 @@ public function form_prefill_select( $data ) {
public function form( $data ) {
$date_format = get_option( 'date_format' );

$sponsor_id = absint( $data['sponsor_id'] );
$sponsor_amount = get_post_meta( $sponsor_id, '_wcb_sponsor_amount', true );
$sponsor_currency = get_post_meta( $sponsor_id, '_wcb_sponsor_currency', true );
$sponsor_id = absint( $data['sponsor_id'] );
$sponsor_amount = get_post_meta( $sponsor_id, '_wcb_sponsor_amount', true );
$sponsor_currency = get_post_meta( $sponsor_id, '_wcb_sponsor_currency', true );

$wordcamp = get_wordcamp_post();
$start_date = ! empty( $wordcamp->meta['Start Date (YYYY-mm-dd)'][0] ) ? date( $date_format, $wordcamp->meta['Start Date (YYYY-mm-dd)'][0] ) : '';
$end_date = ! empty( $wordcamp->meta['End Date (YYYY-mm-dd)'][0] ) ? date( $date_format, $wordcamp->meta['End Date (YYYY-mm-dd)'][0] ) : $start_date;
$wordcamp = get_wordcamp_post();
$start_date = ! empty( $wordcamp->meta['Start Date (YYYY-mm-dd)'][0] ) ? date( $date_format, $wordcamp->meta['Start Date (YYYY-mm-dd)'][0] ) : '';
$end_date = ! empty( $wordcamp->meta['End Date (YYYY-mm-dd)'][0] ) ? date( $date_format, $wordcamp->meta['End Date (YYYY-mm-dd)'][0] ) : $start_date;

$number_formatter = new NumberFormatter( get_locale(), NumberFormatter::SPELLOUT );
$number_formatter = new NumberFormatter( get_locale(), NumberFormatter::SPELLOUT );
$sponsorship_amount = $number_formatter->format( $sponsor_amount ) . " {$sponsor_currency}";

$number_formatter = new NumberFormatter( get_locale(), NumberFormatter::CURRENCY );
$number_formatter = new NumberFormatter( get_locale(), NumberFormatter::CURRENCY );
$sponsorship_amount_num = $number_formatter->formatCurrency( $sponsor_amount, $sponsor_currency );

$data = wp_parse_args( $data, array(
'sponsor_name' => get_the_title( $sponsor_id ),
'sponsor_rep_name' => get_post_meta( $sponsor_id, '_wcpt_sponsor_first_name', true ) . ' ' . get_post_meta( $sponsor_id, '_wcpt_sponsor_last_name', true ),
'sponsor_rep_title' => '',
'agreement_date' => wp_date( $date_format ),
'wordcamp_location' => $wordcamp->meta['Location'][0],
'wordcamp_date' => ( $start_date !== $end_date ) ? "{$start_date} - {$end_date}" : $start_date,
'sponsorship_amount' => $sponsorship_amount,
'sponsorship_amount_num' => $sponsorship_amount_num,
'sponsorship_benefits' => '',
'sponsor_name' => get_the_title( $sponsor_id ),
'sponsor_rep_name' => get_post_meta( $sponsor_id, '_wcpt_sponsor_first_name', true ) . ' ' . get_post_meta( $sponsor_id, '_wcpt_sponsor_last_name', true ),
'sponsor_rep_title' => '',
'agreement_date' => wp_date( $date_format ),
'wordcamp_location' => $wordcamp->meta['Location'][0],
'wordcamp_date' => ( $start_date !== $end_date ) ? "{$start_date} - {$end_date}" : $start_date,
'sponsorship_amount' => $sponsorship_amount,
'sponsorship_amount_num' => $sponsorship_amount_num,
'sponsorship_benefits' => '',
) );
?>
<style>
Expand Down

0 comments on commit 2b19ae8

Please sign in to comment.