- This topic has 3 replies, 2 voices, and was last updated 5 months, 1 week ago by .
I’m getting this:
Warning: strtolower() expects parameter 1 to be string, array given in [...]/wp-includes/formatting.php on line 2126
This happens when I register a relationship to multiple CPT’s and don’t hide the meta_box.
MB_Relationships_API::register([ 'id' => 'xxxx', 'from' => [ 'post_type' => 'cpt1', 'meta_box' => [ 'hidden' => true, ] ], 'to' => [ 'post_type' => ['cpt2','cpt3','cpt4','cpt5'], 'meta_box' => [ 'title' => 'xxxx', 'field_title' => 'xxxx', ], ], ]);
The warning disappears when I add
'hidden' => trueto the ‘to’ section, or when I use only one cpt in the second section.
- You must be logged in to reply to this topic.