Hi,
Why the relationship field ignores the "max_clone" setting?
"+ Add" button and drag/sort handle still there.
Maybe some other settings needs to be specified?
add_action( 'mb_relationships_init', 'tickets_to_event_relationship' );
function tickets_to_event_relationship() {
MB_Relationships_API::register( [
'id' => 'tickets-to-event',
'from' => [
'object_type' => 'post',
'post_type' => 'ticket',
'meta_box' => [
'context' => 'normal',
'priority' => 'high',
],
],
'to' => [
'object_type' => 'post',
'post_type' => 'poster',
'meta_box' => [
'context' => 'normal',
'priority' => 'high',
'closed' => true,
],
'field' => [
<strong>'max_clone' => '1',</strong>
'required' => true,
],
],
] );
}