As always, let me start by commending you for an amazing plug-in.
After upgrading from WordPress 3.4.2 and CPT-onomies 1.1 to WordPress 3.5 and CPT-onomies 1.2, I received an error from line 1450 of cpt-onomy.php when doing the following:
$postid = 12345; //my post number $terms = 'test'; $cpt_onomy->wp_set_object_terms( $postid, $terms, 'testcategory', FALSE );
This worked fine prior to upgrading.
After reviewing cpt-onomy.php, I created $terms_arr as an array and loaded it with $terms. This worked fine. Here is my new code:
$postid = 12345; //my post number $terms = 'test'; $terms_arr = array( $terms ); $cpt_onomy->wp_set_object_terms( $postid, $terms_arr, 'testcategory', FALSE );
Is this the way it is now intended to work? Or, perhaps, am I overlooking something?
Thanks, Rachel, for all you do!
- The topic ‘Does wp_set_object_terms() requires $terms to be an array’ is closed to new replies.