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