Event_Modifier::add_event_data_to_sample( array $data, TECTickets_Wallet_PlusPassesApple_WalletPass $pass )
Add event data to sample Apple Wallet pass.
Contents
Parameters
- $data
-
(array) (Required) The Apple Pass data.
- $pass
-
(TECTickets_Wallet_PlusPassesApple_WalletPass) (Required) The Apple Pass object.
Return
(array)
Source
File: src/Events/Integrations/Plugins/Tickets_Wallet_Plus/Passes/Apple_Wallet/Event_Modifier.php
public function add_event_data_to_sample( array $data, Pass $pass ) {
// Add the event title.
$data['secondary'][] = [
'key' => 'event_title',
'label' => esc_html__( 'Event', 'the-events-calendar' ),
'value' => esc_html__( 'Arts in the Park', 'the-events-calendar' ),
];
// Add the event start date.
$data['secondary'][] = [
'dateStyle' => 'PKDateStyleMedium',
'isRelative' => true,
'key' => 'event_start_date',
'label' => esc_html__( 'Date', 'the-events-calendar' ),
'timeStyle' => 'PKDateStyleShort',
'value' => gmdate( 'Y-m-d\TH:iP' ),
];
// Add the event venue.
$data['auxiliary'][] = [
'key' => 'event_venue',
'label' => esc_html__( 'Venue', 'the-events-calendar' ),
'value' => esc_html__( 'Central Park', 'the-events-calendar' ),
];
return $data;
}
Changelog
| Version | Description |
|---|---|
| 6.2.8 | Introduced. |