attachment-taxonomies
attachment-taxonomies copied to clipboard
Removing taxonomies added by other plugins (Polylang compatibility)
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?