Skip to content

Commit

Permalink
erge branch 'release/G22.iguanodon' of github.com:the-events-calendar…
Browse files Browse the repository at this point in the history
…/event-tickets into release/G22.iguanodon
  • Loading branch information
bordoni committed Jan 19, 2022
2 parents 3b176cd + 5f60a05 commit 00a7c2f
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions src/admin-views/editor/list-row.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?php
$provider = $ticket->provider_class;
$provider_obj = Tribe__Tickets__Tickets::get_ticket_provider_instance( $provider );
$inventory = $ticket->inventory();
$available = $ticket->available();
$capacity = $ticket->capacity();
$stock = $ticket->stock();
$needs_warning = false;
$stk_warning = false;
$mode = $ticket->global_stock_mode();
$event = $ticket->get_event();
$provider = $ticket->provider_class;
$provider_obj = Tribe__Tickets__Tickets::get_ticket_provider_instance( $provider );
$inventory = $ticket->inventory();
$available = $ticket->available();
$capacity = $ticket->capacity();
$stock = $ticket->stock();
$needs_warning = false;
$stk_warning = false;
$mode = $ticket->global_stock_mode();
$event = $ticket->get_event();
$show_duplicate_button = ! function_exists( 'tribe_is_community_edit_event_page' ) || ! tribe_is_community_edit_event_page();

// If we don't have an event we shouldn't even continue
if ( ! $event ) {
Expand Down Expand Up @@ -120,18 +121,20 @@ class="tribe-ticket-field-order"
esc_html( $ticket->name )
);

printf(
"<button data-provider='%s' data-ticket-id='%s' title='%s' class='ticket_duplicate'><span class='ticket_duplicate_text'>%s</span></a>",
esc_attr( $ticket->provider_class ),
esc_attr( $ticket->ID ),
esc_attr( sprintf(
// Translators: %s: dynamic "ticket" text, %d: ticket ID #.
_x( 'Duplicate %s ID: %d', 'ticket ID title attribute', 'event-tickets' ),
tribe_get_ticket_label_singular( 'ticket_id_title_attribute' ),
$ticket->ID
) ),
esc_html( $ticket->name )
);
if ( $show_duplicate_button ) {
printf(
"<button data-provider='%s' data-ticket-id='%s' title='%s' class='ticket_duplicate'><span class='ticket_duplicate_text'>%s</span></a>",
esc_attr($ticket->provider_class),
esc_attr($ticket->ID),
esc_attr(sprintf(
// Translators: %s: dynamic "ticket" text, %d: ticket ID #.
_x('Duplicate %s ID: %d', 'ticket ID title attribute', 'event-tickets'),
tribe_get_ticket_label_singular('ticket_id_title_attribute'),
$ticket->ID
)),
esc_html($ticket->name)
);
}

printf(
"<button attr-provider='%s' attr-ticket-id='%s' title='%s' class='ticket_delete'><span class='ticket_delete_text'>%s</span></a>",
Expand Down

0 comments on commit 00a7c2f

Please sign in to comment.