Hi. I have created a User / Post Type Relationship using the code below.
I would like to be able to populate the select users list only with users having a certain role.
I have browsed the docs, tried using the query args, but to no prevail.
Any suggestions for what I like to achieve?
function stores_to_administrators()
{
MB_Relationships_API::register([
'id' => 'stores_to_administrators',
'from' => [
'object_type' => 'post',
'post_type' => 'store',
'empty_message' => 'No store selected',
'admin_column' => 'after title',
'field' => [
'max_clone' => 1,
],
],
'to' => [
'object_type' => 'user',
'field' => [
'max_clone' => 1,
],
],
'label_from' => 'Administrator',
'label_to' => 'Managed Store',
]);
}