Tell us what you are trying to do?
I am trying to get a list of all Relationships in which a certain post type is in.
Is there any documentation that you are following?
I was hoping the Toolset Relationship API had a method for this, but apparently not.
---
1. Post Types (unfortunately?) are managed with ACF
2. Relationships are managed with Toolset (all M2Ms)
3. I need to retrieve ideally the slug of all relationships in which each post type is used in. See example below of a ideal dummy function:
I am pretty sure I miss something since such an operation I imagine is used often - for example, in Toolsets backend (but only if the post types are managed with Toolset) one can see a list of relationships in which this specific post type is...)
For example:
// If there is a relationship appointment between "Doctor" and "Patient" post types we use the following
toolset_get_related_post_types( 'parent', 'patient' );
// This will return array( 'doctor' => array( 'appointment' ) )
Right - but that does not get me all relationships in which the post type is
So I need to know ahead which relationship I query, as opposed to the toolset_get_relationships() (undocumented) function which gives them all by post type (and role of post type).
Do you think it is a high risk this function changes in future?
Well - I can not guarantee about the function that is not added to post-relationship API doc which is publicly available. If you see that function within Toolset plugin source and want to use it, you will have to use it at your own risk as I do not have any ETA or any commitment that it will have any change it future or not.