filters are sorted
This commit is contained in:
@@ -151,6 +151,8 @@ function mp_fill_fields_value($id) {
|
||||
$event = (object)[];
|
||||
foreach($fields as $field) {
|
||||
$value = get_field($field, $id);
|
||||
if (gettype($value) == "string")
|
||||
$value = trim($value, " ");
|
||||
$event->$field = $value;
|
||||
}
|
||||
|
||||
@@ -169,7 +171,7 @@ function mp_get_published_events() {
|
||||
foreach ($posts_list as $post) {
|
||||
$event = mp_fill_fields_value($post->ID);
|
||||
$event->id = $post->ID;
|
||||
$event->title = $post->post_title;
|
||||
$event->title = trim($post->post_title, " ");
|
||||
array_push($events, $event);
|
||||
}
|
||||
mp_console_log("events:");
|
||||
|
||||
Reference in New Issue
Block a user