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