Conditions | 4 |
Paths | 8 |
Total Lines | 21 |
Lines | 21 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
21 | public static function prepareFields(array $input, $mutation_name) |
||
22 | { |
||
23 | |||
24 | $args = []; |
||
25 | |||
26 | if (! empty($input['name'])) { |
||
27 | $args['EVT_name'] = sanitize_text_field($input['name']); |
||
28 | } |
||
29 | |||
30 | if (! empty($input['desc'])) { |
||
31 | $args['EVT_desc'] = sanitize_text_field($input['desc']); |
||
32 | } |
||
33 | |||
34 | if (! empty($input['shortDesc'])) { |
||
35 | $args['EVT_short_desc'] = sanitize_text_field($input['shortDesc']); |
||
36 | } |
||
37 | |||
38 | // Likewise the other fields... |
||
39 | |||
40 | return $args; |
||
41 | } |
||
42 | } |
||
43 |