'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 ) ); ?>