|
@@ 1202-1206 (lines=5) @@
|
| 1199 |
|
|
| 1200 |
|
if ( in_array( 'fields', $include, true ) || empty( $include ) ) { |
| 1201 |
|
$type = isset( $data['field_type'] ) ? esc_attr( $data['field_type'] ) : ''; // can come from ajax |
| 1202 |
|
foreach ( $object['data']['fields'] as $key => $value ) { |
| 1203 |
|
if ( '' === $type || $type === $value['type'] ) { |
| 1204 |
|
$object_fields[ $key ] = $value; |
| 1205 |
|
} |
| 1206 |
|
} |
| 1207 |
|
$object_description['fields'] = $object_fields; |
| 1208 |
|
} |
| 1209 |
|
|
|
@@ 1242-1246 (lines=5) @@
|
| 1239 |
|
$object_fields = array(); |
| 1240 |
|
$type = isset( $data['type'] ) ? esc_attr( $data['type'] ) : ''; |
| 1241 |
|
$include_record_types = isset( $data['include_record_types'] ) ? esc_attr( $data['include_record_types'] ) : false; |
| 1242 |
|
foreach ( $object['data']['fields'] as $key => $value ) { |
| 1243 |
|
if ( '' === $type || $type === $value['type'] ) { |
| 1244 |
|
$object_fields[ $key ] = $value; |
| 1245 |
|
} |
| 1246 |
|
} |
| 1247 |
|
if ( true === $include_record_types ) { |
| 1248 |
|
$object_record_types = array(); |
| 1249 |
|
if ( isset( $object['data']['recordTypeInfos'] ) && count( $object['data']['recordTypeInfos'] ) > 1 ) { |