Mass edit mode on WordPress

So that nobody else has to spend an hour trying to track this down, I thought I’d share the accumulated wisdom.

As discussed here, the mass delete feature on WordPress is not quite as wonderful as it first appears. Turns out, however, that if you set

register_globals = On

in php.ini, it works fine.

Fine, that is, except that register_globals is evil, and should not be turned on on any server that actually wants to be secure. Hopefully I’ll have a patch to remove this neessity in the next little bit. I’m slightly hampered by the fact that I don’t actually know PHP.



Ok, here’s the patch:

< if (!empty($delete_comments)) {

> if (!empty($_POST[‘delete_comments’])) {
< $del_comments = ”; $safe_delete_commeents = ”; $i = 0;
< foreach ($delete_comments as $comment) { // Check the permissions on each

> $i = 0;
> foreach ($_POST[‘delete_comments’] as $comment) { // Check the permissions on each