From 7b2acc35a03cec9928e9ce86c9a3195429ccd306 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 1 Apr 2021 19:47:09 +0200 Subject: Move rendering of concert assignment table. Moved it to the admin page for now. May move it further to a partial or something later. There's quite a bit of cleanup needed. It still refers to some utility functions in the old shortcode module. --- includes/venue.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'includes/venue.php') diff --git a/includes/venue.php b/includes/venue.php index 8edb136..de144fd 100644 --- a/includes/venue.php +++ b/includes/venue.php @@ -48,5 +48,15 @@ if ( !class_exists('GiglogAdmin_Venue') ) { return array_map(function ($r) { return $r->wpgvenue_city; }, $results); } + + static function venues_in_city($city) + { + global $wpdb; + $q = $wpdb->prepare( + "select id, wpgvenue_name from wpg_venues where wpgvenue_city=?", $city); + $results = $wpdb->get_results($q); + + return array_map(function ($r) { return [$r->id, $r->wpgvenue_name]; }, $results); + } } } -- cgit v1.2.3