It seems like only a couple of days ago that I was muttering about how WordPress 3.5 had stopped inserting the title attribute of images inserted into posts. While this was only a minor inconvenience, it irritated me enough to (a) moan about it and (b) try to change it.
I’d done a fair amount of reading, which led me to believe that a simple function (and it would have to be simple, given my coding skill level) should be able to do what I needed. One of the great things about WordPress is that it’s designed to be fiddled with. It offers numerous “hooks” and “filters”, which, put in the basic terms that a non-programmer like me can understand, allow you to change almost everything it does. Want to insert some extra text? Want to stop something displaying? Chances are that there’s a hook or filter you can use.
In this particular case, it seemed that what I needed to play with was the
filter. And after much googling, and much trial, and and even more error, I came up with a function that does exactly what I needed. As I didn’t want to break things, rather than adding it to my general purpose Functionality plugin, I created it as a shiny new plugin all to itself. And sure enough, with this plugin activated, when I insert an image, the title attribute is inserted. This ensures that the tooltip appears, and lightbox plugins no longer get confused.
It’s such a short and simple thing, that I can include the whole of it here:
Download the plugin from the WordPress Plugin Directory
This has only been tested on my own sites, where it didn’t appear to break anything. Use at your own risk. If you happen to be a real programmer, you may point and laugh as much as seems appropriate. Or if you’re a real programmer and you have advice or suggestions to improve what I’ve done, I’d be happy to receive them.
 Probably because it was
 It would have to be, for reasons previously mentioned