• I came across a problem where the posts Custom taxonomy terms didn’t got copied to the created post at my Site Wide blog.

    I dug into the code of the plugin and found out that it uses wp_insert_post together with the tax_input element. Which turns out to be a problem when wordPress checks whether the user has permission via current_user_can(): to insert the taxonomy terms.

    The solution (as explained in the blog post) was to use the wp_set_object_terms function. In my case i added

    foreach( $post->tax_input as $tax => $term )
    			if( $term )
    				wp_set_object_terms( $p, $term, $tax );

    right beneath

    $p = wp_insert_post( $post );

    on line #437 .

    Maybe this should be updated for the plugin in general Ron ?

    http://wordpress.org/plugins/wordpress-mu-sitewide-tags/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Custom taxonomy bug (?)’ is closed to new replies.