'seatt_event', 'numberposts' => -1 ) ); // -1 = "nothing picked yet" (distinct from 0, the explicit "All // events" choice) — matches Chart Builder's "select an event // first" screen, so this page doesn't silently show combined // data across every event until that's actually chosen on purpose. $selected = isset( $_GET['event_id'] ) ? intval( $_GET['event_id'] ) : -1; // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only: chooses what to display if ( -1 === $selected ) { ?>

0 ? SEATT_DB::get_seat_occupancy( $selected ) : null; $seat_total = $occupancy ? array_sum( $occupancy ) : 0; $trend_rev = array_sum( array_map( fn( $d ) => $d->revenue, $trend ) ); ?>

revenue ) ); ?>
paid_bookings ); ?>
tickets_sold ); ?>
avg_order ) ) ); ?>
%

0 ? SEATT_DB::get_seat_map( $selected ) : array(); if ( $seat_map ) : ?>

$row ) { $slices[] = array( 'label' => $row->label . ' (' . (int) $row->qty . ')', 'value' => (float) $row->revenue, 'color' => SEATT_Charts::color( $i ), 'note' => seatt_format_price( $row->revenue ), ); } echo wp_kses( SEATT_Charts::donut( $slices, (string) $summary->tickets_sold, __( 'tickets', 'seathive' ) ), SEATT_Charts::allowed_html() ); endif; ?>

__( 'Paid', 'seathive' ), 'value' => $statuses['paid'], 'color' => '#00a32a' ), array( 'label' => __( 'Pending', 'seathive' ), 'value' => $statuses['pending_payment'], 'color' => '#dba617' ), array( 'label' => __( 'Cancelled', 'seathive' ), 'value' => $statuses['cancelled'], 'color' => '#d63638' ), ), (string) $all_bookings, __( 'bookings', 'seathive' ) ), SEATT_Charts::allowed_html() ); endif; ?>

__( 'Sold', 'seathive' ), 'value' => $occupancy['sold'], 'color' => '#2271b1' ), array( 'label' => __( 'On hold', 'seathive' ), 'value' => $occupancy['held'], 'color' => '#dba617' ), array( 'label' => __( 'Available', 'seathive' ), 'value' => $occupancy['available'], 'color' => '#c3c4c7' ), ), round( $occupancy['sold'] / $seat_total * 100 ) . '%', __( 'filled', 'seathive' ) ), SEATT_Charts::allowed_html() ); ?>

label ); ?> qty ); ?> revenue ) ); ?>