WordPress as CMS – Mass Editing

By Sol in Lab

I spent yesterday creating the interface to perform mass operations (i.e. operations on multiple items at once), and today I started adding some functionality. I’ve just started, and the code is pretty messy ATM, but here’s what I’ve got so far:

  • Move Items – Select the items you want to move, choose the section you want to move them to, and specify which item they’ll be inserted after (only applies to sections as posts do not have a menu order), and submit the form. Simple and quick.
  • Delete Items – Select the items you want to delete and check the option to “Delete Selected” and submit. All selected items will be deleted. Currently, all child items of any deleted items are moved to the next available parent section (meaning it checks to make sure the parent section isn’t also being deleted), but I’m thinking about adding an option to delete all the children items (sections and posts) of a section that has been deleted. It wouldn’t be too hard as I’ve already built a helper function that gets all the child items (regardless of depth) for a given section, so maybe I’ll add the option just for kicks.

Here’s a shot of the interface (temporary icons by famfamfam):

Content Listing

Mass Editing UI

It’s not a long list, but it’s a pretty significant list to me because these were two main administrative features that I felt were necessary for me to consider this plugin useful. I still have to work on optimizing the code, but I’m glad to have gotten this functionality into the plugin.

I’ll be honest though– these features were only added to provide a baseline level of functionality on a temporary basis. While it technically is usable, I don’t know if I would rank it high in usability. I would really love to move items around simply by dragging/dropping them. Also, I’m not really fond of having to go the post edit form every time I want to modify a minor detail of a post/section (i.e. title, parent section, status, etc.), so providing functionality for mass editing of those details is on the to-do list as well. I’ve got a couple more things I’d like to add as well, but I best not get too far ahead of myself 🙂