Just out of curiosity and to be certain, before I request an export of your taxonomy settings so I can try to recreate, can you try without setting the meta_box_cb and see if it works afterwards?
That said, I’m curious why you’re trying to pass a categories based callback function name for a non-hierarchical taxonomy. Those taxonomy types are equivalent to the post tags, where you just type in the terms to associate.
Regarding any attempts to prevent, that is feeling fairly open ended and difficult to prevent since pretty much anything could be passed in for the callback name, and we’d have zero way to know what is being done with it, for what purposes, etc.
Thread Starter
MM_wp
(@mm_wp)
1. Without the meta_box_cb it all works as expected
2. I added that setting because it was better for me to have the list of checkbox to select rather than the “type in” metabox. It works without problems in the edit page, but breaks in the quick edit where the “type in” is showed and obv fails the validation.
3. To prevent: IMO a notice that says “non-hierarchical taxonomies can’t be used in Quick Edit with post_categories_meta_box callback” would be nice.
If you set the taxonomy to be hierarchical, you’ll get the checkbox version by default without having to set custom metabox callbacks and it’d work just fine in quick edit. Any specific reasons you need it to be non-hierarchical? Or is that just an unrealized detail?
Can’t say I have seen a bunch of people trying to pass the callback for non-hierarchical taxonomies, so I’m not too high on the idea of adding that specific of a note to the admin UI.
Thread Starter
MM_wp
(@mm_wp)
Whatever man, thanks for the replies and have a nice day.