Media Categories 1.6 BetaPosted: April 1, 2014
I am happy to see that so many people have found this plugin useful. I’ve had many feature requests, a couple code contributions, and plenty of bug reports. I appreciate it all.
It’s been over a year since there was an update to the Media Categories plugin, so I’ve been hard at work this past week adding a ton of new features. I’ve taken to heart as many feature requests and bug reports as I could handle.
Heres a detailed list of what you can expect in this new and improved version of Media Categories:
Improved Category Metabox: Filter terms as you type
Back in WordPress 3.4 and earlier, there were no metaboxes for taxonomy on attachments, so I had to roll my own fake metaboxes (“metafauxes”, I’ve started calling them). With the big push in WordPress 3.5 to improve the media modal, the need for that metafaux on the main editor page went away – but with it went one of everyone’s favorite features of this plugin. The “Searchable Categories” field, the input box that let users filter the categories that were showing, making the metabox easier to use.
In Media Categories 1.6, I’ve created a new set of custom metaboxes that bring back this feature! You can now type the name of the term your interested in and the list of terms in the metabox will filter as you type.
Drop-downs Filters in the Media Library & Media Modal
One of the most frequent feature requests made for this plugin has been the ability to filter items in the Media Library by taxonomy, just like you can on the Posts admin list. We’ll I’ve done that, so now you’ll have a separate drop-down for each taxonomy assigned to work with Media Categories.
Somewhat less frequent of a feature request, but still a great idea, has been to have the same ability to filter by taxonomy, but from within the Media Modal. This would be useful for obvious reasons to anyone with a large collection of images – especially for folks who’s website might happen to focus around imagery.
Media Categories 1.6 will include both of these new drop-down filters.
Sortable Columns in Media Library
Simple enhancement, but a frequent request. Click the header of the taxonomy columns to sort them by taxonomy. Not much to say about it except that getting it to work alongside the drop-down filters was pretty challenging.
Improved Media Modal “Metafauxes”
As I mentioned above, a metafaux is what I call a fake metabox – just a simplified version of the metabox meant to be used in places where the WordPress metabox framework doesn’t normally work. When WordPress 3.5 was released, it introduced the Media Modal/Media Manager. As a matter of chance, a bug was introduced. There was no way to distinguish between the media editor in sidebar of the Media Modal, and the main media editor in the Media Library. So my metafauxes were showing up in the modal, but they weren’t working.
I reported the bug, and they got it patched up quickly, but instead of taking out the metafauxes, I made them work – in the modal. However, they were kinda buggy.
I’ve fixed them up now, they look a little nicer, and they work a lot better – and just as before, they collapse to save space on the small modal sidebar, and you can filter as you type!
Gallery Shortcode Compatibility
To be honest, I should have known better. It was back in Media Categories 1.2 that I added the ability to select a taxonomy when using the “gallery” shortcode. This was very cool, and I think it became another big draw for people to use the plugin.
There was a terrible secret here though (thunder!), to make this work, I had to override the default WordPress shortcode (shreak!). This was bound to cause problems, and it did. I’ve received multiple reports of other plugins also interacting with the “gallery” shortcode, and when those plugins are on at the same time as this one – they don’t get along.
I figure most people dont have the conflicts (i think?) – so this plugin by default continues to modify the default “gallery” shortcode for the sake of not breaking people’s websites who already use it this way. However, it also creates a secondary shortcode called [media_gallery]
To stop the conflicts with other plugins, paste two line snippet of PHP into function.php file. This sets a property in the Media Categories object to false which stops my plugin from messing with the default gallery.
See the documentation for exact details on how this will work. I know its annoying that it requires code – but just you wait. An options page is coming.
Bulk Editing – its the one feature request that I really wanted to get into this release, but it turned out to me more work than I had time for. I’ll try to make this feature a top priority on the next major release.
Options/Settings Page – I want to eventually eliminate the need for people to drop lines of code into functions.php to control how this plugin works. I want this settings page to simply let users pick from a list of all available taxonomies, and select which ones should be made to work with attachments.
Code Cleanup/Refactor – Given that the scope of this plugin has changed, I also want to reevaluate how it is written. It is currently a lot clunkier than I’d like it to be.
This plugin was originally meant to only be a tool for developers, to let them easily turn on metaboxes and associate taxonomies with attachments. It’s become more than that, and the users aren’t all developers anymore. That said, I’ll keep intact the control developers already have. I’ll probably even make it so the settings page can be completely disabled by defining some property in functions.php
Can’t wait? Wanna help?
If you’d like to beta test the plugin, please do so. Its available in the master branch of its GitHub repository here: Media Categories 1.6 Beta
If you have a bug to report, I always prefer that you do so on GitHub Issues, since its so much better than the WordPress.org forums.