felixarntz / attachment-taxonomies

This plugin adds categories and tags to the WordPress media library - lightweight and developer-friendly.
https://wordpress.org/plugins/attachment-taxonomies/
GNU General Public License v3.0
29 stars 6 forks source link

Removing taxonomies added by other plugins (Polylang compatibility) #16

Closed tnottu closed 1 year ago

tnottu commented 6 years ago

I am using Polylang (Pro) to make my site multilingual. Polylang uses taxonomies to define the posts' language and to connect posts to their translations. These taxonomies are not selected by the user, as the plugin handles that under the hood.

Enabling the Attachment Taxonomies -plugin will make those Polylang-taxonomies visible in the attachment editing view. See the attached screenshot.

I tried removing the Polylang taxonomies from Attachment_Taxonomies-instance, but it didn't help.

Attachment_Taxonomies::instance()->remove_taxonomy( 'language' );
Attachment_Taxonomies::instance()->remove_taxonomy( 'post_translations' );

How could I remove those taxonomies from the Attachment_Taxonomies-instance and attachment edit screen?

attachment-taxonomies-w-polylang