From 6fd4c083a3602ed4a8b4ca534d7ee2735125a777 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Thu, 1 Aug 2019 12:02:13 -0400 Subject: [PATCH] get pointsOfInterest route params into usable vars, include request --- setup/routes/pointsOfInterest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/setup/routes/pointsOfInterest.php b/setup/routes/pointsOfInterest.php index 53a7d1b..1beaa03 100644 --- a/setup/routes/pointsOfInterest.php +++ b/setup/routes/pointsOfInterest.php @@ -59,6 +59,18 @@ class GLMA_POI_Rest_Controller array( // endpoint for getting members 'methods' => WP_REST_Server::READABLE, 'callback' => function( $request ) { + + + $latMin = $this->params['latMin']; + $lastLatMin = $this->params['lastLatMin']; + $latMax = $this->params['latMax']; + $lastLatMax = $this->params['lastLatMax']; + $lonMin = $this->params['lonMin']; + $lastLonMin = $this->params['lastLonMin']; + $lonMax = $this->params['lonMax']; + $lastLonMax = $this->params['lastLonMax']; + + // Callback function can be a lot shorter. // You could just create a new model to get the results in an array // and use return rest_ensure_response( $data ); -- 2.17.1