Created
September 6, 2023 07:31
-
-
Save rilwis/5bdf07c530206e5ab374f69cdbb5e7d0 to your computer and use it in GitHub Desktop.
MB Relationships: change field type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'mb_relationships_init', function () { | |
MB_Relationships_API::register( [ | |
'id' => 'users_to_posts', | |
'from' => [ | |
'object_type' => 'user', | |
'field' => [ | |
'field_type' => 'checkbox_list', | |
], | |
], | |
'to' => [ | |
'object_type' => 'post', | |
'field' => [ | |
'field_type' => 'radio', | |
], | |
], | |
] ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment