1
0
Fork 0
forked from lino/radar-wp

Add filter by country(code).

This commit is contained in:
ekes 2015-04-14 11:55:14 +02:00
parent cc1fc9a941
commit 4424f09f06
2 changed files with 5 additions and 2 deletions

View file

@ -53,7 +53,6 @@ function radar_client() {
function radar_filter($settings) {
$filter = new \Radar\Connect\Filter;
if (!empty($settings['city'])) {
$filter->addCity($settings['city']);
}
@ -61,6 +60,9 @@ function radar_filter($settings) {
$filter->addGroup($settings['group']);
}
if (!empty($settings['country'])) {
$filter->addCountry($settings['country']);
}
return $filter;
}

View file

@ -5,7 +5,7 @@
* Description: Provides widget and short code to display radar events.
* Plugin URI: http://radar.squat.net/
* Author: Ekes
* Version: 0.1.0-alpha1
* Version: 0.1.0-alpha2
* ================================================================== */
// TODO cron updating; and caching.
@ -29,6 +29,7 @@ function radar_shortcode_events($attributes, $content = '') {
'api_url' => 'https://new-radar.iskra.net/',
'max_count' => 5,
'city' => '',
'country' => '',
'group' => '',
'fields' => array(
'title',