' . esc_html( (string) ( $ev['title'] ?? '' ) ) . '
'; $html .= ''; if ( ! empty( $ev['summary'] ) ) { $html .= '' . esc_html( (string) $ev['summary'] ) . '
'; } foreach ( is_array( $ev['registration_types'] ?? null ) ? $ev['registration_types'] : [] as $tp ) { if ( ! is_array( $tp ) ) { continue; } $amount = (float) ( $tp['amount'] ?? 0 ); $price = $amount > 0 ? number_format_i18n( $amount, 2 ) . ' ' . (string) ( $tp['currency'] ?? 'EUR' ) : _x( 'free', 'the price of a registration type', 'vimine' ); $left = ''; if ( isset( $tp['remaining'] ) ) { $n = (int) $tp['remaining']; $left = sprintf( /* translators: %d: how many places are left */ _n( '%d place left', '%d places left', $n, 'vimine' ), $n ); } $html .= '' . esc_html( (string) ( $tp['name'] ?? '' ) . ' · ' . $price ) . '' . esc_html( $left ) . '
';
}
if ( ( $ev['status'] ?? '' ) === 'published' ) {
$html .= '' . esc_html__( 'Register', 'vimine' ) . '';
}
$html .= '