Shout out of the night: Nacin

This afternoon I did a terrible, terrible thing. I upgraded to WordPress 3.0.2 without backing up anything. There were two key things I did not realize. Which totally screwed me over:

  1. When editing your child themes in wp-admin (not via FTP, not locally), the directory on the right also lists files from the parent theme. When you edit those files (even if the child theme is selected in the dropdown), you're really editing the parent theme files.
  2. When you upgrade to 3.0.2, the Twenty Ten theme reverts back to default settings.

What does this mean? I edited files from the parent theme, then deleted those changes when I upgraded. And because this was a project for work (not just leisurely fun), I panicked.

Thankfully, the second time around I was able to code everything much more quickly and efficiently, but I won't make that mistake again thanks to WordPress core developer Andrew Nacin's latest commits:

When editing a child theme, there's no way to know whether you're editing a parent theme file or a child theme file. This could be disastrous, as you could later lose your changes on an update of Twenty Ten when you thought you were doing everything right.

A little warning just above the Save Changes button should be enough as a sanity check until we can more thoroughly overhaul the theme editor in potentially 3.2.

With 3.1, you'll get a warning if you're editing the parent theme of the current theme and you won't even be able to access those files unless you manually select that theme from the dropdown (as shown in the screenshot above).

So thanks, Nacin, for rockin' my Friday night.