| @@ 87-89 (lines=3) @@ | ||
| 84 | $args['DTT_EVT_start'] = new DateTime(sanitize_text_field($input['startDate'])); |
|
| 85 | } |
|
| 86 | ||
| 87 | if (! empty($input['tickets'])) { |
|
| 88 | $args['tickets'] = array_map('sanitize_text_field', (array) $input['tickets']); |
|
| 89 | } |
|
| 90 | ||
| 91 | return $args; |
|
| 92 | } |
|
| @@ 41-43 (lines=3) @@ | ||
| 38 | { |
|
| 39 | $args = []; |
|
| 40 | ||
| 41 | if (! empty($input['datetimes'])) { |
|
| 42 | $args['datetimes'] = array_map('sanitize_text_field', (array) $input['datetimes']); |
|
| 43 | } |
|
| 44 | ||
| 45 | if (! empty($input['description'])) { |
|
| 46 | $args['TKT_description'] = sanitize_text_field($input['description']); |
|
| @@ 94-96 (lines=3) @@ | ||
| 91 | $args['TKT_price'] = (float) $input['price']; |
|
| 92 | } |
|
| 93 | ||
| 94 | if (! empty($input['prices'])) { |
|
| 95 | $args['prices'] = array_map('sanitize_text_field', (array) $input['prices']); |
|
| 96 | } |
|
| 97 | ||
| 98 | if (array_key_exists('quantity', $input)) { |
|
| 99 | $args['TKT_qty'] = (int) $input['quantity']; |
|