| @@ 34-41 (lines=8) @@ | ||
| 31 | $field_type_vars[ 'pod_types' ] = true; |
|
| 32 | ||
| 33 | // Only show supported field types |
|
| 34 | if ( true !== $field_type_vars[ 'pod_types' ] ) { |
|
| 35 | if ( empty( $field_type_vars[ 'pod_types' ] ) ) |
|
| 36 | continue; |
|
| 37 | elseif ( is_array( $field_type_vars[ 'pod_types' ] ) && !in_array( pods_var( 'type', $pod ), $field_type_vars[ 'pod_types' ] ) ) |
|
| 38 | continue; |
|
| 39 | elseif ( !is_array( $field_type_vars[ 'pod_types' ] ) && pods_var( 'type', $pod ) != $field_type_vars[ 'pod_types' ] ) |
|
| 40 | continue; |
|
| 41 | } |
|
| 42 | ||
| 43 | if ( !empty( PodsForm::$field_group ) ) { |
|
| 44 | if ( !isset( $field_types_select[ PodsForm::$field_group ] ) ) |
|
| @@ 1543-1550 (lines=8) @@ | ||
| 1540 | $options[ 'additional-field' ][ $type ] = array(); |
|
| 1541 | ||
| 1542 | // Only show supported field types |
|
| 1543 | if ( true !== $field_type_vars[ 'pod_types' ] ) { |
|
| 1544 | if ( empty( $field_type_vars[ 'pod_types' ] ) ) |
|
| 1545 | continue; |
|
| 1546 | elseif ( is_array( $field_type_vars[ 'pod_types' ] ) && !in_array( pods_var( 'type', $pod ), $field_type_vars[ 'pod_types' ] ) ) |
|
| 1547 | continue; |
|
| 1548 | elseif ( !is_array( $field_type_vars[ 'pod_types' ] ) && pods_var( 'type', $pod ) != $field_type_vars[ 'pod_types' ] ) |
|
| 1549 | continue; |
|
| 1550 | } |
|
| 1551 | ||
| 1552 | $options[ 'additional-field' ][ $type ] = PodsForm::ui_options( $type ); |
|
| 1553 | } |
|