ssj_costy
Forum Replies Created
-
There’s one more problem I’ve noticed: I have some other taxonomies in my website, and I created a media category library with the same name as one of the terms from another taxonomy, and what I noticed is that it doesn’t create a new one, but it just uses the same term from the other taxonomy. So if at one point I want to change its name, it will change in my other taxonomy as well.
Thanks for doing this ??Yeah, so that problem is definitely because of how wp_set_object_terms is used. I’ve made changes on my local version of the plugin and I changed 3 lines of code for this:
the original lines:
435: array_push($terms, $term->name);
638: array_push($terms, $bulkterm->name);
643: array_push($terms, $ct->name);I changed them to:
435: array_push($terms, intval($term->term_id));
638: array_push($terms, intval($bulkterm->term_id));
643: array_push($terms, intval($ct->term_id));It works now
Hey, you did a pretty nice job with this. The incompatibility with ACF image fields was giving me a lot of trouble, but now it’s great.
Anyway, I also have a feature request: try to make it possible to have media categories with the same name, but at different levels in the hierarchy.
Something like:
Category 1
-Test
Category 2
-TestRight now you can add the media categories like that, but when you want to add images to them, they always get added to the first category, even if you choose the second one.
I think it might be because of the way the function wp_set_object_terms is used. I noticed that the $terms parameter that is sent is an array with the names of the categories, instead of their IDs or slugs.
Keep up the good work.
Cheers!
Ah, stupid me. It was applying the class align-right or align-left instead of the wordpress default alignright or alignleft. I just needed to add those classes to css too. ??