Delete Empty Tags

Per this older post, I thought it might be useful to create a super basic plugin for deleting unused tags. This plugin adds a button to the admin Tags view enabling batch-deletion of tags that are not associated with any records. It only deletes the unused tags that are displayed on the current page (because that was easier). It’s not at all polished, but it does do what it says on the label and should be totally safe to use. As always, inspect code you find on the web, use your best judgment, and keep backups.

Repository

Feel free to submit improvements, fork it, etc.

Screenshot

Erin, could I use your idea and add it to my Admin Tools plugin? My plugin already allows deletion of empty tags, adding a button to the Tags page is an interesting extra…

Sure, that would be great. I haven’t tried out Admin Tools yet, but it looks really useful.

Great.

If you are planning to test the plugin Admin Tools, and you would like to add the button and function yourself as a pr, you’re more than welcome: I’ve seen your code is solid and neat too.

Here’s a link to the updated Admin Tools plugin:

1 Like