- This topic has 5 replies, 2 voices, and was last updated 6 days, 2 hours ago by .
-
Topic
-
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', ]); }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- You must be logged in to reply to this topic.