array( 'type' => 'array' ), 'ticketable_post_types' => array( 'type' => 'array' ), 'commerce_enabled' => array( 'type' => 'boolean' ), 'plus_active' => array( 'type' => 'boolean' ), ); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } protected function run( array $input ) { $providers = Ticket_Repository::providers(); $ticketable = Ticket_Repository::ticketable_post_types(); return array( 'providers' => $providers, 'ticketable_post_types' => $ticketable, 'commerce_enabled' => Event_Tickets_Guard::commerce_enabled(), 'plus_active' => Event_Tickets_Guard::plus_active(), 'message' => sprintf( /* translators: 1: number of providers, 2: comma-separated post types */ __( '%1$d provider(s). Tickets can be attached to: %2$s.', 'acrossai-abilities-manager' ), count( $providers ), implode( ', ', $ticketable ) ), ); } }