Skip to content

Commit ac1bfa7

Browse files
author
Chris Gårdenberg
committed
fix(List View): Use mb_stripos the right way when filtering for cities
1 parent 183cb49 commit ac1bfa7

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

PLUGIN-CHECKSUM

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e41efca472679a97afef5f905f1eda64
1+
7aa718b0dc544ce119e56f705a764880

content/template/listTemplate/list-courses.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
$found_city = false;
8181
foreach ( $object['Events'] as $ev ) {
82-
if ( mb_stripos( $filter_city, $ev['City'] ) !== false ) {
82+
if ( mb_stripos( $ev['City'], $filter_city ) !== false ) {
8383
$found_city = true;
8484
}
8585
}

content/template/listTemplate/list-events.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117

118118
if ( ! empty( $filter_city ) ) {
119119
$events = array_filter( $events, function( $object ) use ( &$filter_city ) {
120-
return mb_stripos( $filter_city, $object['City'] ) !== false;
120+
return mb_stripos( $object['City'], $filter_city ) !== false;
121121
} );
122122
}
123123

includes/edu-ajax-functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ function edu_api_listview_eventlist() {
314314

315315
if ( ! empty( $filter_city ) ) {
316316
$events = array_filter( $events, function( $object ) use ( &$filter_city ) {
317-
return mb_stripos( $filter_city, $object['City'] ) !== false;
317+
return mb_stripos( $object['City'], $filter_city ) !== false;
318318
} );
319319
}
320320

includes/edu-shortcodes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function eduadmin_get_detailinfo( $attributes ) {
272272

273273
$api_key = get_option( 'eduadmin-api-key' );
274274

275-
if ( ! $api_key || empty( $api_key ) ) {
275+
if ( empty( $api_key ) ) {
276276
EDU()->stop_timer( $t );
277277

278278
return 'Please complete the configuration: <a href="' . admin_url() . 'admin.php?page=eduadmin-settings">EduAdmin - Api Authentication</a>';

0 commit comments

Comments
 (0)