Custom Fields
Re-Envisioned
Support MB Relationships Add meta data to field settings to identify as relationship field Reply To: Add meta data to field settings to identify as relationship field

#12208

Clayton Collie
Participant

After I found all object fields for a post object. I looped through each field and used this conditional to make sure I was grabbing a relationship field.

if ( 'post' === $field['type'] && strpos( $field['id'], '_to' ) !== false && strpos( $field['id'], '_from' ) !== false )