diff --git a/includes/core/classes/class-rest-api.php b/includes/core/classes/class-rest-api.php index 9a49a3f2e..3bedde8f3 100644 --- a/includes/core/classes/class-rest-api.php +++ b/includes/core/classes/class-rest-api.php @@ -523,7 +523,7 @@ public function events_list( WP_REST_Request $request ): WP_REST_Response { $params = $request->get_params(); $event_list_type = $params['event_list_type']; $max_number = $this->max_number( (int) $params['max_number'], 5 ); - $datetime_format = $params['datetime_format'] ?: 'D, M j, Y, g:i a T'; + $datetime_format = ! empty( $params['datetime_format'] ) ? $params['datetime_format'] : 'D, M j, Y, g:i a T'; $posts = array(); $topics = array(); $venues = array();